instaltion of hdf5 with latest intel compilers

We are trying to install hdf5 (version: 1.14.3) with latest intel compilers (ICX, ICPX, and IFX) by
./configure --prefix=/apps/wrf_lib --enable-shared --with-pic CFLAGS=“-fPIC -O3 -xHost -ip -fno-alias -align” FFLAGS=“-fPIC -O3 -xHost -ip -fno-alias -align” CXXFLAGS=“-fPIC -O3 -xHost -ip -fno-alias -align” FFLAGS=“-I/opt/intel/oneapi/compiler/2024.0/include -L/opt/intel/oneapi/compiler/2024.0/lib” as per previous suggestions. But we got errors like below (We are trying to attach the log file but that option (upload) is not supporting for the new users) :

checking for gcc... icx
checking whether the C compiler works... no
configure: error: in `/home/wrf_build/source_files/hdf5-1.14.3':
configure: error: C compiler cannot create executable
See `config.log' for more details

But, I have all the intel compilers
which icx
/opt/intel/oneapi/compiler/2024.0/bin/icx
which ifx
/opt/intel/oneapi/compiler/2024.0/bin/ifx
which icpx
/opt/intel/oneapi/compiler/2024.0/bin/icpx


   **Please provide the solutions/suggestions to overcome from this problem.**

Thank you,
Srinivas

Hi,

Would you please share config.log?

In the mean time, please check if CXX is defined as shown below:

hdf5/.github/workflows/intel-auto.yml at develop · HDFGroup/hdf5

You can also try ./configure CXX=/full/path/to/icpx ....

Second, try disabling fortran --disable-fortran.
That’s our CI does now as you can see from the above link.

Finally, remove all FLAGS to match our CI:
./confgiure --enable-shared --disable-fortran

Dear Sir,

Based on your suggestions, we followed these steps:

1. Exported the paths of CC (icx), CXX (icpx), and FC (ifx).
2. Disabled Fortran (--enable-shared --disable-fortran).
3. Did not import the flags (FFLAGS, CFLAGS, FFLAGS, CXXFLAGS).

Interestingly, it now appears to be working fine. Please review the log file and provide any further suggestions or corrections.

Thank you.
Srinivas
logfile.tar.gz (33.7 KB)

My experience is that the CMake builds have been working a lot better with the new Intel compilers than the autotools (configure). I have used CMake + icx/ifx for HDF5 for a long time without problems.

@yernisrinivasnekkali , you may want to try 1.14.4 snapshot:

          curl -O -L https://github.com/HDFGroup/hdf5/archive/refs/tags/snapshot-1.14.tar.gz
          tar zxf snapshot-1.14.tar.gz
          cd hdf5-snapshot-1.14
          ./configure --prefix=/tmp CC="$(which icx)" FC="$(which ifx)"  --enable-build-mode=production --enable-fortran
          make -j
          make check -j

I tested it yesterday and --enable-fortran worked fine with 2024.1 Intel oneAPI.

1 Like

Dear Sir,
The provided HDF5 file was installed successfully with Fortran enabled (–enable-shared and --enable-Fortran). It’s important to note that we didn’t import any flags (FFLAGS, CFLAGS, and CXXFLAGS). Please review the log file and provide any further suggestions or corrections.
config.log (291.4 KB)