2013-09-24 13:24:33 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# sit class file
|
|
|
|
#
|
|
|
|
# Christoph Niethammer <niethammer@hlrs.de> (C) 2013
|
|
|
|
#
|
|
|
|
|
|
|
|
CATEGORY="performance"
|
|
|
|
PACKAGE="vampirtrace"
|
|
|
|
VERSION="5.14.4"
|
|
|
|
URL="http://www.tu-dresden.de/zih/vampirtrace/"
|
|
|
|
INSTALLER="Christoph Niethammer <niethammer@hlrs.de>"
|
|
|
|
|
|
|
|
|
|
|
|
# Archive A and package name P
|
|
|
|
A="VampirTrace-${VERSION}.tar.gz"
|
|
|
|
P="VampirTrace-${VERSION}"
|
|
|
|
|
|
|
|
enable_papi=${enable_papi:=1}
|
|
|
|
enable_cuda=${enable_cuda:=1}
|
|
|
|
|
|
|
|
|
|
|
|
# Other interesting configure options:
|
|
|
|
#--enable-sampling \
|
|
|
|
|
2016-01-26 14:01:15 +00:00
|
|
|
case $PLATFORM in
|
|
|
|
hermit1|hornet|hazelhen)
|
|
|
|
CONFIGURE_OPTS=" \
|
|
|
|
--with-platform=crayxe \
|
|
|
|
--build=x86_64-unknown-linux-gnu \
|
|
|
|
--host=x86_64-cray-linux-gnu \
|
|
|
|
"
|
|
|
|
#--without-cross-prefix \
|
|
|
|
#--disable-exectrace \
|
|
|
|
;;
|
|
|
|
laki)
|
|
|
|
CONFIGURE_OPTS=" \
|
|
|
|
--with-mpi-dir=$MPI_DIR \
|
|
|
|
"
|
|
|
|
;;
|
|
|
|
esac
|
2013-09-24 13:24:33 +00:00
|
|
|
|
|
|
|
# use PAPI
|
|
|
|
if [ $enable_papi != 0 ] ; then
|
2016-01-26 14:01:15 +00:00
|
|
|
case $PLATFORM in
|
|
|
|
hermit1|hornet|hazelhen)
|
|
|
|
module load papi
|
|
|
|
;;
|
|
|
|
laki)
|
|
|
|
module load performance/papi
|
|
|
|
PAPI_DIR=$(dirname $(dirname $(which papi_avail)))
|
|
|
|
CONFIGURE_OPTS="${CONFIGURE_OPTS} --with-papi-dir=$PAPI_DIR"
|
|
|
|
;;
|
|
|
|
esac
|
2013-09-24 13:24:33 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
# use CUDA
|
|
|
|
if [ $enable_cuda != 0 ] ; then
|
|
|
|
if [[ $PLATFORM == "hermit1" ]] ; then
|
|
|
|
module load craype-accel-nvidia35
|
|
|
|
CONFIGURE_OPTS="${CONFIGURE_OPTS} --with-cuda-inc-dir=$WORKDIR/CUDA5.0.35_patchedHeaders/"
|
|
|
|
else
|
|
|
|
module load cuda
|
|
|
|
fi
|
|
|
|
#--with-cupti-dir=$CUDA_DIR/extras/CUPTII \
|
|
|
|
#--with-cuda-inc-dir=$CUDA_DIR/include \
|
|
|
|
#--with-cuda-lib-dir=$CUDA_DIR/lib \
|
|
|
|
#--with-cudart-lib-dir=$CUDA_DIR/lib64 \
|
|
|
|
#--with-cudart-dir=$CUDA_DIR \
|
|
|
|
CUDA_DIR=${CUDA_DIR:=$(dirname $(dirname $(which nvcc)))}
|
|
|
|
CONFIGURE_OPTS="${CONFIGURE_OPTS} \
|
|
|
|
--with-cuda-dir=$CUDA_DIR \
|
|
|
|
"
|
|
|
|
fi
|
|
|
|
|
|
|
|
src_prepare() {
|
|
|
|
if [[ $PLATFORM == "hermit1" ]] ; then
|
|
|
|
module load craype-accel-nvidia35
|
|
|
|
# create a copy of cuda header files and apply the patched provided by ZIH to enable OpenACC support
|
|
|
|
PATCHED_CUDA_HEADER_DIR=$WORKDIR/CUDA5.0.35_patchedHeaders/
|
|
|
|
mkdir -p $PATCHED_CUDA_HEADER_DIR
|
|
|
|
rsync -a $CUDATOOLKIT_HOME/include/ $PATCHED_CUDA_HEADER_DIR/
|
|
|
|
tar xfz $SCLASS_DIR/$SCLASSFILE-hermit-openacc-0000.patch.tar.gz -C $PATCHED_CUDA_HEADER_DIR/../
|
|
|
|
fi
|
|
|
|
}
|