From 774214bd777f79f1e7d8c429367aecdbf52513d0 Mon Sep 17 00:00:00 2001
From: Sergey Kosukhin <sergey.kosukhin@mpimet.mpg.de>
Date: Mon, 27 Jun 2022 13:36:49 +0200
Subject: [PATCH] Move CI script for ICON parallel integration to Levante.

---
 .../test.icon-pio.intel-classic-2021.5.0}     | 35 +++++++++++--------
 1 file changed, 21 insertions(+), 14 deletions(-)
 rename .ci/bb/{mistral-dkrz/test.icon-pio.nag-6.2.6223 => levante-dkrz/test.icon-pio.intel-classic-2021.5.0} (77%)

diff --git a/.ci/bb/mistral-dkrz/test.icon-pio.nag-6.2.6223 b/.ci/bb/levante-dkrz/test.icon-pio.intel-classic-2021.5.0
similarity index 77%
rename from .ci/bb/mistral-dkrz/test.icon-pio.nag-6.2.6223
rename to .ci/bb/levante-dkrz/test.icon-pio.intel-classic-2021.5.0
index 4b6608b16..3bfa59906 100755
--- a/.ci/bb/mistral-dkrz/test.icon-pio.nag-6.2.6223
+++ b/.ci/bb/levante-dkrz/test.icon-pio.intel-classic-2021.5.0
@@ -7,7 +7,7 @@ script_dir=$(cd "$(dirname "$0")"; pwd)
 top_srcdir=$(cd "${script_dir}/../../.."; pwd)
 
 . "${script_dir}/utils.sh"
-init_nag626223
+init_intelclassic202150
 
 test -f "${top_srcdir}/configure" || "${top_srcdir}/autogen.sh"
 
@@ -15,7 +15,7 @@ test -f "${top_srcdir}/configure" || "${top_srcdir}/autogen.sh"
 # of YAXT and PPM become available only at the build time. The following
 # imitates that.
 
-WRONG_YAXT_ROOT=$(init_pgi1990 >/dev/null && echo "${YAXT_ROOT}")
+WRONG_YAXT_ROOT=$(init_gcc1120 >/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-}"
 
@@ -28,12 +28,9 @@ rm -rf "${LOCAL_YAXT_ROOT}" "${LOCAL_PPM_ROOT}"
 # 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}")
+WRONG_NETCDF_ROOT=$(init_gcc1120 >/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 \
@@ -50,18 +47,28 @@ export LD_LIBRARY_PATH="${MPICH_ROOT}/lib:${NETCDF_ROOT}/lib:${ECCODES_ROOT}/lib
 --with-netcdf \
 --with-on-demand-check-programs \
 --without-example-programs \
---without-grib-api \
+--without-grib_api \
 --without-szlib \
 --without-threads \
-CC="${CC}" \
-CFLAGS='-g -march=native -O2' \
-CPPFLAGS="-I${MPICH_ROOT}/include -I${NETCDF_ROOT}/include -I${ECCODES_ROOT}/include" \
+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='-no-prec-sqrt -no-prec-div -fast-transcendentals -m64 -march=core-avx2 -mtune=core-avx2 -no-fma -g -gdwarf-4 -ip -pc64 -std=gnu99 -qno-opt-dynamic-align -O2 -ftz' \
+CPPFLAGS="-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' \
+FC="${MPIFC}" \
+FCFLAGS="-gdwarf-4 -g -pc64 -fp-model source" \
+LDFLAGS="-L${NETCDF_ROOT}/lib -L${ECCODES_ROOT}/lib64" \
+LIBS='-Wl,--as-needed -lnetcdf -leccodes' \
 MPIROOT= \
 MPI_C_INCLUDE= \
 MPI_C_LIB= \
-- 
GitLab