-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_benchmarks.sh
More file actions
executable file
·68 lines (61 loc) · 2.37 KB
/
build_benchmarks.sh
File metadata and controls
executable file
·68 lines (61 loc) · 2.37 KB
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
#!/bin/bash
# Initialise option flags
BUILD_DBG="true"
BUILD_OPT="true"
BUILD_GENERIC="true"
BUILD_INTEL="false"
BUILD_AMD="false"
if [[ $* == --no-dbg ]]; then BUILD_DBG="false"; fi
if [[ $* == --no-opt ]]; then BUILD_OPT="false"; fi
if [[ $* == --intel ]]; then BUILD_INTEL="true"; BUILD_GENERIC="false"; fi
if [[ $* == --amd ]]; then BUILD_AMD="true"; BUILD_GENERIC="false"; fi
# AMD Libraries
#PATH_TO_CBLAS_DIR="/opt/AMD/aocl/aocl-linux-aocc-3.1.0/include"
#PATH_TO_BLAS_LIBS="/opt/AMD/aocl/aocl-linux-aocc-3.1.0/lib64"
#PATH_TO_LAPACKE_INCLUDE_DIR="/opt/AMD/aocl/aocl-linux-aocc-3.1.0/include"
#PATH_TO_LIBGFORTRAN="/opt/AMD/aocl/aocl-linux-aocc-3.1.0/lib"
#PATH_TO_LAPACK_BINARIES="/opt/AMD/aocl/aocl-linux-aocc-3.1.0/lib"
# Intel Libraries
#PATH_TO_CBLAS_DIR="/opt/intel/oneapi/mkl/latest/include"
#PATH_TO_BLAS_LIBS="/opt/intel/oneapi/mkl/latest/lib/intel64"
#PATH_TO_LAPACKE_INCLUDE_DIR="/opt/intel/oneapi/mkl/latest/include"
#PATH_TO_LIBGFORTRAN="/opt/intel/oneapi/mkl/latest/lib/intel64"
#PATH_TO_LAPACK_BINARIES="/opt/intel/oneapi/mkl/latest/lib/intel64"
# Build all tests and save log
echo
echo "------------------------------------------------------------"
# System BLAS/LAPACK
PATH_TO_CBLAS_DIR="/usr/include"
PATH_TO_BLAS_LIBS="/usr/lib64"
PATH_TO_LAPACKE_INCLUDE_DIR="/usr/include"
PATH_TO_LIBGFORTRAN="/usr/lib64"
PATH_TO_LAPACK_BINARIES="/usr/lib64"
echo -e "Building Interpolation Bench:"
echo
chpl -o bench/interpBench.chapel \
--fast \
-L/usr/lib64/gcc/x86_64-suse-linux/11 \
-I$PATH_TO_CBLAS_DIR \
-L$PATH_TO_BLAS_LIBS -lcblas \
-I$PATH_TO_LAPACKE_INCLUDE_DIR \
-L$PATH_TO_LIBGFORTRAN -lgfortran \
-L$PATH_TO_LAPACK_BINARIES -llapacke -llapack -lcblas \
--main-module InterpBench bench/interpBench.chpl
2>&1 | tee bench/interpBench-build.log
if [ $? -eq 0 ]; then
echo -e "\nSuccess"
else
echo -e "\nFailed"
fi
echo
echo
echo "------------------------------------------------------------"
echo
echo -e "Running Tests..."
echo
# Run tests and output to file
./bench/interpBench &> bench/interpBench.log
echo -e "Done"
echo
echo "------------------------------------------------------------"
echo