Salome HOME
Merge branch 'master' of https://codev-tuleap.cea.fr/plugins/git/salome/yacs
[modules/yacs.git] / src / engine / PlayGround.cxx
index f28047937e3d563cc4a8445909fbc500ded85041..de89ba4c181a20d0921194e0ffa9bc4d40ce65a2 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2006-2017  CEA/DEN, EDF R&D
+// Copyright (C) 2006-2019  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -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
         {