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

Move CI script for Intel to Levante.

parent 64a90980
No related branches found
No related tags found
1 merge request!11Consolidation with CDI-PIO (1.8.x)
......@@ -7,13 +7,23 @@ script_dir=$(cd "$(dirname "$0")"; pwd)
top_srcdir=$(cd "${script_dir}/../../.."; pwd)
. "${script_dir}/utils.sh"
init_intel1706
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 \
......@@ -21,10 +31,12 @@ mkdir build && cd build
--enable-mpi \
--enable-option-checking=fatal \
--enable-ppm-dist-array \
--with-grib-api="${GRIBAPI_ROOT}" \
--with-eccodes \
--with-netcdf="${NETCDF_ROOT}" \
CC="${MPICC}" \
CPPFLAGS="${CPPFLAGS}" \
FC="${MPIFC}" \
LDFLAGS="${LDFLAGS}" \
MPI_LAUNCH="${MPI_LAUNCH}" \
PKG_CONFIG_PATH="${YAXT_ROOT}/lib/pkgconfig:${PPM_ROOT}/lib/pkgconfig"
......
......@@ -122,6 +122,35 @@ init_gcc1120 ()
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
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
......@@ -138,3 +167,19 @@ check_all_tests_passed ()
}
}' $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
}
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