1 | .\"Copyright 2006-2008 Sun Microsystems, Inc. |
---|
2 | .\" Copyright (c) 1996 Thinking Machines Corporation |
---|
3 | .TH MPI_Is_thread_main 3 "Dec 08, 2009" "1.4" "Open MPI" |
---|
4 | |
---|
5 | .SH NAME |
---|
6 | \fBMPI_Is_thread_main\fP \- Determines if thread called MPI_Init |
---|
7 | |
---|
8 | .SH SYNTAX |
---|
9 | .ft R |
---|
10 | .SH C Syntax |
---|
11 | .nf |
---|
12 | #include <mpi.h> |
---|
13 | int MPI_Is_thread_main(int *\fIflag\fP) |
---|
14 | |
---|
15 | .SH Fortran Syntax |
---|
16 | .nf |
---|
17 | INCLUDE 'mpif.h' |
---|
18 | MPI_IS_THREAD_MAIN(\fIFLAG, IERROR\fP) |
---|
19 | LOGICAL \fIFLAG\fP |
---|
20 | INTEGER \fIIERROR\fP |
---|
21 | |
---|
22 | .SH C++ Syntax |
---|
23 | .nf |
---|
24 | #include <mpi.h> |
---|
25 | bool MPI::Is_thread_main() |
---|
26 | |
---|
27 | .SH OUTPUT PARAMETERS |
---|
28 | .TP 1i |
---|
29 | flag |
---|
30 | True if calling thread is main thread (boolean). |
---|
31 | .ft R |
---|
32 | .TP 1i |
---|
33 | IERROR |
---|
34 | Fortran only: Error status (integer). |
---|
35 | |
---|
36 | .SH DESCRIPTION |
---|
37 | .ft R |
---|
38 | MPI_Is_thread_main is called by a thread to find out whether the |
---|
39 | caller is the main thread (that is, the thread that called MPI_Init or |
---|
40 | MPI_Init_thread). |
---|
41 | |
---|
42 | .SH ERRORS |
---|
43 | .ft R |
---|
44 | Almost all MPI routines return an error value; C routines as |
---|
45 | the value of the function and Fortran routines in the last argument. C++ |
---|
46 | functions do not return errors. If the default error handler is set to |
---|
47 | MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism |
---|
48 | 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 |
---|
52 | I/O function errors. The error handler may be changed with |
---|
53 | MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN |
---|
54 | may be used to cause error values to be returned. Note that MPI does not |
---|
55 | guarantee that an MPI program can continue past an error. |
---|
56 | .sp |
---|
57 | See the MPI man page for a full list of MPI error codes. |
---|
58 | |
---|
59 | .SH SEE ALSO |
---|
60 | .ft R |
---|
61 | .nf |
---|
62 | MPI_Init |
---|
63 | MPI_Init_thread |
---|
64 | |
---|