Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 682794

Summary: sci-libs/hdf5-1.10.5 USE="fortran mpi" - FATAL ERROR: Cannot read module file 'mpi.mod' opened at (1), because it was created by a different version of GNU Fortran
Product: Gentoo Linux Reporter: Bernd <waebbl-gentoo>
Component: Current packagesAssignee: Gentoo Science Related Packages <sci>
Status: UNCONFIRMED ---    
Severity: normal CC: frp.bissey
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge-info.txt

Description Bernd 2019-04-07 07:16:40 UTC
Created attachment 572132 [details]
emerge-info.txt

When trying to compile like

[ebuild  N    ] sci-libs/hdf5-1.10.5  USE="examples fortran hl mpi szip zlib -cxx -debug -static-libs -threads"

the compile fails with

Making all in testpar
make[2]: Entering directory '/var/tmp/portage/sci-libs/hdf5-1.10.5/work/hdf5-1.10.5/fortran/testpar'
mpif90  -I. -I../../src -I../../fortran/src     -pedantic -Wall -Wextra -Wunderflow -Wimplicit-interface -Wsurprising -Wno-c-binding-type  -s -O2 -I../../fortran/src -I../../fortran/test -I../../fortran/src -I../../fortran/test -O2 -pipe -march=bdver2 -fstack-protector-strong -fstack-check -fbounds-check -c -o ptest.o ptest.f90
ptest.f90:20:6:

   USE MPI
      1
Fatal Error: Cannot read module file ‘mpi.mod’ opened at (1), because it was created by a different version of GNU Fortran
compilation terminated.
Comment 1 Bernd 2019-04-07 07:21:09 UTC
I'm getting an ERR_ACCESS_DENIED when trying to upload the compressed build log.
Comment 2 Benda Xu gentoo-dev 2019-04-07 10:28:02 UTC
I have no idea of this bug.  Do we need some more restrictions over the fortran versions?
Comment 3 François Bissey 2019-04-07 10:49:36 UTC
Fortran under-specify the format of .mod files. They are incompatible from vendor to vendor and often from one compiler version to the next. In the case of gfortran, to make matters worse, it is completely unrelated to change in runtime (libgfortran.so).

Anyway, changes in .mod file are duly mentioned in the release notes for gfortran under compatibility notes at https://gcc.gnu.org/wiki/GFortran/News
The good news is no changes from gcc 5 to gcc 9 at least according to the above page.
Comment 4 François Bissey 2019-04-07 10:51:56 UTC
If it wasn't clear, I recommend the mpi provider (openmpi, mpich or other) to be recompiled with the new gfortran.