1MPI_Testall(3) LAM/MPI MPI_Testall(3)
2
3
4
6 MPI_Testall - Tests for the completion of all previously initiated
7 communications
8
10 #include <mpi.h>
11 int MPI_Testall(int count, MPI_Request *reqs,
12 int *flag, MPI_Status *stats)
13
15 count - lists length (integer)
16 reqs - array of requests (array of handles)
17
18
20 flag - (logical)
21 stats - array of status objects (array of Status), which can be the
22 MPI constant MPI_STATUSES_IGNORE
23
24
25
27 flag is true (1) only if all requests have completed. Otherwise, flag
28 is false (0) and neither reqs nor stats is modified.
29
30
32 For send operations, the only use of status is for MPI_Test_cancelled
33 in the case that there is an error, in which case the MPI_ERROR field
34 of status will be set.
35
36
38 All MPI routines in Fortran (except for MPI_WTIME and MPI_WTICK ) have
39 an additional argument ierr at the end of the argument list. ierr is
40 an integer and has the same meaning as the return value of the routine
41 in C. In Fortran, MPI routines are subroutines, and are invoked with
42 the call statement.
43
44 All MPI objects (e.g., MPI_Datatype , MPI_Comm ) are of type INTEGER in
45 Fortran.
46
47
49 If an error occurs in an MPI function, the current MPI error handler is
50 called to handle it. By default, this error handler aborts the MPI
51 job. The error handler may be changed with MPI_Errhandler_set ; the
52 predefined error handler MPI_ERRORS_RETURN may be used to cause error
53 values to be returned (in C and Fortran; this error handler is less
54 useful in with the C++ MPI bindings. The predefined error handler
55 MPI::ERRORS_THROW_EXCEPTIONS should be used in C++ if the error value
56 needs to be recovered). Note that MPI does not guarantee that an MPI
57 program can continue past an error.
58
59 All MPI routines (except MPI_Wtime and MPI_Wtick ) return an error
60 value; C routines as the value of the function and Fortran routines in
61 the last argument. The C++ bindings for MPI do not return error val‐
62 ues; instead, error values are communicated by throwing exceptions of
63 type MPI::Exception (but not by default). Exceptions are only thrown
64 if the error value is not MPI::SUCCESS .
65
66
67 Note that if the MPI::ERRORS_RETURN handler is set in C++, while MPI
68 functions will return upon an error, there will be no way to recover
69 what the actual error value was.
70 MPI_SUCCESS
71 - No error; MPI routine completed successfully.
72 MPI_ERR_COUNT
73 - Invalid count argument. Count arguments must be non-negative;
74 a count of zero is often valid.
75 MPI_ERR_ARG
76 - Invalid argument. Some argument is invalid and is not identi‐
77 fied by a specific error class. This is typically a NULL
78 pointer or other such error.
79
80 MPI_ERR_IN_STATUS
81 - The actual error value is in the MPI_Status argument. Note
82 that if this error occurs and MPI_STATUS_IGNORE or MPI_STA‐
83 TUSES_IGNORE was used as the status argument, the actual error
84 will be lost. This error class is returned only from the multi‐
85 ple-completion routines ( MPI_Testall , MPI_Testany , MPI_Test‐
86 some , MPI_Waitall , MPI_Waitany , and MPI_Waitsome ). The
87 field MPI_ERROR in the status argument contains the error value
88 or MPI_SUCCESS (no error and complete) or MPI_ERR_PENDING to
89 indicate that the request has not completed. The MPI Standard
90 does not specify what the result of the multiple completion rou‐
91 tines is when an error occurs. For example, in an MPI_WAITALL ,
92 does the routine wait for all requests to either fail or com‐
93 plete, or does it return immediately (with the MPI definition of
94 immediately, which means independent of actions of other MPI
95 processes)? LAM/MPI has chosen to make the return immediate
96 (alternately, local in MPI terms), and to use the error class
97 MPI_ERR_PENDING (introduced in MPI 1.1) to indicate which
98 requests have not completed. In most cases, only one request
99 with an error will be detected in each call to an MPI routine
100 that tests multiple requests. The requests that have not been
101 processed (because an error occured in one of the requests) will
102 have their MPI_ERROR field marked with MPI_ERR_PENDING .
103
104
105
107 For more information, please see the official MPI Forum web site, which
108 contains the text of both the MPI-1 and MPI-2 standards. These docu‐
109 ments contain detailed information about each MPI function (most of
110 which is not duplicated in these man pages).
111
112 http://www.mpi-forum.org/
113
114
115
117 The LAM Team would like the thank the MPICH Team for the handy program
118 to generate man pages ("doctext" from ftp://ftp.mcs.anl.gov/pub/sow‐
119 ing/sowing.tar.gz ), the initial formatting, and some initial text for
120 most of the MPI-1 man pages.
121
123 testall.c
124
125
126
127LAM/MPI 7.1.2 2/23/2006 MPI_Testall(3)