Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: Re: [OMPI devel] [OMPI svn-full] svn:open-mpi r18607
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2008-06-16 11:15:25


Which tests are you referring to?

On Jun 16, 2008, at 11:09 AM, George Bosilca wrote:

>
> On Jun 16, 2008, at 10:58 AM, Jeff Squyres wrote:
>
>>> I completely agree that we should follow the standard to the
>>> greatest possible extend, but then at least we should have our
>>> test codes following the same guidelines. It doesn't means I
>>> volunteer for anything ...
>>
>> I'm not sure what you mean by that...?
>
> I simply emphasized that most of the tests we're using expect
> MPI_ERROR to be set even after MPI_Wait and MPI_Test. I was amazed
> that we use tests that are not standard compliant.
>
> george.
>
>> The spec clearly states that the singular MPI_TEST* and MPI_WAIT*
>> functions should not edit the MPI_ERROR field in the status.
>>
>>>
>>> george.
>>>
>>>
>>>>
>>>>
>>>>
>>>> On Jun 9, 2008, at 10:44 AM, George Bosilca wrote:
>>>>
>>>>> Rainer,
>>>>>
>>>>> The snippet from the MPICH2 is irrelevant to the current
>>>>> discussion.
>>>>> It only concern set empty status. A quick grep in the MPICH2
>>>>> source
>>>>> code (find . -name "*.[ch]" -exec grep -Hn MPI_ERROR {} \;) shows
>>>>> that they ALWAYS set the MPI_ERROR field in the status if they
>>>>> detect something wrong.
>>>>>
>>>>> george.
>>>>>
>>>>> On Jun 9, 2008, at 4:17 AM, Rainer Keller wrote:
>>>>>
>>>>>> Hi,
>>>>>> that's one of the mysteries of the MPI-1 standard.
>>>>>>
>>>>>> Nevertheless, we should be std. conforming. Therefore, I included
>>>>>> the comment
>>>>>> and omitted the setting of .MPI_ERROR.
>>>>>>
>>>>>> MPIch2 does not for the same reasons. Therefore I would say the
>>>>>> tests are
>>>>>> wrong.
>>>>>>
>>>>>> With best regards,
>>>>>> Rainer
>>>>>>
>>>>>>
>>>>>> PS: e.g. from mpich2-1.0.7:
>>>>>> include/mpiimpl.h:2112
>>>>>> /* Do not set MPI_ERROR (only set if ERR_IN_STATUS is returned */
>>>>>> #define MPIR_Status_set_empty(status_) \
>>>>>> { \
>>>>>> if ((status_) != MPI_STATUS_IGNORE) \
>>>>>> { \
>>>>>> (status_)->MPI_SOURCE = MPI_ANY_SOURCE; \
>>>>>> (status_)->MPI_TAG = MPI_ANY_TAG; \
>>>>>> (status_)->count = 0; \
>>>>>> (status_)->cancelled = FALSE; \
>>>>>> } \
>>>>>> }
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Sonntag, 8. Juni 2008, George Bosilca wrote:
>>>>>>> Here is what the MPI standard state:
>>>>>>>
>>>>>>> "In general, message passing calls do not modify the value of
>>>>>>> the
>>>>>>> error code field of status variables. This field may be
>>>>>>> updated only
>>>>>>> by the functions in Section 3.7.5 which return multiple
>>>>>>> statuses.
>>>>>>> The
>>>>>>> field is updated if and only if such function returns with an
>>>>>>> error
>>>>>>> code of MPI ERR IN STATUS.
>>>>>>>
>>>>>>> Rationale. The error field in status is not needed for calls
>>>>>>> that
>>>>>>> return only one status, such as MPI WAIT, since that would only
>>>>>>> duplicate the information returned by the function itself. The
>>>>>>> current
>>>>>>> design avoids the additional overhead of setting it, in such
>>>>>>> cases.
>>>>>>> The field is needed for calls that return multiple statuses,
>>>>>>> since
>>>>>>> each request may have had a different failure. (End of
>>>>>>> rationale.)"
>>>>>>>
>>>>>>> First, the sentence start with "In general" which is not a
>>>>>>> limiting
>>>>>>> statement, it absolutely doesn't state that the field doesn't
>>>>>>> have
>>>>>>> to
>>>>>>> be set. Second, the reason cited in the rationale is completely
>>>>>>> fake.
>>>>>>> We're talking about one store instruction, while the simple
>>>>>>> usage of
>>>>>>> the status will generate a cache miss.
>>>>>>>
>>>>>>> On the other side, a simple grep in the ompi-tests shows that
>>>>>>> hundreds
>>>>>>> of tests use this MPI_ERROR over the return value. If test
>>>>>>> writers
>>>>>>> (which are supposed to know the standard quite well), do such
>>>>>>> things,
>>>>>>> I wonder how can we expect that the users will never do it.
>>>>>>>
>>>>>>> george.
>>>>>>>
>>>>>>> On Jun 6, 2008, at 12:04 PM, Brian Barrett wrote:
>>>>>>>> Since this is not the first or second time we've had the
>>>>>>>> discussion in
>>>>>>>> the group, perhaps a comment in the code would be a good
>>>>>>>> idea :).
>>>>>>>>
>>>>>>>> Brian
>>>>>>>>
>>>>>>>> On Jun 6, 2008, at 9:58 AM, Jeff Squyres wrote:
>>>>>>>>> George --
>>>>>>>>>
>>>>>>>>> This is not correct. Note the comment that says to see
>>>>>>>>> MPI-1.2
>>>>>>>>> section 3.2.5 page 22 (I think it means MPI-1.1). It says:
>>>>>>>>>
>>>>>>>>> "In general, message passing calls do not modify the value
>>>>>>>>> of the
>>>>>>>>> error code field of status variables. This field may be
>>>>>>>>> updated
>>>>>>>>> only
>>>>>>>>> by the functions in Section 3.7.5 which return multiple
>>>>>>>>> statuses."
>>>>>>>>>
>>>>>>>>> So we should not be setting status.MPI_ERROR here; you should
>>>>>>>>> check
>>>>>>>>> the return value from MPI_WAIT to get the error code.
>>>>>>>>>
>>>>>>>>> On Jun 6, 2008, at 11:53 AM, bosilca_at_[hidden] wrote:
>>>>>>>>>> Author: bosilca
>>>>>>>>>> Date: 2008-06-06 11:53:17 EDT (Fri, 06 Jun 2008)
>>>>>>>>>> New Revision: 18607
>>>>>>>>>> URL: https://svn.open-mpi.org/trac/ompi/changeset/18607
>>>>>>>>>>
>>>>>>>>>> Log:
>>>>>>>>>> Update the MPI_ERROR field as well.
>>>>>>>>>>
>>>>>>>>>> Text files modified:
>>>>>>>>>> trunk/ompi/request/req_wait.c | 1 +
>>>>>>>>>> 1 files changed, 1 insertions(+), 0 deletions(-)
>>>>>>>>>>
>>>>>>>>>> Modified: trunk/ompi/request/req_wait.c
>>>>>>>>>> =
>>>>>>>>>> =
>>>>>>>>>> =
>>>>>>>>>> =
>>>>>>>>>> =
>>>>>>>>>> =
>>>>>>>>>> =
>>>>>>>>>> =
>>>>>>>>>> =
>>>>>>>>>> =
>>>>>>>>>> =
>>>>>>>>>> =
>>>>>>>>>> =
>>>>>>>>>> =
>>>>>>>>>> =
>>>>>>>>>> =
>>>>>>>>>> =
>>>>>>>>>> =============================================================
>>>>>>>>>> --- trunk/ompi/request/req_wait.c (original)
>>>>>>>>>> +++ trunk/ompi/request/req_wait.c 2008-06-06 11:53:17 EDT
>>>>>>>>>> (Fri,
>>>>>>>>>> 06
>>>>>>>>>> Jun 2008)
>>>>>>>>>> @@ -50,6 +50,7 @@
>>>>>>>>>> /* See MPI-1.2, sec 3.2.5, p.22 */
>>>>>>>>>> status->MPI_TAG = req->req_status.MPI_TAG;
>>>>>>>>>> status->MPI_SOURCE = req->req_status.MPI_SOURCE;
>>>>>>>>>> + status->MPI_ERROR = req->req_status.MPI_ERROR;
>>>>>>>>>> status->_count = req->req_status._count;
>>>>>>>>>> status->_cancelled = req->req_status._cancelled;
>>>>>>>>>> }
>>>>>>>>>> _______________________________________________
>>>>>>>>>> svn-full mailing list
>>>>>>>>>> svn-full_at_[hidden]
>>>>>>>>>> http://www.open-mpi.org/mailman/listinfo.cgi/svn-full
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Jeff Squyres
>>>>>>>>> Cisco Systems
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> devel mailing list
>>>>>>>>> devel_at_[hidden]
>>>>>>>>> http://www.open-mpi.org/mailman/listinfo.cgi/devel
>>>>>>>>
>>>>>>>> --
>>>>>>>> Brian Barrett
>>>>>>>> Open MPI developer
>>>>>>>> http://www.open-mpi.org/
>>>>>>>>
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> devel mailing list
>>>>>>>> devel_at_[hidden]
>>>>>>>> http://www.open-mpi.org/mailman/listinfo.cgi/devel
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> ----------------------------------------------------------------
>>>>>> Dipl.-Inf. Rainer Keller http://www.hlrs.de/people/keller
>>>>>> HLRS Tel: ++49 (0)711-685 6 5858
>>>>>> Nobelstrasse 19 Fax: ++49 (0)711-685 6 5832
>>>>>> 70550 Stuttgart email: keller_at_[hidden]
>>>>>> Germany AIM/Skype:rusraink
>>>>>
>>>>> _______________________________________________
>>>>> devel mailing list
>>>>> devel_at_[hidden]
>>>>> http://www.open-mpi.org/mailman/listinfo.cgi/devel
>>>>
>>>>
>>>> --
>>>> Jeff Squyres
>>>> Cisco Systems
>>>>
>>>> _______________________________________________
>>>> devel mailing list
>>>> devel_at_[hidden]
>>>> http://www.open-mpi.org/mailman/listinfo.cgi/devel
>>>
>>> _______________________________________________
>>> devel mailing list
>>> devel_at_[hidden]
>>> http://www.open-mpi.org/mailman/listinfo.cgi/devel
>>
>>
>> --
>> Jeff Squyres
>> Cisco Systems
>>
>> _______________________________________________
>> devel mailing list
>> devel_at_[hidden]
>> http://www.open-mpi.org/mailman/listinfo.cgi/devel
>
> _______________________________________________
> devel mailing list
> devel_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/devel

-- 
Jeff Squyres
Cisco Systems