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

Feature/1.2.0 updates #206

Merged
merged 10 commits into from
Apr 16, 2021
10 changes: 2 additions & 8 deletions config/stack_custom.yaml
Original file line number Diff line number Diff line change
@@ -69,13 +69,13 @@ cdo:

pio:
build: YES
version: 2.5.2
version: 2.5.3
enable_pnetcdf: NO
enable_gptl: NO

esmf:
build: YES
version: 8_1_0_beta_snapshot_27
version: 8_1_0
shared: YES
enable_pnetcdf: NO
debug: NO
@@ -169,12 +169,6 @@ crtm:
version: v2.3.0
install_as: 2.3.0

nceppost:
build: NO
version: dceca26
install_as: dceca26
openmp: ON

upp:
build: YES
version: upp_v10.0.5
10 changes: 2 additions & 8 deletions config/stack_gaea.yaml
Original file line number Diff line number Diff line change
@@ -66,13 +66,13 @@ cdo:

pio:
build: YES
version: 2.5.2
version: 2.5.3
enable_pnetcdf: NO
enable_gptl: NO

esmf:
build: YES
version: 8_1_0_beta_snapshot_27
version: 8_1_0
shared: NO
enable_pnetcdf: NO
debug: NO
@@ -166,12 +166,6 @@ crtm:
version: v2.3.0
install_as: 2.3.0

nceppost:
build: NO
version: dceca26
install_as: dceca26
openmp: ON

upp:
build: YES
version: upp_v10.0.5
10 changes: 2 additions & 8 deletions config/stack_jedi.yaml
Original file line number Diff line number Diff line change
@@ -67,13 +67,13 @@ cdo:

pio:
build: YES
version: 2.5.2
version: 2.5.3
enable_pnetcdf: NO
enable_gptl: NO

esmf:
build: YES
version: 8_1_0_beta_snapshot_27
version: 8_1_0
shared: NO
enable_pnetcdf: NO
debug: NO
@@ -167,12 +167,6 @@ crtm:
version: v2.3.0
install_as: 2.3.0

nceppost:
build: NO
version: dceca26
install_as: dceca26
openmp: ON

upp:
build: YES
version: upp_v10.0.5
10 changes: 2 additions & 8 deletions config/stack_mac.yaml
Original file line number Diff line number Diff line change
@@ -70,13 +70,13 @@ cdo:

pio:
build: YES
version: 2.5.2
version: 2.5.3
enable_pnetcdf: NO
enable_gptl: NO

esmf:
build: YES
version: 8_1_0_beta_snapshot_21
version: 8_1_0
shared: NO
enable_pnetcdf: NO
debug: NO
@@ -170,12 +170,6 @@ crtm:
version: v2.3.0
install_as: 2.3.0

nceppost:
build: NO
version: dceca26
install_as: dceca26
openmp: ON

upp:
build: YES
version: upp_v10.0.5
10 changes: 2 additions & 8 deletions config/stack_noaa.yaml
Original file line number Diff line number Diff line change
@@ -66,13 +66,13 @@ cdo:

pio:
build: YES
version: 2.5.2
version: 2.5.3
enable_pnetcdf: NO
enable_gptl: NO

esmf:
build: YES
version: 8_1_0_beta_snapshot_27
version: 8_1_0
shared: NO
enable_pnetcdf: NO
debug: NO
@@ -166,12 +166,6 @@ crtm:
version: v2.3.0
install_as: 2.3.0

nceppost:
build: NO
version: dceca26
install_as: dceca26
openmp: ON

upp:
build: YES
version: upp_v10.0.5
10 changes: 2 additions & 8 deletions config/stack_ufs_weather_ci.yaml
Original file line number Diff line number Diff line change
@@ -69,13 +69,13 @@ cdo:

pio:
build: YES
version: 2.5.2
version: 2.5.3
enable_pnetcdf: NO
enable_gptl: NO

esmf:
build: YES
version: 8_1_0_beta_snapshot_27
version: 8_1_0
shared: YES
enable_pnetcdf: NO
debug: NO
@@ -169,12 +169,6 @@ crtm:
version: v2.3.0
install_as: 2.3.0

nceppost:
build: NO
version: dceca26
install_as: dceca26
openmp: ON

upp:
build: YES
version: upp_v10.0.5
2 changes: 1 addition & 1 deletion libs/build_atlas.sh
Original file line number Diff line number Diff line change
@@ -44,7 +44,7 @@ cd ${HPC_STACK_ROOT}/${PKGDIR:-"pkg"}
URL="https://github.com/$repo/$name.git"
[[ -d $software ]] || git clone $URL $software
[[ -d $software ]] && cd $software || ( echo "$software does not exist, ABORT!"; exit 1 )
git fetch --tags

git checkout $version
[[ ${DOWNLOAD_ONLY} =~ [yYtT] ]] && exit 0
[[ -d build ]] && $SUDO rm -rf build
39 changes: 20 additions & 19 deletions libs/build_cdo.sh
Original file line number Diff line number Diff line change
@@ -34,7 +34,6 @@ if $MODULES; then
fi
else
prefix=${CDO_ROOT:-"/usr/local"}
enable_pnetcdf=$(nc-config --has-pnetcdf)
fi

if [[ ! -z $mpi ]]; then
@@ -54,24 +53,6 @@ export CXXFLAGS="${STACK_CXXFLAGS:-} ${STACK_cdo_CXXFLAGS:-} -fPIC"
export F77=$FC
export FCFLAGS=$FFLAGS

HDF5_LDFLAGS="-L$HDF5_ROOT/lib"
HDF5_LIBS="-lhdf5_hl -lhdf5"

AM_LDFLAGS=$(cat $HDF5_ROOT/lib/libhdf5.settings | grep AM_LDFLAGS | cut -d: -f2)
EXTRA_LIBS=$(cat $HDF5_ROOT/lib/libhdf5.settings | grep "Extra libraries" | cut -d: -f2)

if [[ ! -z $mpi ]]; then
if [[ $enable_pnetcdf =~ [yYtT] ]]; then
PNETCDF_LDFLAGS="-L$PNETCDF_ROOT/lib"
PNETCDF_LIBS="-lpnetcdf"
fi
fi
NETCDF_LDFLAGS="-L$NETCDF_ROOT/lib"
NETCDF_LIBS="-lnetcdf"

export LDFLAGS="${PNETCDF_LDFLAGS:-} ${NETCDF_LDFLAGS:-} ${HDF5_LDFLAGS:-} ${AM_LDFLAGS:-}"
export LIBS="${PNETCDF_LIBS:-} ${NETCDF_LIBS:-} ${HDF5_LIBS:-} ${EXTRA_LIBS:-}"

cd ${HPC_STACK_ROOT}/${PKGDIR:-"pkg"}

case $version in
@@ -100,6 +81,26 @@ software=$name-$version
[[ -d build ]] && rm -rf build
mkdir -p build && cd build

HDF5_LDFLAGS="-L$HDF5_ROOT/lib"
HDF5_LIBS="-lhdf5_hl -lhdf5"

AM_LDFLAGS=$(cat $HDF5_ROOT/lib/libhdf5.settings | grep AM_LDFLAGS | cut -d: -f2)
EXTRA_LIBS=$(cat $HDF5_ROOT/lib/libhdf5.settings | grep "Extra libraries" | cut -d: -f2)

enable_pnetcdf=$(nc-config --has-pnetcdf)

if [[ ! -z $mpi ]]; then
if [[ $enable_pnetcdf =~ [yYtT] ]]; then
PNETCDF_LDFLAGS="-L$PNETCDF_ROOT/lib"
PNETCDF_LIBS="-lpnetcdf"
fi
fi
NETCDF_LDFLAGS="-L$NETCDF_ROOT/lib"
NETCDF_LIBS="-lnetcdf"

export LDFLAGS="${PNETCDF_LDFLAGS:-} ${NETCDF_LDFLAGS:-} ${HDF5_LDFLAGS:-} ${AM_LDFLAGS:-}"
export LIBS="${PNETCDF_LIBS:-} ${NETCDF_LIBS:-} ${HDF5_LIBS:-} ${EXTRA_LIBS:-}"

../configure --prefix=$prefix \
--with-hdf5=$HDF5_ROOT \
--with-netcdf=$NETCDF_ROOT
2 changes: 1 addition & 1 deletion libs/build_ecbuild.sh
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@ cd ${HPC_STACK_ROOT}/${PKGDIR:-"pkg"}
URL="https://github.com/$repo/$name.git"
[[ -d $software ]] || git clone $URL $software
[[ -d $software ]] && cd $software || ( echo "$software does not exist, ABORT!"; exit 1 )
git fetch --tags

git checkout $version
[[ ${DOWNLOAD_ONLY} =~ [yYtT] ]] && exit 0
[[ -d build ]] && $SUDO rm -rf build
2 changes: 1 addition & 1 deletion libs/build_eckit.sh
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@ cd ${HPC_STACK_ROOT}/${PKGDIR:-"pkg"}
URL="https://github.com/$repo/$name.git"
[[ -d $software ]] || git clone $URL $software
[[ -d $software ]] && cd $software || ( echo "$software does not exist, ABORT!"; exit 1 )
git fetch --tags

git checkout $version
[[ ${DOWNLOAD_ONLY} =~ [yYtT] ]] && exit 0
sed -i -e 's/project( eckit CXX/project( eckit CXX Fortran/' CMakeLists.txt
7 changes: 5 additions & 2 deletions libs/build_esmf.sh
Original file line number Diff line number Diff line change
@@ -70,11 +70,14 @@ URL="https://github.com/esmf-org/esmf"
cd ${HPC_STACK_ROOT}/${PKGDIR:-"pkg"}

software="ESMF_$version"
# ESMF does not support out of source builds; clean out the clone
[[ -d $software ]] && ( echo "$software exists, cleaning ..."; rm -rf $software )

[[ -d $software ]] || ( git clone -b $software $URL $software )
[[ ${DOWNLOAD_ONLY} =~ [yYtT] ]] && exit 0
[[ -d $software ]] && cd $software || ( echo "$software does not exist, ABORT!"; exit 1 )

# ESMF does not support out of source builds; clean out the clone
git reset --hard $software && git clean -fx

export ESMF_DIR=$PWD

# This is going to need a little work to adapt for various combinations
2 changes: 1 addition & 1 deletion libs/build_fckit.sh
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@ cd ${HPC_STACK_ROOT}/${PKGDIR:-"pkg"}
URL="https://github.com/$repo/$name.git"
[[ -d $software ]] || git clone $URL $software
[[ -d $software ]] && cd $software || ( echo "$software does not exist, ABORT!"; exit 1 )
git fetch --tags

git checkout $version
[[ ${DOWNLOAD_ONLY} =~ [yYtT] ]] && exit 0
[[ -d build ]] && $SUDO rm -rf build
2 changes: 1 addition & 1 deletion libs/build_fms.sh
Original file line number Diff line number Diff line change
@@ -41,7 +41,7 @@ cd ${HPC_STACK_ROOT}/${PKGDIR:-"pkg"}
URL="https://github.com/$repo/$name.git"
[[ -d $software ]] || git clone $URL $software
[[ -d $software ]] && cd $software || ( echo "$software does not exist, ABORT!"; exit 1 )
git fetch --tags

git checkout $version
[[ ${DOWNLOAD_ONLY} =~ [yYtT] ]] && exit 0
[[ -d build ]] && $SUDO rm -rf build
2 changes: 1 addition & 1 deletion libs/build_jasper.sh
Original file line number Diff line number Diff line change
@@ -74,7 +74,7 @@ else
fi

make -j${NTHREADS:-4}
[[ $MAKE_CHECK =~ [yYtT] ]] && make check
[[ $MAKE_CHECK =~ [yYtT] ]] && make test
$SUDO make install

# generate modulefile from template
62 changes: 40 additions & 22 deletions libs/build_pio.sh
Original file line number Diff line number Diff line change
@@ -52,33 +52,51 @@ if [[ "$version" = "2.5.1" ]]; then
else
branch=pio$(echo $version | sed -e 's/\./_/g')
fi
URL=" https://github.com/NCAR/ParallelIO"
[[ -d $software ]] || git clone $URL $software

URL="https://github.com/NCAR/ParallelIO/releases/download/$branch/${software}.tar.gz"
[[ -f $software.tar.gz ]] || $WGET $URL

tar -xf ${software}.tar.gz


[[ -d $software ]] && cd $software || ( echo "$software does not exist, ABORT!"; exit 1 )
git fetch
git checkout $branch

[[ ${DOWNLOAD_ONLY} =~ [yYtT] ]] && exit 0
[[ -d build ]] && rm -rf build
mkdir -p build && cd build

# These flags (e.g.) set the following that were used for HDF5 library:
#LDFLAGS2='-L$ZLIB_ROOT/lib -L$SZIP_ROOT/lib'
#LDFLAGS3=' -lsz -lz -ldl -lm '
LDFLAGS2=$(cat $HDF5_ROOT/lib/libhdf5.settings | grep AM_LDFLAGS | cut -d: -f2)
LDFLAGS3=$(cat $HDF5_ROOT/lib/libhdf5.settings | grep "Extra libraries" | cut -d: -f2)
export LDFLAGS="$LDFLAGS2 $LDFLAGS3"

[[ $enable_pnetcdf =~ [yYtT] ]] && CMAKE_FLAGS+=" -DWITH_PNETCDF=ON -DPnetCDF_PATH=$PNETCDF" \
|| CMAKE_FLAGS+=" -DWITH_PNETCDF=OFF"
[[ $enable_gptl =~ [yYtT] ]] && CMAKE_FLAGS+=" -DPIO_ENABLE_TIMING=ON" \
|| CMAKE_FLAGS+=" -DPIO_ENABLE_TIMING=OFF"

cmake ..\
-DCMAKE_INSTALL_PREFIX=$prefix \
-DNetCDF_PATH=${NETCDF:-} \
-DHDF5_PATH=${HDF5_ROOT:-} \
-DCMAKE_VERBOSE_MAKEFILE=1 \
$CMAKE_FLAGS
# e.g. -L$ZLIB_ROOT/lib
AM_LDFLAGS=$(cat $HDF5_ROOT/lib/libhdf5.settings | grep AM_LDFLAGS | cut -d: -f2)
# e.g. -lz -ldl -lm
EXTRA_LIBS=$(cat $HDF5_ROOT/lib/libhdf5.settings | grep "Extra libraries" | cut -d: -f2)

export HDF5_LDFLAGS="-L$HDF5_ROOT/lib -lhdf5_hl -lhdf5"
export HDF5_LIBS="-lhdf5_hl -lhdf5"
export NETCDF_LDFLAGS="-L$NETCDF_ROOT/lib"

export CPPFLAGS="-I$NETCDF_ROOT/include"

if [[ $enable_pnetcdf =~ [yYtT] ]]; then
PNETCDF_LDFLAGS="-L$PNETCDF_LIBRARIES"
PNETCDF_FLAGS=""
else
PNETCDF_LDFLAGS=""
PNETCDF_FLAGS="--disable-pnetcdf"
fi

if [[ $enable_gptl =~ [yYtT] ]]; then
TIMING_FLAGS="--enable-timing"
else
TIMING_FLAGS=""
fi

export LDFLAGS="$PNETCDF_LDFLAGS $NETCDF_LDFLAGS $HDF5_LDFLAGS $AM_LDFLAGS"
export LIBS="$HDF5_LIBS $EXTRA_LIBS"

../configure --prefix=$prefix \
--enable-fortran \
$TIMING_FLAGS $PNETCDF_FLAGS


VERBOSE=$MAKE_VERBOSE make -j${NTHREADS:-4}
[[ $MAKE_CHECK =~ [yYtT] ]] && make check
2 changes: 1 addition & 1 deletion libs/build_png.sh
Original file line number Diff line number Diff line change
@@ -52,7 +52,7 @@ cmake $sourceDir \
$shared_flags

make -j${NTHREADS:-4}
[[ $MAKE_CHECK =~ [yYtT] ]] && make check
[[ $MAKE_CHECK =~ [yYtT] ]] && make test
$SUDO make install

# generate modulefile from template