From 616cf192593a1aa7f99d958bfd497faf2c0062ba Mon Sep 17 00:00:00 2001 From: Christoph Niethammer Date: Mon, 11 Apr 2011 09:32:28 +0000 Subject: [PATCH] ompss_install.sh: enable debugging info per default; ayudame --- ompss_install.sh | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/ompss_install.sh b/ompss_install.sh index 2fcf22e..2cb5019 100755 --- a/ompss_install.sh +++ b/ompss_install.sh @@ -35,6 +35,8 @@ nanox_src_dir="$SRC_POOL/nanox/nanox.git" # enable instrumentation (no|yes) instrumentation=${instrumentation:="yes"} +# build with debugging symbols +enable_debug=${enable_debug:=1} # Compiler specifications @@ -48,6 +50,7 @@ fi echo "Loading compiler module ${COMPILER_MODULE}" module load ${COMPILER_MODULE} +declare COMPILER_OPTS= case ${COMPILER} in gnu) COMPILER_OPTS="CC=gcc CXX=g++ FC=gfortran F77=gfortran" @@ -66,17 +69,26 @@ case ${COMPILER} in ;; esac -if [ "$instrumentation" = "yes" ]; then +if [ $enable_debug != 0 ] ; then + COMPILER_OPTS+=" CFLAGS=-g CXXFLAGS=-g CPPFLAGS=-g LDFLAGS=-g" +fi + +if [ "$instrumentation" = "yes" ] ; then module load performance/extrae echo "Building with EXTRAE_HOME=$EXTRAE_HOME" - sleep 2 withextrae="--with-extrae=$EXTRAE_HOME" fi +if [ "$enable_ayudame" = "yes" ] ; then + module load libs/ayudame + echo "Building with AYUDAME_HOME=$AYUDAME_HOME" + withayudame="--with-ayudame=$AYUDAME_HOME" +fi + PREFIX="${PREFIX_BASE}/${CATEGORY}/${PACKAGE}/${VERSION}-${COMPILER}-${COMPILER_VERSION}${PACKAGE_DESCRIPTOR}" echo "PREFIX: $PREFIX" -sleep 2 +sleep 4 @@ -101,7 +113,7 @@ make_package () fi mkdir build cd build - ../configure --prefix=$PREFIX $* 2>&1 | tee "configure.log"; ( exit ${PIPESTATUS} ) + ../configure $COMPILER_OPTS --prefix=$PREFIX $* 2>&1 | tee "configure.log"; ( exit ${PIPESTATUS} ) echo -n "compiling... " make $MAKEOPTS 2>&1 | tee "make.log"; ( exit ${PIPESTATUS} ) echo -n "installing... " @@ -115,7 +127,7 @@ make_package () cd $nanox_src_dir rm -rf autom4te.cache #git pull -git checkout master +#git checkout master ./autogen.sh nanox_version=$(git rev-list -n 1 master) @@ -123,14 +135,14 @@ nanox_version=$(git rev-list -n 1 master) cd $mcxx_src_dir rm -rf autom4te.cache #git pull -git checkout master +#git checkout master ./autogen.sh mcxx_version=$(git rev-list -n 1 master) PREFIX="${PREFIX_BASE}/${CATEGORY}/${PACKAGE}/${VERSION}-${COMPILER}-${COMPILER_VERSION}${PACKAGE_DESCRIPTOR}" echo -n "Installing Nanos++ runtime library... " -make_package $nanox_src_dir $withextrae $cudadir +make_package $nanox_src_dir $withextrae $withayudame $cudadir echo -n "Installing Mercurium compiler... " make_package $mcxx_src_dir --enable-openmpt