Salome HOME
Fix on the previous commit for workload manager.
authorOvidiu Mircescu <ovidiu.mircescu@edf.fr>
Mon, 4 May 2020 15:06:04 +0000 (17:06 +0200)
committerOvidiu Mircescu <ovidiu.mircescu@edf.fr>
Mon, 4 May 2020 15:06:04 +0000 (17:06 +0200)
src/engine/Executor.cxx
src/engine_swig/ExecutorSwig.cxx
src/workloadmanager/Test/TestMain.cxx
src/yacsloader_swig/Test/testSaveLoadRun.py

index e79afb4c27929fd53848bed7a290100e9638267f..1a3bb64dda70e5d8b2ea740d422ee2c8de924b8a 100644 (file)
@@ -1703,7 +1703,7 @@ NewTask::NewTask(Executor& executor, YACS::ENGINE::Task* yacsTask)
 , _yacsTask(yacsTask)
 {
   Container * yacsContainer = yacsTask->getContainer();
-  if(yacsContainer != nullptr && !yacsTask->canAcceptImposedResource())
+  if(yacsContainer != nullptr && yacsTask->canAcceptImposedResource())
   {
     _type.ignoreResources = false;
     _type.name = yacsContainer->getName();
index a0536e1e8e8b7dfc3cc1ab2b78dcaec8b0f9f9ca..9c1eb4235ae7f0191ed2812bfb5e1470798298cf 100644 (file)
@@ -37,7 +37,7 @@ void ExecutorSwig::RunPy(Scheduler *graph,int debug, bool isPyThread, bool froms
   if (isPyThread) _save = PyEval_SaveThread(); // allow Python threads when embedded in a Python thread
   try
     {
-      RunB(graph, debug, fromscratch);
+      RunW(graph, debug, fromscratch);
     }
   catch (YACS::Exception& e)
     {
index e1bb76c56fd658420910347f6a6b4413ba230b91..daf621e1458ad9e8488580447d5dce676edf217d 100644 (file)
@@ -179,6 +179,14 @@ public:
   void btest(); // ignore resources
 };
 
+/**
+ * General test with 150 tasks of 3 types:
+ *   - 50 tasks which need 4 cores for 2s each
+ *   - 50 tasks which need 1 core for 1s each
+ *   - 50 tasks which need no core but take 2s each
+ * We use 2 resources: 10 cores and 18 cores
+ * We verify the global time of execution.
+ */
 void MyTest::atest()
 {
   constexpr std::size_t resourcesNumber = 2;
@@ -266,6 +274,10 @@ void MyTest::atest()
 
 }
 
+/**
+ * Test the case of tasks which need no resources and can be run whithout
+ * waiting.
+ */
 void MyTest::btest()
 {
   Checker<1, 1> check;
index 734de057a4cd8add2bb953691d4a19fcd3ddabfe..6ea538cb95af41dab12e144abe2625fba142baf3 100755 (executable)
@@ -1391,7 +1391,6 @@ assert(my_dpl_localization[0][1]>=0 and my_dpl_localization[0][1]<3)
     ex.RunW(p,0)
     self.assertEqual(p.getState(),pilot.DONE)
 
-    self.skipTest("Skip HPContainertest")
     # run remote
     p=l.load(fname)
     pg=pilot.PlayGround()