From 32696bbee8e64c57310539feeb0e982dfdbe9173 Mon Sep 17 00:00:00 2001 From: Guytri KASTANE Date: Thu, 21 Sep 2023 13:31:28 +0200 Subject: [PATCH] add modifications for native compilation --- applications/SALOME-master-native.pyconf | 2 +- products/env_scripts/fftw.py | 22 ++++++++++++++++++--- products/env_scripts/lapack.py | 7 +++++-- products/env_scripts/metis.py | 25 ++++++++++++++++++++++-- 4 files changed, 48 insertions(+), 8 deletions(-) diff --git a/applications/SALOME-master-native.pyconf b/applications/SALOME-master-native.pyconf index bae1cf2..8d726d8 100644 --- a/applications/SALOME-master-native.pyconf +++ b/applications/SALOME-master-native.pyconf @@ -99,7 +99,7 @@ APPLICATION : pandas : 'native' ParaView : {tag:'5.11.0', base: 'no', section: 'version_5_11_0_MPI', hpc: 'yes'} PERSALYS: 'v14.1' - petsc : {tag : '3.16.0', section: 'version_3_16_0'} + petsc : {tag : '3.19.4', base: 'no', section: 'version_3_19_4'} Pillow : 'native' planegcs : '0.18-3cb6890' psutil : 'native' diff --git a/products/env_scripts/fftw.py b/products/env_scripts/fftw.py index c9ed81a..84bbfba 100644 --- a/products/env_scripts/fftw.py +++ b/products/env_scripts/fftw.py @@ -13,6 +13,22 @@ def set_env(env, prereq_dir, version): env.prepend('LD_LIBRARY_PATH', os.path.join(prereq_dir, 'lib')) def set_nativ_env(env): - env.set('FFTW_ROOT_DIR', '/usr') - env.set('FFTW_INCLUDE_DIR', '/usr') - #env.prepend('LD_LIBRARY_PATH', prereq_dir) + prereq_dir='/usr' + prereq_bin='/usr/bin' + 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' + 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 + + env.set('FFTW_ROOT_DIR', prereq_dir) + env.set('FFTW_INCLUDE_DIR', prereq_inc) + env.prepend('LD_LIBRARY_PATH', prereq_dir) diff --git a/products/env_scripts/lapack.py b/products/env_scripts/lapack.py index 26ecc76..e4d0c67 100644 --- a/products/env_scripts/lapack.py +++ b/products/env_scripts/lapack.py @@ -21,6 +21,9 @@ def set_env(env, prereq_dir, version): env.prepend('PATH', os.path.join(prereq_dir, 'bin')) def set_nativ_env(env): - env.set('LAPACKHOME', '/usr') - env.set('LAPACK_ROOT_DIR', '/') + prereq_dir='/usr/lib/x86_64-linux-gnu' + env.set('LAPACKHOME', prereq_dir) + env.set('LAPACK_ROOT_DIR', prereq_dir) + env.prepend('LD_LIBRARY_PATH', prereq_dir) + diff --git a/products/env_scripts/metis.py b/products/env_scripts/metis.py index 09f763b..07bdb09 100755 --- a/products/env_scripts/metis.py +++ b/products/env_scripts/metis.py @@ -17,5 +17,26 @@ def set_env(env, prereq_dir, version): env.prepend('PATH', os.path.join(prereq_dir, 'bin')) def set_nativ_env(env): - env.set('METISDIR', '/usr') - env.set('METIS_ROOT_DIR', '/usr') # update for cmake + #env.set('METISDIR', '/usr') + #env.set('METIS_ROOT_DIR', '/usr') # update for cmake + prereq_dir='/usr' + prereq_bin='/usr/bin' + 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' + 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 + + env.set('METISDIR', prereq_dir) + env.set('METIS_ROOT_DIR', prereq_dir) + env.set('METIS_INCLUDE_DIR', prereq_inc) + env.prepend('LD_LIBRARY_PATH', prereq_dir) + -- 2.39.2