-
Notifications
You must be signed in to change notification settings - Fork 13
/
compile.sh
executable file
·70 lines (60 loc) · 1.82 KB
/
compile.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
#!/bin/bash
if [ "$1" = "vdw" ] || [ "$1" == "all" ] || [ "$1" == "cuda" ]; then
git submodule update --init --recursive
cd lapack/
mkdir -p build
cd build/
cmake -DCMAKE_INSTALL_LIBDIR=`pwd`/../install_dir ..
cmake --build . -j --target install
cd ../..
fi
rm -rf build
mkdir -p build
cd build
echo $HOSTNAME | grep "rc.usf.edu"
if [ $? == 0 ]; then
module purge
module load compilers/gcc/5.1.0
module load compilers/intel/2015_cluster_xe
if [ "$1" = "cuda" ] || [ "$1" == "all" ]; then
module load apps/cuda/8.0
fi
export CC=icc
export CXX=icpc
fi
echo $HOSTNAME | grep "bridges.psc.edu"
if [ $? == 0 ]; then
module purge
module load gcc/5.3.0
if [ "$1" = "cuda" ] || [ "$1" == "all" ]; then
module load cuda/8.0
fi
export CC=gcc
export CXX=g++
fi
echo $HOSTNAME | grep ".sdsc.edu"
if [ $? == 0 ]; then
module purge
module purge
module load cmake/3.9.1
module load gnu/4.9.2
if [ "$1" = "cuda" ] || [ "$1" == "all" ]; then
module load cuda/8.0
fi
export CC=gcc
export CXX=g++
fi
if [ "$1" = "debug" ]; then
cmake -DQM_ROTATION=OFF -DVDW=OFF -DMPI=OFF -DCUDA=OFF -DCMAKE_BUILD_TYPE=Debug -Wno-dev ../
elif [ "$1" = "cuda" ]; then
cmake -DQM_ROTATION=ON -DVDW=ON -DMPI=OFF -DCUDA=ON -DCMAKE_BUILD_TYPE=release -Wno-dev ../
elif [ "$1" = "mpi" ]; then
cmake -DQM_ROTATION=OFF -DVDW=OFF -DMPI=ON -DCUDA=OFF -DCMAKE_BUILD_TYPE=release -Wno-dev ../
elif [ "$1" = "vdw" ]; then
cmake -DQM_ROTATION=ON -DVDW=ON -DMPI=OFF -DCUDA=OFF -DCMAKE_BUILD_TYPE=release -Wno-dev ../
elif [ "$1" = "all" ]; then
cmake -DQM_ROTATION=ON -DVDW=ON -DMPI=ON -DCUDA=ON -DCMAKE_BUILD_TYPE=release -Wno-dev ../
else
cmake -DQM_ROTATION=OFF -DVDW=OFF -DMPI=OFF -DCUDA=OFF -DCMAKE_BUILD_TYPE=Release -Wno-dev ../
fi
make -j