SUBROUTINE check_openmpi_rma() ! Check if RMA is used with OpenMPI, if so disabled it ! (OpenMPI has several bugs with RMA and it does not ! give any performance benefit) CHARACTER(LEN=mp_max_library_version_string) :: mpi_library_version INTEGER :: ipos, resultlen IF (.NOT. dbcsr_cfg%use_mpi_rma%val) & RETURN #if defined(__DBCSR_OPENMPI_RMA) RETURN #endif CALL mp_get_library_version(mpi_library_version, resultlen) ! ignore failure to obtain the library version string IF (resultlen .EQ. 0) & RETURN ! check if Open MPI ipos = INDEX(mpi_library_version(1:resultlen), "Open MPI v") IF (ipos .EQ. 0) & RETURN CALL dbcsr_warn(__LOCATION__, "You are using OpenMPI: --- "// & mpi_library_version(1:resultlen)// & " --- We disable RMA to prevent errors. "// & "Please install MPICH version or use __DBCSR_OPENMPI_RMA to force the "// & "execution. ") CALL dbcsr_set_config(use_mpi_rma=.FALSE.) END SUBROUTINE check_openmpi_rma