Commit d9ef15e8 authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Adapt daint pgi wrapper to available spack package installations.

parent bfd94f54
#! /bin/bash
set -eux
scriptdir=$(dirname $0)
if [[ x$scriptdir != x ]]; then
scriptdir+=/
fi
module load cdt/20.08
module load cdt/20.11
module load /apps/daint/UES/jenkins/7.0.UP02/gpu/easybuild/modules/all/CMake/3.18.4
#module load CMake/3.18.4
module load craype-haswell
module swap cce pgi/20.1.0
module swap cce pgi/20.1.1
module swap PrgEnv-cray PrgEnv-pgi
module use /project/d56/spack-sw/Modules/cray-cnl7-haswell
module load libaec/1.0.2-pgi-20.1.1-edc4z5g \
eccodes/2.13.0-gcc-8.3.0-wunwg35 \
hdf5/1.10.6-pgi-20.1.1-mciilo2 \
netcdf-c/4.7.3-pgi-20.1.1-ls7chuc \
netcdf-fortran/4.5.2-pgi-20.1.1-fxqf3a5 \
parallel-netcdf/1.12.1-pgi-20.1.1-wbc2so5
#
prefix="/project/d56/tjahns/cdi-pio-pgi-${PGI_VERS_STR}-cray-mpich-${CRAY_MPICH_VERSION}"
# A single allocation is too short on daint to build and check,
# therefore check if libcdipio exists in installation directory and
# try check
if [[ x${SLURM_JOBID+set} = xset && -r "${prefix}/lib/libcdipio.so" ]]; then
stages=check
else
stages=download-unpack-build-install
fi
basedir=/project/d56/tjahns/cdi-pio-build \
builddir=/project/d56/tjahns/cdi-pio-build/build/pgi-"${PGI_VERS_STR}" \
build=pgi \
SCRATCH="${SCRATCH}/cdi-pio-test-files"
mkdir -p "${SCRATCH}"
lfs setstripe --stripe-count 8 "$SCRATCH"
salloc="salloc -t 00:30:00 -N 1 --exclusive -p debug -C gpu -A d56"
builddir=$(mktemp -d "${XDG_RUNTIME_DIR}/cdi-pio-build-$(id -un)-XXXXXXX")
#trap 'rm -rf "$builddir"' EXIT
bash -x ${scriptdir}/scripts/create_srun_bcast.sh "${builddir}/bin" \
"${SCRATCH}" "${builddir}"
netcdf_root=$(command -v nc-config | sed -e 's@/bin/nc-config$@@')
eccodes_root=$(command -v codes_info | sed -e 's@/bin/codes_info$@@')
libaec_root=$(command -v aec | sed -e 's@/bin/aec$@@')
${scriptdir}build-cdi-pio-stack.sh \
basedir=/project/d56/tjahns/cdi-pio-build \
build="pgi-${PGI_VERS_STR}" \
builddir="$builddir" \
SCRATCH="${SCRATCH}" \
libtype=shared \
stages=$stages \
prefix="${prefix}" \
prefix="${prefix}/%n-%b" \
multi_installs=: \
CC=cc FC=ftn FCFLAGS='-g -O2' CXX=CC F77=ftn \
MPI_LAUNCH=/usr/bin/srun \
MPI_LAUNCH="$builddir/bin/srun" \
CMAKE_EXTRA_ARGS=-DCMATH_LIBRARIES:FILEPATH=-lm \
CDI_TEST_PREFIX=/scratch/snx3000/tjahns/cdi-test-files \
${scriptdir}build-cdi-pio-stack.sh
yaxt_configure_env="${salloc}" \
yaxt_check_env="${salloc}" \
ppm_configure_env="${salloc}" \
ppm_check_env="${salloc}" \
cdi_configure_env="${salloc}" \
cdi_check_env="${salloc}" \
cdi_configure="--with-netcdf=\"${netcdf_root}\" --with-eccodes=\"${eccodes_root}\" \"LDFLAGS=\$LDFLAGS -Wl,-rpath,$libaec_root/lib64\"" \
"package_inst[eccodes]=$eccodes_root" \
--use-from-system libaec \
--use-from-system eccodes \
--use-from-system hdf5 \
--use-from-system netcdf-c \
--use-from-system netcdf-fortran \
--use-from-system pnetcdf \
"$@"
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