[mpich-discuss] Waiting for spawned processes to call MPI_Finalize?
Bland, Wesley
wesley.bland at intel.com
Fri Feb 17 09:19:07 CST 2017
It's a minor modification to add the MPI_Comm_disconnect, but yes, it's a modification. I'm not sure of another easy way while staying inside MPI. You could probably do some sort of tricks with some wrapper scripts.
On Feb 17, 2017, at 8:45 AM, Dorier, Matthieu <mdorier at anl.gov<mailto:mdorier at anl.gov>> wrote:
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<mailto:wesley.bland at intel.com>]
Sent: Friday, February 17, 2017 8:39 AM
To: <discuss at mpich.org<mailto: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
_______________________________________________
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/226bec2a/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