1 | .\"Copyright 2006-2008 Sun Microsystems, Inc. |
---|
2 | .\"Copyright (c) 1996 Thinking Machines |
---|
3 | .TH MPI_Query_thread 3 "Dec 08, 2009" "1.4" "Open MPI" |
---|
4 | |
---|
5 | .SH NAME |
---|
6 | \fBMPI_Query_thread\fP \- Returns the current level of thread support |
---|
7 | |
---|
8 | .SH SYNTAX |
---|
9 | .ft R |
---|
10 | |
---|
11 | .SH C Syntax |
---|
12 | .nf |
---|
13 | #include <mpi.h> |
---|
14 | int MPI_Query_thread(int *\fIprovided\fP) |
---|
15 | |
---|
16 | .SH Fortran Syntax |
---|
17 | .nf |
---|
18 | INCLUDE 'mpif.h' |
---|
19 | MPI_QUERY_THREAD(\fIPROVIDED, IERROR\fP) |
---|
20 | INTEGER \fIPROVIDED, IERROR \fP |
---|
21 | |
---|
22 | .SH C++ Syntax |
---|
23 | .nf |
---|
24 | #include <mpi.h> |
---|
25 | int MPI::Query_thread() |
---|
26 | |
---|
27 | .SH OUTPUT PARAMETERS |
---|
28 | .ft R |
---|
29 | .TP 1i |
---|
30 | provided |
---|
31 | C/Fortran only: Level of thread support (integer). |
---|
32 | .TP 1i |
---|
33 | IERROR |
---|
34 | Fortran only: Error status (integer). |
---|
35 | |
---|
36 | .SH DESCRIPTION |
---|
37 | .ft R |
---|
38 | This routine returns in \fIprovided\fP the current level of thread |
---|
39 | support. If MPI was initialized by a call to MPI_Init_thread, |
---|
40 | \fIprovided\fP will have the same value as was returned by that |
---|
41 | function. |
---|
42 | .sp |
---|
43 | The possible values of \fIprovided\fP are as follows: |
---|
44 | .TP 2.4i |
---|
45 | MPI_THREAD_SINGLE |
---|
46 | Only one thread may execute. |
---|
47 | .TP 2.4i |
---|
48 | MPI_THREAD_FUNNELED |
---|
49 | If the process is multithreaded, only the thread |
---|
50 | that called MPI_Init[_thread] may make MPI calls. |
---|
51 | .TP 2.4i |
---|
52 | MPI_THREAD_SERIALIZED |
---|
53 | If the process is multithreaded, only one thread |
---|
54 | may make MPI library calls at one time. |
---|
55 | .TP 2.4i |
---|
56 | MPI_THREAD_MULTIPLE |
---|
57 | If the process is multithreaded, multiple threads |
---|
58 | may call MPI at once with no restrictions. |
---|
59 | |
---|
60 | .SH NOTES |
---|
61 | .ft R |
---|
62 | In Open MPI, \fIprovided\fP is always MPI_THREAD_SINGLE, unless the |
---|
63 | program has been linked with the multithreaded library, in which case |
---|
64 | \fIprovided\fP is MPI_THREAD_MULTIPLE. |
---|
65 | |
---|
66 | .SH ERRORS |
---|
67 | .ft R |
---|
68 | Almost all MPI routines return an error value; C routines as |
---|
69 | the value of the function and Fortran routines in the last argument. C++ |
---|
70 | functions do not return errors. If the default error handler is set to |
---|
71 | MPI::ERRORS_THROW_EXCEPTIONS, then on error the C++ exception mechanism |
---|
72 | will be used to throw an MPI:Exception object. |
---|
73 | .sp |
---|
74 | Before the error value is returned, the current MPI error handler is |
---|
75 | called. By default, this error handler aborts the MPI job, except for |
---|
76 | I/O function errors. The error handler may be changed with |
---|
77 | MPI_Comm_set_errhandler; the predefined error handler MPI_ERRORS_RETURN |
---|
78 | may be used to cause error values to be returned. Note that MPI does not |
---|
79 | guarantee that an MPI program can continue past an error. |
---|
80 | .sp |
---|
81 | See the MPI man page for a full list of MPI error codes. |
---|
82 | |
---|
83 | .SH SEE ALSO |
---|
84 | .ft R |
---|
85 | .nf |
---|
86 | MPI_Init |
---|
87 | MPI_Init_thread |
---|
88 | |
---|