This source file includes following definitions.
- MPI_Dist_graph_neighbors_count
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 #include <assert.h>
18 #include <stdlib.h>
19
20 #include "ompi_config.h"
21
22 #include "ompi/mpi/c/bindings.h"
23 #include "ompi/runtime/params.h"
24 #include "ompi/communicator/communicator.h"
25 #include "ompi/errhandler/errhandler.h"
26 #include "ompi/memchecker.h"
27 #include "ompi/mca/topo/topo.h"
28 #include "ompi/mca/topo/base/base.h"
29
30 #if OMPI_BUILD_MPI_PROFILING
31 #if OPAL_HAVE_WEAK_SYMBOLS
32 #pragma weak MPI_Dist_graph_neighbors_count = PMPI_Dist_graph_neighbors_count
33 #endif
34 #define MPI_Dist_graph_neighbors_count PMPI_Dist_graph_neighbors_count
35 #endif
36
37 static const char FUNC_NAME[] = "MPI_Dist_graph_neighbors_count";
38
39
40 int MPI_Dist_graph_neighbors_count(MPI_Comm comm, int *inneighbors,
41 int *outneighbors, int *weighted)
42 {
43 int err;
44
45 MEMCHECKER(
46 memchecker_comm(comm);
47 );
48
49 if (MPI_PARAM_CHECK) {
50 OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
51 if (ompi_comm_invalid(comm)) {
52 return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_COMM,
53 FUNC_NAME);
54 } else if (NULL == inneighbors || NULL == outneighbors ||
55 NULL == weighted) {
56 return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME);
57 }
58 }
59
60 if (!OMPI_COMM_IS_DIST_GRAPH(comm)) {
61 return OMPI_ERRHANDLER_INVOKE (comm, MPI_ERR_TOPOLOGY,
62 FUNC_NAME);
63 }
64 err = comm->c_topo->topo.dist_graph.dist_graph_neighbors_count(comm, inneighbors,
65 outneighbors, weighted);
66 OMPI_ERRHANDLER_RETURN(err, comm, err, FUNC_NAME);
67 }
68