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