-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.sh
executable file
·74 lines (61 loc) · 1.6 KB
/
build.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
#!/bin/bash
# --- Load required modules
module load cmake
# --- Remove and recreate the build directory
rm -rf build
mkdir -p build
cd build
#-----------------------------------------
# --- Configure the project with CMake
#-----------------------------------------
# --- OpenMP ---
cmake \
-DENABLE_OMP=ON \
-DCMAKE_C_FLAGS="-fopenmp" \
-DCMAKE_CXX_FLAGS="-fopenmp" \
../
# --- OpenMP + Offload ---
# cmake \
# -DENABLE_OMP_TARGET=ON \
# ../
# --- MPI ---
# cmake \
# -DENABLE_MPI_OMP=ON \
# -DCMAKE_C_COMPILER=`which mpicc` \
# -DCMAKE_CXX_COMPILER=`which mpic++` \
# -DCMAKE_C_FLAGS="-fopenmp" \
# -DCMAKE_CXX_FLAGS="-fopenmp" \
# ../
# --- OpenSHMEM ---
# cmake \
# -DENABLE_SHMEM_OMP=ON \
# -DCMAKE_C_COMPILER=`which oshcc` \
# -DCMAKE_CXX_COMPILER=`which oshc++` \
# -DCMAKE_C_FLAGS="-fopenmp" \
# -DCMAKE_CXX_FLAGS="-fopenmp" \
# ../
# --- CUDA ---
#cmake \
# -DENABLE_CUDA=ON \
# -DCMAKE_C_COMPILER=`which nvcc` \
# -DCMAKE_CXX_COMPILER=`which nvcc` \
# -DCMAKE_EXE_LINKER_FLAGS="-lcudart -lcudadevrt" \
# ../
# --- OpenACC ---
# cmake \
# -DENABLE_OACC=ON \
# -DCMAKE_C_COMPILER=`which nvc` \
# -DCMAKE_CXX_COMPILER=`which nvc++` \
# -DCMAKE_C_FLAGS="-acc -ta=tesla:cc70 -Minfo=accel" \
# -DCMAKE_CXX_FLAGS="-acc -ta=tesla:cc70 -Minfo=accel" \
# ../
# --- Build the project
make
# --- Set the path to the executable
export RS=bin/raiderstream
# --- Go back to the project root directory
cd ../
# --- Run the executable
if [ -x $RS ] ; then
echo ; ./run.sh ; echo ; echo
fi