From 6c9c23a10ed5d9b0a3128985b224f36ee5424bb9 Mon Sep 17 00:00:00 2001 From: michael Date: Sat, 30 Oct 2021 22:53:49 +0200 Subject: [PATCH] Added petsc4py in PYTHONPATH\n Preload of libnetcdf on ubuntu 20 --- env_SOLVERLAB.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/env_SOLVERLAB.sh b/env_SOLVERLAB.sh index 57dace3..fb3442a 100644 --- a/env_SOLVERLAB.sh +++ b/env_SOLVERLAB.sh @@ -14,17 +14,22 @@ export MEDCOUPLING_INCLUDE_DIR=@MEDCOUPLING_INCLUDE_DIR@ export MEDCOUPLING_LIBRARIES=@MEDCOUPLING_LIBRARIES@ export PV_LIB_DIR=@PV_LIB_DIR@ export PV_PYTHON_DIR=@PV_PYTHON_DIR@ -export HDF5_ROOT=@HDF5_ROOT@/lib +export HDF5_ROOT=@HDF5_ROOT@ -if [ @SOLVERLAB_WITH_MPI@ = ON ] +if [ @SOLVERLAB_WITH_MPI@ = ON ] then export mpirun=${PETSC_DIR}/${PETSC_ARCH}/bin/mpirun export mpiexec=${PETSC_DIR}/${PETSC_ARCH}/bin/mpiexec fi export COREFLOWS=$COREFLOWS_INSTALL/bin/Executable/COREFLOWSMainExe -export LD_LIBRARY_PATH=$COREFLOWS_INSTALL/lib:$CDMATH_INSTALL/lib:${PETSC_DIR}/lib:$PETSC_LIBRARIES:${MEDCOUPLING_LIBRARIES}:${MEDFILE_ROOT_DIR}/lib:$MEDFILE_LIBRARIES:${MEDFILE_C_LIBRARIES}:$HDF5_ROOT:$PV_LIB_DIR:${LD_LIBRARY_PATH} -export PYTHONPATH=$COREFLOWS_INSTALL/lib/coreflows:$COREFLOWS_INSTALL/bin/coreflows:$COREFLOWS_INSTALL/lib/python:$CDMATH_INSTALL/lib/cdmath:$CDMATH_INSTALL/bin/cdmath:$CDMATH_INSTALL/bin/cdmath/postprocessing:$PV_PYTHON_DIR:${PETSC_DIR}/${PETSC_ARCH}/lib:${PETSC_DIR}/lib:$PETSC_LIBRARIES:${MEDCOUPLING_LIBRARIES}:${MEDCOUPLING_LIBRARIES}/python@Python_VERSION_MAJOR@.@Python_VERSION_MINOR@/site-packages/:${MEDFILE_ROOT_DIR}/lib:$MEDFILE_LIBRARIES:${MEDFILE_C_LIBRARIES}:${PYTHONPATH} +export LD_LIBRARY_PATH=$COREFLOWS_INSTALL/lib:$CDMATH_INSTALL/lib:${PETSC_DIR}/lib:$PETSC_LIBRARIES:${MEDCOUPLING_LIBRARIES}:${MEDFILE_ROOT_DIR}/lib:$MEDFILE_LIBRARIES:${MEDFILE_C_LIBRARIES}:$HDF5_ROOT/lib:$PV_LIB_DIR:${LD_LIBRARY_PATH} +export PYTHONPATH=$COREFLOWS_INSTALL/bin:$COREFLOWS_INSTALL/lib:$COREFLOWS_INSTALL/lib/coreflows:$COREFLOWS_INSTALL/bin/coreflows:$COREFLOWS_INSTALL/lib/python:$CDMATH_INSTALL/lib/cdmath:$CDMATH_INSTALL/bin/cdmath:$CDMATH_INSTALL/bin/cdmath/postprocessing:$PV_PYTHON_DIR:${PETSC_DIR}/${PETSC_ARCH}/lib:${PETSC_DIR}/lib:$PETSC_LIBRARIES:${PETSC_DIR}/${PETSC_ARCH}/lib/petsc4py:${PETSC_DIR}/${PETSC_ARCH}/lib/petsc4py/lib/${PETSC_ARCH}:${PETSC_DIR}/lib/petsc4py:${PETSC_DIR}/lib/petsc4py/lib:${MEDCOUPLING_LIBRARIES}:${MEDCOUPLING_LIBRARIES}/python@Python_VERSION_MAJOR@.@Python_VERSION_MINOR@/site-packages/:${MEDFILE_ROOT_DIR}/lib:$MEDFILE_LIBRARIES:${MEDFILE_C_LIBRARIES}:${PYTHONPATH} + +if [ @PRELOAD_NETCDF_ON_UBUNTU20@ = ON ] +then + export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libnetcdf.so +fi export SOLVERLAB_ROOT_DIR=$COREFLOWS_INSTALL export SOLVERLABGUI=$COREFLOWS_INSTALL/bin/salome/CoreFlows_Standalone.py -- 2.39.2