2

I am using gcc 4.9.2 and trying to use gfortran in order to read and write hdf5 binary files. I am getting the following error:

USE HDF5

  1

Fatal Error: File 'hdf5.mod' opened at (1) is not a GNU Fortran module file

I tried removing and reinstalling gfortran but no change. Any suggestion would be appreciated.

1
  • What gives you the indication that hdf5.mod is a Fortran module? It's simply a binary file format. The .mod extension doesn't make it a Fortran module, any more than giving a .txt file a .jpg extension makes it an image file. Commented Dec 10, 2014 at 0:33

1 Answer 1

1

The HDF5 library (or at least, the Fortran interface part of it) needs to be compiled with the corresponding Fortran compiler and (major) version that you use for your own code as well.

Sign up to request clarification or add additional context in comments.

Comments

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.