]> SALOME platform Git repositories - modules/yacs.git/commitdiff
Salome HOME
Merge branch 'master' of https://git.salome-platform.org/git/modules/yacs
authorAnthony Geay <anthony.geay@edf.fr>
Wed, 8 Apr 2015 10:06:40 +0000 (12:06 +0200)
committerAnthony Geay <anthony.geay@edf.fr>
Wed, 8 Apr 2015 10:06:40 +0000 (12:06 +0200)
src/engine/Executor.cxx
src/runtime/PythonPorts.cxx
src/yacsloader_swig/Test/YacsLoaderInSessionTest.sh.in
src/yacsloader_swig/Test/testEdit.py [changed mode: 0644->0755]
src/yacsloader_swig/Test/testExec.py [changed mode: 0644->0755]
src/yacsloader_swig/Test/testLoader.py [changed mode: 0644->0755]
src/yacsloader_swig/Test/testRefcount.py [changed mode: 0644->0755]
src/yacsloader_swig/Test/testResume.py [changed mode: 0644->0755]
src/yacsloader_swig/Test/testSave.py [changed mode: 0644->0755]
src/yacsloader_swig/Test/testSaveLoadRun.py [changed mode: 0644->0755]

index a36b45531a0504354d63939aa277b872845eb123..daa578be6bec8f1f1356f114175a126852ea49d9 100644 (file)
@@ -364,7 +364,10 @@ void Executor::RunB(Scheduler *graph,int debug, bool fromScratch)
     {
       saveState(_dumpErrorFile);
     }
-  _trace.close();
+  {
+    YACS::BASES::AutoLocker<YACS::BASES::Mutex> alck(&_mutexForTrace);
+    _trace.close();
+  }
   DEBTRACE("End of RunB thread");  
 }
 
@@ -994,6 +997,8 @@ void Executor::launchTask(Task *task)
   DEBTRACE("before _semForMaxThreads.wait " << _semThreadCnt);
   if(_semThreadCnt == 0)
     {
+      // --- Critical section
+      YACS::BASES::AutoLocker<YACS::BASES::Mutex> alck(&_mutexForSchedulerUpdate);
       //check if we have enough threads to run
       std::set<Task*> tmpSet=_runningTasks;
       std::set<Task*>::iterator it = tmpSet.begin();
@@ -1019,6 +1024,7 @@ void Executor::launchTask(Task *task)
           std::cerr << "WARNING: maybe you need more threads to run your schema (current value="<< _maxThreads << ")" << std::endl;
           std::cerr << "If it is the case, set the YACS_MAX_THREADS environment variable to a bigger value (export YACS_MAX_THREADS=xxx)" << std::endl;
         }
+      // --- End of critical section
     }
 
   _semForMaxThreads.wait();
index 9e7f817e791913be91526b3dfb747f2df0c373bc..4d25d1f09b534c27e40c2f8fe1ca664ef024024c 100644 (file)
@@ -283,6 +283,7 @@ OutputPyPort::~OutputPyPort()
 OutputPyPort::OutputPyPort(const OutputPyPort& other, Node *newHelder):OutputPort(other,newHelder),DataPort(other,newHelder),Port(other,newHelder),
                                                                        _data(Py_None)
 {
+  Py_INCREF(_data);
 }
 
 void OutputPyPort::put(const void *data) throw(ConversionException)
index ce5f16be6d4d4f042dd46cd2af10f1951e7203fc..0229f6d41d67537f78dcd8833b7e60e45c985b2b 100644 (file)
@@ -39,7 +39,6 @@ export PYTHONPATH=@CMAKE_BINARY_DIR@/src/engine_swig:$PYTHONPATH
 export PYTHONPATH=@CMAKE_CURRENT_SOURCE_DIR@:$PYTHONPATH
 export PYTHONPATH=@CMAKE_SOURCE_DIR@/src/yacsloader/Test:$PYTHONPATH
 
-chmod +x @CMAKE_CURRENT_SOURCE_DIR@/testExec.py
 python  @CMAKE_CURRENT_SOURCE_DIR@/testExec.py
 ret0=$?
 if [ $ret0 -gt 0 ]; then
@@ -47,7 +46,6 @@ if [ $ret0 -gt 0 ]; then
   exit $ret0
 fi
 
-chmod +x @CMAKE_CURRENT_SOURCE_DIR@/testResume.py
 python  @CMAKE_CURRENT_SOURCE_DIR@/testResume.py
 ret1=$?
 if [ $ret1 -gt 0 ]; then
@@ -55,7 +53,6 @@ if [ $ret1 -gt 0 ]; then
   exit $ret1
 fi
 
-chmod +x @CMAKE_CURRENT_SOURCE_DIR@/testLoader.py
 python  @CMAKE_CURRENT_SOURCE_DIR@/testLoader.py
 ret2=$?
 if [ $ret2 -gt 0 ]; then
@@ -63,7 +60,6 @@ if [ $ret2 -gt 0 ]; then
   exit $ret2
 fi
 
-chmod +x @CMAKE_CURRENT_SOURCE_DIR@/testEdit.py
 python  @CMAKE_CURRENT_SOURCE_DIR@/testEdit.py
 ret3=$?
 if [ $ret3 -gt 0 ]; then
@@ -71,7 +67,6 @@ if [ $ret3 -gt 0 ]; then
   exit $ret3
 fi
 
-chmod +x @CMAKE_CURRENT_SOURCE_DIR@/testSave.py
 python  @CMAKE_CURRENT_SOURCE_DIR@/testSave.py
 ret4=$?
 if [ $ret4 -gt 0 ]; then
@@ -79,7 +74,6 @@ if [ $ret4 -gt 0 ]; then
   exit $ret4
 fi
 
-chmod +x @CMAKE_CURRENT_SOURCE_DIR@/testRefcount.py
 python  @CMAKE_CURRENT_SOURCE_DIR@/testRefcount.py
 ret5=$?
 if [ $ret5 -gt 0 ]; then
@@ -87,7 +81,6 @@ if [ $ret5 -gt 0 ]; then
   exit $ret5
 fi
 
-chmod +x @CMAKE_CURRENT_SOURCE_DIR@/testSaveLoadRun.py
 python  @CMAKE_CURRENT_SOURCE_DIR@/testSaveLoadRun.py
 ret6=$?
 if [ $ret6 -gt 0 ]; then
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)