This source file includes following definitions.
- MPIO_Request_f2c
- MPIO_Request_f2c
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_Request_f2c = PMPIO_Request_f2c
14 #elif defined(HAVE_PRAGMA_HP_SEC_DEF)
15 #pragma _HP_SECONDARY_DEF PMPIO_Request_f2c MPIO_Request_f2c
16 #elif defined(HAVE_PRAGMA_CRI_DUP)
17 #pragma _CRI duplicate MPIO_Request_f2c as PMPIO_Request_f2c
18
19 #endif
20
21
22 #define MPIO_BUILD_PROFILING
23 #include "mpioprof.h"
24 #endif
25 #include "adio_extern.h"
26
27
28
29
30
31
32
33
34
35
36
37 #ifdef HAVE_MPI_GREQUEST
38 MPIO_Request MPIO_Request_f2c(MPI_Fint request) {
39 return((MPIO_Request) request);
40 }
41 #else
42 MPIO_Request MPIO_Request_f2c(MPI_Fint request)
43 {
44 int error_code;
45 static char myname[] = "MPIO_REQUEST_F2C";
46 MPID_THREADPRIV_DECL;
47
48 #ifndef INT_LT_POINTER
49 return (MPIO_Request) request;
50 #else
51
52 ROMIO_THREAD_CS_ENTER();
53
54 if (!request) {
55 return MPIO_REQUEST_NULL;
56 }
57
58 if ((request < 0) || (request > ADIOI_Reqtable_ptr)) {
59 error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE,
60 myname, __LINE__, MPI_ERR_REQUEST,
61 "**request", 0);
62 error_code = MPIO_Err_return_file(MPI_FILE_NULL, error_code);
63 return MPIO_REQUEST_NULL;
64 }
65
66
67 fn_exit:
68 ROMIO_THREAD_CS_EXIT();
69 return ADIOI_Reqtable[request];
70 #endif
71 }
72 #endif