-
Notifications
You must be signed in to change notification settings - Fork 1
/
20_MC2P.conf
121 lines (106 loc) · 4.09 KB
/
20_MC2P.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
#! /bin/bash
shopt -s expand_aliases
STEP0(){
LIST_MACHINE="$LIST_MACHINE MC2P"
}
# 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" = "MC2P" ]; then
COMP="GCC"
OPENMPI="SYS"; VERSION_OPENMPI="1.1.16.5" #Better perf (25%)
DOWN="NO"
fi
}
# Sets some vars
# And prepare the environment
# Only module load and exports are mandatory
STEP2(){
if [ "$MACHINE" = "MC2P" ]; then
module purge > /dev/null 2>&1
alias cmake=/opt/cmake/2.8.11/bin/cmake
module load Utils/python
module unload Parallel/openmpi-1.4.3
[[ "$COMP" = "ICC" ]] && module load Compilateurs/intel12
[[ "$COMP" = "GCC" ]] && module load Compilateurs/gnu
[[ "$COMP" = "GCC" ]] && module load Compilateurs/gnu-4.7
module load Librairies/acml
[[ "$OPENMPI" = "SYS" ]] && module load Parallel/mvapich2-1.8
[[ "$OPENMPI" = "SYS" ]] && BIN_OPENMPI="$MPIHOME"
[[ "$COMP" = "ICC" ]] && export ACML_ROOT="$ACML_ROOT/ifort64"
[[ "$COMP" = "GCC" ]] && export ACML_ROOT="$ACML_ROOT/gfortran64"
export CPATH="$ACML_ROOT/include:$CPATH"
export PATH="/opt/cmake/2.8.11/bin/:$PATH"
[[ "$OPENMPI" = "SYS" ]] && export PATH="$BIN_OPENMPI/bin:$PATH"
[[ "$OPENMPI" = "SYS" ]] && export LD_LIBRARY_PATH="$BIN_OPENMPI/lib:$LD_LIBRARY_PATH"
EXTRA_CONF="$EXTRA_CONF --with-blas-type=ACML --with-blas-include=$ACML_ROOT/include --with-blas-lib=$ACML_ROOT/lib"
fi
}
#======================================================== Compilators
#============================================================ Options
STEP3(){
if [ "$MACHINE" = "MC2P" ];then
if [ "$COMP" = "ICC" ]; then
#Parallel C compilator
P_CC="icc"
#Parallel FORTRAN compilator
P_FC="ifort"
#Parallel FORTRAN 77 compilator
P_F77="ifort"
#Parallel C++ compilator
P_CXX="icpc"
FLAGS_OPTIM="$FLAGS_OPTIM -O1 -xsse2"
else
#Sequential C compilator
S_CC="/share/apps/gcc/4.7/bin/gcc-4.7"
# S_CC="/usr/bin/gcc44"
#Sequential FORTRAN compilator
S_FC="/share/apps/gcc/4.7/bin/gfortran-4.7"
# S_FC="/usr/bin/gfortran44"
#Sequential FORTRAN 77 compilator
S_F77="/share/apps/gcc/4.7/bin/gfortran-4.7"
# S_F77="/usr/bin/gfortran44"
#Sequential C++ compilator
S_CXX="/share/apps/gcc/4.7/bin/c++-4.7"
# S_CXX="/usr/bin/g++44"
#Parallel C compilator
P_CC="$S_CC"
#Parallel FORTRAN compilator
P_FC="$S_FC"
#Parallel FORTRAN 77 compilator
P_F77="$S_F77"
#Parallel C++ compilator
P_CXX="$S_CXX"
fi
if [ "$OPENMPI" = "SYS" ]; then
export LDFLAGS="$LDFLAGS -L$BIN_OPENMPI/lib -lmpich -libumad -libmad -lrdmacm -lmpl -lopa -lpthread -libverbs -ldl -lrt"
FLAGS_OPTIM="$FLAGS_OPTIM -I$BIN_OPENMPI/include"
FLAGS_DEBUG="$FLAGS_DEBUG -I$BIN_OPENMPI/include"
fi
fi
}
STEP8(){
if [ "$MACHINE" = "MC2P" ]; then
TEST="0"
if [ "$VERSION_SATURNE" = "3.2.1" ]; then TEST="1" ; fi # may be necessary with other versions
if [ "$VERSION_SATURNE" = "3.0.4" ]; then TEST="1" ; fi # may be necessary with other versions
if [ "$TEST" = "1" ]; then
cd "$BIN_SATURNE"
stage " PREPATCH " "make.5.log"
tac "$SCRIPTPATH/RESSOURCES" \
| grep 'PATCH CODE_SATURNE BEGIN' -B 50 -m1 | tac\
| grep 'PATCH CODE_SATURNE END' -B 50 -m1 | head -n-1 | tail -n+2 > "$PREFIX/patch"
patch lib/python2.6/site-packages/code_saturne/cs_exec_environment.py "$PREFIX/patch"
rm "$PREFIX/patch"
end_stage
fi
cd "$PREFIX"
fi
}
STEP9(){
[[ "$OPENMPI" = "SYS" ]] && echo "export LD_LIBRARY_PATH=\"/share/apps/mvapich2/1.8/gnu/lib:\$LD_LIBRARY_PATH\""
[[ "$COMP" = "GCC" ]] && echo "export LD_LIBRARY_PATH=\"/share/apps/gcc/4.7/lib:\$LD_LIBRARY_PATH\""
[[ "$COMP" = "GCC" ]] && echo "export LD_LIBRARY_PATH=\"/share/apps/acml/gfortran64/lib:\$LD_LIBRARY_PATH\""
}
"STEP$1" 2>/dev/null