<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;">
<div>
<div>
<div>IIUC, this would break code that uses MPI_COMM_WORLD as a static initializer, e.g., to initialize a global variable like "MPI_Comm mycomm = MPI_COMM_WORLD".</div>
<div><br>
</div>
<div>Why can't the handles themselves be compile-time constants corresponding to objects that are not created until the library is initialized (how it works now)? Note that such handles are defined to be compile-time constants. I don't know that they necessarily
correspond to symbols that you can take an address of.</div>
<div><br>
</div>
<div> ~Jim.</div>
<div>
<div id="MAC_OUTLOOK_SIGNATURE"></div>
</div>
</div>
</div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:12pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>intel <<a href="mailto:intel-bounces@lists.mpich.org">intel-bounces@lists.mpich.org</a>> on behalf of "Bland, Wesley" <<a href="mailto:wesley.bland@intel.com">wesley.bland@intel.com</a>><br>
<span style="font-weight:bold">Date: </span>Tuesday, October 31, 2017 at 10:16 AM<br>
<span style="font-weight:bold">To: </span>"<a href="mailto:devel@mpich.org">devel@mpich.org</a>" <<a href="mailto:devel@mpich.org">devel@mpich.org</a>><br>
<span style="font-weight:bold">Cc: </span>"<a href="mailto:intel@mpich.org">intel@mpich.org</a>" <<a href="mailto:intel@mpich.org">intel@mpich.org</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [mpich-intel] [mpich-devel] Sessions Considering Changing MPI_COMM_WORLD<br>
</div>
<div><br>
</div>
<blockquote id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" style="BORDER-LEFT: #b5c4df 5 solid; PADDING:0 0 0 5; MARGIN:0 0 0 5;">
<div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div class="">I misrepresented what I was trying to say here I think. I don't believe it's necessary to remove the symbol MPI_COMM_WORLD. What it does change (at least for MPICH-derived implementations) is that before MPI_INIT(), MPI_COMM_WORLD might be MPI_COMM_NULL
(or something else with no meaning), and after MPI_INIT(), the handle would be changed to something more useful. The fact that the handle would change midstream is what's different.</div>
<div class=""><br class="">
</div>
On Oct 30, 2017, at 5:51 PM, Jeff Hammond <<a href="mailto:jeff.science@gmail.com" class="">jeff.science@gmail.com</a>> wrote:
<div>
<blockquote type="cite" class="">
<div class="">
<div dir="auto" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<br class="">
</div>
<div dir="auto" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
Lots of MPI libraries create their own communicator from the compile-time constant rather than a communicator argument. Breaking even a few of these will ruin MPI’s exhalted reputation in the HPC world.</div>
</div>
</blockquote>
<div><br class="">
</div>
<div>This doesn't prevent the global variable from existing. In fact, if you were blindly using MPI_COMM_WORLD before without checking whether or not MPI was initialized, bad things were going to happen anyway. What this does do is say that if you haven't called
MPI_INIT(), MPI_COMM_WORLD will probably point to MPI_COMM_NULL or something.</div>
<div><br class="">
</div>
<div>Perhaps saying that MPI_COMM_WORLD won't be a compile time constant isn't correct. The better way of saying it is probably that MPI_COMM_WORLD won't evaluate to anything useful until it's filled in during MPI_INIT(). If you end up using the sessions interface
instead, the MPI library never has to create MPI_COMM_WORLD and incur all of the associated startup cost.</div>
<br class="">
<blockquote type="cite" class="">
<div class="">
<div dir="auto" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
The better option is to provide new headers and libraries for sessions that break backwards compatibility. Or just have users opt-in to sessions by not using MPI_COMM_WORLD at all. That way you’re only breaking code that wants this feature rather than many
that don’t.</div>
</div>
</blockquote>
<div><br class="">
</div>
<div>Completely breaking backward compatibility is one option that was considered, but the working group thought that if we did things this way, it would still be possible for legacy codes to work without moving to the new Sessions interface.</div>
<br class="">
<blockquote type="cite" class="">
<div class="">
<div dir="auto" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
What’s your Fortran story? If you don’t have a trivial solution for users of mpif.h, you’ve lost approximately half if MPI’s users.</div>
</div>
</blockquote>
</div>
<br class="">
<div class="">I think it's similar to what it is now. MPI_COMM_WORLD is a global variable that has no meaning until MPI_INIT() is called.</div>
</div>
</div>
</blockquote>
</span>
</body>
</html>