On Mar 25, 2013, at 4:59 AM, Дмитрий Донцов <dvdont...@compcenter.org> wrote:

> I've found error in OpenMPI with error codes.

Thanks for investigating this!

> According to MPI standard (2.2 and later):
> MPI_ERR_LASTCODE must be equals to last error code and MPI_LASTUSEDCODE must 
> be greater than or equal to MPI_ERR_LASTCODE.

Hmm.  Can you cite where you see that in the spec?  I see in MPI-3 p349, line 
48:

    0 = MPI_SUCCESS < MPI_ERR_... <= MPI_ERR_LASTCODE

Specifically, it says that MPI_ERR_LASTCODE can be greater than the last error 
code (MPI_ERR_WIN, in this case).

Regardless, I'm just arguing semantics here -- our current value of LASTCODE is 
technically ok (for this reason), but your next argument gives a different 
reason why it's not ok.  :-)

> In OpenMPI MPI_ERR_LASTCODE is greater than real last error code 
> (MPI_ERR_WIN) for 1 and MPI_LASTUSEDCODE hardcoded linked with MPI_ERR_WIN. 
> So, possible situation when MPI_LASTUSEDCODE (equals to MPI_ERR_WIN) is less 
> than MPI_ERR_LASTCODE.

You're right -- I see the definition of MPI_LASTUSEDCODE in MPI-3 p353 27-32, 
and it says that LASTUSEDCODE must be >= MPI_ERR_LASTCODE.

So we have two choices:

1. set MPI_ERR_LASTCODE = MPI_LASTUSEDCODE = MPI_ERR_WIN
2. leave MPI_ERR_LASTCODE = MPI_ERR_WIN + 1, and set MPI_LASTUSEDCODE to 
MPI_ERR_LASTCODE

I'm ok with your solution (#1) -- it doesn't leave a "hole" in the error code 
space when users create their own.

I applied a slightly modified version of your patch in 
https://svn.open-mpi.org/trac/ompi/changeset/28225.  I don't know / doubt if 
this will make 1.7.0, but we can get it in 1.7.1.

Thank you!

-- 
Jeff Squyres
jsquy...@cisco.com
For corporate legal information go to: 
http://www.cisco.com/web/about/doing_business/legal/cri/


Reply via email to