configure with Intel compiler and OpenHPC 4.9.0 fails
Added by Rainer Herbst almost 2 years ago
Dear all,
the last couple of days I had my head banging against the wall. :-(
I want to build CDO 2.1.1 against NetCDF v. 4.9.0 from the OpenHPC stack, but the configure failes with
@
./configure --prefix=/opt/ohpc/pub/libs/intel-openmpi4/cdo/2.1.1 --with-netcdf=/opt/ohpc/pub/libs/intel/openmpi4/netcdf/4.9.0 --with-hdf5=/opt/ohpc/pub/libs/intel/openmpi4/hdf5/1.10.8 CC=mpicc CXX=mpicxx F77=mpif77
...
checking for netcdf.h... yes
checking for library containing nc_open... no
configure: error: Could not link to NetCDF library
@
If I use the OpenHPC NetCDF 4.7.3, configure works fine.
I tried several settings, but to no result. The problem might be in some undefined references in the libnetcdf.so:
configure:27808: mpicc -o conftest -g -O2 -fopenmp -pthread -I/opt/ohpc/pub/libs/intel/openmpi4/netcdf/4.9.0/include -I/opt/ohpc/pub/libs/intel/openmpi4/hdf5/1.10.8/include -DgFortran -L/opt/ohpc/pub/libs/intel/openmpi4/netcdf/4.9.0/lib -L/opt/ohpc/pub/libs/intel/openmpi4/hdf5/1.10.8/lib conftest.c -lnetcdf -lhdf5_hl -lhdf5 -lpthread >&5
/opt/ohpc/pub/libs/intel/openmpi4/netcdf/4.9.0/lib/libnetcdf.so: undefined reference to `__libm_feature_flag_x_init'
/opt/ohpc/pub/libs/intel/openmpi4/netcdf/4.9.0/lib/libnetcdf.so: undefined reference to `__libm_feature_flag_x'
But again, some (other) undefined symbols exists in version 4.7.3, too. Could this break the configure process? What can I do to overcome this problem?
TIA
Rainer
config.log (76 KB) config.log |
Replies (3)
RE: configure with Intel compiler and OpenHPC 4.9.0 fails - Added by Ralf Mueller almost 2 years ago
Hi Rainer!
first of all: you don't need MPI for CDO. so instead of CC=mpicc I'd use CC=icc and so on for FC and CXX
Try adding -lm
to the LIBS
given to configure. The problem here is, that Intel compilers are VERY creative regarding what to take: libm from the system, libm from the classic compiler suite, libm from the new llvm-based compilers suite.
So I would try your original configure call and adding LIBS=-lm
Ah and another option to get some insights: call
ldd /opt/ohpc/pub/libs/intel/openmpi4/netcdf/4.9.0/lib/libnetcdf.soto check the runtime depoendencies of the netcdf shared lirbary. And search for a
nc-config
executable in /opt/ohpc/pub/libs/intel/openmpi4/netcdf/4.9.0/bin
. This can provide the linking or compiling flags you need,too.
cheers
ralf
RE: configure with Intel compiler and OpenHPC 4.9.0 fails - Added by Rainer Herbst over 1 year ago
Hi!
At least, I was able to drill the problem down to the Intel compiler version.
The netcdf package from OpenHPC was compiled using the Intel compiler version 2023.0.0. In this version, the libimf.so provides the requested symbols:- nm /opt/intel/oneapi/compiler/2023.0.0/linux/compiler/lib/intel64_lin/libimf.so | grep '__libm_feature_flag_x'
00000000003e45c0 b __libm_feature_flag_x
0000000000024f50 t __libm_feature_flag_x_init
With this compiler version, configuration/building of CDO with NetCDF 4.9.0 libs from OpenHPC works correct.
Regards,
Rainer
RE: configure with Intel compiler and OpenHPC 4.9.0 fails - Added by Ralf Mueller over 1 year ago
thx for posting the solution, Rainer!