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

compiling HDF5P 1.10.7 --enable-fortran fails with error: C compiler cannot create executables

RobbieTheK
New Contributor I
672 Views

Very similar to How to build HDF5 using Intel compiler?

What options do I need to get  --enable-fortran to work? Just --enable-parallel works without errors.

 

checking for gcc... mpiicc
checking whether the C compiler works... no
configure: error: in `/cluster/home/me/hdf5-hdf5-1_10_7':
configure: error: C compiler cannot create executables

./configure --prefix=/cluster/shared/apps/hdf5p/1.10.7 --enable-fortran --enable-parallel CC=mpiicc FC=mpiifort CXX=mpiicpc 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$INTEL/oneapi/mpi/latest/include -L$INTEL/oneapi/mpi/latest/lib"  

module loaded:

1) oneapi/tbb/2021.11  oneapi/intel_ipp_intel64/2021.10 15) oneapi/dal/2024.0.0
2) oneapi/oclfpga/2024.0.0 9) oneapi/ifort/2024.0.2 16) oneapi/compiler/2024.0.2
3) oneapi/compiler-rt/2024.0.2 10) oneapi/dpl/2022.3 17) oneapi/ccl/2021.11.2
4) oneapi/vtune/2024.0 11) oneapi/dpct/2024.0.0 18) oneapi/advisor/2024.0
5) oneapi/mpi/2021.11 12) oneapi/dnnl/3.3.0 19) oneapi/2024.0.0/2024.0.0
6) oneapi/mkl/2024.0 13) oneapi/dev-utilities/2024.0.0 20) oneapi/hpctoolkit/mpi/2021.11
7) oneapi/intel_ippcp_intel64/2021.9 14) oneapi/debugger/2024.0.0

 

Labels (2)
0 Kudos
1 Solution
RobbieTheK
New Contributor I
577 Views

Hat tip to this HDF5 discussion thread I had to install autotools 2.71 and re-run autogen.sh and as the user said there "Intel introduced a compiler flag starting with “-l” which is getting interpreted as a library".

View solution in original post

0 Kudos
4 Replies
TobiasK
Moderator
617 Views

@RobbieTheK 

You set:
MPICC='mpiicc -cc=icx'
MPICXX='mpiicpc -cxx=icpx'
MPIF77='mpiifort -fc=ifx'
MPIF90='mpiifort -fc=ifx'
MPIFC='mpiifort -fc=ifx'

which is not recognized by configure.

Just please use the corresponding llvm wrapper scripts

./configure --prefix=/cluster/shared/apps/hdf5p/1.10.7 --enable-fortran --enable-parallel CC=mpiicx FC=mpiifx CXX=mpiicpx CFLAGS="-fPIC -O3 -xHost -ip -fno-alias -align" FFLAGS="-fPIC -O3 -xHost -ip -fno-alias -align" CXXFLAGS="-fPIC -O3 -xHost -ip -fno-alias -align"

 

+ I think I remember there was an issue with -align so I would just skip it and use -O3 -xHOST as compiler flags.

0 Kudos
RobbieTheK
New Contributor I
611 Views

Well that fails with:

checking if Fortran interface enabled... yes
checking whether we are using the GNU Fortran compiler... no
checking whether mpiifx accepts -g... no
checking for Fortran flag to compile .f90 files... unknown
configure: error: Fortran could not compile .f90 files

 

Then I export PATH to include  /cluster/shared/apps/oneapi/2024.0/etc/modulefiles/, which I'm surprise does not get exported with the setvars

And then a different failure as noted in uploaded config.log:

checking if Fortran compiler version compatible with Fortran 2003 HDF... yes
checking how to get verbose linking output from mpiifx... -v
checking for Fortran libraries of mpiifx... -loopopt=1 -L/cluster/shared/apps/oneapi/hpctoolkit/mpi/2021.11/opt/mpi/libfabric/lib -L/cluster/shared/apps/oneapi/hpctoolkit/mpi/2021.11/lib -L/cluster/shared/apps/oneapi/ccl/2021.11/lib/ -L/cluster/shared/apps/oneapi/dal/2024.0/lib -L/cluster/shared/apps/oneapi/dnnl/2024.0/lib -L/cluster/shared/apps/oneapi/compiler/2024.0/lib -L/cluster/shared/apps/oneapi/ipp/2021.10/lib -L/cluster/shared/apps/oneapi/ippcp/2021.9/lib -L/cluster/shared/apps/oneapi/mkl/2024.0/lib -L/cluster/shared/apps/oneapi/mpi/2021.11/opt/mpi/libfabric/lib -L/cluster/shared/apps/oneapi/mpi/2021.11/lib -L/cluster/shared/apps/oneapi/tbb/2021.11/lib -L/usr/lib64/openmpi/lib -L/usr/lib64/openmpi/lib/paraview -L/cluster/shared/apps/oneapi/hpctoolkit/compiler/2024.0/lib -L/cluster/shared/apps/oneapi/hpctoolkit/compiler/2024.0/lib/clang/17/lib/x86_64-unknown-linux-gnu -L/usr/lib/gcc/x86_64-redhat-linux/11/ -L/usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/11/../../../../lib64/ -L/lib/../lib64 -L/lib/../lib64/ -L/usr/lib/../lib64 -L/usr/lib/../lib64/ -L/cluster/shared/apps/oneapi/hpctoolkit/mpi/2021.11/opt/mpi/libfabric/lib/ -L/cluster/shared/apps/oneapi/hpctoolkit/mpi/2021.11/lib/ -L/cluster/shared/apps/oneapi/dal/2024.0/lib/ -L/cluster/shared/apps/oneapi/dnnl/2024.0/lib/ -L/cluster/shared/apps/oneapi/compiler/2024.0/lib/ -L/cluster/shared/apps/oneapi/ipp/2021.10/lib/ -L/cluster/shared/apps/oneapi/ippcp/2021.9/lib/ -L/cluster/shared/apps/oneapi/mkl/2024.0/lib/ -L/cluster/shared/apps/oneapi/mpi/2021.11/opt/mpi/libfabric/lib/ -L/cluster/shared/apps/oneapi/mpi/2021.11/lib/ -L/cluster/shared/apps/oneapi/tbb/2021.11/lib/ -L./ -L/usr/lib64/openmpi/lib/ -L/usr/lib64/openmpi/lib/paraview/ -L/usr/lib/gcc/x86_64-redhat-linux/11/../../../ -L/lib64 -L/lib/ -L/usr/lib64 -L/usr/lib -lifport -lifcoremt -limf -lsvml -lm -lipgo -lirc -lpthread -lirc_s -ldl
checking for dummy main to link with Fortran libraries... unknown
configure: error: in `/cluster/home/me/hdf5-hdf5-1_10_7':
configure: error: linking to Fortran libraries from C fails
See `config.log' for more details

 

0 Kudos
RobbieTheK
New Contributor I
578 Views

Hat tip to this HDF5 discussion thread I had to install autotools 2.71 and re-run autogen.sh and as the user said there "Intel introduced a compiler flag starting with “-l” which is getting interpreted as a library".

0 Kudos
TobiasK
Moderator
549 Views

@RobbieTheK 
glad you found what's going wrong.

If you had uploaded the new config.log and not the original again I would have been able to point you to our known issues:

https://www.intel.com/content/www/us/en/developer/articles/release-notes/oneapi-fortran-compiler-release-notes.html#inpage-nav-5-6

 

0 Kudos
Reply