-
Notifications
You must be signed in to change notification settings - Fork 0
/
env_SOLVERLAB.sh
106 lines (85 loc) · 2.66 KB
/
env_SOLVERLAB.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#!/bin/bash
# this bash file have to be sourced : 'source env_SOLVERLAB.sh'
# this bash file is generated by CMake from env_SOLVERLAB.sh, copy and modify as your own needs/risks.
##### utilities #####
RED="\e[0;31m"
GREEN="\e[0;32m"
YELLOW="\e[0;33m"
BOLD="\e[1m"
NC="\e[0m" # No Color
function f_red {
echo -e ${RED}${@}${NC}
}
function f_green {
echo -e ${GREEN}${@}${NC}
}
function f_info {
f_green "INFO : ${@}"
}
function f_error {
f_red "ERROR : ${@}"
# exit 1 # ko avoid if sourced file
}
function f_warning {
f_red "WARNING : ${@}"
}
##### main #####
export SOLVERLAB_INSTALL=@CMAKE_INSTALL_PREFIX@
export PETSC_DIR=@PETSC_INSTALL@
export PETSC_ARCH=@PETSC_ARCH@
export PETSC_INCLUDES=@PETSC_INCLUDES_INSTALL@
export PETSC_LIBRARIES=@PETSC_DIR@/@PETSC_ARCH@/lib
export PETSC4PY_ROOT_DIR=@PETSC4PY_ROOT_DIR@
export SLEPC4PY_ROOT_DIR=@SLEPC4PY_ROOT_DIR@
export MEDFILE_ROOT_DIR=@MEDFILE_ROOT_DIR@
export MEDFILE_INCLUDE_DIRS=@MEDFILE_INCLUDE_DIRS@
export MEDFILE_LIBRARIES=@MEDFILE_LIBRARIES_INSTALL@
export MEDCOUPLING_ROOT_DIR=@MEDCOUPLING_ROOT_DIR@
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@
export SOLVERLAB=${SOLVERLAB_INSTALL}/bin/Executable/COREFLOWSMainExe
export LD_LIBRARY_PATH=\
${SOLVERLAB_INSTALL}/lib:\
${PETSC_DIR}/lib:\
${PETSC_DIR}/${PETSC_ARCH}/lib:\
${MEDCOUPLING_LIBRARIES}:\
${MEDFILE_ROOT_DIR}/lib:\
${HDF5_ROOT}/lib:\
${PV_LIB_DIR}:\
${LD_LIBRARY_PATH}
export PYTHONPATH=\
${SOLVERLAB_INSTALL}/bin:\
${SOLVERLAB_INSTALL}/bin/cdmath:\
${SOLVERLAB_INSTALL}/bin/cdmath/postprocessing:\
${SOLVERLAB_INSTALL}/bin/coreflows:\
${SOLVERLAB_INSTALL}/lib:\
${SOLVERLAB_INSTALL}/lib/cdmath:\
${SOLVERLAB_INSTALL}/lib/coreflows:\
${PETSC_DIR}/${PETSC_ARCH}/lib:\
${PETSC_DIR}/lib:\
${PETSC4PY_ROOT_DIR}:\
${PETSC4PY_ROOT_DIR}/lib/${PETSC_ARCH}:\
${SLEPC4PY_ROOT_DIR}:\
${SLEPC4PY_ROOT_DIR}/lib/${PETSC_ARCH}:\
${MEDCOUPLING_LIBRARIES}:\
${MEDCOUPLING_LIBRARIES}/python@Python_VERSION_MAJOR@.@Python_VERSION_MINOR@/site-packages/:\
${MEDFILE_ROOT_DIR}/lib:\
${HDF5_ROOT}/lib:\
${PV_PYTHON_DIR}:\
${PYTHONPATH}
if [ @SOLVERLAB_WITH_MPI@ = ON ] # test SOLVERLAB_WITH_MPI
then
export mpirun=$PETSC_DIR/$PETSC_ARCH/bin/mpirun
export mpiexec=$PETSC_DIR/$PETSC_ARCH/bin/mpiexec
export MPI4PY_ROOT_DIR=@MPI4PY_ROOT_DIR@
export PYTHONPATH=$MPI4PY_ROOT_DIR:$PYTHONPATH
fi
if [ @PRELOAD_NETCDF_ON_UBUNTU20@ = ON ] # test PRELOAD_NETCDF_ON_UBUNTU20
then
export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libnetcdf.so
fi
export SOLVERLAB_ROOT_DIR=${SOLVERLAB_INSTALL}
f_info SOLVERLAB_ROOT_DIR=${SOLVERLAB_INSTALL}