diff --git a/mcxx-nanox_install.sh b/mcxx-nanox_install.sh index 8a99f89..1f89818 100755 --- a/mcxx-nanox_install.sh +++ b/mcxx-nanox_install.sh @@ -32,7 +32,7 @@ mcxx_src_dir="$SRC_POOL/mcxx/mcxx.git" nanox_src_dir="$SRC_POOL/nanox/nanox.git" # enable instrumentation (no|yes) -instrumentation="no" +instrumentation=${instrumentation:="no"} # Compiler specifications @@ -64,6 +64,13 @@ case ${COMPILER} in ;; esac +if [ "$instrumentation" = "yes" ]; then + module load performance/extrae + echo "Building with EXTRAE_HOME=$EXTRAE_HOME" + sleep 2 + withextrae="--with-extrae=$EXTRAE_HOME" +fi + PREFIX="${PREFIX_BASE}/${CATEGORY}/${PACKAGE}/${VERSION}-${COMPILER}-${COMPILER_VERSION}${PACKAGE_DESCRIPTOR}" echo "PREFIX: $PREFIX" @@ -87,55 +94,35 @@ make_package () cd $dir echo -n "configuring... " - if [[ -d build ]] - then + if [[ -d build ]] ; then rm -rf build fi mkdir build cd build ../configure --prefix=$PREFIX $* || fail echo -n "compiling... " - make $MK_OPTS || fail + make || fail echo -n "installing... " make install || fail cd .. echo "Success" } -if [ "$instrumentation" = "yes" ]; then - echo -n "Installing Extrae instrumentation library... " - echo "Not available yet." - fail - - tar zxf $EXTRAE_TAR - make_package ${EXTRAE_TAR%.tar*} --disable-doc -fi - cd $nanox_src_dir -# tar jxf $NANOS_TAR rm -rf autom4te.cache #git pull git checkout master ./autogen.sh nanox_version=$(git rev-list -n 1 master) -echo $nanox_version - -if [ "$instrumentation" = "yes" ]; then - export CXXFLAGS="-DNANOS_INSTRUMENTATION_ENABLED" - export CFLAGS="-DNANOS_INSTRUMENTATION_ENABLED" - withextrae="--with-extrae=$PREFIX" -fi -#tar jxf $MERCURIUM_TAR cd $mcxx_src_dir rm -rf autom4te.cache #git pull git checkout master ./autogen.sh mcxx_version=$(git rev-list -n 1 master) -echo $mcxx_version PREFIX="${PREFIX_BASE}/${CATEGORY}/${PACKAGE}/${VERSION}-${COMPILER}-${COMPILER_VERSION}${PACKAGE_DESCRIPTOR}"