compile / configure HDF5 v. 1.12.2 with Intel Fortran; compiles etc., but uses GNU compiler


#1

GENERAL PROBLEM
When trying to compile / configure HDF5 v. 1.12.2 with the Intel compiler it does so, however, with the GNU compiler

Operating System: Linux Mint 20.2

script run for compile etc.:
sudo su
source /opt/intel/oneapi/setvars.sh > /dev/null 2>&1
FC=mpiifort
FCFLAGS="-I/opt/intel/oneapi/mpi/2021.7.0/include -L/opt/intel/oneapi/mpi/2021.7.0/lib/release -L/opt/intel/oneapi/mpi/2021.7.0/lib -g -fPIC -O3 -xsse4.2 -lgfortran -nofor-main" ./configure --prefix=/usr/local/hdf5/1.12.2 --enable-parallel --enable-fortran --enable-build-mode=production
make
export I_MPI_FABRICS=ofi
make check
make install

Some output:
from file config.log

checking for config linux-gnu… found
compiler ‘mpicc’ is GNU gcc-9.4.0
compiler ‘mpif90’ is GNU gfortran-9.4.0
compiler ‘g++’ is GNU g+±9.4.0

However from the command line:
$mpif90 -v

mpif90 for the Intel® MPI Library 2021.7 for Linux*
Copyright Intel Corporation.
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu

My suspicion:
Possibly something is bad with the Intel installation (worried about COLLECT_GCC=gfortran), but may well be something else, e.g. the script I used.

So I ask:
Can anybody help?


#2

What does mpicc resolve to? gnu or Intel? Also, adding your entire config.log file would help diagnose.


#3

Hi,

I have tried to upload the files config.log and MYhdf5_install.txt; the latter contains the output to stdout; it says, however, that new users cannot upload files.

Yet, the files available online:
https://hdf5stuff.w3spaces.com/config_.log.txt
https://hdf5stuff.w3spaces.com/MYhdf5_install.txt (the stdout content).

Find furthermore below the output to the commands “mpicc” and “which mpicc”:

wir@Plassmann:~$ mpicc
This script invokes an appropriate specialized C MPI compiler driver.
The following ways (priority order) can be used for changing default
compiler name (gcc):

  1. Command line option: -cc=<compiler_name>
  2. Environment variable: I_MPI_CC (current value ‘’)
  3. Environment variable: MPICH_CC (current value ‘’)
    wir@Plassmann:~$ which mpicc
    /opt/intel/oneapi/mpi/2021.7.0//bin/mpicc

#4

As advised by a colleague, I put it here more distinctly:

The (Intel!) versions of mpicc and mpif90, respectively, provoke calls to the GNU c++ and gfortran compilers (unless this is overwritten explicitly). – Hence, HDF5 is compiled with the GNU compilers using the standard HDF5 package makefiles for installation, not with Intel, as they ought to be!

For example:
`wir@Plassmann:~/p/AAA/source$ which mpicc
/opt/intel/oneapi/mpi/2021.7.0//bin/mpicc

wir@Plassmann:~/p/AAA/source$ mpicc -show
gcc -I"/opt/intel/oneapi/mpi/2021.7.0/include" -L"/opt/intel/oneapi/mpi/2021.7.0/lib/release" -L"/opt/intel/oneapi/mpi/2021.7.0/lib" -Xlinker --enable-new-dtags -Xlinker -rpath -Xlinker “/opt/intel/oneapi/mpi/2021.7.0/lib/release” -Xlinker -rpath -Xlinker “/opt/intel/oneapi/mpi/2021.7.0/lib” -lmpifort -lmpi -lrt -lpthread -Wl,-z,now -Wl,-z,relro -Wl,-z,noexecstack -Xlinker --enable-new-dtags -ldl
`


#5

If you haven’t resolved this yet, the output of mpicc -v and mpicc --version might provide additional useful information.