Intel 2018 and HDF5 1.10.2 error


#1

the following bash command used

CC=mpicc CXX=mpicxx CPP=‘icc -E’ CXXCPP=‘icpc -E’ F9X=mpif90 FC=mpif90 LDFLAGS="-L/Users/jessequinn/Packages/zlib-1.2.11/lib -Wl,-rpath,/Users/jessequinn/Packages/zlib-1.2.11/lib" …/configure --prefix=/Users/jessequinn/Packages/hdf5-1.10.2 --enable-shared --enable-static --enable-fortran --enable-parallel --with-zlib=/Users/jessequinn/Packages/zlib-1.2.11 && make -j 4 all && make -j 4 install

where mpicc and mpicxx are linked with mpich, I receive the following error

mpif90 -I. -I…/…/…/fortran/test -I…/…/src -I…/…/fortran/src -I…/…/fortran/src -I…/…/fortran/src -c -o tH5F.o …/…/…/fortran/test/tH5F.F90
mpif90 -I. -I…/…/…/fortran/test -I…/…/src -I…/…/fortran/src -I…/…/fortran/src -I…/…/fortran/src -c -o tH5D.o …/…/…/fortran/test/tH5D.F90
mpif90 -I. -I…/…/…/fortran/test -I…/…/src -I…/…/fortran/src -I…/…/fortran/src -I…/…/fortran/src -c -o tH5R.o …/…/…/fortran/test/tH5R.F90
mpif90 -I. -I…/…/…/fortran/test -I…/…/src -I…/…/fortran/src -I…/…/fortran/src -I…/…/fortran/src -c -o tH5S.o …/…/…/fortran/test/tH5S.F90
mpif90 -I. -I…/…/…/fortran/test -I…/…/src -I…/…/fortran/src -I…/…/fortran/src -I…/…/fortran/src -c -o tH5T.o …/…/…/fortran/test/tH5T.F90
mpif90 -I. -I…/…/…/fortran/test -I…/…/src -I…/…/fortran/src -I…/…/fortran/src -I…/…/fortran/src -c -o tH5VL.o …/…/…/fortran/test/tH5VL.F90
mpif90 -I. -I…/…/…/fortran/test -I…/…/src -I…/…/fortran/src -I…/…/fortran/src -I…/…/fortran/src -c -o tH5Z.o …/…/…/fortran/test/tH5Z.F90
mpif90 -I. -I…/…/…/fortran/test -I…/…/src -I…/…/fortran/src -I…/…/fortran/src -I…/…/fortran/src -c -o tH5Sselect.o …/…/…/fortran/test/tH5Sselect.F90
mpif90 -I. -I…/…/…/fortran/test -I…/…/src -I…/…/fortran/src -I…/…/fortran/src -I…/…/fortran/src -c -o tH5P.o …/…/…/fortran/test/tH5P.F90
mpif90 -I. -I…/…/…/fortran/test -I…/…/src -I…/…/fortran/src -I…/…/fortran/src -I…/…/fortran/src -c -o tH5A.o …/…/…/fortran/test/tH5A.F90
mpif90 -I. -I…/…/…/fortran/test -I…/…/src -I…/…/fortran/src -I…/…/fortran/src -I…/…/fortran/src -c -o tH5I.o …/…/…/fortran/test/tH5I.F90
mpif90 -I. -I…/…/…/fortran/test -I…/…/src -I…/…/fortran/src -I…/…/fortran/src -I…/…/fortran/src -c -o tH5G.o …/…/…/fortran/test/tH5G.F90
mpif90 -I. -I…/…/…/fortran/test -I…/…/src -I…/…/fortran/src -I…/…/fortran/src -I…/…/fortran/src -c -o tH5E.o …/…/…/fortran/test/tH5E.F90
mpif90 -I. -I…/…/…/fortran/test -I…/…/src -I…/…/fortran/src -I…/…/fortran/src -I…/…/fortran/src -c -o tHDF5.o …/…/…/fortran/test/tHDF5.F90
mpif90 -I. -I…/…/…/fortran/test -I…/…/src -I…/…/fortran/src -I…/…/fortran/src -I…/…/fortran/src -c -o fortranlib_test.o …/…/…/fortran/test/fortranlib_test.F90
FCLD fortranlib_test
ifort: error #10236: File not found: ‘…/…/fortran/src/.libs/libhdf5_fortran.dylib’
make[2]: *** [fortranlib_test] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1

Any ideas how to approach?

I am compiling on Mac OS high Sierra 10.13.4


#2

What is in fortran/src/.libs? Can you supply your config.log file? Did you check it for errors?

Thanks,
Scot


#3

I have discussed this with intel. You may view it here.

https://software.intel.com/comment/1920766

The following command was used to produce the following error

CC=mpicc CFLAGS=’-O3 -xcore-avx2 -ip -mp1 -m64 -shared-intel’ CXX=mpicxx CXXFLAGS=’-O3 -xcore-avx2 -ip -mp1 -m64 -shared-intel’ CPP=‘icc -E’
CXXCPP=‘icpc -E’ F9X=mpif90 FC=mpif90 FCFLAGS=’-O3 -xcore-avx2 -ip -mp1 -m64 -shared-intel -assume nostd_value’
LDFLAGS="-L/Users/jessequinn/Packages/zlib-1.2.11/lib -Wl,-commons,use_dylibs,-rpath,/Users/jessequinn/Packages/zlib-1.2.11/lib"
…/configure --prefix=/Users/jessequinn/Packages/hdf5-1.10.2 --enable-shared --enable-static --enable-fortran --enable-fortran2003
–enable-parallel --with-zlib=/Users/jessequinn/Packages/zlib-1.2.11 && make -j 8 all && make -j 8 install

mpif90 -I. -I…/…/…/fortran/test -I…/…/src -I…/…/fortran/src -I…/…/fortran/src -I…/…/fortran/src -O3 -xcore-avx2 -ip -mp1 -m64 -shared-intel -c -o tH5E.o …/…/…/fortran/test/tH5E.F90

mpif90 -I. -I…/…/…/fortran/test -I…/…/src -I…/…/fortran/src -I…/…/fortran/src -I…/…/fortran/src -O3 -xcore-avx2 -ip -mp1 -m64 -shared-intel -c -o tHDF5.o …/…/…/fortran/test/tHDF5.F90

mpif90 -I. -I…/…/…/fortran/test -I…/…/src -I…/…/fortran/src -I…/…/fortran/src -I…/…/fortran/src -O3 -xcore-avx2 -ip -mp1 -m64 -shared-intel -c -o fortranlib_test.o …/…/…/fortran/test/fortranlib_test.F90

FCLD fortranlib_test

ifort: error #10236: File not found: ‘…/…/fortran/src/.libs/libhdf5_fortran.dylib’

make[2]: *** [fortranlib_test] Error 1

make[1]: *** [all-recursive] Error 1

make: *** [all-recursive] Error 1

The attached config.log

https://jessequinn-my.sharepoint.com/:u:/g/personal/me_jessequinn_info/ETWxbK0x5ndNpBneNsYWQQUBk_n3k1CTC99XWDUF6OOQtg?e=FyfKX0


#4

ls of the .lib directory

-rw-r–r-- 1 jessequinn staff 9522 4 Apr 17:44 H5Af.o

-rw-r–r-- 1 jessequinn staff 11879 4 Apr 17:45 H5Aff.o

-rw-r–r-- 1 jessequinn staff 13071 4 Apr 17:44 H5Df.o

-rw-r–r-- 1 jessequinn staff 16503 4 Apr 17:45 H5Dff.o

-rw-r–r-- 1 jessequinn staff 2986 4 Apr 17:44 H5Ef.o

-rw-r–r-- 1 jessequinn staff 2530 4 Apr 17:45 H5Eff.o

-rw-r–r-- 1 jessequinn staff 6386 4 Apr 17:44 H5Ff.o

-rw-r–r-- 1 jessequinn staff 5515 4 Apr 17:45 H5Fff.o

-rw-r–r-- 1 jessequinn staff 9342 4 Apr 17:44 H5Gf.o

-rw-r–r-- 1 jessequinn staff 6156 4 Apr 17:45 H5Gff.o

-rw-r–r-- 1 jessequinn staff 2758 4 Apr 17:44 H5If.o

-rw-r–r-- 1 jessequinn staff 2407 4 Apr 17:45 H5Iff.o

-rw-r–r-- 1 jessequinn staff 7470 4 Apr 17:44 H5Lf.o

-rw-r–r-- 1 jessequinn staff 5880 4 Apr 17:45 H5Lff.o

-rw-r–r-- 1 jessequinn staff 10558 4 Apr 17:44 H5Of.o

-rw-r–r-- 1 jessequinn staff 7000 4 Apr 17:45 H5Off.o

-rw-r–r-- 1 jessequinn staff 47513 4 Apr 17:44 H5Pf.o

-rw-r–r-- 1 jessequinn staff 53663 4 Apr 17:45 H5Pff.o

-rw-r–r-- 1 jessequinn staff 3676 4 Apr 17:44 H5Rf.o

-rw-r–r-- 1 jessequinn staff 5897 4 Apr 17:45 H5Rff.o

-rw-r–r-- 1 jessequinn staff 12683 4 Apr 17:44 H5Sf.o

-rw-r–r-- 1 jessequinn staff 18437 4 Apr 17:45 H5Sff.o

-rw-r–r-- 1 jessequinn staff 19181 4 Apr 17:44 H5Tf.o

-rw-r–r-- 1 jessequinn staff 16732 4 Apr 17:45 H5Tff.o

-rw-r–r-- 1 jessequinn staff 1303 4 Apr 17:44 H5Zf.o

-rw-r–r-- 1 jessequinn staff 1534 4 Apr 17:45 H5Zff.o

-rw-r–r-- 1 jessequinn staff 12763 4 Apr 17:44 H5_f.o

-rw-r–r-- 1 jessequinn staff 26217 4 Apr 17:45 H5_ff.o

-rw-r–r-- 1 jessequinn staff 128896 4 Apr 17:45 H5_gen.o

-rw-r–r-- 1 jessequinn staff 18590 4 Apr 17:45 H5f90global.o

-rw-r–r-- 1 jessequinn staff 1581 4 Apr 17:44 H5f90kit.o

-rw-r–r-- 1 jessequinn staff 1183 4 Apr 17:44 H5fortkit.o

-rw-r–r-- 1 jessequinn staff 895 4 Apr 17:44 H5fortran_types.o

-rw-r–r-- 1 jessequinn staff 705 4 Apr 17:45 HDF5.o

-rw-r–r-- 1 jessequinn staff 527168 4 Apr 17:45 libhdf5_fortran.a

lrwxr-xr-x 1 jessequinn staff 25 4 Apr 17:45 libhdf5_fortran.dylib -> libhdf5_fortran.100.dylib

lrwxr-xr-x 1 jessequinn staff 21 4 Apr 17:45 libhdf5_fortran.la -> …/libhdf5_fortran.la

-rw-r–r-- 1 jessequinn staff 1103 4 Apr 17:45 libhdf5_fortran.lai


#5

Essentially clang/GNU can compile with --enable-shared but intel fails.


#6

It appears if you use mpich built with Intel 18, then libhdf5_fortran.1000.dylib is not created. If you use the Intel 18 compilers (i.e., no parallel), then it does create the dylib file.

We’ll look into it, thanks for the report.

Scot


#7

This same issue occurs with openmpi, so it is not a unique problem with mpich.


#8

I think I have the solution to this issue. When building the library libhdf5_fortran.la you want to use the intel C compiler and the mpicc to perform the link. The command

/bin/sh …/…/libtool --tag=CC --mode=link mpicc -I…/…/src -I…/…/fortran/src -fPIC -version-info 101:1:1 -L/Users/jgrove/spack/opt/spack/darwin-highsierra-x86_64/intel-18.0.2/zlib-1.2.11-ydrvx5qzjpu2tped42kadoqqn2vihy2m/lib -Wl,-commons,use_dylibs -o libhdf5_fortran.la -rpath /Users/jgrove/junk/TOGO/lib H5f90global.lo H5fortran_types.lo H5_ff.lo H5Aff.lo H5Dff.lo H5Eff.lo H5Fff.lo H5Gff.lo H5Iff.lo H5Lff.lo H5Off.lo H5Pff.lo H5Rff.lo H5Sff.lo H5Tff.lo H5Zff.lo H5_gen.lo H5fortkit.lo H5f90kit.lo H5_f.lo H5Af.lo H5Df.lo H5Ef.lo H5Ff.lo H5Gf.lo H5If.lo H5Lf.lo H5Of.lo H5Pf.lo H5Rf.lo H5Sf.lo H5Tf.lo H5Zf.lo HDF5.lo …/…/src/libhdf5.la -lz -ldl -lm

will create the desired dynamic library. I suspect this is something that would be done in libtool which probably just assumed you wanted to link with Fortran.


#9

so has this been resolved?


#10

The problem still exists in the HDF code as far as their release is concerned. The easiest way to force linking with C is to add a C file to the library. This can be complete empty and autotools will assume that since the library is mixed C/Fortran it should be linked with C. I don’t know enough about how Cmake does this decision, but I expect the solution to be similar. This fix will get you past this problem. The build will then fail during testing due to improper linking with the Intel fortran code.

/bin/sh …/libtool --tag=CC --mode=link mpicc -std=c99 -pedantic -Wall -Wextra -Wbad-function-cast -Wc+±compat -Wcast-align -Wcast-qual -Wconversion -Wdeclaration-after-statement -Wdisabled-optimization -Wfloat-equal -Wformat=2 -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-include-dirs -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpacked -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wswitch-default -Wswitch-enum -Wundef -Wunused-macros -Wunsafe-loop-optimizations -Wwrite-strings -finline-functions -s -Wno-inline -Wno-aggregate-return -Wno-missing-format-attribute -Wno-missing-noreturn -O -fPIC -L/Users/jgrove/spack/opt/spack/darwin-highsierra-x86_64/intel-18.0.2/zlib-1.2.11-ydrvx5qzjpu2tped42kadoqqn2vihy2m/lib -Wl,-commons,use_dylibs -o atomic_writer atomic_writer.o libh5test.la …/src/libhdf5.la -lz -ldl -lm
libtool: link: mpicc -std=c99 -pedantic -Wall -Wextra -Wbad-function-cast -Wc+±compat -Wcast-align -Wcast-qual -Wconversion -Wdeclaration-after-statement -Wdisabled-optimization -Wfloat-equal -Wformat=2 -Winit-self -Winvalid-pch -Wmissing-declarations -Wmissing-include-dirs -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpacked -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wswitch-default -Wswitch-enum -Wundef -Wunused-macros -Wunsafe-loop-optimizations -Wwrite-strings -finline-functions -s -Wno-inline -Wno-aggregate-return -Wno-missing-format-attribute -Wno-missing-noreturn -O -fPIC -Wl,-commons -Wl,use_dylibs -o .libs/atomic_writer atomic_writer.o -L/Users/jgrove/spack/opt/spack/darwin-highsierra-x86_64/intel-18.0.2/zlib-1.2.11-ydrvx5qzjpu2tped42kadoqqn2vihy2m/lib ./.libs/libh5test.a …/src/.libs/libhdf5.dylib -lz -ldl -lm
ld: warning: option -s is obsolete and being ignored
Undefined symbols for architecture x86_64:
“___intel_new_feature_proc_init”, referenced from:
_main in atomic_writer.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
gmake[1]: *** [Makefile:1621: atomic_writer] Error 1

The resolution here is that the Intel library libintlc.dylib (-lintlc) is needed.

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

I didn’t figure out enough of the HDF build system to see where to add this library link, so I gave up on shared libraries for now. When you disable shared on the configure line things work.


#12

I’m having the same problem. How do you solved it?