-
Notifications
You must be signed in to change notification settings - Fork 13
/
build.sh
executable file
·57 lines (47 loc) · 1.31 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
#!/bin/bash
[ ! -d config ] && mkdir -p config
[ ! -e configure ] && autoreconf -fv -i
[ ! -d build ] && mkdir build
cd build
echo "PREFIX=$PREFIX"
echo "CUDADRV=$CUDADRV"
echo "CUDATK=$CUDATK"
echo "CUDA=$CUDA"
echo "MPI_HOME=$MPI_HOME"
if [ ! -e Makefile ]; then
echo "configuring..."
EXTRA=
if [ "x$CUDADRV" != "x" ]; then
EXTRA+=" --with-cuda-driver=${CUDADRV}"
fi
if [ "x$CUDATK" != "x" ]; then
EXTRA+=" --with-cuda-toolkit=$CUDATK"
elif [ "x$CUDA" != "x" ]; then
EXTRA+=" --with-cuda-toolkit=$CUDA"
else
echo "ERROR: CUDA toolkit path not passed"
exit
fi
if [ "x$OFED" != "x" ]; then
echo "picking OFED libibverbs from $OFED"
EXTRA+=" --with-libibverbs=$OFED"
else
echo "WARNING: assuming IB Verbs is installed in /usr"
EXTRA+=" --with-libibverbs=/usr"
fi
if [ "x$GDRCOPY" != "x" ]; then
EXTRA+=" --with-gdrcopy=$GDRCOPY"
else
echo "WARNING: assuming GDRcopy is installed in /usr"
EXTRA+=" --with-gdrcopy=/usr"
fi
EXTRA+=" --enable-test"
EXTRA+=" --enable-extended-memops"
#EXTRA+=" --enable-nvtx"
#EXTRA+=" --with-gdstools=$PREFIX"
../configure \
--prefix=$PREFIX \
--with-mpi=$MPI_HOME \
$EXTRA
fi
make V=1 clean all install