This source file includes following definitions.
- MPI_T_enum_get_info
1
2
3
4
5
6
7
8
9
10
11
12
13
14 #include "ompi/mpi/tool/mpit-internal.h"
15
16 #if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES
17 #pragma weak MPI_T_enum_get_info = PMPI_T_enum_get_info
18 #endif
19
20 #if OMPI_PROFILING_DEFINES
21 #include "ompi/mpi/tool/profile/defines.h"
22 #endif
23
24
25 int MPI_T_enum_get_info(MPI_T_enum enumtype, int *num, char *name, int *name_len)
26 {
27 int rc = MPI_SUCCESS;
28
29 if (!mpit_is_initialized ()) {
30 return MPI_T_ERR_NOT_INITIALIZED;
31 }
32
33 ompi_mpit_lock ();
34
35 do {
36 if (num) {
37 rc = enumtype->get_count (enumtype, num);
38 if (OPAL_SUCCESS != rc) {
39 rc = MPI_ERR_OTHER;
40 break;
41 }
42 }
43
44 mpit_copy_string (name, name_len, enumtype->enum_name);
45 } while (0);
46
47 ompi_mpit_unlock ();
48
49 return rc;
50 }