[mpich-discuss] uninitialized MPI_request in ad_write_coll.c and ad_rea_coll.c
Rob Ross
rross at mcs.anl.gov
Mon May 12 17:08:57 CDT 2008
Ok thanks. -- Rob
On May 10, 2008, at 11:17 PM, Wei-keng Liao wrote:
>
> Please ignore my earlier post. There is nothing wrong with these 2
> files.
>
> Wei-keng
>
>
> On Sat, 10 May 2008, Wei-keng Liao wrote:
>
>>
>> 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