diff --git a/config/stack_custom.yaml b/config/stack_custom.yaml index 874d5d6b..bdf05585 100644 --- a/config/stack_custom.yaml +++ b/config/stack_custom.yaml @@ -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 diff --git a/config/stack_gaea.yaml b/config/stack_gaea.yaml index 616cbd21..eab51858 100644 --- a/config/stack_gaea.yaml +++ b/config/stack_gaea.yaml @@ -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 diff --git a/config/stack_jedi.yaml b/config/stack_jedi.yaml index b7f4fd09..00007b50 100644 --- a/config/stack_jedi.yaml +++ b/config/stack_jedi.yaml @@ -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 diff --git a/config/stack_mac.yaml b/config/stack_mac.yaml index 650fb706..a43ac280 100644 --- a/config/stack_mac.yaml +++ b/config/stack_mac.yaml @@ -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 diff --git a/config/stack_noaa.yaml b/config/stack_noaa.yaml index 071ec08c..08cf3667 100644 --- a/config/stack_noaa.yaml +++ b/config/stack_noaa.yaml @@ -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 diff --git a/config/stack_ufs_weather_ci.yaml b/config/stack_ufs_weather_ci.yaml index 3c12fe3a..6f5945b3 100644 --- a/config/stack_ufs_weather_ci.yaml +++ b/config/stack_ufs_weather_ci.yaml @@ -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 diff --git a/libs/build_atlas.sh b/libs/build_atlas.sh index e35e7202..acf147ad 100755 --- a/libs/build_atlas.sh +++ b/libs/build_atlas.sh @@ -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 diff --git a/libs/build_cdo.sh b/libs/build_cdo.sh index 86473956..07e7bbe6 100755 --- a/libs/build_cdo.sh +++ b/libs/build_cdo.sh @@ -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 diff --git a/libs/build_ecbuild.sh b/libs/build_ecbuild.sh index 1249bf1b..93b9b1a2 100755 --- a/libs/build_ecbuild.sh +++ b/libs/build_ecbuild.sh @@ -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 diff --git a/libs/build_eckit.sh b/libs/build_eckit.sh index 00b12df5..f329d5ed 100755 --- a/libs/build_eckit.sh +++ b/libs/build_eckit.sh @@ -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 diff --git a/libs/build_esmf.sh b/libs/build_esmf.sh index 16d8f38b..e032f931 100755 --- a/libs/build_esmf.sh +++ b/libs/build_esmf.sh @@ -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 diff --git a/libs/build_fckit.sh b/libs/build_fckit.sh index e57e0d1f..d690e37c 100755 --- a/libs/build_fckit.sh +++ b/libs/build_fckit.sh @@ -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 diff --git a/libs/build_fms.sh b/libs/build_fms.sh index 9a23ac59..775f6d31 100755 --- a/libs/build_fms.sh +++ b/libs/build_fms.sh @@ -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 diff --git a/libs/build_jasper.sh b/libs/build_jasper.sh index 4d52ec2d..66436645 100755 --- a/libs/build_jasper.sh +++ b/libs/build_jasper.sh @@ -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 diff --git a/libs/build_pio.sh b/libs/build_pio.sh index 2c7ee9e8..49325e5b 100755 --- a/libs/build_pio.sh +++ b/libs/build_pio.sh @@ -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 diff --git a/libs/build_png.sh b/libs/build_png.sh index 28a2ed42..7560fbca 100755 --- a/libs/build_png.sh +++ b/libs/build_png.sh @@ -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