eschnett / MPItrampoline

A forwarding MPI implementation that can use any other MPI implementation via an MPI ABI
MIT License
44 stars 4 forks source link

Correct Fortran MPI_IN_PLACE #30

Closed eschnett closed 2 years ago

ocaisa commented 2 years ago

I was testing using this in a toolchain, and when configuring ScaLAPACK, I am getting:

-- Testing FORTRAN_MANGLING
-- CDEFS set to MPIwrapper: MPI_IN_PLACE loc: 22967324997600MPIwrapper: MPI_IN_PLACE: 0Add_

which triggers compilation failures.

For other successful builds I see

-- Testing FORTRAN_MANGLING
-- CDEFS set to Add_
eschnett commented 2 years ago

@ocaisa I added debug output to MPItrampoline and MPIwrapper during startup. I think this debug output confuses the configure script.

ocaisa commented 2 years ago

Ok, I will leave this alone until you think it is ready, thanks.

eschnett commented 2 years ago

I think it is ready now on Linux. The debug output should not be there any more. At the moment I'm fighting macOS Fortran problems on the CI infrastructure.

ocaisa commented 2 years ago

I remove the prints from the MPIwrapper patch and did a rebuild, configure step has now passed so looking good.

ocaisa commented 2 years ago

Some progress, definitely different error:

/scratch/ocaisa/cp2k_regtesting/TEST-prebuilt-psmp-2022-03-10_15-48-32/UNIT/libcp2k_unittest.out
 * [ABORT]                                                                     *
 *  \___/       MPI error 5 in mpi_comm_free @ mp_comm_free : MPI_ERR_COMM:    *
 *    |                            invalid communicator                        *
 *  O/|                                                                        *
 * /| |                                                                        *
 * / \                                          mpiwrap/message_passing.F:1133 *
 *******************************************************************************
ocaisa commented 2 years ago

The CP2K problems are most likely not related to this. The patch I was using does not work in general (even without using MPItrampoline) and I still can't fully figure it out.