[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1058944: Bug#1058876: libopenmpi-dev: paths missing /usr/include...(for fortran mpi.mod)



On 2023-12-26 11:00, Alastair McKinstry wrote:
On 24/12/2023 10:50, Drew Parsons wrote:
reopen 1058876
block 1058944 by 1058876
thanks

Alas, the fix in openmpi 4.1.6-3 for the include path to the openmpi fortran modules has hardcoded x86_64-linux-gnu

This is preventing builds and tests on other architectures, e.g. rebuilding sundials for the petsc transition.

I think openmpi's debian/tests will also need Depends: pkg-config for the new compile_run_cc_pkgconfig test.

The problem appears to be the heuristics in upstream/FindMPI.cmake in
adios2 (and sundials). It happens in sid tests but not my arm64 devel
environment. Debugging slowly.

It's not just adios2 and sundials though. openmpi's own arm64 tests are failing on debci with a reference to x86_64-linux-gnu

e.g.
 79s Setting up libopenmpi-dev:arm64 (4.1.6-3) ...
79s update-alternatives: using /usr/lib/aarch64-linux-gnu/openmpi/include to provide /usr/include/aarch64-linux-gnu/mpi (mpi-aarch64-linux-gnu) in auto mode
 79s Setting up autopkgtest-satdep (0) ...
 79s Processing triggers for libc-bin (2.37-12) ...
83s (Reading database ... 17753 files and directories currently installed.)
 83s Removing autopkgtest-satdep (0) ...
86s autopkgtest [03:14:37]: test compile_run_mpif90: [----------------------- 86s f951: Warning: Nonexistent include directory ‘/usr/include/x86_64-linux-gnu/fortran/gfortran-mod-15/openmpi’ [-Wmissing-include-dirs]
 86s hello.f90:3:11:
 86s
 86s     3 |       use mpi
 86s       |           1
86s Fatal Error: Cannot open module file ‘mpi.mod’ for reading at (1): No such file or directory


It's a strange error to be sure. From that error message, I thought x86_64-linux-gnu might have gotten hardcoded into the include path in ompi-f90.pc for arm64. But downloading libopenmpi-dev_4.1.6-3_arm64.deb and inspecting manually, I can see that arm64's ompi-f90.pc contains -I/usr/include/aarch64-linux-gnu/fortran/gfortran-mod-15/openmpi which would be the correct path. I unpacked libopenmpi-dev_4.1.6-3_arm64.deb manually, but I can't find any reference to include/x86_64 inside its files.

openmpi's compile_run_mpif90 test doesn't use pkgconfig anyway. It builds directly with mpif90. Could the problem be inside the mpif90.openmpi binary? That would be strange though. arm64's mpif90.openmpi oughtn't be referring to x86_64 any more than the pkgconfig file.

Best of luck with debugging.

Drew


Reply to: