Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

HDF5 with ifort

Manfredo_d_1
Beginner
10,326 Views

Hello,

I just completed a fresh installation of ifort-icc compilers and installed the HDF5 package with the intel compilers. The installation seemed ok and the correct mod files have been produced. Then when I try to use the HDF5 I get the usual different compiler error:

/Users/manfredo/Desktop/ED2/ED/src/include

 /usr/local/hdf5_mio/include

 /usr/bin/ifort-14.0-base/compiler/include/intel64

 /usr/bin/ifort-14.0-base/compiler/include

 /usr/local/include

 /usr/include

End of search list.

hdf5_coms.F90(3): error #7013: This module file was not generated by any release of this compiler.   [HDF5]

   use hdf5

-------^

compilation aborted for hdf5_coms.F90 (code 1)

make[1]: *** [hdf5_coms.o] Error 1

make: *** [all] Error 2

MacBook-Air-di-Manfredo:bin manfredo$ icc -v

icc version 14.0.4 (gcc version 4.8.1 compatibility)

 

Before installing the HDF5 with intel compilers I had a version compiled with gfortran. However before reinstalling it with ifort I cleaned all the files and now the only hdf5.mod file I have is the one produced during the intel compilation. Working on Mac OSX.

Thanks for any suggestions. Manfredo

0 Kudos
1 Solution
Kevin_D_Intel
Employee
10,326 Views

I don't know whether the information is still available, but if so, can you scan your configure output to see whether there is any reference to gfortran?

Also can you scan your HDF build area and find the hdf5.mod file and then attach it in a reply. That will help us determine whether it was produced by gfortran or ifort.

View solution in original post

0 Kudos
11 Replies
TimP
Honored Contributor III
10,326 Views

You can't use the .mod files generated by gfortran; in fact, gfortran .mod files work only across a narrow range of gfortran releases.  You may have forgotten to force the .mod files to rebuild with ifort.

0 Kudos
Kevin_D_Intel
Employee
10,326 Views

As Tim indicates, it appears an incompatible module file is being found.

You may already be aware of the article Building HDF5* with Intel® compilers; however, noting your use of the 14.0 compiler, once you overcome this module issue you may experience the issue outlined in the Resolving problem when building HDF5* with Intel® compiler 14.0 listed in the Known Issues and Limitations section in that article.

0 Kudos
Manfredo_d_1
Beginner
10,326 Views

As I said I compiled the HDF5 by specifying the intel compilers exactly as it described in the page Kevin suggests.

0 Kudos
Manfredo_d_1
Beginner
10,326 Views

By the way, I had already checked the make and didn't found that error. My file H5Sff.f90 is indeed already correct.

0 Kudos
Manfredo_d_1
Beginner
10,326 Views

The set of instructions I used is:

export CC=icc

export F9X=ifort

export CCX=icpc

tar -zxvf hdf5-1.8.15.tar.gz
  cd hdf5-1.8.15
  ./configure --prefix=/usr/local/hdf5_mio --enable-fortran
   
  make
   
  make check
   
  sudo make install prefix=/usr/local/hdf5_mio

 

I also checked with a locate that no hdf5 file from the old versions were present so there should be nothing but the files compiled with intel compilers. 

0 Kudos
TimP
Honored Contributor III
10,326 Views

If you didn't set a value for CXX, I suppose it may use g++.   The logs ought to show it.

0 Kudos
Kevin_D_Intel
Employee
10,327 Views

I don't know whether the information is still available, but if so, can you scan your configure output to see whether there is any reference to gfortran?

Also can you scan your HDF build area and find the hdf5.mod file and then attach it in a reply. That will help us determine whether it was produced by gfortran or ifort.

0 Kudos
Manfredo_d_1
Beginner
10,326 Views

@Tim: Good suggestion, I didn't realize the mistake. I am trying again. Meanwhile the result of the ./configure has some unexpected lines:

Compiling Options:

------------------

               Compilation Mode: production

                     C Compiler: /usr/bin/clang ( Apple LLVM version 6.0 )

                         CFLAGS: 

                      H5_CFLAGS:  -O3

                      AM_CFLAGS: 

                       CPPFLAGS: 

                    H5_CPPFLAGS:   -DNDEBUG -UH5_DEBUG_API

                    AM_CPPFLAGS: 

               Shared C Library: yes

               Static C Library: yes

  Statically Linked Executables: no

                        LDFLAGS: 

                     H5_LDFLAGS: 

                     AM_LDFLAGS: 

          Extra libraries: -lz -ldl -lm 

                Archiver: ar

               Ranlib: ranlib

           Debugged Packages: 

            API Tracing: no

 

Languages:

----------

                        Fortran: yes

               Fortran Compiler: /usr/local/bin/gfortran ( GNU Fortran (GCC) 4.9.0)

          Fortran 2003 Compiler: 

                  Fortran Flags: 

               H5 Fortran Flags:  -pedantic -Wall -Wconversion -Wunderflow -Wimplicit-interface -W -O2 -s

               AM Fortran Flags: 

         Shared Fortran Library: no

         Static Fortran Library: yes

 

                            C++: no

 

 

I am pretty sure here to have correctly typed the compilers to export. May it be not enough to specify export CC=icc to set the C compiler?

0 Kudos
TimP
Honored Contributor III
10,326 Views

If your Intel compilers aren't made visible by sourceing the compilervars or ipsevars script, the configure also would fall back to other compilers.

The Intel article referred to above suggests compiler FLAGS settings to go with Intel compilers/

0 Kudos
Manfredo_d_1
Beginner
10,326 Views

Solved by switching export........  to

sudo CC=icc F9X=ifort CXX=icpc ./configure .........

@Tim @Kevin Thank you so much for you support, I appreciated it.

0 Kudos
Kevin_D_Intel
Employee
10,326 Views

Interesting. I guess that suggests something in your current shell leads to the use of gfortran despite the exports. Anyway, glad you found a usable solution.

I will make note of your experiences to the article's author just to double check nothing has changed on the more current OS X* releases.

0 Kudos
Reply