Skip to content
Snippets Groups Projects
Commit 58d5beef authored by Sergey Kosukhin's avatar Sergey Kosukhin
Browse files

Add CI scripts for ICON integration.

parent 9293d278
No related branches found
No related tags found
2 merge requests!14Draft: K202125/cdi 1.8.x pio merge followup,!8Consolidation with CDI-PIO (1.8.x)
#!/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
# When configure as part of ICON, the C headers of YAXT and PPM are available
# but the libraries and Fortran modules are not. The following imitates that.
# Note that the configure script of ICON calls the configure script of CDI with
# an additional argument 'PKG_CONFIG=' to make sure that neither YAXT nor PPM
# are picked up by pkg-config. However, here we check that it is not needed.
WRONG_YAXT_ROOT=$(init_pgi1990 >/dev/null && echo "${YAXT_ROOT}")
export PKG_CONFIG_PATH="${WRONG_YAXT_ROOT}/lib/pkgconfig"
export LD_LIBRARY_PATH="${WRONG_YAXT_ROOT}/lib:${LD_LIBRARY_PATH-}"
LOCAL_YAXT_ROOT="$(pwd)/cdi-test-yaxt"
LOCAL_PPM_ROOT="$(pwd)/cdi-test-ppm"
rm -rf "${LOCAL_YAXT_ROOT}" "${LOCAL_PPM_ROOT}"
# There is not way for the configure script of ICON to provide the configure
# script of CDI with the path to the installation of NetCDF in use. Here we
# imitate a situation when 'nc-config' from another (wrong) installation of
# NetCDF is in the PATH.
WRONG_NETCDF_ROOT=$(init_gcc640 >/dev/null && echo "${NETCDF_ROOT}")
export PATH="${WRONG_NETCDF_ROOT}/bin:${PATH-}"
# The configure wrappers of ICON export LD_LIBRARY_PATH:
export LD_LIBRARY_PATH="${MPICH_ROOT}/lib:${NETCDF_ROOT}/lib:${ECCODES_ROOT}/lib:${LD_LIBRARY_PATH}"
"${top_srcdir}/configure" \
--disable-cdi-app \
--disable-maintainer-mode \
--disable-shared \
--enable-cf-interface \
--enable-cgribex \
--enable-grib \
--enable-iso-c-interface \
--enable-mpi \
--enable-option-checking=fatal \
--enable-static \
--with-grib-api="${ECCODES_ROOT}" \
--with-netcdf \
--without-eccodes \
--without-threads \
CC="${CC}" \
CFLAGS='-g -march=native -O2' \
CPPFLAGS="-I${MPICH_ROOT}/include -I${NETCDF_ROOT}/include -I${ECCODES_ROOT}/include" \
CXX=no \
F77=no \
FC="${FC}" \
FCFLAGS="-I${MPICH_ROOT}/include -kind=byte -colour -f2008 -Wc=$(which gcc) -w=uep -O0 -Wc,-g -float-store -nan -gline -g" \
LDFLAGS="-L${MPICH_ROOT}/lib -L${NETCDF_ROOT}/lib -L${ECCODES_ROOT}/lib" \
LIBS='-leccodes -lnetcdf -lmpifort -lmpi -lubsan' \
MPI_LAUNCH="$(which "${MPI_LAUNCH%% *}") ${MPI_LAUNCH#* }" \
PPM_CODE_C_LIB=' ' \
PPM_CORE_C_INCLUDE="-I${PPM_ROOT}/include" \
YAXT_C_INCLUDE="-I${YAXT_ROOT}/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_fortran_mod_yaxt="-I${LOCAL_YAXT_ROOT}/include" \
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 \
acx_cv_option_search_PPM_initialize_c="${LOCAL_PPM_ROOT}/lib/libscalesppmcore.a" \
acx_cv_option_search_xt_initialized_c="${LOCAL_YAXT_ROOT}/lib/libyaxt_c.a" \
acx_cv_option_search_xt_initialized_fc="${LOCAL_YAXT_ROOT}/lib/libyaxt.a ${LOCAL_YAXT_ROOT}/lib/libyaxt_c.a"
rsync -uavz "${YAXT_ROOT}/" "${LOCAL_YAXT_ROOT}" --exclude='*.h' --exclude='*.la' --exclude='*.pc' --exclude='*.so' --exclude='*.so.*'
rsync -uavz "${PPM_ROOT}/" "${LOCAL_PPM_ROOT}" --exclude='*.h' --exclude='*.la' --exclude='*.pc' --exclude='*.so' --exclude='*.so.*'
make -j8
make -j8 check | tee check.log
check_all_tests_passed check.log
#!/bin/bash
set -eu
script_dir=$(cd "$(dirname "$0")"; pwd)
top_srcdir=$(cd "${script_dir}/../../.."; pwd)
. "${script_dir}/utils.sh"
init_gcc640
# The configure wrappers of ICON export LD_LIBRARY_PATH:
export LD_LIBRARY_PATH="${NETCDF_ROOT}/lib:${GRIBAPI_ROOT}/lib:${LD_LIBRARY_PATH-}"
"${top_srcdir}/configure" \
--disable-cdi-app \
--disable-cf-interface \
--disable-maintainer-mode \
--disable-mpi \
--disable-shared \
--enable-cgribex \
--enable-grib \
--enable-iso-c-interface \
--enable-option-checking=fatal \
--enable-static \
--with-grib-api="${GRIBAPI_ROOT}" \
--with-netcdf \
--without-eccodes \
--without-threads \
CC="${MPICC}" \
CFLAGS='-g -march=native -mpc64 -O2' \
CPPFLAGS="-I${NETCDF_ROOT}/include -I${GRIBAPI_ROOT}/include" \
CXX=no \
F77=no \
FC="${MPIFC}" \
FCFLAGS='-std=f2008 -fmodule-private -fimplicit-none -fmax-identifier-length=63 -Wall -Wcharacter-truncation -Wconversion -Wunderflow -Wunused-parameter -Wno-surprising -fall-intrinsics -g -march=native -mpc64' \
LDFLAGS="-L${NETCDF_ROOT}/lib -L${GRIBAPI_ROOT}/lib" \
LIBS='-lgrib_api -lnetcdf' \
MPI_LAUNCH="$(which "${MPI_LAUNCH%% *}") ${MPI_LAUNCH#* }" \
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
make -j8
make -j8 check
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