From: Guytri KASTANE Date: Thu, 21 Sep 2023 11:31:28 +0000 (+0200) Subject: add modifications for native compilation X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=16dbe1542eb2ddfedd8d53ea209d65e5f03c050b;p=tools%2Fsat_salome.git add modifications for native compilation --- diff --git a/products/compil_scripts/petsc-3.19.4.sh b/products/compil_scripts/petsc-3.19.4.sh index 2c50abe..c30c760 100755 --- a/products/compil_scripts/petsc-3.19.4.sh +++ b/products/compil_scripts/petsc-3.19.4.sh @@ -7,34 +7,33 @@ echo "########################################################################## cp -r $SOURCE_DIR/* . CONFIGURE_FLAGS= +CONFIGURE_FLAGS+=" --download-slepc=ext/slepc-3.19.2.tar.gz" CONFIGURE_FLAGS+=" --with-blaslapack-dir=${LAPACK_ROOT_DIR}" CONFIGURE_FLAGS+=" --with-python-dir=${PYTHON_ROOT_DIR}" -CONFIGURE_FLAGS+=" --download-slepc=/home/salome-public/prerequis/archives/slepc-3.19.2.tar.gz" CONFIGURE_FLAGS+=" --with-hdf5-dir=${HDF5_ROOT_DIR}" CONFIGURE_FLAGS+=" --with-fftw-dir=${FFTW_ROOT_DIR}" CONFIGURE_FLAGS+=" --with-cuda=0" # CONFIGURE_FLAGS+=" --with-debugging=0" # by default Petsc is build in debug mode CONFIGURE_FLAGS+=" --with-petsc4py=yes" CONFIGURE_FLAGS+=" --download-slepc-configure-arguments=--with-slepc4py=yes " -CONFIGURE_FLAGS+=" --CFLAGS=-fPIC" # echo if [ -n "${SAT_HPC}" ] then - CONFIGURE_FLAGS+=" --download-hypre=ext/hypre-2.27.0.tar.gz" - CONFIGURE_FLAGS+=" --download-parms=ext/parms-3.2-p5.tar.gz" - CONFIGURE_FLAGS+=" --download-metis=ext/metis-5.1.0-p10.tar.gz" - CONFIGURE_FLAGS+=" --download-parmetis=ext/parmetis-4.0.3-p6.tar.gz" - CONFIGURE_FLAGS+=" --download-ptscotch=ext/scotch_6.1.0.tar.gz" + CONFIGURE_FLAGS+=" --download-hypre=ext/hypre-2.28.0.tar.gz" + CONFIGURE_FLAGS+=" --download-metis=ext/metis-5.1.0-p11.tar.gz" + CONFIGURE_FLAGS+=" --download-ptscotch=ext/scotch_7.0.3.tar.gz" + if [ -n "${MPI4PY_ROOT_DIR}" ] then CONFIGURE_FLAGS+=" --with-mpi4py-dir=${MPI4PY_ROOT_DIR}" else - CONFIGURE_FLAGS+=" --download-mpi4py=ext/mpi4py-3.0.3.tar.gz" + CONFIGURE_FLAGS+=" --download-mpi4py=yes" #ext/mpi4py-3.0.3.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} else - CONFIGURE_FLAGS+=" --with-metis-dir=${METIS_ROOT_DIR}" + #CONFIGURE_FLAGS+=" --with-metis-dir=${METIS_ROOT_DIR}" + CONFIGURE_FLAGS+=" --download-metis=ext/metis-5.1.0-p11.tar.gz" echo "*** configure --prefix=${PRODUCT_INSTALL} --with-mpi=0 ${CONFIGURE_FLAGS}" ./configure --prefix=${PRODUCT_INSTALL} --with-mpi=0 ${CONFIGURE_FLAGS} fi @@ -68,6 +67,15 @@ then exit 3 fi +echo +echo "*** make check" +make $MAKE_OPTIONS check +if [ $? -ne 0 ] +then + echo "ERROR on make check" + exit 4 +fi + echo echo "########## END" diff --git a/products/env_scripts/fftw.py b/products/env_scripts/fftw.py index 51219ac..84bbfba 100644 --- a/products/env_scripts/fftw.py +++ b/products/env_scripts/fftw.py @@ -13,24 +13,21 @@ 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/lib' - prereq_bin='/usr/lib' + 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' - prereq_inc='/usr/include' + 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 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' + import patform + #FIXME env.set('FFTW_ROOT_DIR', prereq_dir) env.set('FFTW_INCLUDE_DIR', prereq_inc) diff --git a/products/env_scripts/lapack.py b/products/env_scripts/lapack.py index 228eafa..e4d0c67 100644 --- a/products/env_scripts/lapack.py +++ b/products/env_scripts/lapack.py @@ -21,25 +21,7 @@ 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' - 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' - + 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 9371c86..07bdb09 100755 --- a/products/env_scripts/metis.py +++ b/products/env_scripts/metis.py @@ -32,12 +32,9 @@ def set_nativ_env(env): 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' - + import patform + #FIXME + env.set('METISDIR', prereq_dir) env.set('METIS_ROOT_DIR', prereq_dir) env.set('METIS_INCLUDE_DIR', prereq_inc) diff --git a/products/petsc.pyconf b/products/petsc.pyconf index 6256fe4..d9bbd83 100644 --- a/products/petsc.pyconf +++ b/products/petsc.pyconf @@ -25,6 +25,7 @@ version_3_19_4 : { compil_script : "petsc-3.19.4.sh" depend : ["hdf5", "Python", "lapack","fftw", "llvm"] + patches: ['petsc-3.19.4-mpi4py.patch','petsc-3.19.4-libpath.patch'] } version_3_17_0 :