-
Notifications
You must be signed in to change notification settings - Fork 13
/
bidparse
executable file
·35 lines (30 loc) · 1.56 KB
/
bidparse
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
#!/bin/bash
export JAVA_OPTS="-Xmx12G -Xms128M" # Set as much memory as possible
BIDPARSE_ROOT="${BASH_SOURCE[0]}"
if [ ! `uname` = "Darwin" ]; then
BIDPARSE_ROOT=`readlink -f "${BIDPARSE_ROOT}"`
else
BIDPARSE_ROOT=`readlink "${BIDPARSE_ROOT}"`
fi
BIDPARSE_ROOT=`dirname "$BIDPARSE_ROOT"`
BIDPARSE_ROOT="$( echo ${BIDPARSE_ROOT} | sed s+/cygdrive/c+c:+ )"
BIDMAT_ROOT="${BIDPARSE_ROOT}/../BIDMat" # Change if needed
# export JAVA_HOME="" # Set here if not set in environment
# Fix these if needed
JCUDA_VERSION="0.5.0"
JCUDA_LIBDIR="${BIDMAT_ROOT}/lib"
BIDLIB="${BIDMAT_ROOT}/lib"
LIBDIR=${BIDPARSE_ROOT}/lib
if [ `uname` = "Darwin" ]; then
export DYLD_LIBRARY_PATH="${BIDMAT_ROOT}/lib:${BIDPARSE_ROOT}/lib:/usr/local/cuda/lib:${LD_LIBRARY_PATH}"
else
export LD_LIBRARY_PATH="${BIDMAT_ROOT}/lib:${BIDPARSE_ROOT}/lib:/usr/local/cuda/lib64:${LD_LIBRARY_PATH}"
fi
BIDMAT_LIBS="${BIDMAT_ROOT}/BIDMat.jar;${BIDLIB}/ptplot.jar;${BIDLIB}/ptplotapplication.jar;${BIDLIB}/jhdf5.jar;${BIDLIB}/commons-math3-3.1.1.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"
export ALL_LIBS="${BIDPARSE_ROOT}/BIDParse.jar;${LIBDIR}/berkeleyparser4BIDParse.jar;${BIDMAT_LIBS};${JCUDA_LIBS};${JAVA_HOME}/lib/tools.jar"
if [ ! "$OS" = "Windows_NT" ]; then
export ALL_LIBS=`echo "${ALL_LIBS}" | sed 's/;/:/g'`
fi
cd ${BIDPARSE_ROOT}
scala -nobootcp -cp "${ALL_LIBS}" -Yrepl-sync -i ${LIBDIR}/bidparse_init.scala