From b56b4a3291f192d7e53f9e105bbe284857fe8be3 Mon Sep 17 00:00:00 2001 From: Jose Gracia Date: Thu, 4 Aug 2022 09:06:44 +0000 Subject: [PATCH] Adding python_vanilla 3.10.4 --- packages/debugger/temanejo/temanejo-1.0_any | 4 + .../development/python/vanilla_python-3.10.4 | 140 ++++++++++++++++++ .../development/python/vanilla_python-3.8.1 | 103 +++++++++++++ .../development/python/vanilla_python-3.8.3 | 107 +++++++++++++ packages/libs/nanox/nanox-any | 10 +- packages/performance/extrae/extrae-3.7.1 | 13 +- packages/performance/extrae/extrae-3.8.3 | 8 +- sit | 7 +- 8 files changed, 386 insertions(+), 6 deletions(-) create mode 100755 packages/development/python/vanilla_python-3.10.4 create mode 100755 packages/development/python/vanilla_python-3.8.1 create mode 100755 packages/development/python/vanilla_python-3.8.3 diff --git a/packages/debugger/temanejo/temanejo-1.0_any b/packages/debugger/temanejo/temanejo-1.0_any index b9e171e..353d1c6 100755 --- a/packages/debugger/temanejo/temanejo-1.0_any +++ b/packages/debugger/temanejo/temanejo-1.0_any @@ -18,6 +18,7 @@ enable_module=${enable_module:=1} MODULE_TEMPLATE=${PREFIX_BASE}/${CATEGORY}/${PACKAGE}/modulefiles/HLRS_temanejo_modulefile.in # build OmpSs plugin; set to path to OmpSs installation enable_ompss=${enable_ompss:=0} +enable_ompt=${enable_ompt:=0} # Archive A and package name P A=${PACKAGE}-${VERSION}.tar.gz @@ -36,6 +37,9 @@ fi if [ $enable_ompss != 0 ]; then CONFIGURE_OPTS+=" --with-ompss=$enable_ompss " fi +if [ $enable_ompt != 0 ]; then + CONFIGURE_OPTS+=" --enable-ompt " +fi src_postinst() { diff --git a/packages/development/python/vanilla_python-3.10.4 b/packages/development/python/vanilla_python-3.10.4 new file mode 100755 index 0000000..037bdf9 --- /dev/null +++ b/packages/development/python/vanilla_python-3.10.4 @@ -0,0 +1,140 @@ +#!/bin/sh +# sit class file +# +# Christoph Niethammer (C) 2018 +# + +CATEGORY="development" +PACKAGE="python/vanilla_python" +VERSION="3.10.4" +SHORT_VERSION="3.10" +URL="https://www.python.org/" +INSTALLER="Jose Gracia " + + + +# Archive A and package name P +A="Python-${VERSION}.tgz" +P="Python-${VERSION}" + + +# Other interesting configure options: +#--enable-sampling \ +CONFIGURE_OPTS=" \ + --enable-shared + --enable-unicode=ucs4 + --enable-optimizations + --with-ensurepip + " + + +case $PLATFORM in +rocky|vulcan|laki|slc) + ;; +hazelhen) + ;; +*) + ;; +esac + +src_postinst() { + + set_symlinks + + install_vanilla_packages + + install_share_directory + + enable_pip_site + + install_site_packages + + echo "Stage postinst done." +} + +install_vanilla_packages() { + # install numpy, mpi4py + + export LD_LIBRARY_PATH=$PREFIX/lib/:$LD_LIBRARY_PATH + export PYTHONPATH=$PREFIX/lib/python${SHORT_VERSION}/site-packages + + _PIP_SITE_INDEX_URL="http://localhost:3141/root/pypi/+simple/" + export PIP_DEFAULT_TIMEOUT=2 + export PIP_DISABLE_PIP_VERSION_CHECK=1 + export PIP_INDEX_URL=$_PIP_SITE_INDEX_URL + + $PREFIX/bin/pip install numpy scipy dask + $PREFIX/bin/pip list + + # freeze site-packages directory + chmod -R a-w $PREFIX/lib/python${SHORT_VERSION}/site-packages +} + +install_site_packages() { + export PYTHON_SITE_HOME=$PREFIX/../../$SHORT_VERSION + echo "########### $PYTHON_SITE_HOME" + PATH=$PATH:$PYTHON_SITE_HOME/bin:$PREFIX/bin + PIP_SITE=$PYTHON_SITE_HOME/bin/pip-site + PACKAGES=$PYTHON_SITE_HOME/../share/artifacts/default_requirements.txt + [ -f "$PIP_SITE" ] && $PIP_SITE install --user -r $PACKAGES +} + +install_share_directory() { + # create link if shared directory does not exist + GENERAL_PYTHON=/sw/general/x86_64/development/python + PYTHON_PREFIX=$PREFIX/../../ # all python stuff is here + SHARED=$PYTHON_PREFIX/share + [ ! -d "$SHARED" ] && ln -s $GENERAL_PYTHON/share $SHARED + + # report + [ -d "$SHARED" ] && echo "Share directory is present." +} + +enable_pip_site() { + # create link from share/bin/pip-site into $SHORT_VERSION/bin + PYTHON_SITE_HOME=$PREFIX/../../$SHORT_VERSION + PIP_SITE=$PYTHON_SITE_HOME/bin/pip-site + mkdir -p $PYTHON_SITE_HOME/bin + [ ! -f "$PIP_SITE" ] && ln -s $PYTHON_SITE_HOME/../share/bin/pip-site $PIP_SITE + # create directory for logs + mkdir -p $PYTHON_SITE_HOME/logs + + # report + [ -f "$PIP_SITE" ] && echo "pip-site is present." + [ ! -f "$PIP_SITE" ] && echo "pip-site is NOT present." +} + +src_setperms() { + chmod -R g=u $PREFIX + chmod -R o=u-w $PREFIX +} + + +set_symlinks() { + # Adding some symlinks + # Actually PEP 394 recomments against this, but we will do it anyway + + cd $PREFIX/bin + FILES="python pip pydoc" + for FILE in $FILES; do + if [ ! -f $FILE ]; then + if [ -f ${FILE}3 ]; then + ln -s ${FILE}3 ${FILE} + fi + fi + done + FILE="python3-config" + if [ ! -f $FILE ]; then + ln -s ${FILE} python-config + fi +} + + +# src_build() { +# make shared add_binutils_objs +# } +# +# src_install() { +# ln -s ../$PACKAGE-$VERSION/doc . +# make install || sit_fail "Installation failed" +# } diff --git a/packages/development/python/vanilla_python-3.8.1 b/packages/development/python/vanilla_python-3.8.1 new file mode 100755 index 0000000..21d1e83 --- /dev/null +++ b/packages/development/python/vanilla_python-3.8.1 @@ -0,0 +1,103 @@ +#!/bin/sh +# sit class file +# +# Christoph Niethammer (C) 2018 +# + +CATEGORY="development" +PACKAGE="python/vanilla_python" +VERSION="3.8.1" +SHORT_VERSION="3.8" +URL="https://www.python.org/" +INSTALLER="Jose Gracia " + + + +# Archive A and package name P +A="Python-${VERSION}.tgz" +P="Python-${VERSION}" + + +# Other interesting configure options: +#--enable-sampling \ +CONFIGURE_OPTS=" \ + --enable-shared + --enable-unicode=ucs4 + --enable-optimizations + --with-ensurepip + " + + +case $PLATFORM in +vulcan|laki|slc) + ;; +hazelhen) + ;; +*) + ;; +esac + +src_postinst() { + + set_symlinks + + install_vanilla_packages + + #install_site_packages + + echo "******** DO NOT FORGET to enable pip-site mechanism" +} + +install_vanilla_packages() { + # install numpy, mpi4py + + export LD_LIBRARY_PATH=$PREFIX/lib/:$LD_LIBRARY_PATH + export PYTHONPATH=$PREFIX/lib/python${SHORT_VERSION}/site-packages + + _PIP_SITE_INDEX_URL="http://localhost:3141/root/pypi/+simple/" + export PIP_DEFAULT_TIMEOUT=2 + export PIP_DISABLE_PIP_VERSION_CHECK=1 + export PIP_INDEX_URL=$_PIP_SITE_INDEX_URL + + $PREFIX/bin/pip install numpy scipy dask + $PREFIX/bin/pip list + + # freeze site-packages directory + chmod -R a-w $PREFIX/lib/python${SHORT_VERSION}/site-packages +} + +install_site_packages() { + /bin/true +} + + +src_setperms() { + chmod -R g=u $PREFIX + chmod -R o=u-w $PREFIX +} + + +set_symlinks() { + # Adding some symlinks + # Actually PEP 394 recomments against this, but we will do it anyway + + cd $PREFIX/bin + FILES="python pip pydoc" + for FILE in $FILES; do + if [ ! -f $FILE ]; then + if [ -f ${FILE}3 ]; then + ln -s ${FILE}3 ${FILE} + fi + fi + done +} + + +# src_build() { +# make shared add_binutils_objs +# } +# +# src_install() { +# ln -s ../$PACKAGE-$VERSION/doc . +# make install || sit_fail "Installation failed" +# } diff --git a/packages/development/python/vanilla_python-3.8.3 b/packages/development/python/vanilla_python-3.8.3 new file mode 100755 index 0000000..a26c6f7 --- /dev/null +++ b/packages/development/python/vanilla_python-3.8.3 @@ -0,0 +1,107 @@ +#!/bin/sh +# sit class file +# +# Christoph Niethammer (C) 2018 +# + +CATEGORY="development" +PACKAGE="python/vanilla_python" +VERSION="3.8.3" +SHORT_VERSION="3.8" +URL="https://www.python.org/" +INSTALLER="Jose Gracia " + + + +# Archive A and package name P +A="Python-${VERSION}.tgz" +P="Python-${VERSION}" + + +# Other interesting configure options: +#--enable-sampling \ +CONFIGURE_OPTS=" \ + --enable-shared + --enable-unicode=ucs4 + --enable-optimizations + --with-ensurepip + " + + +case $PLATFORM in +vulcan|laki|slc) + ;; +hazelhen) + ;; +*) + ;; +esac + +src_postinst() { + + set_symlinks + + install_vanilla_packages + + #install_site_packages + + echo "******** DO NOT FORGET to enable pip-site mechanism" +} + +install_vanilla_packages() { + # install numpy, mpi4py + + export LD_LIBRARY_PATH=$PREFIX/lib/:$LD_LIBRARY_PATH + export PYTHONPATH=$PREFIX/lib/python${SHORT_VERSION}/site-packages + + _PIP_SITE_INDEX_URL="http://localhost:3141/root/pypi/+simple/" + export PIP_DEFAULT_TIMEOUT=2 + export PIP_DISABLE_PIP_VERSION_CHECK=1 + export PIP_INDEX_URL=$_PIP_SITE_INDEX_URL + + $PREFIX/bin/pip install numpy scipy dask + $PREFIX/bin/pip list + + # freeze site-packages directory + chmod -R a-w $PREFIX/lib/python${SHORT_VERSION}/site-packages +} + +install_site_packages() { + /bin/true +} + + +src_setperms() { + chmod -R g=u $PREFIX + chmod -R o=u-w $PREFIX +} + + +set_symlinks() { + # Adding some symlinks + # Actually PEP 394 recomments against this, but we will do it anyway + + cd $PREFIX/bin + FILES="python pip pydoc" + for FILE in $FILES; do + if [ ! -f $FILE ]; then + if [ -f ${FILE}3 ]; then + ln -s ${FILE}3 ${FILE} + fi + fi + done + FILE="python3-config" + if [ ! -f $FILE ]; then + ln -s ${FILE} python-config + fi +} + + +# src_build() { +# make shared add_binutils_objs +# } +# +# src_install() { +# ln -s ../$PACKAGE-$VERSION/doc . +# make install || sit_fail "Installation failed" +# } diff --git a/packages/libs/nanox/nanox-any b/packages/libs/nanox/nanox-any index 3211dc2..24b6d4e 100644 --- a/packages/libs/nanox/nanox-any +++ b/packages/libs/nanox/nanox-any @@ -11,6 +11,9 @@ # * decide on a version number for the user-visible package, # e.g. the nanox version, and set OMPSS_VERSION=xxx # * choose a nanox version +# * dependencies: +# * HWLOC_HOME=/opt/compiler/ompss/common; PATH=$HWLOC_HOME/bin/:$PATH +# * module load performance/extrae # * install libs/nanox with: # NANOX_VERSION=0.7a-2014-04-10 VERSION=$OMPSS_VERSION \ # COMPILER=gnu CATEGORY=compiler PREFIX_BASE=$YOUR_PREFIX_BASE @@ -43,6 +46,8 @@ enable_ayudame=${enable_ayudame:=0} enable_debug=${enable_debug:=0} # enable hwloc enable_hwloc=${enable_hwloc:=1} +# disable hardcoding library paths / rpath +disable_rpath=${disable_rpath:=1} # Other interesting configure options: #CONFIGURE_OPTS=" \ @@ -65,7 +70,7 @@ if [ $enable_debug == 1 ] ; then fi if [ $enable_extrae == 1 ] ; then - module load performance/extrae + #module load performance/extrae echo "Building with EXTRAE_HOME=$EXTRAE_HOME" CONFIGURE_OPTS+=" --with-extrae=$EXTRAE_HOME" fi @@ -82,6 +87,9 @@ if [ $enable_hwloc == 1 ] ; then CONFIGURE_OPTS+=" --with-hwloc=$HWLOC_DIR" fi +if [ $disable_rpath == 1 ] ; then + CONFIGURE_OPTS+=" --disable-rpath" +fi src_pretest() { /bin/true diff --git a/packages/performance/extrae/extrae-3.7.1 b/packages/performance/extrae/extrae-3.7.1 index 663fdc8..fd57590 100644 --- a/packages/performance/extrae/extrae-3.7.1 +++ b/packages/performance/extrae/extrae-3.7.1 @@ -19,16 +19,25 @@ enable_papi=${enable_papi:=1} # Other interesting configure options: #--disable-doc \ sit_info "MPI_DIR $MPI_DIR" +MPI_DIR=${MPI_ROOT:=$(dirname $(dirname $(which mpicc)))} CONFIGURE_OPTS="\ --with-mpi=$MPI_DIR \ - --with-mpi-headers=${MPI_INC_DIR:=$MPI_DIR/lib} - --with-mpi-libs=${MPI_LIB_DIR:=$MPI_DIR/lib} --enable-sampling --enable-posix-clock \ --without-unwind \ --without-dyninst \ " +CFLAGS+="-g -O2 -Wno-error" +CXXFLAGS+="-g -O2 -Wno-error" + case $PLATFORM in + hawk) + BINUTILS_DIR=${BINUTILS_ROOT:=$(dirname $(dirname $(which ld)))} + CONFIGURE_OPTS+="\ + --with-binutils=$BINUTILS_ROOT \ + --with-unwind=$LIBUNWIND_ROOT \ + " + ;; hornet|hazelhen) CFLAGS+=" -dynamic" LDFLAGS+=" -dynamic -lrt" diff --git a/packages/performance/extrae/extrae-3.8.3 b/packages/performance/extrae/extrae-3.8.3 index c756be5..8a2a6ce 100644 --- a/packages/performance/extrae/extrae-3.8.3 +++ b/packages/performance/extrae/extrae-3.8.3 @@ -16,10 +16,13 @@ P=${PACKAGE}-${VERSION} enable_papi=${enable_papi:=1} +#module unload binutils +module list + # Other interesting configure options: #--disable-doc \ sit_info "MPI_DIR $MPI_DIR" -MPI_DIR=${MPI_ROOT:=$(dirname $(dirname $(which mpicc)))} +MPI_DIR=${MPI_ROOT:=$(dirname $(dirname $(which mpicc)))} CONFIGURE_OPTS="\ --with-mpi=$MPI_DIR \ --enable-sampling @@ -32,9 +35,10 @@ CXXFLAGS+="-g -O2 -Wno-error" case $PLATFORM in hawk) + module load papi libunwind binutils BINUTILS_DIR=${BINUTILS_ROOT:=$(dirname $(dirname $(which ld)))} CONFIGURE_OPTS+="\ - --with-binutils=$BINUTILS_ROOT \ + --with-binutils=$BINUTILS_DIR \ --with-unwind=$LIBUNWIND_ROOT \ " ;; diff --git a/sit b/sit index 9216501..c914d99 100755 --- a/sit +++ b/sit @@ -6,6 +6,7 @@ # set -e +#set -x function show_help() { echo "Usage: $0 [options] [action] " @@ -128,9 +129,13 @@ else module swap $COMPILER $COMPILER/$COMPILER_VERSION fi # adjust MPICH and libsci versions to match compiler - module load cray-mpich-compat/v7 || module load cray-mpich-compat/v6 + # module load cray-mpich-compat/v7 || module load cray-mpich-compat/v6 fi MPI_DIR=$MPICH_DIR + module unload craype-hugepages16M + module sw craype-network-aries craype-network-none + module unload cray-mpich + module sw craype-haswell craype-sandybridge ;; hawk) if [ -z "$COMPILER_VERSION" ] ; then