]> SALOME platform Git repositories - tools/sat_salome.git/commitdiff
Salome HOME
bos #28849 - Debian 10 until a more robust approach is found
authorNabil Ghodbane <nabil.ghodbane@cea.fr>
Wed, 2 Feb 2022 12:05:16 +0000 (13:05 +0100)
committerNabil Ghodbane <nabil.ghodbane@cea.fr>
Wed, 2 Feb 2022 12:05:16 +0000 (13:05 +0100)
products/ParaView.pyconf
products/env_scripts/openmpi.py
products/patches/paraview.0020.findMPI.patch [new file with mode: 0644]

index 702346f2ecac6d3a4c740cce38f375480bbd11e4..ee02ffe75c031040c6dc22b94216bc3a2fbc93f1 100755 (executable)
@@ -326,7 +326,8 @@ version_5_9_0_DB10 :
                'paraview.0017-ParaView_protobuf_crash.patch',
                'paraview.0015-Paraview_VTKM_ioss.patch'
                'paraview.0018-spns-26351-autoconvert.patch',
-               'paraview.0019-spns-26344-VTK-OpenMP.patch'
+               'paraview.0019-spns-26344-VTK-OpenMP.patch',
+               'paraview.0020.findMPI.patch'
               ]
 }
 
index 7e26a0a94d56c6c8a626bd0b4a17a47e96db4456..6c17a38fb21d24add2f2e15e0e0925686b2f09e0 100644 (file)
@@ -29,6 +29,12 @@ def set_nativ_env(env):
     env.set('MPI_ROOT_DIR', prereq_dir)
     env.set('OPENMPIDIR', prereq_dir)
     env.set('MPI_ROOT', prereq_dir)
-    env.set('MPI_C_FOUND', os.path.join(prereq_dir,'lib','libmpi.so'))
+    mpiclib_dir=prereq_dir
+    try:
+        if "debian" in distro.name().lower() and any(version in distro.version() for version in ["10"]) :
+            mpiclib_dir='/usr/lib/x86_64-linux-gnu/openmpi'
+    except:
+        pass
+    env.set('MPI_C_FOUND', os.path.join(mpiclib_dir,'lib','libmpi.so'))
     env.prepend('PATH', os.path.join(prereq_dir, 'bin'))
     env.prepend('LD_LIBRARY_PATH', os.path.join(prereq_dir,'lib'))
diff --git a/products/patches/paraview.0020.findMPI.patch b/products/patches/paraview.0020.findMPI.patch
new file mode 100644 (file)
index 0000000..09cdbd8
--- /dev/null
@@ -0,0 +1,14 @@
+diff -Naur ParaView_ref/VTK/CMake/patches/3.17/FindMPI.cmake ParaView_new/VTK/CMake/patches/3.17/FindMPI.cmake
+--- ParaView_ref/VTK/CMake/patches/3.17/FindMPI.cmake  2022-02-02 10:45:40.273534527 +0100
++++ ParaView_new/VTK/CMake/patches/3.17/FindMPI.cmake  2022-02-02 12:20:19.005537074 +0100
+@@ -1727,6 +1727,10 @@
+   list(APPEND _MPI_REQ_VARS "MPI_MPICXX_FOUND")
+ endif()
++if(DEFINED ENV{MPI_C_FOUND})
++  set(MPI_C_FOUND $ENV{MPI_C_FOUND})
++endif()  
++
+ find_package_handle_standard_args(MPI
+     REQUIRED_VARS ${_MPI_REQ_VARS}
+     VERSION_VAR ${_MPI_MIN_VERSION}