<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">There’s been a lot of churn on the TAG_UB code in the last year or two, but I think it finally stabilized last October with this pull request:<div class=""><br class=""></div><div class=""><a href="https://github.com/pmodels/mpich/pull/3111" class="">https://github.com/pmodels/mpich/pull/3111</a></div><div class=""><br class=""></div><div class="">Jeff was right. The value of TAG_UB will depend on a lot of things, but if you use the exact same configuration, hardware, and environment variables from run to run, it should be the same value every time. As long as your application is querying the value instead of assuming a static value, you’ll be fine.<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Apr 27, 2019, at 11:20 AM, Jeff Hammond via discuss <<a href="mailto:discuss@mpich.org" class="">discuss@mpich.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><br class=""></div><div class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Apr 26, 2019 at 12:18 PM Wei-keng Liao via discuss <<a href="mailto:discuss@mpich.org" class="">discuss@mpich.org</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">According to MPI 3.1, Section 8.1.2, the attribute value of<br class="">
MPI_TAG_UB attached to MPI_COMM_WORLD can be inquired by function<br class="">
MPI_Comm_get_attr(). It has the same value on all processes of<br class="">
MPI_COMM_WORLD.<br class="">
<br class="">
My first question is should this value be the same across different runs?</blockquote><div dir="auto" class=""><br class=""></div><div dir="auto" class="">I would expect it to be the same when running with the same options. It is possible that it will change for different numbers of processes. It is also possible that it changes based upon the network or which back-end is used (eg libfabric provider).</div><div dir="auto" class=""><br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br class="">
A small test program using MPICH 3.3 shows they are not the same across<br class="">
runs and across processes. But when compiled with the latest master branch,<br class="">
they are the same. So, can I assume the answer to my question is YES and<br class="">
MPICH has fixed this in the master branch?<br class="">
<br class="">
My second question is that I notice MPI_TAG_UB is defined as a constant<br class="">
of 0x64400001 (=1681915905) in mpi.h. That value is not the one returned<br class="">
by MPI_Comm_get_attr(), which is 10345120. Is this intended?<br class="">
</blockquote><div dir="auto" class=""><br class=""></div><div dir="auto" class="">I don’t think that’s the value but the key used to query it. You need to call get_attr rather than look at this value. The key is meaningless by itself.</div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">Jeff</div><div dir="auto" class=""><br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br class="">
I also tested OpenMPI 4.0.0. The inconsistency occurs across different<br class="">
runs, as well as different processes. I can see OpenMPI defines<br class="">
MPI_TAG_UB as an enum type, rather than a constant.<br class="">
<br class="">
Wei-keng<br class="">
<br class="">
_______________________________________________<br class="">
discuss mailing list <a href="mailto:discuss@mpich.org" target="_blank" class="">discuss@mpich.org</a><br class="">
To manage subscription options or unsubscribe:<br class="">
<a href="https://lists.mpich.org/mailman/listinfo/discuss" rel="noreferrer" target="_blank" class="">https://lists.mpich.org/mailman/listinfo/discuss</a><br class="">
</blockquote></div></div>-- <br class=""><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">Jeff Hammond<br class=""><a href="mailto:jeff.science@gmail.com" target="_blank" class="">jeff.science@gmail.com</a><br class=""><a href="http://jeffhammond.github.io/" target="_blank" class="">http://jeffhammond.github.io/</a></div>
_______________________________________________<br class="">discuss mailing list <a href="mailto:discuss@mpich.org" class="">discuss@mpich.org</a><br class="">To manage subscription options or unsubscribe:<br class=""><a href="https://lists.mpich.org/mailman/listinfo/discuss" class="">https://lists.mpich.org/mailman/listinfo/discuss</a><br class=""></div></blockquote></div><br class=""></div></body></html>