Skip to content
Snippets Groups Projects
Commit a839a349 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Merge branch 'develop' into mgf

parents 236abc84 a8af89be
Branches mgf
No related tags found
No related merge requests found
Pipeline #23917 failed
Showing
with 1307 additions and 15 deletions
#!/bin/bash
set -eu
set -o pipefail
script_dir=$(cd "$(dirname "$0")"; pwd)
top_srcdir=$(cd "${script_dir}/../../.."; pwd)
. "${script_dir}/utils.sh"
init_clang1201
# Check the formatting. Note that git-clang-format might keep redundant blank
# lines. Therefore, we use clang-format:
find src app \
-name '*.h' -o -name '*.hpp' -o -name '*.c' -o -name '*.cpp' | \
xargs -n 1 -P 8 clang-format --Werror --dry-run --verbose
test -f "${top_srcdir}/configure" || "${top_srcdir}/autogen.sh"
"${top_srcdir}/configure" \
--disable-maintainer-mode \
--enable-cf-interface \
--enable-iso-c-interface \
--enable-mpi \
--enable-option-checking=fatal \
--with-eccodes="${ECCODES_ROOT}" \
--with-netcdf="${NETCDF_ROOT}" \
CC="${MPICC}" \
CPPFLAGS="-I${UUID_ROOT}/include" \
FC="${MPIFC}" \
F77="${MPIFC}" \
LDFLAGS="-I${UUID_ROOT}/lib" \
MPI_LAUNCH="${MPI_LAUNCH}" \
PKG_CONFIG_PATH="${YAXT_ROOT}/lib/pkgconfig:${PPM_ROOT}/lib/pkgconfig"
make -j8
make -j8 check | tee tests/test-suite.log
check_all_tests_passed tests/test-suite.log
#!/bin/bash
set -eu
set -o pipefail
script_dir=$(cd "$(dirname "$0")"; pwd)
top_srcdir=$(cd "${script_dir}/../../.."; pwd)
. "${script_dir}/utils.sh"
init_nag626223
test -f "${top_srcdir}/configure" || "${top_srcdir}/autogen.sh"
# Create a distribution file with minimalistic configuration:
"${top_srcdir}/configure"
make -j1 dist
# Create a subdirectory for further testing and switch to it:
mkdir check_dist && cd check_dist
# Move the distribution file to the test directory and unpack it:
mv ../cdi-*.tar.gz ./
tar xf cdi-*.tar.gz
# Create a subdirectory for building and switch to it:
mkdir build && cd build
# Use GCC from the path when compiling/linking Fortran code:
FCFLAGS="-O2 -g -Wc=$(which gcc)"
# Create an out-of-source configuration:
../cdi-*/configure \
--disable-maintainer-mode \
--enable-cf-interface \
--enable-iso-c-interface \
--enable-mpi \
--enable-option-checking=fatal \
--with-eccodes="${ECCODES_ROOT}" \
--with-netcdf="${NETCDF_ROOT}" \
CC="${MPICC}" \
CPPFLAGS="-I${UUID_ROOT}/include" \
F77="${MPIFC}" \
FC="${MPIFC}" \
FCFLAGS="${FCFLAGS}" \
FFLAGS="${FCFLAGS}" \
LDFLAGS="-I${UUID_ROOT}/lib" \
MPI_LAUNCH="${MPI_LAUNCH}" \
PKG_CONFIG_PATH="${YAXT_ROOT}/lib/pkgconfig:${PPM_ROOT}/lib/pkgconfig"
make -j8
make -j8 check | tee tests/test-suite.log
check_all_tests_passed tests/test-suite.log
make -j8 distclean
check_no_files_in_cwd
#!/bin/bash
set -eu
set -o pipefail
script_dir=$(cd "$(dirname "$0")"; pwd)
top_srcdir=$(cd "${script_dir}/../../.."; pwd)
. "${script_dir}/utils.sh"
init_nv2130
# We want to check with the Debian version of Libtool, which is patched to avoid
# overlinking:
( export PATH="/usr/bin:${PATH-}"
export ACLOCAL_PATH="/usr/share/aclocal:${ACLOCAL_PATH-}"
module unload automake/1.16.1
module load automake/1.16.1
"${top_srcdir}/autogen.sh" )
"${top_srcdir}/configure" \
--disable-maintainer-mode \
--enable-cf-interface \
--enable-iso-c-interface \
--enable-mpi \
--enable-option-checking=fatal \
--with-eccodes="${ECCODES_ROOT}" \
--with-netcdf="${NETCDF_ROOT}" \
CC="${MPICC}" \
CPPFLAGS="-I${UUID_ROOT}/include" \
F77="${MPIFC}" \
FC="${MPIFC}" \
FCFLAGS='-g -fPIC' \
LDFLAGS="-I${UUID_ROOT}/lib" \
MPI_LAUNCH="${MPI_LAUNCH}" \
PKG_CONFIG_PATH="${YAXT_ROOT}/lib/pkgconfig:${PPM_ROOT}/lib/pkgconfig"
make -j8
make -j8 check | tee tests/test-suite.log
check_all_tests_passed tests/test-suite.log
# Check that an executable is not overlinked to libscalesppmcore.so:
tested_file='./examples/pio/.libs/collectData'
invalid_needed=`readelf -d "${tested_file}" | sed -E -n '/\(NEEDED\).*libscalesppmcore\.so/p'` || {
echo "ERROR: failed to check '${tested_file}' for ELF NEEDED entries" >&2
exit 1
}
if test -n "${invalid_needed}"; then
{
echo "ERROR: '${tested_file}' has excessive ELF NEEDED entries:" >&2
echo "${invalid_needed}" >&2
} >&2
exit 1
fi
#!/bin/bash
set -eu
set -o pipefail
script_dir=$(cd "$(dirname "$0")"; pwd)
top_srcdir=$(cd "${script_dir}/../../.."; pwd)
. "${script_dir}/utils.sh"
init_gcc630
test -f "${top_srcdir}/configure" || "${top_srcdir}/autogen.sh"
"${top_srcdir}/configure" \
--disable-maintainer-mode \
--enable-option-checking=fatal \
--enable-python \
--enable-ruby \
--enable-swig \
--with-eccodes="${ECCODES_ROOT}" \
--with-netcdf="${NETCDF_ROOT}" \
CC="${CC}" \
CPPFLAGS="-I${UUID_ROOT}/include" \
CXX="${CXX}" \
LDFLAGS="-L${UUID_ROOT}/lib"
make -j8
# Test the interfaces:
LD_LIBRARY_PATH="${NETCDF_ROOT}/lib:${LD_LIBRARY_PATH}" make -j8 -C interfaces test
(cd interfaces && ./CdiInfo)
make -j8 check
#
# Accepts a list of environment modules and loads them witch conflict
# resolution.
#
switch_for_module ()
{
for sfm_module in "$@"; do
sfm_module_full=
sfm_module_short=
case $sfm_module in
*/*)
# The module is provided with the version part:
sfm_module_full=$sfm_module
sfm_module_short=`echo $sfm_module | sed 's%/[^/]*$%%'` ;;
*)
# Only the name of the module is provided, get the default version:
sfm_module_full=`module show $sfm_module 2>&1 | sed -n "s%^[^ \t]*/\\($sfm_module.*\\):%\\1%p"`
sfm_module_short=$sfm_module ;;
esac
# A space-separated list of modules that are already loaded:
sfm_loaded_full=`module -t list 2>&1 | tr '\n' ' ' | sed 's/^.*Modulefiles://' | sed 's/(default)//g'`
# Check whether the requested module if already loaded:
if test -n "$sfm_module_full"; then
case " $sfm_loaded_full " in
*" $sfm_module_full "*)
echo "module $sfm_module is already loaded"
continue ;;
esac
fi
# A list of modules in conflict:
sfm_conflicts=`module show $sfm_module 2>&1 | sed -n 's/^conflict\(.*\)/\1/p' | tr '\n\t' ' '`
# A list of loaded modules without version parts:
sfm_loaded_short=`echo "$sfm_loaded_full" | sed 's%\([^ ][^ ]*\)/[^ ]*%\1%g'`
# Add the short name of the module to the list of conflicts:
sfm_conflicts="$sfm_conflicts $sfm_module_short"
# A list of loaded modules that are in conflict with the requested module:
sfm_loaded_conflicts=
for sfm_conflict in $sfm_conflicts""; do
sfm_loaded_list=
case $sfm_conflict in
*/*)
# The conflict is specified with the version part:
sfm_loaded_list=$sfm_loaded_full ;;
*)
# The conflict is specified without the version part:
sfm_loaded_list=$sfm_loaded_short ;;
esac
# Check that the conflicted module is loaded:
case " $sfm_loaded_list " in
*" $sfm_conflict "*)
# The conflict is loaded, check whether it is already added to the
# list:
case " $sfm_loaded_conflicts " in
*" $sfm_conflict "*) ;;
*)
# The conflict is not in the list, append:
sfm_loaded_conflicts="$sfm_loaded_conflicts $sfm_conflict" ;;
esac
;;
esac
done
# Calculate the number of modules that must be unloaded to before loading
# the requested module:
sfm_loaded_conflicts_count=`echo $sfm_loaded_conflicts | wc -w`
case $sfm_loaded_conflicts_count in
0)
# None of the conflicting modules is loaded:
sfm_cmd="module load $sfm_module" ;;
1)
# There is only one module that must be unloaded, use switch command:
sfm_cmd="module switch $sfm_loaded_conflicts $sfm_module" ;;
*)
# There is more than one module that must be unloaded, unload all of
# them and then load the requested one:
sfm_cmd="module unload $sfm_loaded_conflicts && module load $sfm_module" ;;
esac
echo "$sfm_cmd"
eval "$sfm_cmd"
done
}
#
# Initializes the environment.
#
init_env ()
{
saved_set=$-
set +eu
. /etc/profile.d/mpim.sh
set -${saved_set}
switch_for_module automake/1.16.1
# Use non-Debian libtool by default:
LIBTOOL_ROOT='/data/mpi/sclab/sip/m300488/libcdi-ci-sw/gcc-6.3.0-sandybridge/libtool-2.4.6-qdyaqqw'
export PATH="${LIBTOOL_ROOT}/bin:${PATH-}"
export ACLOCAL_PATH="${LIBTOOL_ROOT}/share/aclocal:${ACLOCAL_PATH-}"
SWIG_ROOT='/data/mpi/sclab/sip/m300488/libcdi-ci-sw/gcc-6.3.0-sandybridge/swig-4.0.2-busrrtn'
RUBY_ROOT='/data/mpi/sclab/sip/m300488/libcdi-ci-sw/gcc-6.3.0-sandybridge/ruby-3.0.2-stqm2vj'
PYTHON_ROOT='/data/mpi/sclab/sip/m300488/libcdi-ci-sw/gcc-6.3.0-sandybridge/python-2.7.18-zqrnwom'
export PATH="${RUBY_ROOT}/bin:${PYTHON_ROOT}/bin:${SWIG_ROOT}/bin:${PATH-}"
}
#
# Sets variables for tests with GCC 6.3.0.
#
init_gcc630 ()
{
init_env
switch_for_module gcc/6.3.0
CC=gcc
CXX=g++
FC=gfortran
ECCODES_ROOT='/data/mpi/sclab/sip/m300488/libcdi-ci-sw/gcc-6.3.0-sandybridge/eccodes-2.21.0-3sdngaq'
NETCDF_ROOT='/data/mpi/sclab/sip/m300488/libcdi-ci-sw/gcc-6.3.0-sandybridge/netcdf-c-4.8.0-fzupaca'
UUID_ROOT='/data/mpi/sclab/sip/m300488/libcdi-ci-sw/gcc-6.3.0-sandybridge/libuuid-1.0.3-rm4kv2o'
# Here we fix a never-ending story with Libtool overlinkning, absence of
# '*.la' files when they could help, and '-Wl,--disable/enable-new-dtags':
HDF5_ROOT='/data/mpi/sclab/sip/m300488/libcdi-ci-sw/gcc-6.3.0-sandybridge/hdf5-1.10.7-4l3frcp'
export LD_LIBRARY_PATH="${ECCODES_ROOT}/lib:${HDF5_ROOT}/lib:${LD_LIBRARY_PATH-}"
}
#
# Sets variables for tests with NVHPC 21.3.0.
#
init_nv2130 ()
{
init_env
switch_for_module gcc/6.3.0
export NVHPC='/data/mpi/sclab/sip/m300488/nvhpc'
export NVLOCALRC="${NVHPC}/Linux_x86_64/21.3/compilers/bin/localrc.60300"
export PATH="${NVHPC}/Linux_x86_64/21.3/compilers/bin:${PATH-}"
CC=nvc
CXX=nvc++
FC=nvfortran
export PATH="/data/mpi/sclab/sip/m300488/libcdi-ci-sw/nvhpc-21.3-sandybridge/mpich-3.4.2-sfxulsj/bin:${PATH-}"
MPICC=mpicc
MPIFC=mpif90
MPI_LAUNCH="$(which mpirun)"
ECCODES_ROOT='/data/mpi/sclab/sip/m300488/libcdi-ci-sw/gcc-6.3.0-sandybridge/eccodes-2.21.0-3sdngaq'
NETCDF_ROOT='/data/mpi/sclab/sip/m300488/libcdi-ci-sw/nvhpc-21.3-sandybridge/netcdf-c-4.8.0-vjppuov'
PPM_ROOT='/data/mpi/sclab/sip/m300488/libcdi-ci-sw/nvhpc-21.3-sandybridge/scales-ppm-1.0.7-uy4z72r'
YAXT_ROOT='/data/mpi/sclab/sip/m300488/libcdi-ci-sw/nvhpc-21.3-sandybridge/yaxt-0.9.2.1-lbqqemx'
UUID_ROOT='/data/mpi/sclab/sip/m300488/libcdi-ci-sw/gcc-6.3.0-sandybridge/libuuid-1.0.3-rm4kv2o'
# Here we fix a never-ending story with Libtool overlinkning, absence of
# '*.la' files when they could help, and '-Wl,--disable/enable-new-dtags':
HDF5_ROOT='/data/mpi/sclab/sip/m300488/libcdi-ci-sw/nvhpc-21.3-sandybridge/hdf5-1.10.7-h7pvthl'
export LD_LIBRARY_PATH="${ECCODES_ROOT}/lib:${HDF5_ROOT}/lib:${LD_LIBRARY_PATH-}"
}
#
# Sets variables for tests with Clang 12.0.1.
#
init_clang1201 ()
{
init_env
switch_for_module gcc/6.3.0
export PATH="/data/mpi/sclab/sip/m300488/clang/12.0.1/bin:${PATH-}"
# Clang does not inject RPATHs to the standard library in use:
export LD_LIBRARY_PATH="/sw/stretch-x64/gcc/gcc-6.3.0/lib64:${LD_LIBRARY_PATH-}"
CC=clang
CXX=clang++
FC=gfortran
export PATH="/data/mpi/sclab/sip/m300488/libcdi-ci-sw/clang-12.0.1-sandybridge/openmpi-4.1.1-6ydagyy/bin:${PATH-}"
MPICC=mpicc
MPIFC=mpif90
MPI_LAUNCH="$(which mpirun) --oversubscribe"
ECCODES_ROOT='/data/mpi/sclab/sip/m300488/libcdi-ci-sw/gcc-6.3.0-sandybridge/eccodes-2.21.0-3sdngaq'
NETCDF_ROOT='/data/mpi/sclab/sip/m300488/libcdi-ci-sw/clang-12.0.1-sandybridge/netcdf-c-4.8.0-z6r5guk'
PPM_ROOT='/data/mpi/sclab/sip/m300488/libcdi-ci-sw/clang-12.0.1-sandybridge/scales-ppm-1.0.7-5mhatgx'
YAXT_ROOT='/data/mpi/sclab/sip/m300488/libcdi-ci-sw/clang-12.0.1-sandybridge/yaxt-0.9.2.1-cj2nf5j'
UUID_ROOT='/data/mpi/sclab/sip/m300488/libcdi-ci-sw/gcc-6.3.0-sandybridge/libuuid-1.0.3-rm4kv2o'
# Here we fix a never-ending story with Libtool overlinkning, absence of
# '*.la' files when they could help, and '-Wl,--disable/enable-new-dtags':
HDF5_ROOT='/data/mpi/sclab/sip/m300488/libcdi-ci-sw/clang-12.0.1-sandybridge/hdf5-1.10.7-4y54xnh'
export LD_LIBRARY_PATH="${ECCODES_ROOT}/lib:${HDF5_ROOT}/lib:${LD_LIBRARY_PATH-}"
}
#
# Sets variables for tests with NAG 6.2.6223.
#
init_nag626223 ()
{
init_env
switch_for_module gcc/6.3.0 nag/6.2
CC=gcc
CXX=g++
FC=nagfor
export PATH="/data/mpi/sclab/sip/m300488/libcdi-ci-sw/nag-6.2-sandybridge/mpich-3.4.2-fzsvtw2/bin:${PATH-}"
MPICC=mpicc
MPIFC=mpif90
MPI_LAUNCH="$(which mpirun)"
ECCODES_ROOT='/data/mpi/sclab/sip/m300488/libcdi-ci-sw/gcc-6.3.0-sandybridge/eccodes-2.21.0-3sdngaq'
NETCDF_ROOT='/data/mpi/sclab/sip/m300488/libcdi-ci-sw/nag-6.2-sandybridge/netcdf-c-4.8.0-ogawg3w'
PPM_ROOT='/data/mpi/sclab/sip/m300488/libcdi-ci-sw/nag-6.2-sandybridge/scales-ppm-1.0.7-5kdlwzv'
YAXT_ROOT='/data/mpi/sclab/sip/m300488/libcdi-ci-sw/nag-6.2-sandybridge/yaxt-0.9.2.1-rhq2ysn'
UUID_ROOT='/data/mpi/sclab/sip/m300488/libcdi-ci-sw/gcc-6.3.0-sandybridge/libuuid-1.0.3-rm4kv2o'
# Here we fix a never-ending story with Libtool overlinkning, absence of
# '*.la' files when they could help, and '-Wl,--disable/enable-new-dtags':
HDF5_ROOT='/data/mpi/sclab/sip/m300488/libcdi-ci-sw/nag-6.2-sandybridge/hdf5-1.10.7-pltg3k4'
export LD_LIBRARY_PATH="${ECCODES_ROOT}/lib:${HDF5_ROOT}/lib:${LD_LIBRARY_PATH-}"
}
#
# Accepts a path to a file containing the testsuite summary (either the
# 'test-suite.log' or the standard output of the 'make check' command) and
# checks whether all tests were run and passed.
#
check_all_tests_passed ()
{
awk '/SKIP: /{
print "ERROR: the total number of tests is not equal to the number of passed tests";
exit 1;
}' $1 >&2
}
#
# Checks whether the current working directory or any of its subdirectories
# contain a file and fails with an error message if that is the case.
#
check_no_files_in_cwd ()
{
cnfic_files=`find . -type f 2>/dev/null`
if test -n "$cnfic_files"; then
{
echo "ERROR: the current working directory contains undeleted files:"
echo "$cnfic_files"
} >&2
exit 1
fi
}
#!/bin/bash
set -eu
set -o pipefail
script_dir=$(cd "$(dirname "$0")"; pwd)
top_srcdir=$(cd "${script_dir}/../../.."; pwd)
. "${script_dir}/utils.sh"
init_cray1203
# Save time for the person running this script manually:
if test "x${PE_NETCDF_MODULE_NAME}" = 'xcray-netcdf'; then
case $top_srcdir in
"${HOME}/"*)
echo "ERROR: parallel NetCDF4 tests are known to fail when CDI is built in the user home directory and linked against NetCDF that does not support MPI parallel invocations" >&2
exit 1
esac
fi
test -f "${top_srcdir}/configure" || "${top_srcdir}/autogen.sh"
# The configure script does not check the 'lib64' subdirectory, therefore we
# run it with '--with-eccodes' and the following flags. Note that fixing this
# in the configure script might be tricky: the 'lib64' subdirectory should be
# checked first but if it does not exist or does not contain the library, we
# might end up linking to a library from the linker's default search path
# (e.g. /usr/lib) instead of the one from "$with_eccodes/lib" because
# "-L${with_eccodes}/lib64" would be ignored in that case:
CPPFLAGS="-I${ECCODES_ROOT}/include"
LDFLAGS="-L${ECCODES_ROOT}/lib64"
"${top_srcdir}/configure" \
--disable-maintainer-mode \
--enable-cf-interface \
--enable-iso-c-interface \
--enable-mpi \
--enable-option-checking=fatal \
--with-eccodes \
--with-netcdf \
CC="${CC}" \
CPPFLAGS="${CPPFLAGS}" \
F77="${FC}" \
FC="${FC}" \
LDFLAGS="${LDFLAGS}" \
MPI_LAUNCH="${MPI_LAUNCH}" \
PKG_CONFIG_PATH="${YAXT_ROOT}/lib/pkgconfig:${PPM_ROOT}/lib/pkgconfig:${PKG_CONFIG_PATH}"
make -j8
make -j8 check | tee tests/test-suite.log
check_all_tests_passed tests/test-suite.log
#!/bin/bash
set -eu
set -o pipefail
script_dir=$(cd "$(dirname "$0")"; pwd)
top_srcdir=$(cd "${script_dir}/../../.."; pwd)
. "${script_dir}/utils.sh"
init_pgi2011
# Save time for the person running this script manually:
if test "x${PE_NETCDF_MODULE_NAME}" = 'xcray-netcdf'; then
case $top_srcdir in
"${HOME}/"*)
echo "ERROR: parallel NetCDF4 tests are known to fail when CDI is built in the user home directory and linked against NetCDF that does not support MPI parallel invocations" >&2
exit 1
esac
fi
test -f "${top_srcdir}/configure" || "${top_srcdir}/autogen.sh"
# The configure script does not check the 'lib64' subdirectory, therefore we
# run it with '--with-eccodes' and the following flags. Note that fixing this
# in the configure script might be tricky: the 'lib64' subdirectory should be
# checked first but if it does not exist or does not contain the library, we
# might end up linking to a library from the linker's default search path
# (e.g. /usr/lib) instead of the one from "$with_eccodes/lib" because
# "-L${with_eccodes}/lib64" would be ignored in that case:
CPPFLAGS="-I${ECCODES_ROOT}/include"
LDFLAGS="-L${ECCODES_ROOT}/lib64"
"${top_srcdir}/configure" \
--disable-maintainer-mode \
--enable-cf-interface \
--enable-iso-c-interface \
--enable-mpi \
--enable-option-checking=fatal \
--with-eccodes \
--with-netcdf \
CC="${CC}" \
CFLAGS='-g -O1' \
CPPFLAGS="${CPPFLAGS}" \
F77="${FC}" \
FC="${FC}" \
FCFLAGS='-g -fPIC' \
LDFLAGS="${LDFLAGS}" \
MPI_LAUNCH="${MPI_LAUNCH}" \
PKG_CONFIG_PATH="${YAXT_ROOT}/lib/pkgconfig:${PPM_ROOT}/lib/pkgconfig:${PKG_CONFIG_PATH}" \
PTHREAD_LIBS='-lpthread'
make -j8
make -j8 check | tee tests/test-suite.log
check_all_tests_passed tests/test-suite.log
#
# Accepts a list of environment modules and loads them witch conflict
# resolution.
#
switch_for_module ()
{
for sfm_module in "$@"; do
sfm_module_full=
sfm_module_short=
case $sfm_module in
*/*)
# The module is provided with the version part:
sfm_module_full=$sfm_module
sfm_module_short=`echo $sfm_module | sed 's%/[^/]*$%%'` ;;
*)
# Only the name of the module is provided, get the default version:
sfm_module_full=`module show $sfm_module 2>&1 | sed -n "s%^[^ \t]*/\\($sfm_module.*\\):%\\1%p"`
sfm_module_short=$sfm_module ;;
esac
# A space-separated list of modules that are already loaded:
sfm_loaded_full=`module -t list 2>&1 | tr '\n' ' ' | sed 's/^.*Modulefiles://' | sed 's/(default)//g'`
# Check whether the requested module if already loaded:
if test -n "$sfm_module_full"; then
case " $sfm_loaded_full " in
*" $sfm_module_full "*)
echo "module $sfm_module is already loaded"
continue ;;
esac
fi
# A list of modules in conflict:
sfm_conflicts=`module show $sfm_module 2>&1 | sed -n 's/^conflict\(.*\)/\1/p' | tr '\n\t' ' '`
# A list of loaded modules without version parts:
sfm_loaded_short=`echo "$sfm_loaded_full" | sed 's%\([^ ][^ ]*\)/[^ ]*%\1%g'`
# Add the short name of the module to the list of conflicts:
sfm_conflicts="$sfm_conflicts $sfm_module_short"
# A list of loaded modules that are in conflict with the requested module:
sfm_loaded_conflicts=
for sfm_conflict in $sfm_conflicts""; do
sfm_loaded_list=
case $sfm_conflict in
*/*)
# The conflict is specified with the version part:
sfm_loaded_list=$sfm_loaded_full ;;
*)
# The conflict is specified without the version part:
sfm_loaded_list=$sfm_loaded_short ;;
esac
# Check that the conflicted module is loaded:
case " $sfm_loaded_list " in
*" $sfm_conflict "*)
# The conflict is loaded, check whether it is already added to the
# list:
case " $sfm_loaded_conflicts " in
*" $sfm_conflict "*) ;;
*)
# The conflict is not in the list, append:
sfm_loaded_conflicts="$sfm_loaded_conflicts $sfm_conflict" ;;
esac
;;
esac
done
# Calculate the number of modules that must be unloaded to before loading
# the requested module:
sfm_loaded_conflicts_count=`echo $sfm_loaded_conflicts | wc -w`
case $sfm_loaded_conflicts_count in
0)
# None of the conflicting modules is loaded:
sfm_cmd="module load $sfm_module" ;;
1)
# There is only one module that must be unloaded, use switch command:
sfm_cmd="module switch $sfm_loaded_conflicts $sfm_module" ;;
*)
# There is more than one module that must be unloaded, unload all of
# them and then load the requested one:
sfm_cmd="module unload $sfm_loaded_conflicts && module load $sfm_module" ;;
esac
echo "$sfm_cmd"
eval "$sfm_cmd"
done
}
#
# Initializes the environment.
#
init_env ()
{
AUTOMAKE_ROOT='/project/d56/libcdi-ci-sw/gcc-11.2.0-haswell/automake-1.16.3-46gthis'
export PATH="${AUTOMAKE_ROOT}/bin:${PATH-}"
# Tell the custom installation of Automake where the libtool macros are:
export ACLOCAL_PATH="/usr/share/aclocal:${ACLOCAL_PATH-}"
}
#
# Sets variables for tests with Cray 12.0.3.
#
init_cray1203 ()
{
init_env
switch_for_module craype PrgEnv-cray cce/12.0.3 cray-mpich
# Build and test against NetCDF that does not support MPI parallel invocations
# (parallel NetCDF4 tests are known to fail in this case when run from the
# user home directory on Daint):
switch_for_module cray-netcdf
# Uncomment the following line to test against MPI-capable NetCDF:
# switch_for_module cray-netcdf-hdf5parallel cray-hdf5-parallel
CC=cc
CXX=CC
FC=ftn
MPI_LAUNCH="$(which srun) -p cscsci -C gpu -A d56 -t 05:00"
ECCODES_ROOT='/project/d56/libcdi-ci-sw/cce-12.0.3-haswell/eccodes-2.24.2-o2a4fw3'
PPM_ROOT='/project/d56/libcdi-ci-sw/cce-12.0.3-haswell/scales-ppm-1.0.8-44zlrlu'
YAXT_ROOT='/project/d56/libcdi-ci-sw/cce-12.0.3-haswell/yaxt-0.9.2.1-enz3pcz'
# Here we fix a never-ending story with Libtool overlinkning, absence of
# '*.la' files when they could help, and '-Wl,--disable/enable-new-dtags':
export LD_LIBRARY_PATH="${ECCODES_ROOT}/lib64:${PPM_ROOT}/lib:${YAXT_ROOT}/lib:${LD_LIBRARY_PATH-}"
}
#
# Sets variables for tests with PGI 20.1.1.
#
init_pgi2011 ()
{
init_env
# We use deprecated versions (the most recent compatible with PGI though) of
# the Cray packages and have to make sure that the default versions are
# unloaded (otherwise, we get various warnings and errors):
module unload cray-mpich cray-netcdf cray-netcdf-hdf5parallel cray-hdf5 cray-hdf5-parallel
switch_for_module craype PrgEnv-pgi/6.0.8 pgi/20.1.1 cray-mpich/7.7.15
# Build and test against NetCDF that does not support MPI parallel invocations
# (parallel NetCDF4 tests are known to fail in this case when run from the
# user home directory on Daint):
switch_for_module cray-netcdf/4.7.4.0 cray-hdf5/1.12.0.0
# Uncomment the following line to test against MPI-capable NetCDF:
# switch_for_module cray-netcdf-hdf5parallel/4.7.4.0 cray-hdf5-parallel/1.12.0.0
CC=cc
CXX=CC
FC=ftn
MPI_LAUNCH="$(which srun) -p cscsci -C gpu -A d56 -t 05:00"
ECCODES_ROOT='/project/d56/libcdi-ci-sw/pgi-20.1.1-haswell/eccodes-2.24.2-hwtl5nr'
PPM_ROOT='/project/d56/libcdi-ci-sw/pgi-20.1.1-haswell/scales-ppm-1.0.8-z2nxqya'
YAXT_ROOT='/project/d56/libcdi-ci-sw/pgi-20.1.1-haswell/yaxt-0.9.2.1-3orop7g'
# The deprecated versions of the Cray packages are not in the default linker
# search path:
export LD_LIBRARY_PATH="${MPICH_DIR}/lib:${NETCDF_DIR}/lib:${HDF5_DIR}/lib:${LD_LIBRARY_PATH-}"
# Here we fix a never-ending story with Libtool overlinkning, absence of
# '*.la' files when they could help, and '-Wl,--disable/enable-new-dtags':
export LD_LIBRARY_PATH="${ECCODES_ROOT}/lib64:${PPM_ROOT}/lib:${YAXT_ROOT}/lib:${LD_LIBRARY_PATH-}"
}
#
# Accepts a path to a file containing the testsuite summary (either the
# 'test-suite.log' or the standard output of the 'make check' command) and
# checks whether all tests were run and passed.
#
check_all_tests_passed ()
{
awk '/SKIP: /{
print "ERROR: the total number of tests is not equal to the number of passed tests";
exit 1;
}' $1 >&2
}
#!/bin/bash
set -eu
unset CDPATH
module purge
module load git
install_dir='/work/mh0287/m300488/libcdi-ci-sw/install'
work_dir="$(pwd)/build"
make_cmd='make -j22'
mkdir -p "${work_dir}" && cd "${work_dir}"
# Get PPM 1.0.8:
wget https://swprojects.dkrz.de/redmine/attachments/download/517/ppm-1.0.8.tar.gz
tar xvf ppm-1.0.8.tar.gz
ppm_src_dir="${work_dir}/ppm-1.0.8"
ppm_name_tag='ppm-1.0.8'
ppm_config_args='--enable-MPI --disable-netcdf --disable-hdf5 --disable-parmetis --disable-metis --disable-crypto'
# Get YAXT 0.9.3:
git clone --depth=1 -b release-0.9.3 https://gitlab.dkrz.de/dkrz-sw/yaxt.git
yaxt_src_dir="${work_dir}/yaxt"
yaxt_name_tag='yaxt-0.9.3'
yaxt_config_args=''
export CC='mpicc'
export FC='mpif90'
# Install for GCC 11.2.0:
compiler_name_tag='gcc-11.2.0'
module load openmpi/4.1.2-gcc-11.2.0
# Install PPM:
build_dir="${ppm_name_tag}-${compiler_name_tag}"
mkdir "${build_dir}"
( cd "${build_dir}"
"${ppm_src_dir}/configure" ${ppm_config_args} --prefix="${install_dir}/${ppm_name_tag}-${compiler_name_tag}"
$make_cmd
$make_cmd check
$make_cmd install )
# Install YAXT:
build_dir="${yaxt_name_tag}-${compiler_name_tag}"
mkdir "${build_dir}"
( cd "${build_dir}"
"${yaxt_src_dir}/configure" ${yaxt_config_args} --prefix="${install_dir}/${yaxt_name_tag}-${compiler_name_tag}"
$make_cmd
$make_cmd check
$make_cmd install )
module unload openmpi/4.1.2-gcc-11.2.0
# Install for Intel Classic 2021.5.0:
compiler_name_tag='intel-classic-2021.5.0'
module load openmpi/4.1.2-intel-2021.5.0
# Install PPM:
build_dir="${ppm_name_tag}-${compiler_name_tag}"
mkdir "${build_dir}"
( cd "${build_dir}"
"${ppm_src_dir}/configure" ${ppm_config_args} --prefix="${install_dir}/${ppm_name_tag}-${compiler_name_tag}"
$make_cmd
$make_cmd check
$make_cmd install )
# Install YAXT:
build_dir="${yaxt_name_tag}-${compiler_name_tag}"
mkdir "${build_dir}"
( cd "${build_dir}"
"${yaxt_src_dir}/configure" ${yaxt_config_args} --prefix="${install_dir}/${yaxt_name_tag}-${compiler_name_tag}"
$make_cmd
$make_cmd check
$make_cmd install )
module unload openmpi/4.1.2-intel-2021.5.0
#!/bin/bash
set -eu
set -o pipefail
script_dir=$(cd "$(dirname "$0")"; pwd)
top_srcdir=$(cd "${script_dir}/../../.."; pwd)
. "${script_dir}/utils.sh"
init_gcc1120
test -f "${top_srcdir}/configure" || "${top_srcdir}/autogen.sh"
# The configure script does not check the 'lib64' subdirectory, therefore we
# run it with '--with-eccodes' and the following flags. Note that fixing this
# in the configure script might be tricky: the 'lib64' subdirectory should be
# checked first but if it does not exist or does not contain the library, we
# might end up linking to a library from the linker's default search path
# (e.g. /usr/lib) instead of the one from "$with_eccodes/lib" because
# "-L${with_eccodes}/lib64" would be ignored in that case:
CPPFLAGS="-I${ECCODES_ROOT}/include"
LDFLAGS="-L${ECCODES_ROOT}/lib64"
# We expect --enable-cf-interface and --enable-ppm-dist-array to be set to
# 'yes' automatically because of --enable-mpi. Function
# 'check_all_tests_passed' that we run at the end makes sure that the options
# have been enabled and the corresponding tests have not been skipped.
"${top_srcdir}/configure" \
--disable-maintainer-mode \
--enable-iso-c-interface \
--enable-mpi \
--enable-option-checking=fatal \
--with-eccodes \
--with-netcdf="${NETCDF_ROOT}" \
CC="${MPICC}" \
CPPFLAGS="${CPPFLAGS}" \
F77="${MPIFC}" \
FC="${MPIFC}" \
LDFLAGS="${LDFLAGS}" \
MPI_LAUNCH="${MPI_LAUNCH}" \
PKG_CONFIG_PATH="${YAXT_ROOT}/lib/pkgconfig:${PPM_ROOT}/lib/pkgconfig"
make -j8
make -j8 check | tee tests/test-suite.log
check_all_tests_passed tests/test-suite.log
#!/bin/bash
set -eu
set -o pipefail
script_dir=$(cd "$(dirname "$0")"; pwd)
top_srcdir=$(cd "${script_dir}/../../.."; pwd)
. "${script_dir}/utils.sh"
init_intelclassic202150
test -f "${top_srcdir}/configure" || "${top_srcdir}/autogen.sh"
# Create a subdirectory for building and switch to it:
mkdir build && cd build
# The configure script does not check the 'lib64' subdirectory, therefore we
# run it with '--with-eccodes' and the following flags. Note that fixing this
# in the configure script might be tricky: the 'lib64' subdirectory should be
# checked first but if it does not exist or does not contain the library, we
# might end up linking to a library from the linker's default search path
# (e.g. /usr/lib) instead of the one from "$with_eccodes/lib" because
# "-L${with_eccodes}/lib64" would be ignored in that case:
CPPFLAGS="-I${ECCODES_ROOT}/include"
LDFLAGS="-L${ECCODES_ROOT}/lib64"
"${top_srcdir}/configure" \
--disable-maintainer-mode \
--enable-cf-interface \
--enable-iso-c-interface \
--enable-mpi \
--enable-option-checking=fatal \
--with-eccodes \
--with-netcdf="${NETCDF_ROOT}" \
CC="${MPICC}" \
CPPFLAGS="${CPPFLAGS}" \
F77="${MPIFC}" \
FC="${MPIFC}" \
LDFLAGS="${LDFLAGS}" \
MPI_LAUNCH="${MPI_LAUNCH}" \
PKG_CONFIG_PATH="${YAXT_ROOT}/lib/pkgconfig:${PPM_ROOT}/lib/pkgconfig"
make -j8
make -j8 check | tee tests/test-suite.log
check_all_tests_passed tests/test-suite.log
make -j8 distclean
check_no_files_in_cwd
#!/bin/bash
echo "WARNING: the current version of CDI-PIO is incompatible with the build system if ICON" >&2
exit 0
#!/bin/bash
set -eu
script_dir=$(cd "$(dirname "$0")"; pwd)
top_srcdir=$(cd "${script_dir}/../../.."; pwd)
. "${script_dir}/utils.sh"
init_gcc1120
# The following compiler flags are used by the respective ICON configure
# wrapper. They are not set into stone and can be changed if needed. It is just
# important to keep them the same as in the wrapper.
CFLAGS='-g -gdwarf-4 -march=native -mpc64 -O2'
FCFLAGS='-fmodule-private -fimplicit-none -fmax-identifier-length=63 -Wall -Wcharacter-truncation -Wconversion -Wunderflow -Wunused-parameter -Wno-surprising -fall-intrinsics -g -march=native -mpc64 -fbacktrace -fbounds-check -fstack-protector-all -finit-real=nan -finit-integer=-2147483648 -finit-character=127 -O2 -std=f2008'
test -f "${top_srcdir}/configure" || "${top_srcdir}/autogen.sh"
"${top_srcdir}/configure" \
--disable-cdi-app \
--disable-maintainer-mode \
--disable-shared \
--enable-cf-interface=no \
--enable-cgribex \
--enable-grib \
--enable-iso-c-interface \
--enable-mpi=no \
--enable-ppm-dist-array=no \
--enable-silent-rules=no \
--enable-static \
--with-eccodes=yes \
--with-netcdf \
--with-on-demand-check-programs \
--without-example-programs \
--without-grib_api \
--without-szlib \
--without-threads \
BUILD_CC= \
BUILD_CFLAGS= \
BUILD_CXX= \
BUILD_F77= \
BUILD_FC= \
BUILD_FCFLAGS= \
BUILD_LDFLAGS= \
BUILD_LIBS= \
BUILD_MPI_C_LIB= \
BUILD_MPI_FC_LIB= \
CC="${MPICC}" \
CFLAGS="${CFLAGS}" \
CPPFLAGS="-I${NETCDF_ROOT}/include -I${ECCODES_ROOT}/include" \
CXX=no \
F77=no \
FC="${MPIFC}" \
FCFLAGS="${FCFLAGS}" \
LDFLAGS="-L${NETCDF_ROOT}/lib -L${ECCODES_ROOT}/lib64" \
LIBS='-leccodes -lnetcdf' \
MPIROOT= \
MPI_C_INCLUDE= \
MPI_C_LIB= \
MPI_FC_LIB= \
MPI_FC_MOD= \
MPI_LAUNCH="${MPI_LAUNCH}" \
PKG_CONFIG= \
PPM_CORE_C_INCLUDE= \
PPM_CORE_C_LIB= \
YAXT_C_INCLUDE= \
YAXT_C_LIB= \
YAXT_FC_LIB= \
YAXT_FC_MOD= \
ac_cv_func_uuid_create=no \
ac_cv_lib_uuid_uuid_generate=no \
acx_cv_have_libnc_dap=no \
acx_cv_have_nc4hdf5=no \
acx_cv_have_netcdf2=yes \
acx_cv_have_netcdf4=yes \
acx_cv_have_pnetcdf=no
make -j8
make -j8 check
#
# Accepts a list of environment modules and loads them witch conflict
# resolution.
#
switch_for_module ()
{
for sfm_module in "$@"; do
sfm_module_full=
sfm_module_short=
case $sfm_module in
*/*)
# The module is provided with the version part:
sfm_module_full=$sfm_module
sfm_module_short=`echo $sfm_module | sed 's%/[^/]*$%%'` ;;
*)
# Only the name of the module is provided, get the default version:
sfm_module_full=`module show $sfm_module 2>&1 | sed -n "s%^[^ \t]*/\\($sfm_module.*\\):%\\1%p"`
sfm_module_short=$sfm_module ;;
esac
# A space-separated list of modules that are already loaded:
sfm_loaded_full=`module -t list 2>&1 | tr '\n' ' ' | sed 's/^.*Modulefiles://' | sed 's/(default)//g'`
# Check whether the requested module if already loaded:
if test -n "$sfm_module_full"; then
case " $sfm_loaded_full " in
*" $sfm_module_full "*)
echo "module $sfm_module is already loaded"
continue ;;
esac
fi
# A list of modules in conflict:
sfm_conflicts=`module show $sfm_module 2>&1 | sed -n 's/^conflict\(.*\)/\1/p' | tr '\n\t' ' '`
# A list of loaded modules without version parts:
sfm_loaded_short=`echo "$sfm_loaded_full" | sed 's%\([^ ][^ ]*\)/[^ ]*%\1%g'`
# Add the short name of the module to the list of conflicts:
sfm_conflicts="$sfm_conflicts $sfm_module_short"
# A list of loaded modules that are in conflict with the requested module:
sfm_loaded_conflicts=
for sfm_conflict in $sfm_conflicts""; do
sfm_loaded_list=
case $sfm_conflict in
*/*)
# The conflict is specified with the version part:
sfm_loaded_list=$sfm_loaded_full ;;
*)
# The conflict is specified without the version part:
sfm_loaded_list=$sfm_loaded_short ;;
esac
# Check that the conflicted module is loaded:
case " $sfm_loaded_list " in
*" $sfm_conflict "*)
# The conflict is loaded, check whether it is already added to the
# list:
case " $sfm_loaded_conflicts " in
*" $sfm_conflict "*) ;;
*)
# The conflict is not in the list, append:
sfm_loaded_conflicts="$sfm_loaded_conflicts $sfm_conflict" ;;
esac
;;
esac
done
# Calculate the number of modules that must be unloaded to before loading
# the requested module:
sfm_loaded_conflicts_count=`echo $sfm_loaded_conflicts | wc -w`
case $sfm_loaded_conflicts_count in
0)
# None of the conflicting modules is loaded:
sfm_cmd="module load $sfm_module" ;;
1)
# There is only one module that must be unloaded, use switch command:
sfm_cmd="module switch $sfm_loaded_conflicts $sfm_module" ;;
*)
# There is more than one module that must be unloaded, unload all of
# them and then load the requested one:
sfm_cmd="module unload $sfm_loaded_conflicts && module load $sfm_module" ;;
esac
echo "$sfm_cmd"
eval "$sfm_cmd"
done
}
#
# Initializes the environment.
#
init_env ()
{
:
}
#
# Sets variables for tests with GCC 11.2.0.
#
init_gcc1120 ()
{
init_env
switch_for_module gcc/11.2.0-gcc-11.2.0 openmpi/4.1.2-gcc-11.2.0
CC=gcc
CXX=g++
FC=gfortran
MPICC=mpicc
MPIFC=mpif90
MPI_LAUNCH="$(which mpirun)"
ECCODES_ROOT='/sw/spack-levante/eccodes-2.21.0-4ywkk4'
NETCDF_ROOT='/sw/spack-levante/netcdf-c-4.8.1-6qheqr'
PPM_ROOT='/work/mh0287/m300488/libcdi-ci-sw/install/ppm-1.0.8-gcc-11.2.0'
YAXT_ROOT='/work/mh0287/m300488/libcdi-ci-sw/install/yaxt-0.9.3-gcc-11.2.0'
# Here we fix a never-ending story with Libtool overlinkning, absence of
# '*.la' files when they could help, and '-Wl,--disable/enable-new-dtags':
export LD_LIBRARY_PATH="${ECCODES_ROOT}/lib64:${NETCDF_ROOT}/lib:${LD_LIBRARY_PATH-}"
}
#
# Sets variables for tests with Intel Classic 2021.5.0.
#
init_intelclassic202150 ()
{
init_env
# Try to make sure that the compiler works with the system gcc:
module unload gcc
# For whatever reason, Intel Classic 2021.5.0 is enabled with
# intel-oneapi-compilers/2022.0.1-gcc-11.2.0:
switch_for_module intel-oneapi-compilers/2022.0.1-gcc-11.2.0 openmpi/4.1.2-intel-2021.5.0
AR=xiar
CC=icc
CXX=icpc
FC=ifort
MPICC=mpicc
MPIFC=mpif90
MPI_LAUNCH="$(which mpirun)"
ECCODES_ROOT='/sw/spack-levante/eccodes-2.21.0-3ehkbb'
NETCDF_ROOT='/sw/spack-levante/netcdf-c-4.8.1-2k3cmu'
PPM_ROOT='/work/mh0287/m300488/libcdi-ci-sw/install/ppm-1.0.8-intel-classic-2021.5.0'
YAXT_ROOT='/work/mh0287/m300488/libcdi-ci-sw/install/yaxt-0.9.3-intel-classic-2021.5.0'
# Here we fix a never-ending story with Libtool overlinkning, absence of
# '*.la' files when they could help, and '-Wl,--disable/enable-new-dtags':
export LD_LIBRARY_PATH="${ECCODES_ROOT}/lib64:${NETCDF_ROOT}/lib:${LD_LIBRARY_PATH-}"
}
#
# Accepts a path to a file containing the testsuite summary (either the
# 'test-suite.log' or the standard output of the 'make check' command) and
# checks whether all tests were run and passed.
#
check_all_tests_passed ()
{
awk '/SKIP: /{
print "ERROR: the total number of tests is not equal to the number of passed tests";
exit 1;
}' $1 >&2
}
#
# Checks whether the current working directory or any of its subdirectories
# contain a file and fails with an error message if that is the case.
#
check_no_files_in_cwd ()
{
cnfic_files=`find . -type f 2>/dev/null`
if test -n "$cnfic_files"; then
{
echo "ERROR: the current working directory contains undeleted files:"
echo "$cnfic_files"
} >&2
exit 1
fi
}
#!/bin/bash
set -eu
set -o pipefail
script_dir=$(cd "$(dirname "$0")"; pwd)
top_srcdir=$(cd "${script_dir}/../.."; pwd)
test_environment='unknown'
case $(uname -s) in
Linux)
node_name=$(uname -n)
case $(host "${node_name}") in
mpipc*.mpimet.mpg.de\ * | \
breeze*.mpimet.mpg.de\ *)
test_environment='breeze-mpim' ;;
levante*.atos.local\ *)
test_environment='levante-dkrz' ;;
daint*.login.cscs.ch\ *)
test_environment='daint-cscs' ;;
esac
esac
test "x${test_environment}" != 'xunknown' || {
echo 'ERROR: unknown test environment' >&2
exit 1
}
cd "${top_srcdir}"
git update-index -q --refresh || {
echo "ERROR: failed to update git index in '${top_srcdir}'" >&2
exit 1
}
git diff-files --quiet || {
echo "ERROR: '${top_srcdir}' has unstaged changes" >&2
exit 1
}
untracked_files=`git ls-files --others` || {
echo "ERROR: failed to get list of untracked files in '${top_srcdir}'" >&2
exit 1
}
if test -n "${untracked_files}"; then
{
echo "ERROR: '${top_srcdir}' has untracked files:" >&2
echo "${untracked_files}" >&2
} >&2
exit 1
fi
echo "Running tests for '${test_environment}'"
for script in $(find "${script_dir}/${test_environment}" -type f -name 'test.*' -executable); do
echo "Running '${script}'"
"${script}"
git clean -fdx
git checkout .
done
2022-11-05 Uwe Schulzweida
* NetCDF output: added compression support for data on GRID_GENERIC
2022-10-19 Uwe Schulzweida
* Replaced CDI function vlistDefVarExtra() by cdiDefKeyString() with CDI_KEY_CHUNKS
* Replaced CDI function vlistInqVarExtra() by cdiInqKeyString() with CDI_KEY_CHUNKS
* Replaced CDI function vlistDefVarScalefactor() by cdiDefKeyFloat() with CDI_KEY_SCALEFACTOR
* Replaced CDI function vlistInqVarScalefactor() by cdiDefKeyFloat () with CDI_KEY_SCALEFACTOR
* Replaced CDI function vlistDefVarAddoffset() by cdiDefKeyFloat () with CDI_KEY_ADDOFFSET
* Replaced CDI function vlistInqVarAddoffset() by cdiDefKeyFloat () with CDI_KEY_ADDOFFSET
2022-10-17 Uwe Schulzweida
* Added environment variable CDI_SHUFFLE to set shuffle option to NetCDF4 deflation compression
2022-10-16 Uwe Schulzweida
* Improved read performance of temporal chunked NetCDF4 data
* Added environment variable CDI_CHUNK_CACHE to set the NetCDF4 chunk cache size
* Added environment variable CDI_CHUNK_CACHE_MAX to set the maximum chunk cache size
2022-10-14 Uwe Schulzweida
* NetCDF: reading of lower time bounds is wrong since 2.0.6 (bug fix)
2022-10-06 Uwe Schulzweida
* Version 2.1.0 released
2022-10-05 Uwe Schulzweida
* Added CDI_PROJ_HEALPIX
2022-10-04 Uwe Schulzweida
* cdi_encode_timeval: added support for TUNIT_SECOND
2022-09-30 Uwe Schulzweida
* install cmake files in <install>/lib/cmake/cdi
2022-08-12 Uwe Schulzweida
* added CDI_KEY_CHUNKTYPE and CDI_KEY_CHUNKSIZE
......@@ -56,7 +99,7 @@
2022-01-28 Uwe Schulzweida
* cdf_read_coordinates: check that bounds have only 2 dimensions [Bug #10575]
* cdf_read_coordinates: check that grid cell bounds have only 2 dimensions [Bug #10575]
* gribIterator::gridGenerate: copy CDI_KEY_UUID (bug fix)
2022-01-12 Uwe Schulzweida
......
CDI NEWS
--------
Version 2.1.0 (11 October 2021):
Version 2.2.0 (6 October 2023):
New features:
* Improved read performance of temporal chunked NetCDF4 data
Fixed bugs:
Version 2.1.0 (6 October 2022):
New features:
* Added support for NCZarr
* Set number of significant bits used for NetCDF 4.9.0 bit-roundung: vlistDefVarNSB()/vlistInqVarNSB()
* Added support for milli seconds
* Changed DateType back to int
* Made CDI compatible to revision 1.8.3 used in ICON
Fixed bugs:
* recalculate optimal chunk_size if gridsize is > chunk_size_lim
* ecCodes encode: fix problem with startStep for step type MIN/MAX
* GRIB read: recalculate start date/time for every record and timestep
* changed chunk_size_lim from 1073741823 to 16777216
* compareXYvals failed for unstructured grids (segmentation fault) [Bug #10632]
* cdf_read_coordinates: check that bounds have only 2 dimensions [Bug #10575]
* cdf_read_coordinates: check that grid cell bounds have only 2 dimensions [Bug #10575]
Version 2.0.0 (11 October 2021):
......
......@@ -78,8 +78,8 @@ static int datamode = DP_MODE;
static void
version(void)
{
int filetypes[] = { CDI_FILETYPE_SRV, CDI_FILETYPE_EXT, CDI_FILETYPE_IEG, CDI_FILETYPE_GRB, CDI_FILETYPE_GRB2,
CDI_FILETYPE_NC, CDI_FILETYPE_NC2, CDI_FILETYPE_NC4, CDI_FILETYPE_NC4C, CDI_FILETYPE_NC5, CDI_FILETYPE_NCZARR };
int filetypes[] = { CDI_FILETYPE_SRV, CDI_FILETYPE_EXT, CDI_FILETYPE_IEG, CDI_FILETYPE_GRB, CDI_FILETYPE_GRB2, CDI_FILETYPE_NC,
CDI_FILETYPE_NC2, CDI_FILETYPE_NC4, CDI_FILETYPE_NC4C, CDI_FILETYPE_NC5, CDI_FILETYPE_NCZARR };
const char *typenames[] = { "srv", "ext", "ieg", "grb", "grb2", "nc", "nc2", "nc4", "nc4c", "nc5", "nczarr" };
fprintf(stderr, "CDI version 2.1\n");
......@@ -497,8 +497,8 @@ printShortinfo(int streamID, int vlistID, int vardis)
{
const CdiDateTime dt = taxisInqRdatetime(taxisID);
fprintf(stdout, " RefTime = %4.4d-%2.2d-%2.2d %2.2d:%2.2d:%2.2d",
dt.date.year, dt.date.month, dt.date.day, dt.time.hour, dt.time.minute, dt.time.second);
fprintf(stdout, " RefTime = %4.4d-%2.2d-%2.2d %2.2d:%2.2d:%2.2d", dt.date.year, dt.date.month, dt.date.day,
dt.time.hour, dt.time.minute, dt.time.second);
if (dt.time.ms) fprintf(stdout, ".%d", dt.time.ms);
const int tunits = taxisInqTunit(taxisID);
......@@ -560,8 +560,9 @@ setDefaultDataType(char *datatypestr)
else
{
fprintf(stderr, "Unsupported number of bits %d!\n", nbits);
fprintf(stderr,
"Use I8/I16/I32/F32/F64 for nc/nc2/nc4/nc4c/nc5/nczarr; F32/F64 for grb2/srv/ext/ieg; P1 - P24 for grb/grb2.\n");
fprintf(
stderr,
"Use I8/I16/I32/F32/F64 for nc/nc2/nc4/nc4c/nc5/nczarr; F32/F64 for grb2/srv/ext/ieg; P1 - P24 for grb/grb2.\n");
exit(EXIT_FAILURE);
}
}
......
......@@ -9,15 +9,14 @@
#include "printinfo.h"
#define DATE_FORMAT "%5.4d-%2.2d-%2.2d"
#define TIME_FORMAT "%2.2d:%2.2d:%2.2d"
void
datetime2str(CdiDateTime dt, char *datetimestr, int maxlen)
{
snprintf(datetimestr, maxlen, DATE_FORMAT "T" TIME_FORMAT,
dt.date.year, dt.date.month, dt.date.day, dt.time.hour, dt.time.minute, dt.time.second);
snprintf(datetimestr, maxlen, DATE_FORMAT "T" TIME_FORMAT, dt.date.year, dt.date.month, dt.date.day, dt.time.hour, dt.time.minute,
dt.time.second);
}
void
......@@ -44,7 +43,8 @@ time2str(CdiTime time, char *timestr, int maxlen)
}
if (msDigitsNum)
snprintf(timestr, maxlen, "%2.2d:%2.2d:%0*.*f", time.hour, time.minute, msDigitsNum + 3, msDigitsNum, time.second + time.ms / 1000.0);
snprintf(timestr, maxlen, "%2.2d:%2.2d:%0*.*f", time.hour, time.minute, msDigitsNum + 3, msDigitsNum,
time.second + time.ms / 1000.0);
else
snprintf(timestr, maxlen, TIME_FORMAT, time.hour, time.minute, time.second);
}
......
......@@ -42,7 +42,7 @@ case "${HOSTNAME}" in
CC=icc CFLAGS="-g -D_REENTRANT -Wall -Wwrite-strings -O3 -march=native -fp-model source"
;;
bailung*|d133*|d134*)
${CONFPATH}configure --prefix=$HOME/local \
${CONFPATH}configure --prefix=$HOME/local/cdi \
--enable-maintainer-mode \
--enable-iso-c-interface \
--enable-swig \
......@@ -69,7 +69,7 @@ case "${HOSTNAME}" in
--with-fdb5=$HOME/src/fdb \
--with-eccodes=$HOME/local/eccodes-2.22.0 \
--with-netcdf=$HOME/local/netcdf-c-4.9.0"
PREFIX="--prefix=$HOME/local"
PREFIX="--prefix=$HOME/local/cdi"
LD_ADD="-Wl,-rpath,$HOME/local/eccodes-2.22.0/lib -Wl,-rpath,$HOME/src/fdb/lib"
if test "$COMP" = clang ; then
${CONFPATH}configure $CONFIG_OPTS $PREFIX $CDILIBS LDFLAGS="$LD_ADD $LDFLAGS" \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment