Search for mod files in $FMODDIR directory
authorAlastair McKinstry <mckinstry@debian.org>
Mon, 1 Jan 2024 17:14:56 +0000 (17:14 +0000)
committerAlastair McKinstry <mckinstry@debian.org>
Mon, 1 Jan 2024 17:14:56 +0000 (17:14 +0000)
Last-Updated: 2023-12-21
Forwarded: no

Also look in a fortran-ABI-specific directory for libs

Gbp-Pq: Name mpifort.patch

ompi/tools/wrappers/mpifort-wrapper-data.txt.in

index 27a7c05ea4ae8b924d938586fdef56d2fe1cc377..7821251e693eace5ffa0e1b3990d73ec02aa4b0c 100644 (file)
@@ -10,6 +10,7 @@ project_short=OMPI
 version=@OMPI_VERSION@
 language=Fortran
 compiler_env=FC
+compiler_version=@COMPILER_VERSION@
 compiler_flags_env=FCFLAGS
 compiler=@FC@
 preprocessor_flags=
@@ -24,5 +25,7 @@ libs_static=@OMPI_FORTRAN_USEMPIF08_LIB@ @OMPI_FORTRAN_USEMPI_LIB@ -l@OMPI_LIBMP
 dyn_lib_file=lib@OMPI_LIBMPI_NAME@.@OPAL_DYN_LIB_SUFFIX@
 static_lib_file=lib@OMPI_LIBMPI_NAME@.a
 required_file=@OMPI_WRAPPER_FORTRAN_REQUIRED_FILE@
-includedir=${includedir}
-libdir=${libdir}
+# The same includedir is used in mpif77 and mpif90; so link the mod files in there
+# but set fmoddir and use it where possible
+includedir=${libdir}/../../fortran/@COMPILER_VERSION@/openmpi
+libdir=${libdir}/fortran/@FC@