Compiling HDF5 Intel Compiler [Completed Mail]

Dear HDF5 users and Developers,

I'm currently struggling to compile an fortran application that contains
HDF5 functions with the Intel compiler suite 2016 on Ubuntu 14.04

What I did
1) Install MPICH using the Intel compilers
2) Install HDF5 using the Intel compilers with MPICH
3) Install PETSc using the MPICH compilers and telling PETSc where HDF5
is located
4) Trying to compile my application with the PETSc makefile. That
Fails :frowning:

Doing the same with the current GNU compilers works fine.
Using openMPI instead of MPICH does not solve the problem, I also tried
it on different Linux flavors.

The (shortened) linker command looks like

mpif90 -Wl,-rpath,/opt//petsc-3.6.3/Intel-16.0-MPICH-3.2/lib
-Wl,-rpath,/opt//hdf5-1.8.16/Intel/16.0/MPICH/3.2/lib
-Wl,-rpath,/opt//szip-2.1/Intel/16.0/lib -lz
-L/opt//petsc-3.6.3/Intel-16.0-MPICH-3.2/lib
-L/opt//hdf5-1.8.16/Intel/16.0/MPICH/3.2/lib
-L/opt//szip-2.1/Intel/16.0/lib -fPIC -O3 -xHost -no-prec-div
-openmp -openmp-report0 -parallel -shared-intel -O2 -stand f08
-standard-semantics -O2 -o DAMASK_spectral.exe DAMASK_spectral.o \
    prec.o DAMASK_interface.o IO.o HDF5_Utilities.o
-L/opt//petsc-3.6.3/Intel-16.0-MPICH-3.2/lib -lpetsc
-Wl,-rpath,/opt/petsc-3.6.3/Intel-16.0-MPICH-3.2/lib
-L/opt/petsc-3.6.3/Intel-16.0-MPICH-3.2/lib -lsuperlu_4.3
-lsuperlu_dist_4.1 -lcmumps -ldmumps -lsmumps -lzmumps -lmumps_common
-lpord -lscalapack -lHYPRE
-Wl,-rpath,/opt/fftw-3.3.4/Intel/16.0/MPICH/3.2/lib
-L/opt/fftw-3.3.4/Intel/16.0/MPICH/3.2/lib
-Wl,-rpath,/opt/hdf5-1.8.16/Intel/16.0/MPICH/3.2/lib
-L/opt/hdf5-1.8.16/Intel/16.0/MPICH/3.2/lib
-Wl,-rpath,/opt/szip-2.1/Intel/16.0/lib -L/opt/szip-2.1/Intel/16.0/lib
-Wl,-rpath,/opt/mpich-3.2/Intel/16.0/lib -L/opt/mpich-3.2/Intel/16.0/lib
-Wl,-rpath,/opt/intel/compilers_and_libraries_2016/linux/mkl/lib/intel64
-L/opt/intel/compilers_and_libraries_2016/linux/mkl/lib/intel64
-Wl,-rpath,/opt/intel/compilers_and_libraries_2016/linux/lib/intel64
-L/opt/intel/compilers_and_libraries_2016/linux/lib/intel64
-Wl,-rpath,/opt/intel/compilers_and_libraries_2016.0.109/linux/compiler/lib/intel64_lin -L/opt/intel/compilers_and_libraries_2016.0.109/linux/compiler/lib/intel64_lin -Wl,-rpath,/usr/lib/gcc/x86_64-linux-gnu/5 -L/usr/lib/gcc/x86_64-linux-gnu/5 -Wl,-rpath,/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu -Wl,-rpath,/lib/x86_64-linux-gnu -L/lib/x86_64-linux-gnu -lmpicxx -lumfpack -lklu -lcholmod -lbtf -lccolamd -lcolamd -lcamd -lamd -lsuitesparseconfig -lml -lmpicxx -llapack -lblas -lparmetis -lmetis -lhdf5hl_fortran -lhdf5_fortran -lhdf5_hl -lhdf5 -lfftw3_mpi -lfftw3 -lpthread -lhwloc -lchaco -lmpifort -lifport -lifcore_pic -lm -lpthread -lm -lmpicxx -lz -Wl,-rpath,/opt/petsc-3.6.3/Intel-16.0-MPICH-3.2/lib -L/opt/petsc-3.6.3/Intel-16.0-MPICH-3.2/lib -Wl,-rpath,/opt/fftw-3.3.4/Intel/16.0/MPICH/3.2/lib -L/opt/fftw-3.3.4/Intel/16.0/MPICH/3.2/lib -Wl,-rpath,/opt/hdf5-1.8.16/Intel/16.0/MPICH/3.2/lib -L/opt/hdf5-1.8.16/Intel/16.0/MPICH/3.2/lib -Wl,-rpath,/opt/szip-2.1/Intel/16.0/lib -L/opt/szip-2.1/Intel/16.0/lib -ldl -Wl,-rpath,/opt/mpich-3.2/Intel/16.0/lib -L/opt/mpich-3.2/Intel/16.0/lib -lmpi -Wl,-rpath,/opt/petsc-3.6.3/Intel-16.0-MPICH-3.2/lib -L/opt/petsc-3.6.3/Intel-16.0-MPICH-3.2/lib -Wl,-rpath,/opt/fftw-3.3.4/Intel/16.0/MPICH/3.2/lib -L/opt/fftw-3.3.4/Intel/16.0/MPICH/3.2/lib -Wl,-rpath,/opt/hdf5-1.8.16/Intel/16.0/MPICH/3.2/lib

So I'm linking in the correct order against the 4 libraries from HDF5
and have the path given with -L and even as -Wl,rpath.

However, I get a bunch of these messages:

/nethome/storage/raid4/m.diehl/DAMASK/code/HDF5_Utilities.f90:58:
undefined reference to `h5lib_MP_h5open_f_'

even though the verbose compiler command
-Wl,--verbose
tells that it finds the libraries:

attempt to
open /opt//hdf5-1.8.16/Intel/16.0/MPICH/3.2/lib/libhdf5hl_fortran.so
succeeded
-lhdf5hl_fortran
(/opt//hdf5-1.8.16/Intel/16.0/MPICH/3.2/lib/libhdf5hl_fortran.so)

readelf readelf -Ws /opt/hdf5-1.8.16/Intel/16.0/MPICH/3.2/lib/libhdf5_fortran.so
   916: 0000000000024600 80 FUNC GLOBAL DEFAULT 12 h5t_mp_h5topen_f_
   969: 0000000000024600 80 FUNC GLOBAL DEFAULT 12 h5t_mp_h5topen_f_

tells that the symbols are in these files (as expected).

I would appreciate any help. Please find attached the complete log files.

best regards
Martin

Log_compile.txt (156 KB)

Log_config.txt (2.66 KB)

···

--
------------------------------------------------
Max-Planck-Institut für Eisenforschung GmbH
Max-Planck-Straße 1
D-40237 Düsseldorf

Handelsregister B 2533
Amtsgericht Düsseldorf

Geschäftsführung
Prof. Dr. Gerhard Dehm
Prof. Dr. Jörg Neugebauer
Prof. Dr. Dierk Raabe
Dr. Kai de Weldige

Ust.-Id.-Nr.: DE 11 93 58 514
Steuernummer: 105 5891 1000
-------------------------------------------------
Please consider that invitations and e-mails of our institute are
only valid if they end with …@mpie.de.
If you are not sure of the validity please contact rco@mpie.de

Bitte beachten Sie, dass Einladungen zu Veranstaltungen und E-Mails
aus unserem Haus nur mit der Endung …@mpie.de gültig sind.
In Zweifelsfällen wenden Sie sich bitte an rco@mpie.de
-------------------------------------------------

I am not sure how much help it might be but I found similar issue from 2011,

http://hdf-forum.184993.n3.nabble.com/HDF5-and-undefined-reference-td2475757.html

Mark

···

From: Hdf-forum <hdf-forum-bounces@lists.hdfgroup.org<mailto:hdf-forum-bounces@lists.hdfgroup.org>> on behalf of Martin Diehl <m.diehl@mpie.de<mailto:m.diehl@mpie.de>>
Organization: Max-Planck-Institut für Eisenforschung GmbH
Reply-To: HDF Users Discussion List <hdf-forum@lists.hdfgroup.org<mailto:hdf-forum@lists.hdfgroup.org>>
Date: Friday, March 18, 2016 4:16 AM
To: "hdf-forum@lists.hdfgroup.org<mailto:hdf-forum@lists.hdfgroup.org>" <hdf-forum@lists.hdfgroup.org<mailto:hdf-forum@lists.hdfgroup.org>>
Subject: [Hdf-forum] Compiling HDF5 Intel Compiler [Completed Mail]

Dear HDF5 users and Developers,

I'm currently struggling to compile an fortran application that contains
HDF5 functions with the Intel compiler suite 2016 on Ubuntu 14.04

What I did
1) Install MPICH using the Intel compilers
2) Install HDF5 using the Intel compilers with MPICH
3) Install PETSc using the MPICH compilers and telling PETSc where HDF5
is located
4) Trying to compile my application with the PETSc makefile. That
Fails :frowning:

Doing the same with the current GNU compilers works fine.
Using openMPI instead of MPICH does not solve the problem, I also tried
it on different Linux flavors.

The (shortened) linker command looks like

mpif90 -Wl,-rpath,/opt//petsc-3.6.3/Intel-16.0-MPICH-3.2/lib
-Wl,-rpath,/opt//hdf5-1.8.16/Intel/16.0/MPICH/3.2/lib
-Wl,-rpath,/opt//szip-2.1/Intel/16.0/lib -lz
-L/opt//petsc-3.6.3/Intel-16.0-MPICH-3.2/lib
-L/opt//hdf5-1.8.16/Intel/16.0/MPICH/3.2/lib
-L/opt//szip-2.1/Intel/16.0/lib -fPIC -O3 -xHost -no-prec-div
-openmp -openmp-report0 -parallel -shared-intel -O2 -stand f08
-standard-semantics -O2 -o DAMASK_spectral.exe DAMASK_spectral.o \
    prec.o DAMASK_interface.o IO.o HDF5_Utilities.o
-L/opt//petsc-3.6.3/Intel-16.0-MPICH-3.2/lib -lpetsc
-Wl,-rpath,/opt/petsc-3.6.3/Intel-16.0-MPICH-3.2/lib
-L/opt/petsc-3.6.3/Intel-16.0-MPICH-3.2/lib -lsuperlu_4.3
-lsuperlu_dist_4.1 -lcmumps -ldmumps -lsmumps -lzmumps -lmumps_common
-lpord -lscalapack -lHYPRE
-Wl,-rpath,/opt/fftw-3.3.4/Intel/16.0/MPICH/3.2/lib
-L/opt/fftw-3.3.4/Intel/16.0/MPICH/3.2/lib
-Wl,-rpath,/opt/hdf5-1.8.16/Intel/16.0/MPICH/3.2/lib
-L/opt/hdf5-1.8.16/Intel/16.0/MPICH/3.2/lib
-Wl,-rpath,/opt/szip-2.1/Intel/16.0/lib -L/opt/szip-2.1/Intel/16.0/lib
-Wl,-rpath,/opt/mpich-3.2/Intel/16.0/lib -L/opt/mpich-3.2/Intel/16.0/lib
-Wl,-rpath,/opt/intel/compilers_and_libraries_2016/linux/mkl/lib/intel64
-L/opt/intel/compilers_and_libraries_2016/linux/mkl/lib/intel64
-Wl,-rpath,/opt/intel/compilers_and_libraries_2016/linux/lib/intel64
-L/opt/intel/compilers_and_libraries_2016/linux/lib/intel64
-Wl,-rpath,/opt/intel/compilers_and_libraries_2016.0.109/linux/compiler/lib/intel64_lin -L/opt/intel/compilers_and_libraries_2016.0.109/linux/compiler/lib/intel64_lin -Wl,-rpath,/usr/lib/gcc/x86_64-linux-gnu/5 -L/usr/lib/gcc/x86_64-linux-gnu/5 -Wl,-rpath,/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu -Wl,-rpath,/lib/x86_64-linux-gnu -L/lib/x86_64-linux-gnu -lmpicxx -lumfpack -lklu -lcholmod -lbtf -lccolamd -lcolamd -lcamd -lamd -lsuitesparseconfig -lml -lmpicxx -llapack -lblas -lparmetis -lmetis -lhdf5hl_fortran -lhdf5_fortran -lhdf5_hl -lhdf5 -lfftw3_mpi -lfftw3 -lpthread -lhwloc -lchaco -lmpifort -lifport -lifcore_pic -lm -lpthread -lm -lmpicxx -lz -Wl,-rpath,/opt/petsc-3.6.3/Intel-16.0-MPICH-3.2/lib -L/opt/petsc-3.6.3/Intel-16.0-MPICH-3.2/lib -Wl,-rpath,/opt/fftw-3.3.4/Intel/16.0/MPICH/3.2/lib -L/opt/fftw-3.3.4/Intel/16.0/MPICH/3.2/lib -Wl,-rpath,/opt/hdf5-1.8.16/Intel/16.0/MPICH/3.2/lib -L/opt/hdf5-1.8.16/Intel/16.0/MPICH/3.2/lib -Wl,-rpath,/opt/szip-2.1/Intel/16.0/lib -L/opt/szip-2.1/Intel/16.0/lib -ldl -Wl,-rpath,/opt/mpich-3.2/Intel/16.0/lib -L/opt/mpich-3.2/Intel/16.0/lib -lmpi -Wl,-rpath,/opt/petsc-3.6.3/Intel-16.0-MPICH-3.2/lib -L/opt/petsc-3.6.3/Intel-16.0-MPICH-3.2/lib -Wl,-rpath,/opt/fftw-3.3.4/Intel/16.0/MPICH/3.2/lib -L/opt/fftw-3.3.4/Intel/16.0/MPICH/3.2/lib -Wl,-rpath,/opt/hdf5-1.8.16/Intel/16.0/MPICH/3.2/lib

So I'm linking in the correct order against the 4 libraries from HDF5
and have the path given with -L and even as -Wl,rpath.

However, I get a bunch of these messages:

/nethome/storage/raid4/m.diehl/DAMASK/code/HDF5_Utilities.f90:58:
undefined reference to `h5lib_MP_h5open_f_'

even though the verbose compiler command
-Wl,--verbose
tells that it finds the libraries:

attempt to
open /opt//hdf5-1.8.16/Intel/16.0/MPICH/3.2/lib/libhdf5hl_fortran.so
succeeded
-lhdf5hl_fortran
(/opt//hdf5-1.8.16/Intel/16.0/MPICH/3.2/lib/libhdf5hl_fortran.so)

readelf readelf -Ws /opt/hdf5-1.8.16/Intel/16.0/MPICH/3.2/lib/libhdf5_fortran.so
   916: 0000000000024600 80 FUNC GLOBAL DEFAULT 12 h5t_mp_h5topen_f_
   969: 0000000000024600 80 FUNC GLOBAL DEFAULT 12 h5t_mp_h5topen_f_

tells that the symbols are in these files (as expected).

I would appreciate any help. Please find attached the complete log files.

best regards
Martin

--
------------------------------------------------
Max-Planck-Institut für Eisenforschung GmbH
Max-Planck-Straße 1
D-40237 Düsseldorf
Handelsregister B 2533
Amtsgericht Düsseldorf
Geschäftsführung
Prof. Dr. Gerhard Dehm
Prof. Dr. Jörg Neugebauer
Prof. Dr. Dierk Raabe
Dr. Kai de Weldige
Ust.-Id.-Nr.: DE 11 93 58 514
Steuernummer: 105 5891 1000
-------------------------------------------------
Please consider that invitations and e-mails of our institute are
only valid if they end with …@mpie.de<mailto:…@mpie.de>.
If you are not sure of the validity please contact rco@mpie.de<mailto:rco@mpie.de>

Bitte beachten Sie, dass Einladungen zu Veranstaltungen und E-Mails
aus unserem Haus nur mit der Endung …@mpie.de<mailto:…@mpie.de> gültig sind.
In Zweifelsfällen wenden Sie sich bitte an rco@mpie.de<mailto:rco@mpie.de>
-------------------------------------------------

Dear Mark,

thanks for the hint.
Unfortunately, that does not solve the issues (and I'm a little bit
reluctant to use the wrapper, because with MPI wrappers and PETSc
wrappers, I would in the end have a wrapper to a wrapper to a wrapper to
the compiler).
Fortunately, I found the answer in the Intel forum. It's related to the
compiler options:
https://software.intel.com/en-us/forums/intel-fortran-compiler-for-linux-and-mac-os-x/topic/621720

best regards,
Martin

···

On Fri, 2016-03-18 at 12:16 +0100, Martin Diehl wrote:

Dear HDF5 users and Developers,

I'm currently struggling to compile an fortran application that contains
HDF5 functions with the Intel compiler suite 2016 on Ubuntu 14.04

What I did
1) Install MPICH using the Intel compilers
2) Install HDF5 using the Intel compilers with MPICH
3) Install PETSc using the MPICH compilers and telling PETSc where HDF5
is located
4) Trying to compile my application with the PETSc makefile. That
Fails :frowning:

Doing the same with the current GNU compilers works fine.
Using openMPI instead of MPICH does not solve the problem, I also tried
it on different Linux flavors.

The (shortened) linker command looks like

mpif90 -Wl,-rpath,/opt//petsc-3.6.3/Intel-16.0-MPICH-3.2/lib
-Wl,-rpath,/opt//hdf5-1.8.16/Intel/16.0/MPICH/3.2/lib
-Wl,-rpath,/opt//szip-2.1/Intel/16.0/lib -lz
-L/opt//petsc-3.6.3/Intel-16.0-MPICH-3.2/lib
-L/opt//hdf5-1.8.16/Intel/16.0/MPICH/3.2/lib
-L/opt//szip-2.1/Intel/16.0/lib -fPIC -O3 -xHost -no-prec-div
-openmp -openmp-report0 -parallel -shared-intel -O2 -stand f08
-standard-semantics -O2 -o DAMASK_spectral.exe DAMASK_spectral.o \
    prec.o DAMASK_interface.o IO.o HDF5_Utilities.o
-L/opt//petsc-3.6.3/Intel-16.0-MPICH-3.2/lib -lpetsc
-Wl,-rpath,/opt/petsc-3.6.3/Intel-16.0-MPICH-3.2/lib
-L/opt/petsc-3.6.3/Intel-16.0-MPICH-3.2/lib -lsuperlu_4.3
-lsuperlu_dist_4.1 -lcmumps -ldmumps -lsmumps -lzmumps -lmumps_common
-lpord -lscalapack -lHYPRE
-Wl,-rpath,/opt/fftw-3.3.4/Intel/16.0/MPICH/3.2/lib
-L/opt/fftw-3.3.4/Intel/16.0/MPICH/3.2/lib
-Wl,-rpath,/opt/hdf5-1.8.16/Intel/16.0/MPICH/3.2/lib
-L/opt/hdf5-1.8.16/Intel/16.0/MPICH/3.2/lib
-Wl,-rpath,/opt/szip-2.1/Intel/16.0/lib -L/opt/szip-2.1/Intel/16.0/lib
-Wl,-rpath,/opt/mpich-3.2/Intel/16.0/lib -L/opt/mpich-3.2/Intel/16.0/lib
-Wl,-rpath,/opt/intel/compilers_and_libraries_2016/linux/mkl/lib/intel64
-L/opt/intel/compilers_and_libraries_2016/linux/mkl/lib/intel64
-Wl,-rpath,/opt/intel/compilers_and_libraries_2016/linux/lib/intel64
-L/opt/intel/compilers_and_libraries_2016/linux/lib/intel64
-Wl,-rpath,/opt/intel/compilers_and_libraries_2016.0.109/linux/compiler/lib/intel64_lin -L/opt/intel/compilers_and_libraries_2016.0.109/linux/compiler/lib/intel64_lin -Wl,-rpath,/usr/lib/gcc/x86_64-linux-gnu/5 -L/usr/lib/gcc/x86_64-linux-gnu/5 -Wl,-rpath,/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu -Wl,-rpath,/lib/x86_64-linux-gnu -L/lib/x86_64-linux-gnu -lmpicxx -lumfpack -lklu -lcholmod -lbtf -lccolamd -lcolamd -lcamd -lamd -lsuitesparseconfig -lml -lmpicxx -llapack -lblas -lparmetis -lmetis -lhdf5hl_fortran -lhdf5_fortran -lhdf5_hl -lhdf5 -lfftw3_mpi -lfftw3 -lpthread -lhwloc -lchaco -lmpifort -lifport -lifcore_pic -lm -lpthread -lm -lmpicxx -lz -Wl,-rpath,/opt/petsc-3.6.3/Intel-16.0-MPICH-3.2/lib -L/opt/petsc-3.6.3/Intel-16.0-MPICH-3.2/lib -Wl,-rpath,/opt/fftw-3.3.4/Intel/16.0/MPICH/3.2/lib -L/opt/fftw-3.3.4/Intel/16.0/MPICH/3.2/lib -Wl,-rpath,/opt/hdf5-1.8.16/Intel/16.0/MPICH/3.2/lib -L/opt/hdf5-1.8.16/Intel/16.0/MPICH/3.2/lib -Wl,-rpath,/opt/szip-2.1/Intel/16.0/lib -L/opt/szip-2.1/Intel/16.0/lib -ldl -Wl,-rpath,/opt/mpich-3.2/Intel/16.0/lib -L/opt/mpich-3.2/Intel/16.0/lib -lmpi -Wl,-rpath,/opt/petsc-3.6.3/Intel-16.0-MPICH-3.2/lib -L/opt/petsc-3.6.3/Intel-16.0-MPICH-3.2/lib -Wl,-rpath,/opt/fftw-3.3.4/Intel/16.0/MPICH/3.2/lib -L/opt/fftw-3.3.4/Intel/16.0/MPICH/3.2/lib -Wl,-rpath,/opt/hdf5-1.8.16/Intel/16.0/MPICH/3.2/lib

So I'm linking in the correct order against the 4 libraries from HDF5
and have the path given with -L and even as -Wl,rpath.

However, I get a bunch of these messages:

/nethome/storage/raid4/m.diehl/DAMASK/code/HDF5_Utilities.f90:58:
undefined reference to `h5lib_MP_h5open_f_'

even though the verbose compiler command
-Wl,--verbose
tells that it finds the libraries:

attempt to
open /opt//hdf5-1.8.16/Intel/16.0/MPICH/3.2/lib/libhdf5hl_fortran.so
succeeded
-lhdf5hl_fortran
(/opt//hdf5-1.8.16/Intel/16.0/MPICH/3.2/lib/libhdf5hl_fortran.so)

readelf readelf -Ws /opt/hdf5-1.8.16/Intel/16.0/MPICH/3.2/lib/libhdf5_fortran.so
   916: 0000000000024600 80 FUNC GLOBAL DEFAULT 12 h5t_mp_h5topen_f_
   969: 0000000000024600 80 FUNC GLOBAL DEFAULT 12 h5t_mp_h5topen_f_

tells that the symbols are in these files (as expected).

I would appreciate any help. Please find attached the complete log files.

best regards
Martin

--
-------------------------------------------------
Max-Planck-Institut für Eisenforschung GmbH
Max-Planck-Straße 1
D-40237 Düsseldorf

Handelsregister B 2533
Amtsgericht Düsseldorf

Geschäftsführung
Prof. Dr. Gerhard Dehm
Prof. Dr. Jörg Neugebauer
Prof. Dr. Dierk Raabe
Dr. Kai de Weldige

Ust.-Id.-Nr.: DE 11 93 58 514
Steuernummer: 105 5891 1000

Please consider that invitations and e-mails of our institute are only
valid if they end with …@mpie.de.
If you are not sure of the validity please contact rco@mpie.de

Bitte beachten Sie, dass Einladungen zu Veranstaltungen und E-Mails aus
unserem Haus nur mit der Endung …@mpie.de gültig sind.
In Zweifelsfällen wenden Sie sich bitte an rco@mpie.de
-------------------------------------------------

The symbols are close, but not identical.
Is there is discrepancy in the Fortran compiler used to compile your
application and HDF5? It must be from the same vendor, no Fortran compiler
share the same naming convention than the others.

Cheers,

Matthieu

···

2016-04-04 10:39 GMT+01:00 Martin Diehl <m.diehl@mpie.de>:

Dear Mark,

thanks for the hint.
Unfortunately, that does not solve the issues (and I'm a little bit
reluctant to use the wrapper, because with MPI wrappers and PETSc
wrappers, I would in the end have a wrapper to a wrapper to a wrapper to
the compiler).
Fortunately, I found the answer in the Intel forum. It's related to the
compiler options:

https://software.intel.com/en-us/forums/intel-fortran-compiler-for-linux-and-mac-os-x/topic/621720

best regards,
Martin

On Fri, 2016-03-18 at 12:16 +0100, Martin Diehl wrote:
> Dear HDF5 users and Developers,
>
> I'm currently struggling to compile an fortran application that contains
> HDF5 functions with the Intel compiler suite 2016 on Ubuntu 14.04
>
> What I did
> 1) Install MPICH using the Intel compilers
> 2) Install HDF5 using the Intel compilers with MPICH
> 3) Install PETSc using the MPICH compilers and telling PETSc where HDF5
> is located
> 4) Trying to compile my application with the PETSc makefile. That
> Fails :frowning:
>
> Doing the same with the current GNU compilers works fine.
> Using openMPI instead of MPICH does not solve the problem, I also tried
> it on different Linux flavors.
>
> The (shortened) linker command looks like
>
> mpif90 -Wl,-rpath,/opt//petsc-3.6.3/Intel-16.0-MPICH-3.2/lib
> -Wl,-rpath,/opt//hdf5-1.8.16/Intel/16.0/MPICH/3.2/lib
> -Wl,-rpath,/opt//szip-2.1/Intel/16.0/lib -lz
> -L/opt//petsc-3.6.3/Intel-16.0-MPICH-3.2/lib
> -L/opt//hdf5-1.8.16/Intel/16.0/MPICH/3.2/lib
> -L/opt//szip-2.1/Intel/16.0/lib -fPIC -O3 -xHost -no-prec-div
> -openmp -openmp-report0 -parallel -shared-intel -O2 -stand f08
> -standard-semantics -O2 -o DAMASK_spectral.exe DAMASK_spectral.o \
> prec.o DAMASK_interface.o IO.o HDF5_Utilities.o
> -L/opt//petsc-3.6.3/Intel-16.0-MPICH-3.2/lib -lpetsc
> -Wl,-rpath,/opt/petsc-3.6.3/Intel-16.0-MPICH-3.2/lib
> -L/opt/petsc-3.6.3/Intel-16.0-MPICH-3.2/lib -lsuperlu_4.3
> -lsuperlu_dist_4.1 -lcmumps -ldmumps -lsmumps -lzmumps -lmumps_common
> -lpord -lscalapack -lHYPRE
> -Wl,-rpath,/opt/fftw-3.3.4/Intel/16.0/MPICH/3.2/lib
> -L/opt/fftw-3.3.4/Intel/16.0/MPICH/3.2/lib
> -Wl,-rpath,/opt/hdf5-1.8.16/Intel/16.0/MPICH/3.2/lib
> -L/opt/hdf5-1.8.16/Intel/16.0/MPICH/3.2/lib
> -Wl,-rpath,/opt/szip-2.1/Intel/16.0/lib -L/opt/szip-2.1/Intel/16.0/lib
> -Wl,-rpath,/opt/mpich-3.2/Intel/16.0/lib -L/opt/mpich-3.2/Intel/16.0/lib
> -Wl,-rpath,/opt/intel/compilers_and_libraries_2016/linux/mkl/lib/intel64
> -L/opt/intel/compilers_and_libraries_2016/linux/mkl/lib/intel64
> -Wl,-rpath,/opt/intel/compilers_and_libraries_2016/linux/lib/intel64
> -L/opt/intel/compilers_and_libraries_2016/linux/lib/intel64
>
-Wl,-rpath,/opt/intel/compilers_and_libraries_2016.0.109/linux/compiler/lib/intel64_lin
-L/opt/intel/compilers_and_libraries_2016.0.109/linux/compiler/lib/intel64_lin
-Wl,-rpath,/usr/lib/gcc/x86_64-linux-gnu/5
-L/usr/lib/gcc/x86_64-linux-gnu/5 -Wl,-rpath,/usr/lib/x86_64-linux-gnu
-L/usr/lib/x86_64-linux-gnu -Wl,-rpath,/lib/x86_64-linux-gnu
-L/lib/x86_64-linux-gnu -lmpicxx -lumfpack -lklu -lcholmod -lbtf -lccolamd
-lcolamd -lcamd -lamd -lsuitesparseconfig -lml -lmpicxx -llapack -lblas
-lparmetis -lmetis -lhdf5hl_fortran -lhdf5_fortran -lhdf5_hl -lhdf5
-lfftw3_mpi -lfftw3 -lpthread -lhwloc -lchaco -lmpifort -lifport
-lifcore_pic -lm -lpthread -lm -lmpicxx -lz
-Wl,-rpath,/opt/petsc-3.6.3/Intel-16.0-MPICH-3.2/lib
-L/opt/petsc-3.6.3/Intel-16.0-MPICH-3.2/lib
-Wl,-rpath,/opt/fftw-3.3.4/Intel/16.0/MPICH/3.2/lib
-L/opt/fftw-3.3.4/Intel/16.0/MPICH/3.2/lib
-Wl,-rpath,/opt/hdf5-1.8.16/Intel/16.0/MPICH/3.2/lib
-L/opt/hdf5-1.8.16/Intel/16.0/MPICH/3.2/lib
-Wl,-rpath,/opt/szip-2.1/Intel/16.0/lib -L/opt/szip-2.1/Intel/16.0/lib -ldl
-Wl,-rpath,/opt/mpich-3.2/Intel/16.0/lib -L/opt/mpich-3.2/Intel/16.0/lib
-lmpi -Wl,-rpath,/opt/petsc-3.6.3/Intel-16.0-MPICH-3.2/lib
-L/opt/petsc-3.6.3/Intel-16.0-MPICH-3.2/lib
-Wl,-rpath,/opt/fftw-3.3.4/Intel/16.0/MPICH/3.2/lib
-L/opt/fftw-3.3.4/Intel/16.0/MPICH/3.2/lib
-Wl,-rpath,/opt/hdf5-1.8.16/Intel/16.0/MPICH/3.2/lib
>
> So I'm linking in the correct order against the 4 libraries from HDF5
> and have the path given with -L and even as -Wl,rpath.
>
> However, I get a bunch of these messages:
>
> /nethome/storage/raid4/m.diehl/DAMASK/code/HDF5_Utilities.f90:58:
> undefined reference to `h5lib_MP_h5open_f_'
>
> even though the verbose compiler command
> -Wl,--verbose
> tells that it finds the libraries:
>
> attempt to
> open /opt//hdf5-1.8.16/Intel/16.0/MPICH/3.2/lib/libhdf5hl_fortran.so
> succeeded
> -lhdf5hl_fortran
> (/opt//hdf5-1.8.16/Intel/16.0/MPICH/3.2/lib/libhdf5hl_fortran.so)
>
>
>
> readelf readelf -Ws
/opt/hdf5-1.8.16/Intel/16.0/MPICH/3.2/lib/libhdf5_fortran.so
> 916: 0000000000024600 80 FUNC GLOBAL DEFAULT 12
h5t_mp_h5topen_f_
> 969: 0000000000024600 80 FUNC GLOBAL DEFAULT 12
h5t_mp_h5topen_f_
>
> tells that the symbols are in these files (as expected).
>
> I would appreciate any help. Please find attached the complete log files.
>
> best regards
> Martin
>
>
>
>

--
-------------------------------------------------
Max-Planck-Institut für Eisenforschung GmbH
Max-Planck-Straße 1
D-40237 Düsseldorf

Handelsregister B 2533
Amtsgericht Düsseldorf

Geschäftsführung
Prof. Dr. Gerhard Dehm
Prof. Dr. Jörg Neugebauer
Prof. Dr. Dierk Raabe
Dr. Kai de Weldige

Ust.-Id.-Nr.: DE 11 93 58 514
Steuernummer: 105 5891 1000

Please consider that invitations and e-mails of our institute are only
valid if they end with …@mpie.de.
If you are not sure of the validity please contact rco@mpie.de

Bitte beachten Sie, dass Einladungen zu Veranstaltungen und E-Mails aus
unserem Haus nur mit der Endung …@mpie.de gültig sind.
In Zweifelsfällen wenden Sie sich bitte an rco@mpie.de
-------------------------------------------------

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

--
Information System Engineer, Ph.D.
Blog: http://matt.eifelle.com
LinkedIn: http://www.linkedin.com/in/matthieubrucher