Fatal Error: Cannot open module file 'hdf5.mod' for reading at (1): No such file or directory compilation terminated

Hi,

I am trying to compile a local solver with hdf5.

I installed and build hdf5 with the following steps:

tar zxf hdf5-1.14.3.tar.gz
./configure --prefix=/path/to/build/directory CC=mpicc FC=mpif90 CXX=mpicxx --enable-build-mode=production --enable-build-mode=debug --enable-shared -enable-parallel
make
make check
make install
make check-install

Now when I compile the code, I get the following error:

25 | use HDF5
| 1
Fatal Error: Cannot open module file ‘hdf5.mod’ for reading at (1): No such file or directory
compilation terminated.

So I checked the src directory and I could not find any .mod files. I could not find any .mod files.

Can someone point out the mistake I made while building?

Best wishes,
Shantanu

You need to --enable-fortran when building hdf5.