This source file includes following definitions.
- MPI_File_write_at
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 #include "ompi_config.h"
26
27 #include "ompi/mpi/c/bindings.h"
28 #include "ompi/runtime/params.h"
29 #include "ompi/errhandler/errhandler.h"
30 #include "ompi/file/file.h"
31 #include "ompi/datatype/ompi_datatype.h"
32 #include "ompi/memchecker.h"
33
34 #if OMPI_BUILD_MPI_PROFILING
35 #if OPAL_HAVE_WEAK_SYMBOLS
36 #pragma weak MPI_File_write_at = PMPI_File_write_at
37 #endif
38 #define MPI_File_write_at PMPI_File_write_at
39 #endif
40
41 static const char FUNC_NAME[] = "MPI_File_write_at";
42
43
44 int MPI_File_write_at(MPI_File fh, MPI_Offset offset, const void *buf,
45 int count, MPI_Datatype datatype,
46 MPI_Status *status)
47 {
48 int rc;
49
50 MEMCHECKER(
51 memchecker_datatype(datatype);
52 memchecker_call(&opal_memchecker_base_isdefined, buf, count, datatype);
53 );
54
55 if (MPI_PARAM_CHECK) {
56 rc = MPI_SUCCESS;
57 OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
58 if (ompi_file_invalid(fh)) {
59 fh = MPI_FILE_NULL;
60 rc = MPI_ERR_FILE;
61 } else if (count < 0) {
62 rc = MPI_ERR_COUNT;
63 } else {
64 OMPI_CHECK_DATATYPE_FOR_SEND(rc, datatype, count);
65 }
66 OMPI_ERRHANDLER_CHECK(rc, fh, rc, FUNC_NAME);
67 }
68
69 OPAL_CR_ENTER_LIBRARY();
70
71
72
73 switch (fh->f_io_version) {
74 case MCA_IO_BASE_V_2_0_0:
75 rc = fh->f_io_selected_module.v2_0_0.
76 io_module_file_write_at(fh, offset, buf, count, datatype, status);
77 break;
78
79 default:
80 rc = MPI_ERR_INTERN;
81 break;
82 }
83
84
85
86 OMPI_ERRHANDLER_RETURN(rc, fh, rc, FUNC_NAME);
87 }