Intel® MPI Library
Get help with building, analyzing, optimizing, and scaling high-performance computing (HPC) applications.
2219 Discussions

compiling HDF5 parallel: : error: unable to link a simple MPI-IO Fortran program

RobbieTheK
New Contributor I
2,383 Views

What are the options to configure HDF5 parallel with Fortran via oneAPI.

./configure --prefix=/path/to/hdf5p-intel/1.14.3 --enable-parallel --enable-fortran --enable-build-mode=production --enable-shared 

 

Currently Loaded Modulefiles: 1) oneapi/hpctoolkit/mpi/2021.11 2) oneapi/hpctoolkit/compiler-rt/2024.0.2 3) oneapi/compiler-rt/2024.0.2 4) oneapi/ifort/2024.0.2

 

Errors out with:

checking for parallel support files... provided by compiler checking whether a simple MPI-IO C program can be linked... yes checking whether a simple MPI-IO Fortran program can be linked... no configure: error: unable to link a simple MPI-IO Fortran program
Labels (2)
0 Kudos
1 Solution
TobiasK
Moderator
2,315 Views

there is an error in your environment, according to the config.log you set:
I_MPI_ROOT=psm3

which should point to the installation directory instead.

View solution in original post

0 Kudos
4 Replies
TobiasK
Moderator
2,330 Views

@RobbieTheK 
you need to specify the compiler you want to use, otherwise the configure script will just pick up something.
please try with

export CC=mpiicx CXX=mpiicpx FC=mpiifx F77=mpiifx 

also you probably need -fPIC, e.g.:

export CFLAGS="-fPIC -O3 -xHost" FFLAGS="-fPIC -O3 -xHost" CXXFLAGS="-fPIC -O3 -xHost"
./configure ....

0 Kudos
RobbieTheK
New Contributor I
2,324 Views

I tried those, see config.log. I've snipped the fatal errors for brevity. 

 

checking for parallel support files... provided by compiler
checking whether a simple MPI-IO C program can be linked... yes
checking whether a simple MPI-IO Fortran program can be linked... no

 

conftest.c:62:10: fatal error: 'quadmath.h' file not found
62 | #include <quadmath.h>

conftest.cpp:63:10: fatal error: 'ac_nonexistent.h' file not found
63 | #include <ac_nonexistent.h>
| ^~~~~~~~~~~~~~~~~~
1 error generated.
configure:10216: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "HDF5"
| #define PACKAGE_TARNAME "hdf5"
| #define PACKAGE_VERSION "1.15.0"
| #define PACKAGE_STRING "HDF5 1.15.0"
| #define PACKAGE_BUGREPORT "help@hdfgroup.org"
| #define PACKAGE_URL ""
| #define PACKAGE "hdf5"
| #define VERSION "1.15.0"
conftest.c:62:10: fatal error: 'quadmath.h' file not found
62 | #include <quadmath.h>
| ^~~~~~~~~~~~
1 error generated.
configure:7392: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "HDF5"
| #define PACKAGE_TARNAME "hdf5"
| #define PACKAGE_VERSION "1.15.0"
| #define PACKAGE_STRING "HDF5 1.15.0"
| #define PACKAGE_BUGREPORT "help@hdfgroup.org"
| #define PACKAGE_URL ""
| #define PACKAGE "hdf5"
| #define VERSION "1.15.0"

configure:5581: mpiicx -qversion >&5
icx: error: unknown argument '-qversion'; did you mean '--version'?
configure:5592: $? = 1
configure:5581: mpiicx -version >&5
icx: error: unknown argument '-version'; did you mean '--version'?


conftest.c:53:20: error: expected expression
53 | if (sizeof ((off_t)))
| ^
1 error generated.
configure:6436: $? = 1
configure: failed program was:
| /* confdefs.h */

conftest.c:53:22: error: expected expression
53 | if (sizeof ((ssize_t)))
| ^
1 error generated.
configure:6446: $? = 1

  

0 Kudos
TobiasK
Moderator
2,316 Views

there is an error in your environment, according to the config.log you set:
I_MPI_ROOT=psm3

which should point to the installation directory instead.

0 Kudos
RobbieTheK
New Contributor I
2,300 Views

@TobiasK wrote:

there is an error in your environment, according to the config.log you set:
I_MPI_ROOT=psm3

which should point to the installation directory instead.


Well this is embarrassing the modulefile had a typo after changing these values:

setenv I_MPI_OFI_PROVIDER psm3
setenv FI_PROVIDER psm3

 

I_MPI_ROOT was accidentally set to psm3. We need psm3 for our Mellanox InfiniBand mlx5_0 HBA cards.

 

It works now! Thanks so much.

 

 

.

 

 

0 Kudos
Reply