Commit 26671ae2 authored by Matthieu Boileau's avatar Matthieu Boileau

Add StarPU

parent 36bde1a6
#!/bin/bash
set -x
LIB_NAME="starpu"
LIB_VERSION="21055"
GCC_VERSION=6.4.0
MPI_LIB=openmpi
MPI_VERSION=2.1.1
LIB_FULLNAME=${LIB_NAME}-r${LIB_VERSION}
GCC_FULL=gcc-$GCC_VERSION
GCC_SHORT="gcc${GCC_VERSION//.}"
MPI_FULL=${MPI_LIB}-${MPI_VERSION}
MPI_SHORT="${MPI_LIB}${MPI_VERSION//.}"
SUB_DIR=${LIB_NAME}/${LIB_VERSION}/${GCC_FULL}/${MPI_FULL}
WORK_DIR=/data/software/sources/${SUB_DIR}
SRC_DIR=${WORK_DIR}/${LIB_FULLNAME}
ARCHIVE=${SRC_DIR}.tar.gz
URL="svn://scm.gforge.inria.fr/svnroot/starpu/trunk"
BUILD_DIR=${WORK_DIR}/${LIB_FULLNAME}-build
INSTALL_DIR=/data/software/install/${SUB_DIR}
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
MODULE_DIR=/data/software/modules/libs/${LIB_NAME}
MODULE_PATH=${MODULE_DIR}/${LIB_VERSION}_${GCC_SHORT}_${MPI_SHORT}
module purge
module load gcc/${GCC_VERSION}
module load ${MPI_LIB}/${MPI_VERSION}_${GCC_SHORT}
module load AMD-APP-SDK/3.0.130.136
gcc --version |head -n 1
sleep 2
mpirun --version |head -n 1
sleep 2
if [[ ! -d $SRC_DIR ]]; then
svn checkout -r $LIB_VERSION $URL $SRC_DIR || exit 1
cd $SRC_DIR
./autogen.sh || exit 1
fi
if [[ ! -d $BUILD_DIR ]]; then
mkdir $BUILD_DIR
cd $BUILD_DIR
${SRC_DIR}/configure \
--enable-mpi-check \
--disable-build-doc \
--enable-openmp \
--with-opencl-lib-dir=/data/software/install/AMD \
--prefix=${INSTALL_DIR} || exit 1
fi
cd $BUILD_DIR
make -j || exit 1
make -j install || exit 1
cd $SCRIPT_DIR
mkdir -p ${MODULE_DIR}
export LIB_NAME
export LIB_VERSION
export INSTALL_DIR
envtpl --keep-template -o $MODULE_PATH module.tmpl
#%Module1.0################
##
## {{ LIB_NAME }} (svn r{{ LIB_VERSION }}) module
#
#
proc ModulesHelp { } {
global prefix
puts stderr "\tlibs/{{ LIB_NAME }}/{{ LIB_VERSION }} - loads {{ LIB_NAME }} (svn r{{ LIB_VERSION }}) module"
}
module-whatis "Loads {{ LIB_NAME }} (svn r{{ LIB_VERSION }}) and its environment"
# for Tcl script use only
set prefix {{ INSTALL_DIR }}
set libpath $prefix/lib
set binpath $prefix/bin
set includepath $prefix/include
set pkgconfigpath $prefix/lib/pkgconfig
if [module-info mode load] {
prepend-path PATH $binpath
prepend-path LD_LIBRARY_PATH $libpath
prepend-path PKG_CONFIG_PATH $pkgconfigpath
}
if [module-info mode remove] {
remove-path PATH $binpath
remove-path LD_LIBRARY_PATH $libpath
remove-path PKG_CONFIG_PATH $pkgconfigpath
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment