[mvapich-discuss] bug in mpir_request.c?

Martin Pokorny mpokorny at nrao.edu
Wed Oct 12 16:40:49 EDT 2016


I encountered what might be a bug in mpir_request.c. My test case fails 
with a segfault in a call to MPI_Waitsome with an array of requests that 
has a single user-created generalized request at the start of the array 
otherwise filled with "normal" MPI requests. It looks like the 
conditional that starts on line 588 can fail when 
request_ptrs[i+1]->greq_fns is NULL-valued, which seems to be what 
happens in my case when "i" is zero. For reference, here's the code 
starting on line 588 of mpir_request.c in the mvapich2-2.2 source tarball:
>         if (request_ptrs[i+1] == NULL ||
> 		(request_ptrs[i]->greq_fns->greq_class !=
> 			request_ptrs[i+1]->greq_fns->greq_class) )
>             n_classes += 1;
I was able to work around the problem by putting the generalized request 
at the end of the array. I'm open to the possibility that my test code 
is at fault, but I'm suspicious of the mpir_request.c code, as well.

-- 
Martin


More information about the mvapich-discuss mailing list