This source file includes following definitions.
- MPI_Info_delete
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/info/info.h"
32 #include <stdlib.h>
33 #include <string.h>
34
35 #if OMPI_BUILD_MPI_PROFILING
36 #if OPAL_HAVE_WEAK_SYMBOLS
37 #pragma weak MPI_Info_delete = PMPI_Info_delete
38 #endif
39 #define MPI_Info_delete PMPI_Info_delete
40 #endif
41
42 static const char FUNC_NAME[] = "MPI_Info_delete";
43
44
45
46
47
48
49
50
51
52
53
54
55
56 int MPI_Info_delete(MPI_Info info, const char *key) {
57 int key_length;
58 int err;
59
60
61
62
63 if (MPI_PARAM_CHECK) {
64 OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
65 if (NULL == info || MPI_INFO_NULL == info ||
66 ompi_info_is_freed(info)) {
67 return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_INFO,
68 FUNC_NAME);
69 }
70
71 key_length = (key) ? (int)strlen (key) : 0;
72 if ((NULL == key) || (0 == key_length) ||
73 (MPI_MAX_INFO_KEY <= key_length)) {
74 return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_INFO_KEY,
75 FUNC_NAME);
76 }
77 }
78
79 OPAL_CR_ENTER_LIBRARY();
80
81 err = ompi_info_delete (info, key);
82
83
84
85
86
87 if (OPAL_ERR_NOT_FOUND == err) {
88 err = MPI_ERR_INFO_NOKEY;
89 }
90
91 OMPI_ERRHANDLER_RETURN(err, MPI_COMM_WORLD, err, FUNC_NAME);
92 }