[mpich-discuss] Waiting for spawned processes to call MPI_Finalize?

Dorier, Matthieu mdorier at anl.gov
Fri Feb 17 08:45:56 CST 2017


Thanks! There is no way to do this with modifying the child application's code, then, right?

Mattthieu
________________________________
From: Bland, Wesley [wesley.bland at intel.com]
Sent: Friday, February 17, 2017 8:39 AM
To: <discuss at mpich.org>
Subject: Re: [mpich-discuss] Waiting for spawned processes to call MPI_Finalize?

You could use MPI_Comm_disconnect. The description is in the 3.1 standard p. 398:


This function waits for all pending communication on comm to complete internally, deallocates the communicator object, and sets the handle to MPI_COMM_NULL. It is a collective operation.

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.

On Feb 17, 2017, at 7:58 AM, Dorier, Matthieu <mdorier at anl.gov<mailto:mdorier at anl.gov>> wrote:

Hi,

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?

Thanks,

Matthieu
_______________________________________________
discuss mailing list     discuss at mpich.org<mailto:discuss at mpich.org>
To manage subscription options or unsubscribe:
https://lists.mpich.org/mailman/listinfo/discuss

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpich.org/pipermail/discuss/attachments/20170217/ce27e452/attachment.html>
-------------- next part --------------
_______________________________________________
discuss mailing list     discuss at mpich.org
To manage subscription options or unsubscribe:
https://lists.mpich.org/mailman/listinfo/discuss


More information about the discuss mailing list