This source file includes following definitions.
- MPI_File_get_errhandler
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/communicator/communicator.h"
30 #include "ompi/errhandler/errhandler.h"
31 #include "ompi/file/file.h"
32
33 #if OMPI_BUILD_MPI_PROFILING
34 #if OPAL_HAVE_WEAK_SYMBOLS
35 #pragma weak MPI_File_get_errhandler = PMPI_File_get_errhandler
36 #endif
37 #define MPI_File_get_errhandler PMPI_File_get_errhandler
38 #endif
39
40 static const char FUNC_NAME[] = "MPI_File_get_errhandler";
41
42
43 int MPI_File_get_errhandler( MPI_File file, MPI_Errhandler *errhandler)
44 {
45 OPAL_CR_NOOP_PROGRESS();
46
47
48
49 if (MPI_PARAM_CHECK) {
50 OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
51
52
53
54
55
56 if (NULL == file) {
57 return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_FILE,
58 "MPI_File_get_errhandler");
59 } else if (NULL == errhandler) {
60 return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ARG,
61 "MPI_File_get_errhandler");
62 }
63 }
64
65 OPAL_THREAD_LOCK(&file->f_lock);
66
67
68 *errhandler = file->error_handler;
69 OBJ_RETAIN(file->error_handler);
70 OPAL_THREAD_UNLOCK(&file->f_lock);
71
72
73
74 return MPI_SUCCESS;
75 }