This source file includes following definitions.
- MPI_Comm_set_name
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 <string.h>
28
29 #include "ompi/mpi/c/bindings.h"
30 #include "ompi/runtime/params.h"
31 #include "ompi/communicator/communicator.h"
32 #include "ompi/errhandler/errhandler.h"
33 #include "ompi/totalview.h"
34 #include "ompi/memchecker.h"
35
36 #if OMPI_BUILD_MPI_PROFILING
37 #if OPAL_HAVE_WEAK_SYMBOLS
38 #pragma weak MPI_Comm_set_name = PMPI_Comm_set_name
39 #endif
40 #define MPI_Comm_set_name PMPI_Comm_set_name
41 #endif
42
43 static const char FUNC_NAME[] = "MPI_Comm_set_name";
44
45
46 int MPI_Comm_set_name(MPI_Comm comm, const char *name)
47 {
48 int rc;
49
50 MEMCHECKER(
51 memchecker_comm(comm);
52 );
53
54 if ( MPI_PARAM_CHECK ) {
55 OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
56
57 if ( ompi_comm_invalid ( comm ) ) {
58 return OMPI_ERRHANDLER_INVOKE ( MPI_COMM_WORLD, MPI_ERR_COMM,
59 FUNC_NAME);
60 }
61
62 if ( NULL == name ) {
63 return OMPI_ERRHANDLER_INVOKE ( comm, MPI_ERR_ARG,
64 FUNC_NAME);
65 }
66 }
67
68 OPAL_CR_ENTER_LIBRARY();
69
70 rc = ompi_comm_set_name (comm, name );
71
72 #if 0
73
74
75 ++ompi_tv_comm_sequence_number;
76 #endif
77 OMPI_ERRHANDLER_RETURN(rc, comm, rc, FUNC_NAME);
78 }