[mpich-discuss] uninitialized MPI_request in ad_write_coll.c and ad_rea_coll.c

Wei-keng Liao wkliao at ece.northwestern.edu
Sat May 10 18:15:21 CDT 2008


File mpich2-1.0.7/src/mpi/romio/adio/common/ad_write_coll.c, lines 666 and 
671, array requests[] are allocated but not initialized. Since not all of 
the requests[] elements will be used by MPI_Irecv() and MPI_Isend(), it is 
not safe to use the entire requests[] in MPI_Testall() or MPI_Waitall() 
from lines 751 to 761. Maybe this is why these is a #ifdef NEEDS_MPI_TEST 
in line 747?

The same problem happens in ad_read_coll.c

The fix would be to initialize all elements to MPI_REQUEST_NULL.
Otherwise, one must keep track the number of requests posted.

Wei-keng




More information about the mpich-discuss mailing list