It seems that the pkg-config file for openmpi fortran (`ompi-fort.pc`) does not contain the correct include path for `mpi.mod`. It is installed at `/usr/lib/x86_64-linux-gnu/fortran/gfortran-mod-15/openmpi/mpi.mod` but this path is apparently not in the pc file.
Basically the following program should be compilable with `gfortran $(pkg-config ompi-fort --libs --cflags) helloworld.F90`:
It works on my fedora machine where the paths are correct in the pc file, but on Ubuntu, `mpi.mod` cannot be found, because it is not included in `ompi-fort.pc`.
It seems that the pkg-config file for openmpi fortran (`ompi-fort.pc`) does not contain the correct include path for `mpi.mod`. It is installed at `/usr/lib/ x86_64- linux-gnu/ fortran/ gfortran- mod-15/ openmpi/ mpi.mod` but this path is apparently not in the pc file.
Basically the following program should be compilable with `gfortran $(pkg-config ompi-fort --libs --cflags) helloworld.F90`:
``` RANK(MPI_ COMM_WORLD, rank, ierr)
program helloworld
use mpi
integer ierr, rank
call MPI_INIT(ierr)
call MPI_COMM_
write(*,*) rank, "Hello world"
call MPI_FINALIZE(ierr)
```
It works on my fedora machine where the paths are correct in the pc file, but on Ubuntu, `mpi.mod` cannot be found, because it is not included in `ompi-fort.pc`.