Commit 59afb479 authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Merge to restore line-by-line history.

parents 4c2f8e39 c230835e
#! /bin/bash
set -eux
scriptdir=$(dirname "$0")
if [[ x$scriptdir != x ]]; then
scriptdir+=/
fi
module load cmake/3.17.1-gcc-9.1.0 gcc/6.4.0 \
openmpi/2.0.2p2_hpcx-gcc64 \
autoconf/2.69 automake/1.14.1 libtool/2.4.6
nf_config='/sw/rhel6-x64/netcdf/netcdf_fortran-4.4.3-parallel-openmpi2-gcc64/bin/nf-config'
netcdf_dir=$(${nf_config} --flibs | sed 's@.*-L\([^ ]*netcdf_c[^/ ]*\)/lib .*@\1@')
if [[ ! -x "${netcdf_dir}/bin/nc-config" ]]; then
echo "Cannot find nc-config!" >&2
exit 1
fi
eccodes_root='/sw/rhel6-x64/eccodes/eccodes-2.22.0-gcc64'
builddir=$(mktemp -d "/dev/shm/cdi-pio-build-$(id -un)-XXXXXXX")
SCRATCH="/scratch/${USER:0:1}/${USER}/cdi-pio-test-files"
mkdir -p "$SCRATCH"
lfs setstripe --stripe-count 8 "$SCRATCH"
trap 'rm -rf "$builddir"' EXIT
export PATH="${netcdf_dir}/bin:$PATH"
${scriptdir}build-cdi-pio-stack.sh \
build=gcc-6.4.0-openmpi-2.0.2p2 \
builddir="$builddir" \
multi_installs=: \
prefix="/work/k20200/$(id -un)/sw/%k/%v-%b" \
CPPFLAGS="-DNODEBUG $($nf_config --cflags) -I${eccodes_root}/include" \
FCFLAGS="-g -O2 -march=core-avx2 -mtune=core-avx2 $($nf_config --fflags)" \
CFLAGS="-g -O2 -march=core-avx2 -mtune=core-avx2" \
LDFLAGS="-L${eccodes_root}/lib64 -Wl,-rpath,${eccodes_root}/lib64" \
LIBS="-Wl,--as-needed $($nf_config --flibs) -leccodes -lssl -lcrypto" \
SCRATCH="$SCRATCH" \
--use-from-system libaec \
--use-from-system hdf5 \
--use-from-system pnetcdf \
--use-from-system netcdf-c \
--use-from-system netcdf-fortran \
--use-from-system eccodes
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