]> SALOME platform Git repositories - tools/sat_salome.git/commitdiff
Salome HOME
Add comdition in compilation script for petsc 3.19.4 and in env_scripts
authorGuytri KASTANE <guytri.kastane@cea.fr>
Fri, 22 Sep 2023 11:53:31 +0000 (13:53 +0200)
committerGuytri KASTANE <guytri.kastane@cea.fr>
Mon, 22 Apr 2024 09:32:09 +0000 (11:32 +0200)
products/compil_scripts/petsc-3.17.0.sh
products/env_scripts/fftw.py
products/env_scripts/lapack.py
products/env_scripts/metis.py

index 051daff89f5104509dd5783067a51135b1e483c5..6a5e8d9930c21646ea3f3b6be7887a290f91ef0f 100755 (executable)
@@ -12,7 +12,13 @@ cp -rf $SOURCE_DIR/* .
 
 CONFIGURE_FLAGS=
 CONFIGURE_FLAGS+=" --download-slepc=ext/slepc-3.19.2.tar.gz"
-CONFIGURE_FLAGS+=" --with-blaslapack-dir=${LAPACK_ROOT_DIR}"
+
+if [ -f "${LAPACK_ROOT_DIR}/liblapack.a" ] && [ "${SAT_lapack_IS_NATIVE}" == "1"  ]; then
+   CONFIGURE_FLAGS+=" --with-blaslapack-dir=${LAPACK_ROOT_DIR}"
+else
+   CONFIGURE_FLAGS+=" --download-f2cblaslapack=ext/f2cblaslapack-3.8.0.q2.tar.gz"
+fi
+
 CONFIGURE_FLAGS+=" --with-python-dir=${PYTHON_ROOT_DIR}"
 CONFIGURE_FLAGS+=" --download-slepc=ext/slepc-3.17.0.tar.gz"
 if [ "$SAT_hdf5_IS_NATIVE" != "1" ]; then
@@ -33,7 +39,7 @@ then
   then
       CONFIGURE_FLAGS+=" --with-mpi4py-dir=${MPI4PY_ROOT_DIR}"
   else
-      CONFIGURE_FLAGS+=" --download-mpi4py=yes" #ext/mpi4py-3.0.3.tar.gz"
+      CONFIGURE_FLAGS+=" --download-mpi4py=ext/mpi4py-3.1.4.tar.gz"
   fi
   echo "*** configure --prefix=${PRODUCT_INSTALL} --with-mpi-dir=${MPI_ROOT_DIR} ${CONFIGURE_FLAGS}"
   ./configure --prefix=${PRODUCT_INSTALL} --with-mpi-dir=${MPI_ROOT_DIR} ${CONFIGURE_FLAGS}
index 84bbfba0439c8ad4735cf05ddd7ef2c7d2d9821f..51219ac583df3afeb71fab13346621f15dcd79d1 100644 (file)
@@ -13,21 +13,24 @@ def set_env(env, prereq_dir, version):
         env.prepend('LD_LIBRARY_PATH', os.path.join(prereq_dir, 'lib'))
 
 def set_nativ_env(env):
-    prereq_dir='/usr'
-    prereq_bin='/usr/bin'
+    prereq_dir='/usr/lib'
+    prereq_bin='/usr/lib'
     prereq_inc='/usr/include'
     try:
         import distro
         if any(distribution in distro.name().lower() for distribution in ["rocky", "centos", "fedora"]) :
             prereq_dir='/usr'
-            prereq_bin='/usr/bin'
-            prereq_inc='/usr/include/fftw'
+            prereq_bin='/usr'
+            prereq_inc='/usr/include'
         elif any(distribution in distro.name().lower() for distribution in ["debian", "ubuntu"]) :
             prereq_dir='/usr/lib/x86_64-linux-gnu'
             prereq_inc='/usr/include'
     except:
-        import patform
-        #FIXME
+        import platform
+        if any(distribution in platform.linux_distribution()[0].lower() for distribution in ["rocky", "centos", "fedora"]) :
+            prereq_dir='/usr'
+            prereq_bin='/usr'
+            prereq_inc='/usr/include'
 
     env.set('FFTW_ROOT_DIR', prereq_dir)
     env.set('FFTW_INCLUDE_DIR', prereq_inc)
index e4d0c6780326a6141f59c4a68ffb695d76b12846..228eafa0c5a93e24659131e89d5d62e4e1aaad2e 100644 (file)
@@ -21,7 +21,25 @@ def set_env(env, prereq_dir, version):
     env.prepend('PATH', os.path.join(prereq_dir, 'bin'))
 
 def set_nativ_env(env):
-    prereq_dir='/usr/lib/x86_64-linux-gnu'
+    prereq_dir='/usr/lib'
+    prereq_bin='/usr/lib'
+    prereq_inc='/usr/include'
+    try:
+        import distro
+        if any(distribution in distro.name().lower() for distribution in ["rocky", "centos", "fedora"]) :
+            prereq_dir='/usr'
+            prereq_bin='/usr'
+            prereq_inc='/usr/include'
+        elif any(distribution in distro.name().lower() for distribution in ["debian", "ubuntu"]) :
+            prereq_dir='/usr/lib/x86_64-linux-gnu'
+            prereq_inc='/usr/include'
+    except:
+        import platform
+        if any(distribution in platform.linux_distribution()[0].lower() for distribution in ["rocky", "centos", "fedora"]) :
+            prereq_dir='/usr'
+            prereq_bin='/usr'
+            prereq_inc='/usr/include'
+    
     env.set('LAPACKHOME', prereq_dir)
     env.set('LAPACK_ROOT_DIR', prereq_dir)
     env.prepend('LD_LIBRARY_PATH', prereq_dir)
index 07bdb090e0e2d1cbc38a68ab6455b6f1f1870037..9371c861dc26aa5f45de3ca61c6383555d9be6eb 100755 (executable)
@@ -32,9 +32,12 @@ def set_nativ_env(env):
             prereq_dir='/usr/lib/x86_64-linux-gnu'
             prereq_inc='/usr/include'
     except:
-        import patform
-        #FIXME    
-
+        import platform
+        if any(distribution in platform.linux_distribution()[0].lower() for distribution in ["rocky", "centos", "fedora"]) :
+            prereq_dir='/usr'
+            prereq_bin='/usr'
+            prereq_inc='/usr/include'
+    
     env.set('METISDIR', prereq_dir)
     env.set('METIS_ROOT_DIR', prereq_dir)
     env.set('METIS_INCLUDE_DIR', prereq_inc)