-
-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
- Linux Ubuntu 22.04
- Compiler: Gfortran v11.4 & OpenMPI v4.1.2
- HDF5: Compiled from source v1.14.6
Running an example driver causes a cascade of linking errors:
$ fpm run mpi_hdf5_test --profile release --compiler=mpif90 --flag -Dh5fortran_HAVE_PARALLEL --flag "-I/path/to/git/hdf5-1.14.6/hdf5/include -L/path/to/git/hdf5-1.14.6/hdf5/lib" --runner "mpirun -np 1"
mpi_hdf5_test failed.
[100%] Compiling...
/usr/bin/ld: missing --end-group; added as last command line option
/usr/bin/ld: cannot find -lhdf5_openmpihl_fortran: No such file or directory
/usr/bin/ld: cannot find -lhdf5_openmpi_fortran: No such file or directory
/usr/bin/ld: cannot find -lhdf5_openmpi_hl: No such file or directory
/usr/bin/ld: cannot find -lhdf5_openmpi: No such file or directory
collect2: error: ld returned 1 exit status
<ERROR> Compilation failed for object " mpi_hdf5_test "
<ERROR> stopping due to failed compilation
STOP 1
fpm.tom
includes:
[build]
link = ["hdf5", "mpi"]
[dependencies]
h5fortran-mpi = { git="https://github.com/geospace-code/h5fortran-mpi.git"}
mpi = "*"
Workaround attempts
Checking under hdf5-1.14.6/hdf5/lib
there are only these libraries:
$ ls /path/to/git/hdf5-1.14.6/hdf5/lib
libhdf5.a libhdf5_fortran.so.310.3.2 libhdf5_hl_fortran.so libhdf5_hl.so libhdf5.so
libhdf5_fortran.a libhdf5_hl.a libhdf5hl_fortran.so libhdf5_hl.so.310 libhdf5.so.310
libhdf5_fortran.la libhdf5_hl_fortran.a libhdf5hl_fortran.so.310 libhdf5_hl.so.310.0.6 libhdf5.so.310.5.1
libhdf5_fortran.so libhdf5hl_fortran.a libhdf5hl_fortran.so.310.0.6 libhdf5.la
libhdf5_fortran.so.310 libhdf5hl_fortran.la libhdf5_hl.la libhdf5.settings
- Adding
link = ["hdf5hl_fortran", "hdf5_fortran", "hdf5", "mpi", "z"]
to rootfpm.toml
produces the same error - Replacing the following directly under
build/dependencies/h5fortran-mpi/fpm.toml
:
- link = ["hdf5_openmpihl_fortran", "hdf5_openmpi_fortran", "hdf5_openmpi_hl", "hdf5_openmpi", "z", "mpi_mpifh", "mpi"]
+ link = ["hdf5hl_fortran", "hdf5_hl", "hdf5_fortran", "hdf5", "mpi", "z"]
fixes the problem
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working