Re: [Mpi-forum] Question about MPI_Info set on communicators
Another case of email eaten by the server (and I was wondering why you ignored me :) - old email attached below - new comments inline. Martin ________________________________________________________________________ Martin Schulz, [email protected], http://scalability.llnl.gov/ CASC @ Lawrence Livermore National Laboratory, Livermore, USA On 2/16/16, 12:49 PM, "mpi-forum on behalf of Jeff Squyres (jsquyres)" <[email protected] on behalf of [email protected]> wrote:
-----Original Message----- From: Jeff Hammond <[email protected]> Reply: Main MPI Forum mailing list <[email protected]> Date: February 16, 2016 at 2:37:57 PM To: Main MPI Forum mailing list <[email protected]> Subject: Re: [Mpi-forum] Question about MPI_Info set on communicators
- "yes" because the user asked for it (i.e., that's the hint, regardless of what the implementation dos with it.
This answer contradicts the most reasonable interpretation of "hints actually used by the system"
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).
- "no" because the implementation could not provide it - no "foo" key at all because the implementation did not use the hint
I think these are equivalent from a user perspective. In both cases, the user is not getting the "magical_powers"="yes" they requested.
However, my reading of MPI 3.1 6.4.4 p250 says that the keys should be defined, but set to "no".
Ok.
I don¹t read this into the text - it just says that any hint used by the system is returned, those are not used are not. In this case, I would argue that the MPI library does not use the hint and hence it should not be returned. In any case, an MPI library can¹t change a hint - it is not changing what the application wants to tell the library.
In any case, we need to improve the standard text unless Bill swoops in to tell us we are all idiots and points out text that makes the interpretation unambiguous :-)
I agree it needs to be clarified. It would be nice if we could clarify it in a way that is compatible with the 3.0 and 3.1 text (so that we don't have to have apps distinguish between 3.0/3.1 behavior and beyond-3.1 behavior).
I think it¹s a bit strange (I.e., get and set info are not pairs), but it's expressed in the text. I don¹t think we say anywhere in the text (at least I couldn¹t find it) that MPI is supposed to change user defined hints. Back to the old example (that¹s the missing old email): I don¹t think that these two sequences should result in the same behavior.
MPI_Comm_get_info(comm, myinfo_returned); MPI_Comm_dup_with_info(comm, &newcomm, myinfo_returned);
and MPI_Comm_dup(comm, &newcomm);
MPI_Comm_get_info states that a new info object is returned that only contains the hints that are actually used by the communicator. Which hints given by the user are used is, I assume, up to the implementation, but the set can be smaller and not the same with the hints given by the user. When I duplicate a communicator, as a user, I would expect all hints that I gave to be copied as well (I.e., the ones that are set on the communicator), not just the used ones. Back to Jeff¹s example I think the critical part is actually the use of MPI_Comm_get_info: MPI_Info_set(myinfo, "use_shared_memory", "yes"); MPI_Comm_set_info(comm, myinfo); MPI_Comm_get_info(comm, myinfo_returned); // Assume here that there was not enough shared memory available to use shared-memory for // communication on this comm, so MPI_Info_get() tells us that use_shared_memory is "no². This should not return ³no² for ³use_shared_memory² (MPI should never change a user defined hint why would this be the case, they are user set properties), instead ³use_shared_memory² should simply not be present in the returned info object. Nevertheless, the hint is still set on the communicator (why would I, as a user, expect that MPI removes a hint) and so, if you dup the communicator, it should get duplicated as well. If the hint now becomes active (as at the end in Jeff¹s example) MPI_Comm_get_info should include it in the returned info object.
-- Jeff Squyres [email protected] For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/ _______________________________________________ mpi-forum mailing list [email protected] http://secure-web.cisco.com/1tOmvKI1yyCS_mGO20j9isCL5ySWKbNPro0WSEvMJRHaTU 23ypla94_M6gQIGroi6BcOFxLpS5rhu-eI1U3bJl7F0yFSBGQ8R-wRofvFw3aTFAMW6lejH1LL jDWR4K73IRuA0jxBGhkwe67EmwghcKKbntizOt3WrysjB2jsUI0Lnp2HnXqDgTu_j9iq8c8tkv GIM0_IOvsjtTB2bz6tqXNFEy_DEJdGsJiBT253R_5pyyEEQCdvy6ThzPFGrpe_pYyRF19iRSZu OiDtMUpOMBsjThStyjgJSXv-4-rFlr-Z1vEbddhAf9is8Vf9PDIjqQqUkOigEAMSAlMtzUSbeQ 40HMdowaOKVuSOQ9kiQMjI/http%3A%2F%2Flists.mpi-forum.org%2Fmailman%2Flistin fo.cgi%2Fmpi-forum
participants (1)
-
Schulz Martin