This source file includes following definitions.
- MPIO_Waitall
1
2
3
4
5
6
7
8 #include "mpioimpl.h"
9
10 #ifdef HAVE_WEAK_SYMBOLS
11
12 #if defined(HAVE_PRAGMA_WEAK)
13 #pragma weak MPIO_Waitall = PMPIO_Waitall
14 #elif defined(HAVE_PRAGMA_HP_SEC_DEF)
15 #pragma _HP_SECONDARY_DEF PMPIO_Waitall MPIO_Waitall
16 #elif defined(HAVE_PRAGMA_CRI_DUP)
17 #pragma _CRI duplicate MPIO_Waitall as PMPIO_Waitall
18
19 #endif
20
21
22 #define MPIO_BUILD_PROFILING
23 #include "mpioprof.h"
24 #endif
25
26
27
28
29
30
31 int MPIO_Waitall( int count, MPIO_Request requests[], MPI_Status statuses[] )
32 {
33 int notdone, i, flag, err;
34 MPID_THREADPRIV_DECL;
35
36 ROMIO_THREAD_CS_ENTER();
37
38 if (count == 1) {
39 err = MPIO_Wait(requests, statuses);
40 goto fn_exit;
41 }
42
43
44 do {
45 notdone = 0;
46 for (i=0; i<count; i++) {
47 if (requests[i] != MPIO_REQUEST_NULL) {
48 err = MPIO_Test( &requests[i], &flag, &statuses[i] );
49 if (!flag) notdone = 1;
50 if (err) goto fn_exit;
51 }
52 else {
53 #ifdef MPICH
54
55 if (statuses != MPI_STATUSES_IGNORE) {
56 statuses[i].MPI_SOURCE = MPI_ANY_SOURCE;
57 statuses[i].MPI_TAG = MPI_ANY_TAG;
58 MPIR_STATUS_SET_COUNT(statuses[i], 0);
59 MPIR_STATUS_SET_CANCEL_BIT(statuses[i], 0);
60 }
61 #else
62 ;
63 #endif
64 }
65 }
66 } while (notdone);
67
68 err = MPI_SUCCESS;
69 fn_exit:
70
71 ROMIO_THREAD_CS_EXIT();
72 return err;
73 }
74