[Mpi-forum] Question about MPI_Info set on communicators

Jeff Squyres (jsquyres) jsquyres at cisco.com
Wed Feb 17 17:13:27 CST 2016


-----Original Message-----
From: Schulz Martin <schulzm at llnl.gov>
Reply: Main MPI Forum mailing list <mpi-forum at lists.mpi-forum.org>
Date: February 17, 2016 at 5:42:34 PM
To: Main MPI Forum mailing list <mpi-forum at lists.mpi-forum.org>, Jeff Hammond <jeff.science at gmail.com>
Subject:  Re: [Mpi-forum] Question about MPI_Info set on communicators

> >See my reply to Jim: if we're supposed to provide the value of *the
> >hint*, that to me sounds like the *user's input* (as opposed to what the
> >system chose to do with that hint).
>  
> I agree, hints are given by the user to express what an application does.
> Those should never be changed by the MPI library (or no are no longer
> (user) hints).

Even if the MPI implementation should never change the value of these hints, my original question still stands, because MPI_COMM_GET_INFO's use of the phrase "actually used by the system" is still ambiguous (MPI-3.1 p250):

-----
// Assume that the MPI implementation understands the "foo" info key hint, but
// is unable to apply it after a communicator is created.
MPI_Info_set(myinfo, "foo", "yes");
MPI_Comm_set_info(comm, myinfo);
MPI_Comm_get_info(comm, myinfo_returned);
------

So I still don't have a definitive answer as to what is in myinfo_returned:

1. "foo" = "yes", because that's what the user set, and the MPI implementation understood the "foo" hint key (regardless of what it chose to do with that hint)
  --> This is what I think should happen

2. "foo" = "no", because the MPI implementation wasn't able to use the "foo" hint
  --> There's at least 2 explicit votes against this behavior (JeffSq, Martin)

3. no "foo" key is set, because the MPI implementation wasn't able to use the "foo" hint
  --> I'm not a big fan of this, because you can't tell the difference between "foo is not understood by the implementation" and "foo is understood by the implementation, but this hint can't be used right now".

=========

Regardless of what is returned by MPI_COMM_GET_INFO, what happens in MPI_COMM_DUP?

The "actually used by the system" ambiguous phrase only applies to MPI_COMM_GET_INFO.  MPI_COMM_DUP is defined in MPI-3.1 p238:

   "MPI_COMM_DUP duplicates the existing communicator comm with ... info hints."

It doesn't have any scoping language about *which* hints are copied -- it pretty much implies that *all* hints are copied.

As such, I think that "foo"="yes" should be propagated to the new communicator.

Which is another reason that I think that MPI_COMM_GET_INFO should also return "foo"="yes" in myinfo_returned (i.e., so that MPI_COMM_GET_INFO and MPI_COMM_DUP both behave the same way).

Thoughts?

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


More information about the mpi-forum mailing list