Modify GraphChiContext to have a method finishComputation(), which sets some flag. Then modify GraphChiEngine.java, ajd add o n line 281:   if (chiContext.hasFinished()) then break;