forked from UCL-CCS/HemePure
-
Notifications
You must be signed in to change notification settings - Fork 0
/
FullBuild.sh
65 lines (47 loc) · 1.16 KB
/
FullBuild.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
#!/bin/bash
## Compilation/build script for HEMELB
## Run from found location
## MODULE loads
##GCC compilers
MODULES(){
#Module environment on ARCHER2
#module restore PrgEnv-gnu
#Module environment on SuperMUC-NG, default compilers are fine
#module load cmake
#module list
#Export compiler shortcuts as named on given machine
export CC=mpicc
export CXX=mpicxx
}
## HEMELB build
# 1) Dependencies
DEPbuild(){
cd dep
rm -rf build
mkdir build
cd build
cmake -DCMAKE_C_COMPILER=${CC} -DCMAKE_CXX_COMPILER=${CXX} ..
make -j && echo "Done HemeLB Dependencies"
cd ../..
}
SRCbuild(){
cd src
rm -rf build_DEFAULT
mkdir build_DEFAULT
cd build_DEFAULT
cmake -DCMAKE_C_COMPILER=${CC} -DCMAKE_CXX_COMPILER=${CXX} -DHEMELB_USE_GMYPLUS=OFF -DHEMELB_USE_MPI_WIN=OFF -DHEMELB_USE_SSE3=ON -DHEMELB_USE_AVX2=OFF ..
make -j && echo "Done HemeLB Source"
cd ../..
}
SRCbuild_ARCHER2(){
cd src
rm -rf build
mkdir build
cd build
cmake -DCMAKE_Fortran_COMPILER=${FC} -DCMAKE_C_COMPILER=${CC} -DCMAKE_CXX_COMPILER=${CXX} -DCTEMPLATE_LIBRARY=<PathToRepoOnARCHER2>/dep/install/lib/libctemplate.a -DHEMELB_USE_MPI_WIN=OFF ..
make -j && echo "Done HemeLB Source"
cd ../..
}
MODULES
DEPbuild
SRCbuild