Reset "inited" in the unsync mode so as to avoid expensive atomic operation by
[charm.git] / NodeHelper.C
index 041cf75ab1377d26cb9d10fc84084a2226369d56..d328608ddce2c54529707faf6557a938399cd30b 100644 (file)
@@ -73,10 +73,8 @@ void FuncNodeHelper::parallelizeFunc(HelperFn func, int paramNum, void * param,
        curLoop->stealWork();
        TRACE_BRACKET(20);
        
-       if(!sync) return;
-
        TRACE_START(21);                
-       curLoop->waitLoopDone();
+       curLoop->waitLoopDone(sync);
        TRACE_BRACKET(21);        
 
     if (type!=NODEHELPER_NONE)