This source file includes following definitions.
- MPIO_Wait
- MPIO_Wait
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_Wait = PMPIO_Wait
14 #elif defined(HAVE_PRAGMA_HP_SEC_DEF)
15 #pragma _HP_SECONDARY_DEF PMPIO_Wait MPIO_Wait
16 #elif defined(HAVE_PRAGMA_CRI_DUP)
17 #pragma _CRI duplicate MPIO_Wait as PMPIO_Wait
18
19 #endif
20
21
22 #define MPIO_BUILD_PROFILING
23 #include "mpioprof.h"
24 #endif
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39 #ifdef HAVE_MPI_GREQUEST
40 int MPIO_Wait(MPIO_Request *request, MPI_Status *status)
41 {
42 return(MPI_Wait(request, status));
43 }
44 #else
45 int MPIO_Wait(MPIO_Request *request, MPI_Status *status)
46 {
47 int error_code;
48 static char myname[] = "MPIO_WAIT";
49 MPID_THREADPRIV_DECL;
50
51 #ifdef MPI_hpux
52 int fl_xmpi;
53
54 if (*request != MPIO_REQUEST_NULL) {
55 HPMP_IO_WSTART(fl_xmpi, BLKMPIOWAIT, TRDTBLOCK, (*request)->fd);
56 }
57 #endif
58
59 ROMIO_THREAD_CS_ENTER();
60
61 if (*request == MPIO_REQUEST_NULL) {
62 error_code = MPI_SUCCESS;
63 goto fn_exit;
64 }
65
66
67
68 if ((*request < (MPIO_Request) 0) ||
69 ((*request)->cookie != ADIOI_REQ_COOKIE))
70 {
71 error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE,
72 myname, __LINE__, MPI_ERR_REQUEST,
73 "**request", 0);
74 error_code = MPIO_Err_return_file(MPI_FILE_NULL, error_code);
75 goto fn_exit;
76 }
77
78
79 switch ((*request)->optype) {
80 case ADIOI_READ:
81 ADIO_ReadComplete(request, status, &error_code);
82 break;
83 case ADIOI_WRITE:
84 ADIO_WriteComplete(request, status, &error_code);
85 break;
86 }
87
88 #ifdef MPI_hpux
89 HPMP_IO_WEND(fl_xmpi);
90 #endif
91
92 fn_exit:
93 ROMIO_THREAD_CS_EXIT();
94 return error_code;
95 }
96 #endif