Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libcdi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mpim-sw
libcdi
Merge requests
!11
Consolidation with CDI-PIO (1.8.x)
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Consolidation with CDI-PIO (1.8.x)
cdi-1.8.x-pio-merge-followup
into
cdi-1.8.x
Overview
21
Commits
663
Pipelines
28
Changes
236+
Merged
Sergey Kosukhin
requested to merge
cdi-1.8.x-pio-merge-followup
into
cdi-1.8.x
3 years ago
Overview
20
Commits
663
Pipelines
28
Changes
3
Expand
This is a follow-up on
!8 (closed)
.
Edited
3 years ago
by
Sergey Kosukhin
0
0
Merge request reports
Compare
version 21
version 24
6717d915
2 years ago
version 23
85b7a1ea
2 years ago
version 22
7b234d41
2 years ago
version 21
1bc5e581
2 years ago
version 20
18d44119
2 years ago
version 19
305c51a7
2 years ago
version 18
8bb6ae45
2 years ago
version 17
ebd885a0
2 years ago
version 16
d7ae9ee7
2 years ago
version 15
fe20219e
2 years ago
version 14
a2a63b7e
3 years ago
version 13
91737b64
3 years ago
version 12
5eb8cbb1
3 years ago
version 11
d9f38654
3 years ago
version 10
d9f38654
3 years ago
version 9
a41dd2c4
3 years ago
version 8
a7a2b4fd
3 years ago
version 7
98293507
3 years ago
version 6
98293507
3 years ago
version 5
48a56362
3 years ago
version 4
4a4b8677
3 years ago
version 3
23b28f72
3 years ago
version 2
352b4cfe
3 years ago
version 1
352b4cfe
3 years ago
cdi-1.8.x (base)
and
latest version
latest version
d6ede7b4
663 commits,
2 years ago
version 24
6717d915
662 commits,
2 years ago
version 23
85b7a1ea
662 commits,
2 years ago
version 22
7b234d41
662 commits,
2 years ago
version 21
1bc5e581
666 commits,
2 years ago
version 20
18d44119
660 commits,
2 years ago
version 19
305c51a7
659 commits,
2 years ago
version 18
8bb6ae45
658 commits,
2 years ago
version 17
ebd885a0
653 commits,
2 years ago
version 16
d7ae9ee7
652 commits,
2 years ago
version 15
fe20219e
650 commits,
2 years ago
version 14
a2a63b7e
647 commits,
3 years ago
version 13
91737b64
647 commits,
3 years ago
version 12
5eb8cbb1
640 commits,
3 years ago
version 11
d9f38654
638 commits,
3 years ago
version 10
d9f38654
98 commits,
3 years ago
version 9
a41dd2c4
69 commits,
3 years ago
version 8
a7a2b4fd
67 commits,
3 years ago
version 7
98293507
62 commits,
3 years ago
version 6
98293507
62 commits,
3 years ago
version 5
48a56362
63 commits,
3 years ago
version 4
4a4b8677
61 commits,
3 years ago
version 3
23b28f72
61 commits,
3 years ago
version 2
352b4cfe
60 commits,
3 years ago
version 1
352b4cfe
600 commits,
3 years ago
Show latest version
3 files
+
18
−
4
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
.ci/bb/levante-dkrz/test.icon-pio.intel-classic
0 → 100755
+
226
−
0
Options
#!/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
# 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 -qno-opt-dynamic-align -O3 -ftz'
FCFLAGS
=
'-g -gdwarf-4 -pc64 -fp-model source -march=native -O2 -assume realloc_lhs -ftz'
# Make sure that the libtool script has a chance to erroneously link to the
# shared versions of YAXT and PPM:
for
file
in
\
"
${
PPM_ROOT
}
/lib/libscalesppmcore.so"
\
"
${
YAXT_ROOT
}
/lib/libyaxt.so"
\
"
${
YAXT_ROOT
}
/lib/libyaxt_c.so"
;
do
test
-r
"
${
file
}
"
||
{
echo
"ERROR: file '
${
file
}
' not found"
>
&2
exit
1
}
done
# When configured as part of ICON, C headers, Fortran modules and library files
# of YAXT and PPM become available only at the build time. We mock that by
# creating two empty directories for YAXT and PPM before running the configure
# script of CDI and copy the required files into them before running make:
LOCAL_YAXT_ROOT
=
"
$(
pwd
)
/cdi-test-yaxt"
LOCAL_PPM_ROOT
=
"
$(
pwd
)
/cdi-test-ppm"
rm
-rf
"
${
LOCAL_YAXT_ROOT
}
"
"
${
LOCAL_PPM_ROOT
}
"
mkdir
"
${
LOCAL_YAXT_ROOT
}
"
"
${
LOCAL_PPM_ROOT
}
"
# Make sure that CDI gets linked to the right instances of YAXT even if certain
# environment variables and linker flags point to the wrong existing instance:
WRONG_YAXT_LIBDIR
=
"
$(
init_gcc1120
>
/dev/null
&&
echo
"
${
YAXT_ROOT
}
"
)
/lib"
for
file
in
\
"
${
WRONG_YAXT_LIBDIR
}
/libyaxt.la"
\
"
${
WRONG_YAXT_LIBDIR
}
/libyaxt_c.la"
\
"
${
WRONG_YAXT_LIBDIR
}
/pkgconfig/yaxt.pc"
\
"
${
WRONG_YAXT_LIBDIR
}
/pkgconfig/yaxt_c.pc"
;
do
test
-f
"
${
file
}
"
||
{
echo
"ERROR: file '
${
file
}
' not found"
>
&2
exit
1
}
done
export
PKG_CONFIG_PATH
=
"
${
WRONG_YAXT_LIBDIR
}
/pkgconfig"
export
LD_LIBRARY_PATH
=
"
${
WRONG_YAXT_LIBDIR
}
:
${
LD_LIBRARY_PATH
-
}
"
LDFLAGS
=
"-L
${
WRONG_YAXT_LIBDIR
}
"
# There is no 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_gcc1120
>
/dev/null
&&
echo
"
${
NETCDF_ROOT
}
"
)
WRONG_NETCDF_BINDIR
=
"
${
WRONG_NETCDF_ROOT
}
/bin"
# It looks like we cannot properly check whether the wrong 'nc-config' in the
# ${PATH} causes any inconsistency. All we can do is run a not very reliable
# indirect check of whether CDI gets built without the unwanted dependency on
# cURL:
nc_has_dap
=
`
"
${
WRONG_NETCDF_BINDIR
}
/nc-config"
--has-dap
`
||
{
echo
"ERROR: failed to check whether NetCDF in '
${
WRONG_NETCDF_ROOT
}
' is built with DAP support"
>
&2
exit
1
}
test
"x
${
nc_has_dap
}
"
=
'xyes'
||
{
echo
"ERROR: NetCDF in '
${
WRONG_NETCDF_ROOT
}
' is built without DAP support"
>
&2
exit
1
}
export
PATH
=
"
${
WRONG_NETCDF_BINDIR
}
:
${
PATH
-
}
"
test
-f
"
${
top_srcdir
}
/configure"
||
"
${
top_srcdir
}
/autogen.sh"
"
${
top_srcdir
}
/configure"
\
--disable-cdi-app
\
--disable-maintainer-mode
\
--disable-shared
\
--enable-cf-interface
=
yes
\
--enable-cgribex
\
--enable-grib
\
--enable-iso-c-interface
\
--enable-mpi
=
yes
\
--enable-ppm-dist-array
=
yes
\
--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
\
AR
=
"
${
AR
}
"
\
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
=
"
${
LDFLAGS
}
-L
${
NETCDF_ROOT
}
/lib -L
${
ECCODES_ROOT
}
/lib64"
\
LIBS
=
'-Wl,--as-needed -lnetcdf -leccodes'
\
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_header_ppm_dist_array_h
=
yes
\
ac_cv_lib_uuid_uuid_generate
=
no
\
acx_cv_c_include_ppm_ppm_h
=
"-I
${
LOCAL_PPM_ROOT
}
/include"
\
acx_cv_c_include_yaxt_h
=
"-I
${
LOCAL_YAXT_ROOT
}
/include"
\
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.la"
\
acx_cv_option_search_xt_initialized_c
=
"
${
LOCAL_YAXT_ROOT
}
/lib/libyaxt_c.la"
\
acx_cv_option_search_xt_initialized_fc
=
"
${
LOCAL_YAXT_ROOT
}
/lib/libyaxt.la
${
LOCAL_YAXT_ROOT
}
/lib/libyaxt_c.la"
# Create local copies of YAXT and PPM and make them similar to what they look like
# when the libraries are built inside the build system of ICON:
rsync
-uavz
"
${
YAXT_ROOT
}
/"
"
${
LOCAL_YAXT_ROOT
}
/"
--exclude
=
'*.pc'
--exclude
=
'*.so'
--exclude
=
'*.so.*'
rsync
-uavz
"
${
PPM_ROOT
}
/"
"
${
LOCAL_PPM_ROOT
}
/"
--exclude
=
'*.pc'
--exclude
=
'*.so'
--exclude
=
'*.so.*'
sed
-i
-E
-e
"{
# The build system of ICON disables the shared versions of the libraries
# (i.e. configures them with '--disable-shared'):
s/^dlname=.*/dlname=''/
s/^library_names=.*/library_names=''/
# The linking to the libraries is done without installing them:
s/^installed=.*/installed=no/
}"
`
find
"
${
LOCAL_YAXT_ROOT
}
"
"
${
LOCAL_PPM_ROOT
}
"
-name
'*.la'
`
make
-j8
# The current general approach in the build system of ICON is to avoid building
# the shared versions of the bundled libraries and link to the static ones
# without -L and -l flags. Instead, to avoid possible ambiguity, the linking is
# done by passing paths to static library as positional arguments for the
# linker. That, however, does not work well with libtool scripts as they inject
# all files referred by the positional arguments into the generated static
# libraries (archives). That is usually fine with the GNU linker but is a
# problem for the MacOS one, which might ignore the whole library file:
# ld: warning: ignoring file libcdipio.a, building for macOS-x86_64 but attempting to link with file built for macOS-x86_64
# To circumvent the problem, we tell the configure of CDI to link to YAXT and
# PPM using libtool .la files and check that libcdipio.a does not contain any
# other archive files, which the linker might potentially not be able to handle:
tested_file
=
'src/.libs/libcdipio.a'
invalid_entries
=
`
ar t
"
${
tested_file
}
"
|
sed
-n
'/\.a$/p'
`
||
{
echo
"ERROR: failed to check
$1
for invalid entries"
>
&2
exit
1
}
if
test
-n
"
${
invalid_entries
}
"
;
then
{
echo
"ERROR: '
${
tested_file
}
' has invalid entries:"
>
&2
echo
"
${
invalid_entries
}
"
>
&2
}
>
&2
exit
1
fi
make
-j8
check
TESTS
=
XFAIL_TESTS
=
# Check that a test program is linked to YAXT and PPM statically as it should
# when built inside the build system of ICON:
tested_file
=
'tests/pio_write.parallel'
invalid_deps
=
`
ldd
"
${
tested_file
}
"
|
sed
-E
-n
'/libscalesppmcore|libyaxt/p'
`
||
{
echo
"ERROR: failed to check '
${
tested_file
}
' for invalid dependencies"
>
&2
exit
1
}
if
test
-n
"
${
invalid_deps
}
"
;
then
{
echo
"ERROR: '
${
tested_file
}
' has invalid dependencies:"
>
&2
echo
"
${
invalid_deps
}
"
>
&2
}
>
&2
exit
1
fi
# Check that we do not link to the instance of YAXT from ${WRONG_YAXT_LIBDIR}
# (we might fail earlier if ${WRONG_YAXT_LIBDIR} contains the shared version of
# the library):
make
-C
examples/pio collectData2003.parallel
# Check whether CDI is built without the unwanted dependency on cURL:
tested_file
=
'./app/cdi'
cdi_built_with
=
`
"
${
tested_file
}
"
-d
2>&1 |
sed
-E
-n
'/^[ ]*with:/p'
`
&&
test
-n
"
${
cdi_built_with
}
"
||
{
echo
"ERROR: failed to get the expected debug output from '
${
tested_file
}
'"
>
&2
exit
1
}
case
"
${
cdi_built_with
}
"
in
*
' OPeNDAP '
*
)
echo
"ERROR: CDI is built with the unwanted dependency on cURL (i.e. OPeNDAP support is enabled)"
2>&1
exit
1
;;
esac
make
-j8
check
||
{
cat
tests/test-suite.log
;
exit
1
;
}
check_all_tests_passed tests/test-suite.log
Loading