]> SALOME platform Git repositories - tools/sat_salome.git/commitdiff
Salome HOME
spns #43007: use petsc with mpi on salome native; updated SOLVERLAB compilation scrip...
authorGuytri KASTANE <guytri.kastane@cea.fr>
Tue, 29 Oct 2024 08:04:23 +0000 (09:04 +0100)
committerGuytri KASTANE <guytri.kastane@cea.fr>
Tue, 29 Oct 2024 08:04:23 +0000 (09:04 +0100)
applications/SALOME-master-native.pyconf
products/compil_scripts/SOLVERLAB.sh
products/compil_scripts/petsc-3.16.0.sh
products/env_scripts/mpi4py.py
products/env_scripts/openmpi.py

index ef0d1f29e4c0d90681679c2bb6bf451a2a7c2b0e..410d4a82e93379930fa2dd6aa8e3ac5d3ae4c258 100644 (file)
@@ -115,7 +115,7 @@ APPLICATION :
         patsy : 'native'
         ParaView : {tag:'5.11.0', base: 'no',  section: 'version_5_11_0_MPI', hpc: 'yes'}
         PERSALYS : 'v16.0.1'
-        petsc : {tag : '3.16.0', section: 'version_3_16_0'}
+        petsc : {tag : '3.16.0', base: 'no', section: 'version_3_16_0', hpc: 'yes'}
         Pillow : 'native'
         planegcs : '0.18-3cb6890'
         psutil : 'native'
@@ -203,7 +203,7 @@ APPLICATION :
         'YDEFX'
         'pmml'
         'SALOMEBOOTSTRAP'
-        'SOLVERLAB'
+        'SOLVERLAB' : {tag: 'master', base: 'no', section: 'default_MPI', hpc: 'yes'}
         'TopIIVolMesh'
         #'TESTBASE'
         'CEATESTBASE' : 'SalomeV9'
@@ -495,7 +495,7 @@ __overwrite__ :
         'APPLICATION.products.swig'             : '4.0.2'
         'APPLICATION.products.meshio'           : {tag: '5.3.5' ,    base: 'no', section: 'version_5_3_5_no_pip'                }
         'APPLICATION.products.opencv'           : {tag: '3.2.0',     base: 'no', section: 'version_3_2_0_FD38'                  }
-        'APPLICATION.products.petsc'            : {tag: '3.16.0',    base: 'no', section: 'version_3_16_0_FD38'                 }
+        'APPLICATION.products.petsc'            : {tag: '3.16.0',    base: 'no', section: 'version_3_16_0_FD38', hpc: 'yes'     }
         'APPLICATION.products.PyFMI'            : {tag: '2.6',       base: 'no', section: 'version_2_6_FD38'                    }
         'APPLICATION.products.medfile'          : {tag: '4.1.1',     base: 'no', section: 'version_4_1_1_FD38'                  }
         'APPLICATION.products.catalyst'         : {tag: '2.0',       base: 'no', section: 'version_2_0_FD38'                    }
index fa08db5d84aa48b83d3a5215855a3d9feb95fdb2..91c92e785f431cef53920a0c7f503d7fbf40f24c 100755 (executable)
@@ -69,6 +69,12 @@ else
     fi
 fi
 
+if [ -n "${SAT_DEBUG}" ]; then
+    CMAKE_OPTIONS+=" -DCMAKE_BUILD_TYPE=Debug"
+else
+    CMAKE_OPTIONS+=" -DCMAKE_BUILD_TYPE=Release"
+fi
+
 echo
 echo "*** cmake "$CMAKE_OPTIONS
 cmake $CMAKE_OPTIONS $SOURCE_DIR
@@ -86,6 +92,13 @@ if [ $? -ne 0 ]; then
     exit 2
 fi
 
+echo
+echo "*** env_SOLVERLAB.sh deps path"
+if [ "$SAT_openmpi_IS_NATIVE" != "1" ]; then
+    sed -i '/export MPI_ROOT_DIR=.*/a export OPAL_PREFIX=${MPI_ROOT_DIR}' $PRODUCT_INSTALL/env_SOLVERLAB.sh
+fi
+sed -i "s|${PRODUCT_INSTALL%/*}|\$\{ROOT\_DIR\}|g" $PRODUCT_INSTALL/env_SOLVERLAB.sh
+
 echo
 echo "*** make doc install"
 make docCDMATH docCoreFlows install
index d5b432aea7ac685a3035ceac0f4b9a282c156221..03ab48e58b7a3026cdf7eb42da2152e585bdcafb 100755 (executable)
@@ -45,6 +45,11 @@ then
       CONFIGURE_FLAGS+=" --download-mpi4py=ext/mpi4py-3.0.3.tar.gz"
   fi
   echo "*** configure --prefix=${PRODUCT_INSTALL} --with-mpi-dir=${MPI_ROOT_DIR} ${CONFIGURE_FLAGS}"
+  if [ "$SAT_openmpi_IS_NATIVE" == "1" ]; then
+    CONFIGURE_FLAGS+=" --with-cc=${MPI_C_COMPILER}"
+    CONFIGURE_FLAGS+=" --with-cxx=${MPI_CXX_COMPILER}"
+    CONFIGURE_FLAGS+=" --with-fc=${MPI_FC_COMPILER}" 
+  fi
   ./configure --prefix=${PRODUCT_INSTALL} --with-mpi-dir=${MPI_ROOT_DIR} ${CONFIGURE_FLAGS}
 else
   echo "*** configure --prefix=${PRODUCT_INSTALL} --with-mpi=0 ${CONFIGURE_FLAGS}"
index 296a6978295e1665d1e9c050290ca4d65810ba27..3957a96310238f45661e2d2e7487ce01870ce95e 100644 (file)
@@ -12,5 +12,7 @@ def set_env(env, prereq_dir, version):
     env.prepend("PYTHONPATH",os.path.join(prereq_dir, 'lib', 'python' + versionPython, 'site-packages'))
 
 def set_nativ_env(env):
-    pass
+    import mpi4py
+    MPI4PY_ROOT_DIR=os.path.join('/',*mpi4py.__path__[0].split('/')[:-1])
+    env.set("MPI4PY_ROOT_DIR", MPI4PY_ROOT_DIR)
 
index 98668717e0d37f92ec5197ab8931a54c1cb6bf47..7241b0f8be416acd1cd7c9cc6d31547c570e66ed 100644 (file)
@@ -46,6 +46,7 @@ def set_nativ_env(env):
     env.set('MPI_ROOT', prereq_dir)
     env.set('MPI_C_COMPILER', os.path.join(prereq_bin,'mpicc'))
     env.set('MPI_CXX_COMPILER', os.path.join(prereq_bin,'mpicxx'))
+    env.set('MPI_FC_COMPILER', os.path.join(prereq_bin,'mpifort'))
     env.set('MPI_C_FOUND', os.path.join(prereq_dir,'lib','libmpi.so'))
     env.set('MPI_INCLUDE_DIR', prereq_inc)
     if prereq_bin != "/usr/bin":