geospace-code / h5fortran

Lightweight HDF5 polymorphic Fortran: h5write() h5read()
https://geospace-code.github.io/h5fortran
BSD 3-Clause "New" or "Revised" License
99 stars 23 forks source link

GCC 8.3.0 bug (GCC 8.5.0 and others work) #31

Closed scivision closed 2 years ago

scivision commented 2 years ago

On multiple CentOS computers with GCC 8.3.0, this build error is observed since after h5fortran v4.4.4

h5fortran/src/write_scalar.f90:32:118:

   call hdf_create(self, dname, H5T_NATIVE_CHARACTER, dims, dims, file_space_id, dset_id, dtype_id, charlen=len(value))

                  1
Error: Type mismatch in argument 'charlen' at (1); passed INTEGER(8) to INTEGER(4)

I initially think this may be a compiler bug, let's see if we can make a workaround. For whatever reason, various HPC default to GCC 8.3.0.

ref: https://github.com/gemini3d/external/issues/4