George,
this is now fixed by commit 05140df1e66ad3a5d6449d339244580f4b36d872
/* i wanted to silence a false positive and introduce a bug, shame on me
... */
the original code basically did
if( MPI_ERR_IN_STATUS == err ) {
/* At least we know the error was detected during the wait_all */
int err_index = 1;
if( MPI_SUCCESS == statuses[0].MPI_ERROR ) {
err_index = 0;
}
err = statuses[err_index].MPI_ERROR;
return err;
}
is this really correct ?
i mean should it rather be
if( MPI_ERR_IN_STATUS == err ) {
/* At least we know the error was detected during the wait_all */
int err_index = 0;
if( MPI_SUCCESS == statuses[0].MPI_ERROR ) {
err_index = 1;
}
err = statuses[err_index].MPI_ERROR;
return err;
}
Cheers,
Gilles
On 2015/02/23 23:23, George Bosilca wrote:
> Please revert this fix. I don’t know what you’re trying to fix (Coverity CID
> 1269934), but you altered the meaning of the code (regarding the
> MPI_ERR_IN_STATUS return code) and remove meaningful comments. Btw the
> original fix was useless as a call to recv could not return MPI_ERR_IN_STATUS
> (as this code is reserved for functions handling multiple requests).
>
> George.
>
>
>> On Feb 22, 2015, at 23:45 , [email protected] wrote:
>>
>> This is an automated email from the git hooks/post-receive script. It was
>> generated because a ref change was pushed to the repository containing
>> the project "open-mpi/ompi".
>>
>> The branch, master has been updated
>> via 004160f8da97be1f29aefeaaa51cf52298e0d3a4 (commit)
>> from 4c91bdfb0c106f66590aa20b245946dea4af6d61 (commit)
>>
>> Those revisions listed above that are new to this repository have
>> not appeared on any other notification email; so we list those
>> revisions in full, below.
>>
>> - Log -----------------------------------------------------------------
>> https://github.com/open-mpi/ompi/commit/004160f8da97be1f29aefeaaa51cf52298e0d3a4
>>
>> commit 004160f8da97be1f29aefeaaa51cf52298e0d3a4
>> Author: Gilles Gouaillardet <[email protected]>
>> Date: Mon Feb 23 13:45:23 2015 +0900
>>
>> coll/tuned: silence CID 1269934
>>
>> diff --git a/ompi/mca/coll/tuned/coll_tuned_barrier.c
>> b/ompi/mca/coll/tuned/coll_tuned_barrier.c
>> index 8002a74..455e7e1 100644
>> --- a/ompi/mca/coll/tuned/coll_tuned_barrier.c
>> +++ b/ompi/mca/coll/tuned/coll_tuned_barrier.c
>> @@ -69,8 +69,6 @@ ompi_coll_tuned_sendrecv_zero(int dest, int stag,
>> /* post new irecv */
>> err = MCA_PML_CALL(irecv( NULL, 0, MPI_BYTE, source, rtag,
>> comm, &reqs[0]));
>> - /* try to silence CID 1269934 */
>> - assert( MPI_ERR_IN_STATUS != err );
>> if (err != MPI_SUCCESS) { line = __LINE__; goto error_handler; }
>>
>> /* send data to children */
>> @@ -79,15 +77,6 @@ ompi_coll_tuned_sendrecv_zero(int dest, int stag,
>> if (err != MPI_SUCCESS) { line = __LINE__; goto error_handler; }
>>
>> err = ompi_request_wait_all( 2, reqs, statuses );
>> - if (err != MPI_SUCCESS) { line = __LINE__; goto error_handler; }
>> -
>> - return (MPI_SUCCESS);
>> -
>> - error_handler:
>> - /* As we use wait_all we will get MPI_ERR_IN_STATUS which is not an
>> error
>> - * code that we can propagate up the stack. Instead, look for the real
>> - * error code from the MPI_ERROR in the status.
>> - */
>> if( MPI_ERR_IN_STATUS == err ) {
>> /* At least we know the error was detected during the wait_all */
>> int err_index = 1;
>> @@ -98,13 +87,18 @@ ompi_coll_tuned_sendrecv_zero(int dest, int stag,
>> OPAL_OUTPUT ((ompi_coll_tuned_stream, "%s:%d: Error %d occurred in
>> the %s"
>> " stage of
>> ompi_coll_tuned_sendrecv_zero\n",
>> __FILE__, line, err, (0 == err_index ? "receive" :
>> "send")));
>> - } else {
>> - /* Error discovered during the posting of the irecv or isend,
>> - * and no status is available.
>> - */
>> - OPAL_OUTPUT ((ompi_coll_tuned_stream, "%s:%d: Error %d occurred\n",
>> - __FILE__, line, err));
>> + return MPI_ERR_IN_STATUS;
>> }
>> + if (err != MPI_SUCCESS) { line = __LINE__; goto error_handler; }
>> +
>> + return (MPI_SUCCESS);
>> +
>> + error_handler:
>> + /* Error discovered during the posting of the irecv or isend,
>> + * and no status is available.
>> + */
>> + OPAL_OUTPUT ((ompi_coll_tuned_stream, "%s:%d: Error %d occurred\n",
>> + __FILE__, line, err));
>> return err;
>> }
>>
>>
>>
>> -----------------------------------------------------------------------
>>
>> Summary of changes:
>> ompi/mca/coll/tuned/coll_tuned_barrier.c | 28 +++++++++++-----------------
>> 1 file changed, 11 insertions(+), 17 deletions(-)
>>
>>
>> hooks/post-receive
>> --
>> open-mpi/ompi
>> _______________________________________________
>> ompi-commits mailing list
>> [email protected]
>> http://www.open-mpi.org/mailman/listinfo.cgi/ompi-commits
> _______________________________________________
> devel mailing list
> [email protected]
> Subscription: http://www.open-mpi.org/mailman/listinfo.cgi/devel
> Link to this post:
> http://www.open-mpi.org/community/lists/devel/2015/02/17020.php