<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
You could use MPI_Comm_disconnect. The description is in the 3.1 standard p. 398:
<div class=""><br class="">
</div>
<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class="">
<div class="">
<div class="page" title="Page 430">
<div class="layoutArea">
<div class="column">
<p class=""><span style="font-size: 11.000000pt; font-family: 'CMR10'" class="">This function waits for all pending communication on
</span><span style="font-size: 11.000000pt; font-family: 'CMSS10'" class="">comm </span>
<span style="font-size: 11.000000pt; font-family: 'CMR10'" class="">to complete internally, deallocates the communicator object, and sets the handle to
</span><span style="font-size: 10.000000pt; font-family: 'CMSS10'" class="">MPI</span><span style="font-size: 10.000000pt; font-family: 'CMTT10'" class="">_</span><span style="font-size: 10.000000pt; font-family: 'CMSS10'" class="">COMM</span><span style="font-size: 10.000000pt; font-family: 'CMTT10'" class="">_</span><span style="font-size: 10.000000pt; font-family: 'CMSS10'" class="">NULL</span><span style="font-size: 11.000000pt; font-family: 'CMR10'" class="">.
 It is a collective operation. </span></p>
</div>
</div>
</div>
</div>
</blockquote>
<div class="">
<div class="page" title="Page 430">
<div class="layoutArea">
<div class="column">
<div class=""><br class="">
</div>
<div class="">If you disconnect the communicator from MPI_Comm_get_parent before you call MPI_Finalize and the spawning processes do the same, you should synchronize around the disconnect.</div>
</div>
</div>
</div>
</div>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Feb 17, 2017, at 7:58 AM, Dorier, Matthieu <<a href="mailto:mdorier@anl.gov" class="">mdorier@anl.gov</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; direction: ltr; font-family: Tahoma; color: rgb(51, 51, 153); font-size: 10pt;" class="">
Hi,<br class="">
<br class="">
If I have an application that calls MPI_Comm_spawn, is there a way to make the parent "wait" for the child application to have called MPI_Finalize (or terminated), at some point? The rational would be that MPI_Comm_spawn is sort of an MPI equivalent of "fork/execv",
 but I don't see an equivalent of "wait", in the standard. My feeling is that once a child application is spawned, it is supposed to stay alive until the parent calls MPI_Finalize as well. Am I mistaken?<br class="">
<br class="">
Thanks,<br class="">
<br class="">
Matthieu<br class="">
</div>
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">_______________________________________________</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">discuss
 mailing list     </span><a href="mailto:discuss@mpich.org" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">discuss@mpich.org</a><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">To
 manage subscription options or unsubscribe:</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<a href="https://lists.mpich.org/mailman/listinfo/discuss" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">https://lists.mpich.org/mailman/listinfo/discuss</a></div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>