-
Notifications
You must be signed in to change notification settings - Fork 73
/
Copy pathbidmat_full
executable file
·36 lines (31 loc) · 1.53 KB
/
bidmat_full
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
#!/bin/bash
# export JAVA_HOME="" # Set here if not set in environment
# Fix these if needed
JCUDA_VERSION="0.5.5"
export JAVA_OPTS="-Xmx14G -Xms128M -Dfile.encoding=UTF-8" # Set as much memory as possible
BIDMAT_ROOT="${BASH_SOURCE[0]}"
if [ ! `uname` = "Darwin" ]; then
BIDMAT_ROOT=`readlink -f "${BIDMAT_ROOT}"`
else
BIDMAT_ROOT=`readlink "${BIDMAT_ROOT}"`
fi
BIDMAT_ROOT=`dirname "$BIDMAT_ROOT"`
BIDMAT_ROOT=`cd "$BIDMAT_ROOT";pwd`
BIDMAT_ROOT="$( echo ${BIDMAT_ROOT} | sed s+/cygdrive/c+c:+ )"
JCUDA_LIBDIR=${BIDMAT_ROOT}/lib
LIBDIR=${BIDMAT_ROOT}/lib
if [ `uname` = "Darwin" ]; then
export DYLD_LIBRARY_PATH="${BIDMAT_ROOT}/lib:${BIDMAT_}/lib/cuda:${DYLD_LIBRARY_PATH}"
else
export LD_LIBRARY_PATH="${BIDMAT_ROOT}/lib:${BIDMAT_ROOT}/lib/cuda:${LD_LIBRARY_PATH}"
fi
export CUDA_PATH="${BIDMAT_ROOT}/lib/cuda"
BIDMAT_LIBS="${BIDMAT_ROOT}/BIDMat.jar;${LIBDIR}/ptplot.jar;${LIBDIR}/ptplotapplication.jar;${LIBDIR}/jhdf5.jar;${LIBDIR}/commons-math3-3.1.1.jar;${LIBDIR}/lz4-1.1.2.jar"
JCUDA_LIBS="${JCUDA_LIBDIR}/jcuda-${JCUDA_VERSION}.jar;${JCUDA_LIBDIR}/jcublas-${JCUDA_VERSION}.jar;${JCUDA_LIBDIR}/jcufft-${JCUDA_VERSION}.jar;${JCUDA_LIBDIR}/jcurand-${JCUDA_VERSION}.jar;${JCUDA_LIBDIR}/jcusparse-${JCUDA_VERSION}.jar"
ALL_LIBS="${BIDMAT_LIBS};${JCUDA_LIBS};${JAVA_HOME}/lib/tools.jar"
if [ ! "$OS" = "Windows_NT" ]; then
ALL_LIBS=`echo "${ALL_LIBS}" | sed 's/;/:/g'`
else
JAVA_OPTS="-Djava.library.path=${BIDMAT_ROOT}/lib;${BIDMAT_ROOT}/lib/cuda "$JAVA_OPTS
fi
scala -nobootcp -cp "${ALL_LIBS}" -Yrepl-sync -i ${LIBDIR}/bidmat_init.scala "$@"