Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

From: Josh Hursey (jjhursey_at_[hidden])
Date: 2007-04-20 16:05:01


Yeah I was not actually sure what the standard said about passing an
array of requests and having one of the elements be NULL. This just
seemed like a subtle bug when I was looking through the code.

Taking a quick look at the check in mpi/c/startall.c it seems that we
do check for this case there and error out if any element is NULL, so
I agree that we can just remove this from the file. If no one gets to
it before tomorrow sometime (or there are objections) then I'll take
the NULL check out.

Cheers,
Josh

On Apr 20, 2007, at 3:28 PM, George Bosilca wrote:

> I think the NULL test is a left over from long ago. At one point in
> the
> past we decided that all MPI related tests have to be done outside
> the PML
> functions (i.e. in the MPI layer). The test for request == NULL is
> present
> in the start.c and startall.c. Anywhere else (i.e. where we use
> internally
> the pml_start call) we can make sure that this doesn't happens.
> Therefore,
> the test can be safely removed from the startall function.
>
> george.
>
>
> On Fri, 20 Apr 2007, jjhursey_at_[hidden] wrote:
>
>> Author: jjhursey
>> Date: 2007-04-20 13:17:11 EDT (Fri, 20 Apr 2007)
>> New Revision: 14444
>> URL: https://svn.open-mpi.org/trac/ompi/changeset/14444
>>
>> Log:
>> Check for NULL before trying to use the variable.
>>
>>
>> Text files modified:
>> trunk/ompi/mca/pml/ob1/pml_ob1_start.c | 4 ++--
>> 1 files changed, 2 insertions(+), 2 deletions(-)
>>
>> Modified: trunk/ompi/mca/pml/ob1/pml_ob1_start.c
>> =====================================================================
>> =========
>> --- trunk/ompi/mca/pml/ob1/pml_ob1_start.c (original)
>> +++ trunk/ompi/mca/pml/ob1/pml_ob1_start.c 2007-04-20 13:17:11 EDT
>> (Fri, 20 Apr 2007)
>> @@ -32,11 +32,11 @@
>>
>> for(i=0; i<count; i++) {
>> mca_pml_base_request_t *pml_request =
>> (mca_pml_base_request_t*)requests[i];
>> + if(NULL == pml_request)
>> + continue;
>> if (OMPI_REQUEST_PML != requests[i]->req_type) {
>> continue;
>> }
>> - if(NULL == pml_request)
>> - continue;
>>
>> /* If the persistent request is currently active - obtain the
>> * request lock and verify the status is incomplete. if the
>> _______________________________________________
>> svn mailing list
>> svn_at_[hidden]
>> http://www.open-mpi.org/mailman/listinfo.cgi/svn
>>
>
> "We must accept finite disappointment, but we must never lose infinite
> hope."
> Martin Luther King
>
> _______________________________________________
> devel mailing list
> devel_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/devel

----
Josh Hursey
jjhursey_at_[hidden]
http://www.open-mpi.org/