<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hi all,<br>
    <br>
    I have agreed to co-ordinate the word-smithing for MPI_ALIASED.<br>
    <br>
    Note that we do not need to adjust the return values for
    MPI_GROUP_COMPARE due to end-points because all handles to any
    particular communicator (whether containing multiple local
    end-points or not) will reference exactly the same group, i.e.
    MPI_IDENT covers this case.<br>
    <br>
    This is the current text for MPI_COMM_COMPARE (MPI-3.0 p237 lines
    20-25):<br>
    <br>
    MPI_IDENT results if and only if comm1 and comm2 are handles for the
    same object (identical<br>
    groups and same contexts). MPI_CONGRUENT results if the underlying
    groups are identical<br>
    in constituents and rank order; these communicators differ only by
    context. MPI_SIMILAR<br>
    results if the group members of both communicators are the same but
    the rank order differs.<br>
    MPI_UNEQUAL results otherwise.<br>
    <br>
    Here's suggested new text for MPI_COMM_COMPARE:<br>
    <br>
    MPI_IDENT results if comm1 and comm2 are handles for the same rank
    in the same communicator (same rank, identical groups, and same
    contexts).<br>
    MPI_ALIASED results if comm1 and comm2 are handles for different
    ranks in the same communicator (different ranks, identical groups,
    and same contexts).<br>
    MPI_CONGRUENT results if the underlying groups are identical in
    constituents and rank order; these communicators differ only by
    context.<br>
    MPI_SIMILAR results if the group members of both communicators are
    the same but the rank order differs.<br>
    MPI_UNEQUAL results otherwise.<br>
    <br>
    <br>
    I should probably stop there but having thought about this wording a
    bit more (in particular, should "these communicators differ" in the
    MPI_CONGRUENT explanation be changed to "these communicator handles
    differ"?) I have a few further edge-cases for consideration and
    discussion:<br>
    <br>
    1) create an endpoints comm with 2 local endpoints (called
    comm1[2]), duplicate it (called comm2[2]).<br>
    1a) compare handle 0 from the first (comm1[0]) with handle 0 from
    the duplicate (comm2[0]), result is MPI_CONGRUENT.<br>
    1b) compare handle 0 from the first (comm1[0]) with handle 1 from
    the duplicate (comm2[1]), result is MPI_CONGRUENT (but with
    different ranks).<br>
    <br>
    MPI_COMM comm1[2], comm2[2];<br>
    MPI_COMM_CREATE_ENDPOINTS(parent:=MPI_COMM_WORLD, my_num_ep:=2,
    &comm1[0])<br>
    #pragma OMP parallel<br>
    {<br>
    MPI_COMM_DUP(comm1[omp_thread_num()], &comm2[omp_thread_num()])<br>
    }<br>
    MPI_COMM_COMPARE(comm1[0], comm2[0], &resultA) // case 1a:
    resultA is MPI_CONGRUENT<br>
    MPI_COMM_COMPARE(comm1[0], comm2[1], &resultB) // case 1b:
    resultB is MPI_CONGRUENT but could be MPI_CONGRUENT_ALIAS (or
    similar)<br>
    <br>
    The handles in case 1a refer to the same endpoint via two different
    groups but in case 1b they refer to two different endpoints. Is this
    distinction important?<br>
    If so, we could change:<br>
    MPI_CONGRUENT results if the underlying groups are identical in
    constituents and rank order; these communicators differ only by
    context.<br>
    to:<br>
    MPI_CONGRUENT results if the underlying groups are identical in
    constituents and rank order; these communicator handles differ only
    by context.<br>
    and add:<br>
    MPI_CONGRUENT_ALIAS results if the underlying groups are identical
    in constituents and rank order; these communicator handles differ by
    context and by rank.<br>
    <br>
    2) create an endpoints comm with 2 local endpoints (called
    comm1[2]), use MPI_COMM_SPLIT to permute the local ranks (called
    comm2[2]).<br>
    2a) compare handle 0 from the first (comm1[0]) with handle 0 from
    the other (comm2[0]), result is MPI_SIMILAR (but with different
    ranks).<br>
    2b) compare handle 0 from the first (comm1[0]) with handle 1 from
    the other (comm2[1]), result is MPI_SIMILAR.<br>
    <br>
    The handles in case 2a refer to two different endpoints but in case
    2b they refer to the same endpoint via two different groups. Is this
    distinction important?<br>
    If so, we could change:<br>
    MPI_SIMILAR results if the group members of both communicators are
    the same but the rank order differs.<br>
    to:<br>
    MPI_SIMILAR results if the underlying groups are similar (the
    members are the same but the order is different) and the two
    communicator handles refer to the same endpoint.<br>
    and add:<br>
    MPI_SIMILAR_ALIAS results if the underlying groups are similar (the
    members are the same but the order is different) and the two
    communicator handles refer to different endpoints.<br>
    <br>
    3) rinse and repeat for MPI_UNEQUAL and MPI_UNEQUAL_ALIAS<br>
    <br>
    <br>
    This comparison function is now attempting to say something about
    three properties at the same time:<br>
    <ul>
      <li>are the two communicators using the same context?<br>
      </li>
      <li>are the two underlying groups MPI_IDENT, MPI_SIMILAR or
        MPI_UNEQUAL?</li>
      <li>are the two communicator handles referring to the same
        endpoint?<br>
      </li>
    </ul>
    If the two communicators have the same context then the two groups
    must be identical but the communicator handles could still refer to
    identical/different endpoints (two possibilities, MPI_IDENT and
    MPI_ALIASED).<br>
    If the two communicators have different contexts then the two groups
    could be identical, similar or unequal and the communicator handles
    could refer to identical/different endpoints (six possibilities,
    MPI_CONGRUENT, MPI_CONGRUENT_ALIAS, MPI_SIMILAR, MPI_SIMILAR_ALIAS,
    MPI_UNEQUAL and MPI_UNEQUAL_ALIAS).<br>
    <br>
    Whether two communicator handles refer to the same endpoint or to
    different endpoints is entirely orthogonal to whether the two
    communicators are identical, congruent, similar or unequal. We are
    proposing that these two be combined into one query function for
    convenience.<br>
    <br>
    Cheers,<br>
    Dan.<br>
    <pre class="moz-signature" cols="72">-- 
Dan Holmes
Applications Consultant in HPC Research
EPCC, The University of Edinburgh
James Clerk Maxwell Building
The Kings Buildings
Mayfield Road
Edinburgh, UK
EH9 3JZ
T: +44(0)131 651 3465
E: <a class="moz-txt-link-abbreviated" href="mailto:dholmes@epcc.ed.ac.uk">dholmes@epcc.ed.ac.uk</a>

*Please consider the environment before printing this email.*</pre>
  </body>
</html>