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

**URL:** <https://forum.hdfgroup.org/t/fatal-error-cannot-open-module-file-hdf5-mod-for-reading-at-1-no-such-file-or-directory-compilation-terminated/12066>\
**Category:** HDF5 Library\
**Created:** [March 10, 2024, 5:30am UTC](https://forum.hdfgroup.org/t/fatal-error-cannot-open-module-file-hdf5-mod-for-reading-at-1-no-such-file-or-directory-compilation-terminated/12066 "2024-03-10T05:30:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![svachhan](https://forum.hdfgroup.org/letter_avatar_proxy/v4/letter/s/b3f665/32.png) [@svachhan](https://forum.hdfgroup.org/u/svachhan)\
**Post date:** [March 10, 2024, 5:30am UTC](https://forum.hdfgroup.org/t/fatal-error-cannot-open-module-file-hdf5-mod-for-reading-at-1-no-such-file-or-directory-compilation-terminated/12066/1 "2024-03-10T05:30:36Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![brtnfld](https://forum.hdfgroup.org/user_avatar/forum.hdfgroup.org/brtnfld/32/1444_2.png) [@brtnfld](https://forum.hdfgroup.org/u/brtnfld)\
**Post date:** [March 11, 2024, 4:04pm UTC](https://forum.hdfgroup.org/t/fatal-error-cannot-open-module-file-hdf5-mod-for-reading-at-1-no-such-file-or-directory-compilation-terminated/12066/2 "2024-03-11T16:04:30Z")

</div>

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