Closed
Description
Background information
For context: I found this because I am developing a PMPI wrapper library for the Fortran 2008 bindings.
What version of Open MPI are you using? (e.g., v4.1.6, v5.0.1, git branch name and hash, etc.)
I see the bug with
- 5.0.4
- 5.0.6
With older versions (4.1) the bug is not present
Describe how Open MPI was installed (e.g., from a source/distribution tarball, from a git clone, from an operating system distribution package, etc.)
Installed from tarball on my local linux machine with a plain configure
. Compiler is gcc/11.4
If you are building/installing from a git clone, please copy-n-paste the output from git submodule status
.
n/a
Please describe the system on which you are running
- Operating system/version: Linux 6.8.0-49-generic x86_64
- Computer hardware: Laptop
- Network type: Linux shared memory + TCP enabled by configure, but probably not relevant to this issue
Details of the problem
Compiling the program below with mpif90 main.f90
results in a linker error:
/usr/bin/ld: /tmp/ccpw1Fqo.o: in function `MAIN__':
main.f90:(.text+0x63): undefined reference to `pmpi_allreduce_init_f08_'
/usr/bin/ld: main.f90:(.text+0x88): undefined reference to `pmpi_group_from_session_pset_f08_'
/usr/bin/ld: main.f90:(.text+0xa2): undefined reference to `pmpi_session_call_errhandler_f08_'
program main
! This program is not intended to run correctly.
! Its purpose is to trigger undefined reference errors when compiled with OpenMPI/5.0.x
use :: mpi_f08, only: &
PMPI_Allreduce_init, MPI_Request, MPI_REAL, MPI_SUM, MPI_COMM_WORLD, MPI_INFO_NULL, &
PMPI_Group_from_session_pset, MPI_Session, MPI_Group, &
PMPI_Session_call_errhandler, MPI_SUCCESS
implicit none
integer, parameter :: nbuf = 10
real, dimension(nbuf) :: sendbuf, recvbuf
type(MPI_Request) :: request
type(MPI_Session) :: session
type(MPI_Group) :: group
integer :: ierror
call PMPI_Allreduce_init(sendbuf, &
recvbuf, &
nbuf, &
MPI_REAL, &
MPI_SUM, &
MPI_COMM_WORLD, &
MPI_INFO_NULL, &
request, &
ierror)
call PMPI_Group_from_session_pset(session, "group", group, ierror)
call PMPI_Session_call_errhandler(session, MPI_SUCCESS, ierror)
end program
Symbols for
PMPI_Allreduce_init
,PMPI_Group_from_session_pset
,PMPI_Session_call_errhandler
are missing .
The names are present in the mpi_f08
module, because otherwise the compiler would complain about not finding them.