Open
Description
Consider the following:
MPI_Reduce(&send, &recv, LIMIT*sizeof(int), MPI_BYTE, MPI_SUM, root, MPI_COMM_WORLD);
The MPI standard (MPI 3.1 - Section 5.9.2) says that this is not allowed, so this would be an invalid MPI program. MPI_BYTE
can only be used with the MPI_BAND, MPI_BOR, MPI_BXOR
MPI_op
types.
Open MPI does not check this in it's ompi_op_is_valid
param check here. This results in a wrong answer for the user. But they have an incorrect MPI program so all bets are off. However, Open MPI could implement some stronger parameter checking in the MPI routines that use MPI_Op
datatypes.
I have a test program here if someone was interested in working on this (it just tests MPI_Reduce
):