[97] | 1 | .\"Copyright 2006-2008 Sun Microsystems, Inc. |
---|
| 2 | .\"Copyright (c) 1996 Thinking Machines |
---|
| 3 | .TH MPI_Comm_get_parent 3 "Dec 08, 2009" "1.4" "Open MPI" |
---|
| 4 | .SH NAME |
---|
| 5 | \fBMPI_Comm_get_parent\fP \- Returns the parent intercommunicator of current spawned process. |
---|
| 6 | |
---|
| 7 | .SH SYNTAX |
---|
| 8 | .ft R |
---|
| 9 | .SH C Syntax |
---|
| 10 | .nf |
---|
| 11 | #include <mpi.h> |
---|
| 12 | int MPI_Comm_get_parent(MPI_Comm *\fIparent\fP) |
---|
| 13 | |
---|
| 14 | .SH Fortran Syntax |
---|
| 15 | .nf |
---|
| 16 | INCLUDE 'mpif.h' |
---|
| 17 | MPI_COMM_GET_PARENT(\fIPARENT, IERROR\fP) |
---|
| 18 | INTEGER \fIPARENT, IERROR \fP |
---|
| 19 | |
---|
| 20 | .SH C++ Syntax |
---|
| 21 | .nf |
---|
| 22 | #include <mpi.h> |
---|
| 23 | static MPI::Intercomm MPI::Comm::Get_parent() |
---|
| 24 | |
---|
| 25 | |
---|
| 26 | .SH OUTPUT PARAMETERS |
---|
| 27 | .ft R |
---|
| 28 | .TP 1i |
---|
| 29 | parent |
---|
| 30 | The parent communicator (handle). |
---|
| 31 | .TP 1i |
---|
| 32 | IERROR |
---|
| 33 | Fortran only: Error status (integer). |
---|
| 34 | |
---|
| 35 | .SH DESCRIPTION |
---|
| 36 | .ft R |
---|
| 37 | If a process was started with MPI_Comm_spawn or MPI_Comm_spawn_multiple, MPI_Comm_get_parent returns the "parent" intercommunicator of the current process. This parent intercommunicator is created implicitly inside of MPI_Init and is the same intercommunicator returned by the spawn call made in the parents. |
---|
| 38 | .sp |
---|
| 39 | If the process was not spawned, MPI_Comm_get_parent returns MPI_COMM_NULL. |
---|
| 40 | .sp |
---|
| 41 | After the parent communicator is freed or disconnected, MPI_Comm_get_parent returns MPI_COMM_NULL. |
---|
| 42 | |
---|
| 43 | .SH NOTES |
---|
| 44 | .ft R |
---|
| 45 | MPI_Comm_get_parent returns a handle to a single intercommunicator. Calling MPI_Comm_get_parent a second time returns a handle to the same intercommunicator. Freeing the handle with MPI_Comm_disconnect or MPI_Comm_free will cause other references to the intercommunicator to become invalid (dangling). Note that calling MPI_Comm_free on the parent communicator is not useful. |
---|
| 46 | |
---|
| 47 | .SH ERRORS |
---|
| 48 | Almost all MPI routines return an error value; C routines as the value of the function and Fortran routines in the last argument. C++ functions do not return errors. If the default error handler is set to MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism will be used to throw an MPI:Exception object. |
---|
| 49 | .sp |
---|
| 50 | Before the error value is returned, the current MPI error handler is |
---|
| 51 | called. By default, this error handler aborts the MPI job, except for I/O function errors. The error handler may be changed with MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN may be used to cause error values to be returned. Note that MPI does not guarantee that an MPI program can continue past an error. |
---|
| 52 | |
---|
| 53 | .SH SEE ALSO |
---|
| 54 | .ft R |
---|
| 55 | .sp |
---|
| 56 | .nf |
---|
| 57 | MPI_Comm_spawn |
---|
| 58 | MPI_Comm_spawn_multiple |
---|
| 59 | |
---|