Skip to content

Commit ff78ef9

Browse files
committed
Prevent use of OpenMPI.
OpenMPI is incompatible with the way opencoarray uses MPI_wins. A MPI_Win on OpenMPI is a pointer exclusive to each image. Because tokens (aka MPI_Wins) are transfered between images, OpenMPI can not be used, because no way of mapping exists. MPIch and Intel's MPI work fine. This is not a bug, but a design decision.
1 parent fc2c699 commit ff78ef9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/runtime-libraries/mpi/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,11 @@ set(HOST_NAME ${HOST_NAME} PARENT_SCOPE)
146146
execute_process(COMMAND ${MPIEXEC_EXECUTABLE} --version
147147
OUTPUT_VARIABLE mpi_version_out)
148148
if (mpi_version_out MATCHES "[Oo]pen[ -][Mm][Pp][Ii]")
149+
if ( gfortran_compiler AND ( NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 14.0.0 ) )
150+
# OpenMPI uses addresses for windows instead of identical ids on all images for the same token.
151+
# Therefore we can't use it (yet; and probably never).
152+
message( FATAL_ERROR "OpenMPI is incompatible with gfortran's coarray implementation from gfortran version 15 on. Please use a different MPI implementation!")
153+
endif ()
149154
message( STATUS "OpenMPI detected")
150155
set_property(GLOBAL PROPERTY openmpi true)
151156
# Write out a host file because OMPI's mpiexec is dumb

0 commit comments

Comments
 (0)