This source file includes following definitions.
- MPI_File_get_byte_offset
1
2
3
4
5
6
7
8 #include "mpioimpl.h"
9 #include "adioi.h"
10
11 #ifdef HAVE_WEAK_SYMBOLS
12
13 #if defined(HAVE_PRAGMA_WEAK)
14 #pragma weak MPI_File_get_byte_offset = PMPI_File_get_byte_offset
15 #elif defined(HAVE_PRAGMA_HP_SEC_DEF)
16 #pragma _HP_SECONDARY_DEF PMPI_File_get_byte_offset MPI_File_get_byte_offset
17 #elif defined(HAVE_PRAGMA_CRI_DUP)
18 #pragma _CRI duplicate MPI_File_get_byte_offset as PMPI_File_get_byte_offset
19
20 #elif defined(HAVE_WEAK_ATTRIBUTE)
21 int MPI_File_get_byte_offset(MPI_File fh, MPI_Offset offset, MPI_Offset *disp) __attribute__((weak,alias("PMPI_File_get_byte_offset")));
22 #endif
23
24
25 #define MPIO_BUILD_PROFILING
26 #include "mpioprof.h"
27 #endif
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43 int MPI_File_get_byte_offset(MPI_File fh, MPI_Offset offset, MPI_Offset *disp)
44 {
45 int error_code;
46 ADIO_File adio_fh;
47 static char myname[] = "MPI_FILE_GET_BYTE_OFFSET";
48
49 adio_fh = MPIO_File_resolve(fh);
50
51
52 MPIO_CHECK_FILE_HANDLE(adio_fh, myname, error_code);
53
54 if (offset < 0)
55 {
56 error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE,
57 myname, __LINE__, MPI_ERR_ARG,
58 "**iobadoffset", 0);
59 error_code = MPIO_Err_return_file(adio_fh, error_code);
60 goto fn_exit;
61 }
62
63 MPIO_CHECK_NOT_SEQUENTIAL_MODE(adio_fh, myname, error_code);
64
65
66 ADIOI_Get_byte_offset(adio_fh, offset, disp);
67
68 fn_exit:
69
70 return MPI_SUCCESS;
71 }