Bug 2183289 - hdf5: h5pfc Fortran compiler launchers use incorrect module search path
Summary: hdf5: h5pfc Fortran compiler launchers use incorrect module search path
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: hdf5
Version: 39
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Orion Poplawski
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-03-30 19:03 UTC by Brad King
Modified: 2023-08-16 07:12 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: ---
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Brad King 2023-03-30 19:03:45 UTC
In a `fedora:rawhide` container started today:

```
$ dnf install hdf5-openmpi-devel hdf5-mpich-devel hdf5-devel
...
 hdf5                       x86_64 1.12.1-11.fc38
 hdf5-mpich                 x86_64 1.12.1-11.fc38
 hdf5-openmpi               x86_64 1.12.1-11.fc38
...

$ cat test.f90
program test
  use hdf5
end
```

-----------------------------------------------------------------------

With OpenMPI under `module load mpi/openmpi-x86_64`:

```
$ h5pfc -c test.f90
f951: Warning: Nonexistent include directory '/usr/lib64/gfortran/modules/openmpi/openmpi-x86_64' [-Wmissing-include-dirs]
test.f90:2:7:

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

The module exists here:

```
$ ls $MPI_FORTRAN_MOD_DIR/hdf5.mod
/usr/lib64/gfortran/modules/openmpi/hdf5.mod
```

One can hack h5pfc to fix it like this:

```
$ sed -i '/^includedir=/ s|/openmpi-x86_64||' /usr/lib64/openmpi/bin/h5pfc

$ h5pfc -c test.f90
# (succeeds)
```

-----------------------------------------------------------------------

With MPICH under `module load mpi/mpich-x86_64`:

```
$ h5pfc -c test.f90
f951: Warning: Nonexistent include directory '/usr/lib64/gfortran/modules/mpich/mpich-x86_64' [-Wmissing-include-dirs]
```

The module exists here:

```
$ ls $MPI_FORTRAN_MOD_DIR/hdf5.mod
/usr/lib64/gfortran/modules/mpich/hdf5.mod
```

One can hack h5pfc to fix it like this:

```
$ sed -i '/^includedir=/ s|/mpich-x86_64||' /usr/lib64/mpich/bin/h5pfc

$ h5pfc -c test.f90
# (succeeds without warning)
```

Comment 1 Fedora Release Engineering 2023-08-16 07:12:42 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle.
Changing version to 39.


Note You need to log in before you can comment on or make changes to this bug.