# instaltion of hdf5 with latest intel compilers

**URL:** <https://forum.hdfgroup.org/t/instaltion-of-hdf5-with-latest-intel-compilers/12142>\
**Category:** HDF5 Library\
**Created:** [April 7, 2024, 2:25am UTC](https://forum.hdfgroup.org/t/instaltion-of-hdf5-with-latest-intel-compilers/12142 "2024-04-07T02:25:08Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![yernisrinivasnekkali](https://forum.hdfgroup.org/letter_avatar_proxy/v4/letter/y/3ec8ea/32.png) [@yernisrinivasnekkali](https://forum.hdfgroup.org/u/yernisrinivasnekkali)\
**Post date:** [April 7, 2024, 2:25am UTC](https://forum.hdfgroup.org/t/instaltion-of-hdf5-with-latest-intel-compilers/12142/1 "2024-04-07T02:25:08Z")

</div>

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) :

```auto
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

```auto

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

Thank you,
Srinivas
```

---

<div class="post-metadata">

**Author:** ![hyoklee](https://forum.hdfgroup.org/user_avatar/forum.hdfgroup.org/hyoklee/32/1528_2.png) [@hyoklee](https://forum.hdfgroup.org/u/hyoklee)\
**Post date:** [April 7, 2024, 2:37am UTC](https://forum.hdfgroup.org/t/instaltion-of-hdf5-with-latest-intel-compilers/12142/2 "2024-04-07T02:37:55Z")

</div>

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](https://github.com/HDFGroup/hdf5/blob/develop/.github/workflows/intel-auto.yml#L40C11-L40C14)

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`

---

<div class="post-metadata">

**Author:** ![yernisrinivasnekkali](https://forum.hdfgroup.org/letter_avatar_proxy/v4/letter/y/3ec8ea/32.png) [@yernisrinivasnekkali](https://forum.hdfgroup.org/u/yernisrinivasnekkali)\
**Post date:** [April 7, 2024, 6:14am UTC](https://forum.hdfgroup.org/t/instaltion-of-hdf5-with-latest-intel-compilers/12142/3 "2024-04-07T06:14:52Z")

</div>

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](https://forum.hdfgroup.org/uploads/short-url/8clFbhMGmSSZzwQzhsSZkYkZFam.gz) (33.7 KB)

---

<div class="post-metadata">

**Author:** ![Hakon\_Strandenes](https://forum.hdfgroup.org/letter_avatar_proxy/v4/letter/h/77aa72/32.png) [@Hakon\_Strandenes](https://forum.hdfgroup.org/u/Hakon_Strandenes)\
**Post date:** [April 8, 2024, 8:08am UTC](https://forum.hdfgroup.org/t/instaltion-of-hdf5-with-latest-intel-compilers/12142/4 "2024-04-08T08:08:24Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![hyoklee](https://forum.hdfgroup.org/user_avatar/forum.hdfgroup.org/hyoklee/32/1528_2.png) [@hyoklee](https://forum.hdfgroup.org/u/hyoklee)\
**Post date:** [April 8, 2024, 2:21pm UTC](https://forum.hdfgroup.org/t/instaltion-of-hdf5-with-latest-intel-compilers/12142/5 "2024-04-08T14:21:17Z")

</div>

@yernisrinivasnekkali , you may want to try _ **1.14.4** _ snapshot:

```auto
          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.

---

<div class="post-metadata">

**Author:** ![yernisrinivasnekkali](https://forum.hdfgroup.org/letter_avatar_proxy/v4/letter/y/3ec8ea/32.png) [@yernisrinivasnekkali](https://forum.hdfgroup.org/u/yernisrinivasnekkali)\
**Post date:** [April 11, 2024, 11:33am UTC](https://forum.hdfgroup.org/t/instaltion-of-hdf5-with-latest-intel-compilers/12142/6 "2024-04-11T11:33:03Z")

</div>

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](https://forum.hdfgroup.org/uploads/short-url/2zb6MAp1RfDRJIfKrx8gc3R85GM.log) (291.4 KB)
