Folks, Here is attached an oversimplified version of the MPI_Recv_init_null_c test from the intel test suite.
the test works fine with v1.6, v1.7 and v1.8 branches but fails with the trunk. i wonder wether the bug is in OpenMPI or the test itself. on one hand, we could consider there is a bug in OpenMPI : status.MPI_SOURCE should be MPI_PROC_NULL since we explicitly posted a recv request with MPI_PROC_NULL. on the other hand, (mpi specs, chapter 3.7.3 and https://svn.open-mpi.org/trac/ompi/ticket/3475) we could consider the returned value is not significant, and hence MPI_Wait should return an empty status (and empty status has source=MPI_ANY_SOURCE per the MPI specs). for what it's worth, this test is a success with mpich (e.g. status.MPI_SOURCE is MPI_PROC_NULL). what is the correct interpretation of the MPI specs and what should be done ? (e.g. fix OpenMPI or fix/skip the test ?) Cheers, Gilles
/* * This test program is an over simplified version of the * MPI_Recv_init_null_c test from the intel test suite. * * It can be ran on one task : * mpirun -np 1 -host localhost ./a.out * * when ran on the trunk, since r28431, the test will fail : * status.MPI_SOURCE is MPI_ANY_SOURCE instead of MPI_PROC_NULL * * Copyright (c) 2014 Research Organization for Information Science * and Technology (RIST). All rights reserved. */ #include <stdio.h> #include <mpi.h> int main (int argc, char *argv[]) { MPI_Status status; MPI_Request req; int ierr; MPI_Init(&argc, &argv); ierr = MPI_Recv_init(NULL, 0, MPI_INT, MPI_PROC_NULL, MPI_ANY_TAG, MPI_COMM_WORLD, &req); if (ierr != MPI_SUCCESS) MPI_Abort(MPI_COMM_WORLD, 1); ierr = MPI_Start(&req); if (ierr != MPI_SUCCESS) MPI_Abort(MPI_COMM_WORLD, 2); ierr = MPI_Wait(&req, &status); if (ierr != MPI_SUCCESS) MPI_Abort(MPI_COMM_WORLD, 3); if (MPI_PROC_NULL != status.MPI_SOURCE) { if (MPI_ANY_SOURCE == status.MPI_SOURCE) { printf("got MPI_ANY_SOURCE=%d instead of MPI_PROC_NULL=%d\n", status.MPI_SOURCE, MPI_PROC_NULL); } else { printf("got %d instead of MPI_PROC_NULL=%d\n", status.MPI_SOURCE, MPI_PROC_NULL); } } else { printf("OK\n"); } MPI_Finalize(); return 0; }