Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preliminary Spack and Python install for Ella. #279

Open
wants to merge 11 commits into
base: ella-setup
Choose a base branch
from
33 changes: 33 additions & 0 deletions ella_test_install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Test install script for the pawsey-spack-config ella-setup branch

export DATE_TAG=2024.06
export SYSTEM=ella

export PAWSEY_PROJECT=pawsey0001

# .pawsey_project is not sourced on ella
if [ -z "${MYSOFTWARE}" ]; then
export MYSOFTWARE="/pawsey/software/projects/$PAWSEY_PROJECT/$USER"
fi

if [ -z "${PAWESY_PROJECT}" ]; then
export PAWSEY_PROJECT=pawsey0001
fi

if [ -z "${INSTALL_GROUP}" ]; then
export INSTALL_GROUP=$PAWSEY_PROJECT
fi

# Create directory for Spack install, see below.
export ACTUAL_INSTALL_PREFIX="/pawsey/software/projects/${PAWSEY_PROJECT}/${USER}/spack-${DATE_TAG}"
mkdir -p $ACTUAL_INSTALL_PREFIX

# Installing in a deep directory caused a shebang error.
# Using a symlink in the user home directory a workaround.
export INSTALL_PREFIX="/home/${USER}/spack-${DATE_TAG}"
if [ ! -L "${INSTALL_PREFIX}" ]; then
ln -s "$ACTUAL_INSTALL_PREFIX" "$INSTALL_PREFIX"
fi

. ./scripts/install_spack.sh
. ./scripts/install_python.sh
6 changes: 3 additions & 3 deletions scripts/install_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ fi
PAWSEY_SPACK_CONFIG_REPO=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )/.." &> /dev/null && pwd )
. "${PAWSEY_SPACK_CONFIG_REPO}/systems/${SYSTEM}/settings.sh"

# for first run, use cray-python, because there is no Spack python yet
module load cray-python
# initialise spack
. "${INSTALL_PREFIX}/spack/share/spack/setup-env.sh"

Expand All @@ -40,5 +38,7 @@ spack -d spec python@${python_version} %gcc@${gcc_version}
echo "Installing Python with default compilers.."
for arch in $archs; do
sg $INSTALL_GROUP -c "spack install --no-checksum python@${python_version} %gcc@${gcc_version} target=$arch"
sg $INSTALL_GROUP -c "spack install --no-checksum python@${python_version} %cce@${cce_version} target=$arch"
if [ "$SYSTEM" != "ella" ]; then
sg $INSTALL_GROUP -c "spack install --no-checksum python@${python_version} %cce@${cce_version} target=$arch"
fi
done
28 changes: 14 additions & 14 deletions scripts/install_spack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,20 @@ if ! [ -e ${INSTALL_PREFIX}/spack ]; then
git checkout v${spack_version}

# apply Marco's LMOD fixes into spack tree
patch ${INSTALL_PREFIX}/spack/lib/spack/spack/modules/lmod.py \
${PAWSEY_SPACK_CONFIG_REPO}/fixes/lmod_arch_family.patch
# Pascal's enhancements to modulefiles
patch ${INSTALL_PREFIX}/spack/lib/spack/spack/modules/common.py \
${PAWSEY_SPACK_CONFIG_REPO}/fixes/modulenames_plus_common.patch
patch ${INSTALL_PREFIX}/spack/lib/spack/spack/cmd/modules/__init__.py \
${PAWSEY_SPACK_CONFIG_REPO}/fixes/modulenames_plus_init.patch
patch ${INSTALL_PREFIX}/spack/lib/spack/spack/paths.py \
${PAWSEY_SPACK_CONFIG_REPO}/fixes/dot_spack.patch
sed -i -e "s|DATE_TAG|$DATE_TAG|g"\
-e "s|PAWSEY_SYSTEM|$SYSTEM|g"\
${INSTALL_PREFIX}/spack/lib/spack/spack/paths.py

rm "${INSTALL_PREFIX}/spack/.git" -rf
#patch ${INSTALL_PREFIX}/spack/lib/spack/spack/modules/lmod.py \
# ${PAWSEY_SPACK_CONFIG_REPO}/fixes/lmod_arch_family.patch
## Pascal's enhancements to modulefiles
#patch ${INSTALL_PREFIX}/spack/lib/spack/spack/modules/common.py \
# ${PAWSEY_SPACK_CONFIG_REPO}/fixes/modulenames_plus_common.patch
#patch ${INSTALL_PREFIX}/spack/lib/spack/spack/cmd/modules/__init__.py \
# ${PAWSEY_SPACK_CONFIG_REPO}/fixes/modulenames_plus_init.patch
#patch ${INSTALL_PREFIX}/spack/lib/spack/spack/paths.py \
# ${PAWSEY_SPACK_CONFIG_REPO}/fixes/dot_spack.patch
#sed -i -e "s|DATE_TAG|$DATE_TAG|g"\
# -e "s|PAWSEY_SYSTEM|$SYSTEM|g"\
# ${INSTALL_PREFIX}/spack/lib/spack/spack/paths.py
#
#rm "${INSTALL_PREFIX}/spack/.git" -rf
cd -
fi

Expand Down
20 changes: 10 additions & 10 deletions systems/ella/configs/site/compilers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,36 +37,36 @@ compilers:
- compiler:
spec: [email protected]
paths:
cc: gcc-12
cxx: g++-12
f77: gfortran-12
fc: gfortran-12
cc: /usr/bin/gcc-12
cxx: /usr/bin/g++-12
f77: /usr/bin/gfortran-12
fc: /usr/bin/gfortran-12
flags:
cflags: -O3
cxxflags: -O3
cppflags: -O3
fflags: -O3 -fallow-argument-mismatch
operating_system: ubuntu
target: any
modules: {}
modules:
environment: {}
extra_rpaths: []

- compiler:
spec: [email protected]
paths:
cc: gcc
cxx: g++
f77: gfortran
fc: gfortran
cc: /usr/bin/gcc
cxx: /usr/bin/g++
f77: /usr/bin/gfortran
fc: /usr/bin/gfortran
flags:
cflags: -O3
cxxflags: -O3
cppflags: -O3
fflags: -O3 -fallow-argument-mismatch
operating_system: rocky
target: any
modules: {}
modules:
environment: {}
extra_rpaths: []

4 changes: 2 additions & 2 deletions systems/ella/configs/site/packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ packages:
libseccomp:
version: [2.5.3]
zlib:
version: [1.10.4]
version: []
zstd:
version: [1.4.8]
json-c:
Expand All @@ -76,7 +76,7 @@ packages:
version: [3.11.6]
variants: '+optimizations +zlib +sqlite3 +tkinter ~ssl'
gdbm:
version: [1.23.1]
version: [1.23]
apr:
version: [1.7.4]
gettext:
Expand Down
12 changes: 7 additions & 5 deletions systems/ella/settings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@ if [ "$USER" = "spack" ]; then
INSTALL_GROUP="spack"
fi

echo $INSALL_GROUP

if [ -z ${INSTALL_GROUP+x} ]; then
echo "The 'INSTALL_GROUP' variable must be set to linux group that will own the installed files."
exit 1
fi

# Note the use of '' instead of "" to allow env variables to be present in config files
USER_PERMANENT_FILES_PREFIX='/pawsey/ella/projects/'
USER_PERMANENT_FILES_PREFIX="/pawsey/software/projects/pawsey0001/ella"
USER_TEMP_FILES_PREFIX='/tmp'
SPACK_USER_CONFIG_PATH="$MYSOFTWARE/ella/$DATE_TAG/.spack_user_config"
BOOTSTRAP_PATH='$MYSOFTWARE/ella/'$DATE_TAG/.spack_user_config/bootstrap
Expand All @@ -47,12 +49,12 @@ SPACK_POPULATE_CACHE=0

pawseyenv_version="${DATE_TAG}"

archs="arm64"
archs="armv9.0a"
# compiler versions (needed for module trees with compiler dependency)
gcc_version="12.3.0"

# architecture of login/compute nodes (needed by Singularity symlink module)
cpu_arch="arm64"
cpu_arch="armv9.0a"

# tool versions
spack_version="0.21.0" # the prefix "v" is added in setup_spack.sh
Expand Down Expand Up @@ -180,9 +182,9 @@ singularity_name_general="singularityce"

# NOTE: the following are ALL RELATIVE to root_dir above
# root location for Pawsey custom builds
custom_root_dir="custom"
custom_root_dir="/pawsey/software/projects/pawsey0001"
# root location for Pawsey utilities (spack, shpc, scripts)
utilities_root_dir="pawsey"
utilities_root_dir="utilities"
# root location for containers
containers_root_dir="containers"
# location for Pawsey custom build modules
Expand Down