0

I downloaded latest hdf5-1.14.0.tar.gz. After extraction, I configure as

FC=/opt/intel/oneapi/compiler/2022.1.0/linux/bin/intel64/ifort ./configure --enable-fortran

after make, I can find

libhdf5.a  libhdf5.la  libhdf5.settings  libhdf5.so  libhdf5.so.310  libhdf5.so.310.0.0

but what I need is libhdf5_fortran.a. But the closest file I can find is libhdf5_fortran.la under fortran/src. So how to generate libhdf5_fortran.a?

1 Answer 1

2

You are not setting up the Intel compiler correctly. You should run the setvars script to set up all the required paths, and not just provide the absolute path to the compiler. If I do as you have the configure fails with the following

checking if Fortran compiler supports intrinsic SIZEOF... no
checking if Fortran compiler supports intrinsic C_SIZEOF... no
checking if Fortran compiler supports intrinsic STORAGE_SIZE... no
configure: error: Fortran compiler requires either intrinsic functions SIZEOF or STORAGE_SIZE

However if I set up the compiler as recommended and run the configure via

ijb@ijb-Latitude-5410:~/Downloads/hdf5-1.14.0$ . /opt/intel/oneapi/setvars.sh 
 
:: initializing oneAPI environment ...
   bash: BASH_VERSION = 5.0.17(1)-release
   args: Using "$@" for setvars.sh arguments: 
:: advisor -- latest
:: ccl -- latest
:: clck -- latest
:: compiler -- latest
:: dal -- latest
:: debugger -- latest
:: dev-utilities -- latest
:: dnnl -- latest
:: dpcpp-ct -- latest
:: dpl -- latest
:: inspector -- latest
:: intelpython -- latest
:: ipp -- latest
:: ippcp -- latest
:: ipp -- latest
:: itac -- latest
:: mkl -- latest
:: mpi -- latest
:: tbb -- latest
:: vpl -- latest
:: vtune -- latest
:: oneAPI environment initialized ::
 
ijb@ijb-Latitude-5410:~/Downloads/hdf5-1.14.0$ FC=ifort ./configure --enable-fortran

the configure works and after a

ijb@ijb-Latitude-5410:~/Downloads/hdf5-1.14.0$ make -j 4

it compiles correctly and gives the file you are after:

ijb@ijb-Latitude-5410:~/Downloads/hdf5-1.14.0$ find . -name libhdf5_fortran.a -print
./fortran/src/.libs/libhdf5_fortran.a
Sign up to request clarification or add additional context in comments.

2 Comments

Thank you so much. Actually, I set up ifort correctly and compile correctly. But I never thought libhdf5_fortran.a is under a hidden folder .libs
Yes, it is a bizarre place to put it. Possibly it is waiting for a subsequent make install but I'm not at my computer currently

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.