-
Notifications
You must be signed in to change notification settings - Fork 1
/
20_THOR.conf
97 lines (85 loc) · 3.2 KB
/
20_THOR.conf
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
#! /bin/bash
shopt -s expand_aliases
STEP0(){
LIST_MACHINE="$LIST_MACHINE THOR"
}
# Sets some vars
# If system version of a package is available use it
# this is unecessary if one want to do it manually
STEP1(){
if [ "$MACHINE" = "THOR" ]; then
# COMP="GCC"
COMP="ICC"
OPENMPI="SYS"
DOWN="YES"
# CGNS="SYS"; VERSION_CGNS="3.1.4"
# METIS="SYS"; VERSION_METIS="5.1.0"
fi
}
# Sets some vars
# And prepare the environment
# Only module load and exports are mandatory
STEP2(){
if [ "$MACHINE" = "THOR" ]; then
module purge > /dev/null 2>&1
[[ "$COMP" = "ICC" ]] && module load intel-compilers-16
[[ "$COMP" = "GCC" ]] && gnu-compilers/4.9.3
module load intel-cmkl-16
# [[ "$COMP" = "ICC" ]] && [[ "$OPENMPI" = "SYS" ]] && module load intel-mpi-4
[[ "$COMP" = "GCC" ]] && [[ "$OPENMPI" = "SYS" ]] && module load openmpi/1.10.1
[[ "$COMP" = "ICC" ]] && [[ "$OPENMPI" = "SYS" ]] && module load mpt/2.12
[[ "$CGNS" = "SYS" ]] && module load lib/cgns/"$VERSION_CGNS"
[[ "$METIS" = "SYS" ]] && module load lib/metis/"$VERSION_METIS"
# [[ "$COMP" = "ICC" ]] && [[ "$OPENMPI" = "SYS" ]] && BIN_OPENMPI="$I_MPI_ROOT"
[[ "$COMP" = "GCC" ]] && [[ "$OPENMPI" = "SYS" ]] && BIN_OPENMPI="$MPI_HOME"
[[ "$COMP" = "ICC" ]] && [[ "$OPENMPI" = "SYS" ]] && BIN_OPENMPI="$MPI_ROOT"
[[ "$CGNS" = "SYS" ]] && BIN_CGNS="$CGNS_ROOT"
[[ "$METIS" = "SYS" ]] && BIN_METIS="$METIS_ROOT"
EXTRA_CONF="$EXTRA_CONF --with-blas-type=MKL --with-modules=no --disable-mpi-io"
fi
}
STEP3(){
if [ "$MACHINE" = "THOR" ]; then
# [[ "$COMP" = "ICC" ]] && FLAGS_OPTIM="$FLAGS_OPTIM -O2 -fPIC" #fail to compile scotch with O3
# FLAGS_OPTIM="$FLAGS_OPTIM -O0" #fail to compile scotch with O3
if [ "$COMP" = "ICC" ]; then
#Parallel C compilator
P_CC="icc"
#Parallel F90 compilator
P_FC="ifort"
#Parallel F77 compilator
P_F77="ifort"
#Parallel C++ compilator
P_CXX="icpc"
FLAGS_OPTIM="$FLAGS_OPTIM -lmpi"
FLAGS_DEBUG="$FLAGS_DEBUG -lmpi"
fi
fi
}
STEP9(){
if [ "$MACHINE" = "THOR" ]; then
echo
echo -e "\e[31m\e[1m**** Other instructions ****\e[21m\e[0m"
echo "To use code_saturne on NPROC process through mpi"
echo "in interactive mode or in batch mode"
echo "You will have to force code_saturne to use :"
echo "mpiexec = $BIN_OPENMPI/bin/mpirun"
echo "mpiexec_n = ' -np '"
echo "In order to do that, copy $BIN_SATURNE/etc/code_saturne.cfg.template"
echo "as ~/.code_saturne.cfg"
echo "or, for older version of code_saturne, cs_user_scripts.py."
echo
echo "In interactive mode, you may have to add dplace -c CORE1-CORE2"
echo "In oder to force code_saturne to compute on those cores."
echo "To achieve best performance, CORE1+1 should be a multiple of 8."
echo
echo "For batch mode, you have to tell code_saturne to use PBS system."
echo 'batch = "PBS"'
echo "In order to do that, copy $BIN_SATURNE/etc/code_saturne.cfg.template"
echo "as ~/.code_saturne.cfg"
echo "You will have to modify the runcase file to add"
echo "export OMP_NUM_THREADS=1"
echo
fi
}
"STEP$1" 2>/dev/null