This source file includes following definitions.
- MPI_Win_detach
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 #include "ompi_config.h"
22
23 #include <stdio.h>
24
25 #include "ompi/mpi/c/bindings.h"
26 #include "ompi/runtime/params.h"
27 #include "ompi/communicator/communicator.h"
28 #include "ompi/errhandler/errhandler.h"
29 #include "ompi/info/info.h"
30 #include "ompi/win/win.h"
31 #include "ompi/memchecker.h"
32
33 #if OMPI_BUILD_MPI_PROFILING
34 #if OPAL_HAVE_WEAK_SYMBOLS
35 #pragma weak MPI_Win_detach = PMPI_Win_detach
36 #endif
37 #define MPI_Win_detach PMPI_Win_detach
38 #endif
39
40 static const char FUNC_NAME[] = "MPI_Win_detach";
41
42 int MPI_Win_detach(MPI_Win win, const void *base)
43 {
44 int ret = MPI_SUCCESS;
45
46
47 if (MPI_PARAM_CHECK) {
48 OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
49
50 if (ompi_win_invalid(win)) {
51 return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_WIN, FUNC_NAME);
52 } else if (NULL == base) {
53 ret = MPI_ERR_ARG;
54 }
55 OMPI_ERRHANDLER_CHECK(ret, win, ret, FUNC_NAME);
56 }
57
58 OPAL_CR_ENTER_LIBRARY();
59
60
61 ret = win->w_osc_module->osc_win_detach(win, base);
62 OMPI_ERRHANDLER_RETURN(ret, win, ret, FUNC_NAME);
63 }