]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Better error handling for parallel mesh
authorYOANN AUDOUIN <B61570@dsp1062659>
Wed, 13 Dec 2023 10:15:08 +0000 (11:15 +0100)
committerYOANN AUDOUIN <B61570@dsp1062659>
Wed, 13 Dec 2023 10:15:08 +0000 (11:15 +0100)
src/SMESH/SMESH_ParallelMesh.cxx
src/SMESH_SWIG/mesher_launcher.py

index 2bce451f3bd50ca67746b48fce689dc9f3c079a6..4b49486e0afc693f54fe96a3d391b2dde60d82aa 100644 (file)
@@ -61,7 +61,6 @@ SMESH_ParallelMesh::~SMESH_ParallelMesh()
 void SMESH_ParallelMesh::cleanup()
 {
   DeletePoolThreads();
-  std::cout << "Keeping tmp folder" << keepingTmpFolfer() << std::endl;
   if(!keepingTmpFolfer())
   {
     MESSAGE("Set SMESH_KEEP_TMP to > 0 to keep temporary folders")
@@ -78,7 +77,6 @@ void SMESH_ParallelMesh::cleanup()
 bool SMESH_ParallelMesh::keepingTmpFolfer()
 {
   const char* envVar = std::getenv("SMESH_KEEP_TMP");
-  std::cout << "smesh_keep_tmp: " << envVar << std::endl;
 
   if (envVar && (envVar[0] != '\0'))
   {
index 65de1492524de673752903464625ddddd0e01aa3..3794016df1468379f0022b1aa0bea94ec44fb010 100644 (file)
@@ -244,11 +244,12 @@ def run_pylauncher(args):
     del_tmp_folder = True
     try:
        val = int(environ.get("SMESH_KEEP_TMP", "0"))
-       del_tmp_folder = val > 0
+       del_tmp_folder = val < 0
     except Exception as e:
         del_tmp_folder = True
 
-    launcher.clearJobWorkingDir(job_id)
+    if del_tmp_folder:
+        launcher.clearJobWorkingDir(job_id)
 
 def def_arg():
     """ Define and parse arguments for the script """