Salome HOME
[EDF15946] bug with playground when nb of cores is small
[modules/yacs.git] / src / engine / PlayGround.cxx
index f28047937e3d563cc4a8445909fbc500ded85041..883a8b6d1fe230efd1b212e7107aa0cb59580848 100644 (file)
@@ -266,7 +266,7 @@ std::vector< std::vector<int> > PlayGround::splitIntoParts(const std::vector<int
         }
       else if (!(*it).first->hasValidLoopWeight())
         {
-          nbOfCoresAllocated[i]=(int)((double)totalSpace/(double)(sz)); // branch with undefined weight
+          nbOfCoresAllocated[i]=std::max((int)((double)totalSpace/(double)(sz)), nbCoresPerShot[i]); // branch with undefined weight, takes his part proportionnally to the number of branchs
         }
       else
         {