Skip to content

Commit 9b702fb

Browse files
committed
ompi: clean up topo helper functions
This commit removes the communicator topo helper functions in favor of functions in mca/topo/base. Signed-off-by: Nathan Hjelm <[email protected]>
1 parent b0692c6 commit 9b702fb

7 files changed

+19
-158
lines changed

ompi/communicator/Makefile.am

+3-5
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# University of Stuttgart. All rights reserved.
1111
# Copyright (c) 2004-2005 The Regents of the University of California.
1212
# All rights reserved.
13-
# Copyright (c) 2013 Los Alamos National Security, LLC. All rights
13+
# Copyright (c) 2013-2017 Los Alamos National Security, LLC. All rights
1414
# reserved.
1515
# Copyright (c) 2014 Research Organization for Information Science
1616
# and Technology (RIST). All rights reserved.
@@ -26,13 +26,11 @@
2626

2727
headers += \
2828
communicator/communicator.h \
29-
communicator/comm_request.h \
30-
communicator/comm_helpers.h
29+
communicator/comm_request.h
3130

3231
lib@OMPI_LIBMPI_NAME@_la_SOURCES += \
3332
communicator/comm_init.c \
3433
communicator/comm.c \
3534
communicator/comm_cid.c \
36-
communicator/comm_request.c \
37-
communicator/comm_helpers.c
35+
communicator/comm_request.c
3836

ompi/communicator/comm_helpers.c

-92
This file was deleted.

ompi/communicator/comm_helpers.h

-41
This file was deleted.

ompi/mpi/c/ineighbor_alltoallv.c

+4-5
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Copyright (c) 2004-2005 The Regents of the University of California.
1212
* All rights reserved.
1313
* Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
14-
* Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights
14+
* Copyright (c) 2012-2017 Los Alamos National Security, LLC. All rights
1515
* reserved.
1616
* Copyright (c) 2014-2015 Research Organization for Information Science
1717
* and Technology (RIST). All rights reserved.
@@ -29,7 +29,6 @@
2929
#include "ompi/mpi/c/bindings.h"
3030
#include "ompi/runtime/params.h"
3131
#include "ompi/communicator/communicator.h"
32-
#include "ompi/communicator/comm_helpers.h"
3332
#include "ompi/errhandler/errhandler.h"
3433
#include "ompi/datatype/ompi_datatype.h"
3534
#include "ompi/memchecker.h"
@@ -52,7 +51,7 @@ int MPI_Ineighbor_alltoallv(const void *sendbuf, const int sendcounts[], const i
5251
MPI_Request *request)
5352
{
5453
int i, err;
55-
int indegree, outdegree, weighted;
54+
int indegree, outdegree;
5655

5756
MEMCHECKER(
5857
ptrdiff_t recv_ext;
@@ -68,7 +67,7 @@ int MPI_Ineighbor_alltoallv(const void *sendbuf, const int sendcounts[], const i
6867
memchecker_datatype(recvtype);
6968
ompi_datatype_type_extent(sendtype, &send_ext);
7069

71-
err = ompi_comm_neighbors_count(comm, &indegree, &outdegree, &weighted);
70+
err = mca_topo_base_neighbor_count (comm, &indegree, &outdegree);
7271
if (MPI_SUCCESS == err) {
7372
if (MPI_IN_PLACE != sendbuf) {
7473
for ( i = 0; i < outdegree; i++ ) {
@@ -105,7 +104,7 @@ int MPI_Ineighbor_alltoallv(const void *sendbuf, const int sendcounts[], const i
105104
return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME);
106105
}
107106

108-
err = ompi_comm_neighbors_count(comm, &indegree, &outdegree, &weighted);
107+
err = mca_topo_base_neighbor_count (comm, &indegree, &outdegree);
109108
OMPI_ERRHANDLER_CHECK(err, comm, err, FUNC_NAME);
110109
for (i = 0; i < outdegree; ++i) {
111110
OMPI_CHECK_DATATYPE_FOR_SEND(err, sendtype, sendcounts[i]);

ompi/mpi/c/ineighbor_alltoallw.c

+4-5
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Copyright (c) 2004-2005 The Regents of the University of California.
1212
* All rights reserved.
1313
* Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
14-
* Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights
14+
* Copyright (c) 2012-2017 Los Alamos National Security, LLC. All rights
1515
* reserved.
1616
* Copyright (c) 2014-2015 Research Organization for Information Science
1717
* and Technology (RIST). All rights reserved.
@@ -29,7 +29,6 @@
2929
#include "ompi/mpi/c/bindings.h"
3030
#include "ompi/runtime/params.h"
3131
#include "ompi/communicator/communicator.h"
32-
#include "ompi/communicator/comm_helpers.h"
3332
#include "ompi/errhandler/errhandler.h"
3433
#include "ompi/datatype/ompi_datatype.h"
3534
#include "ompi/memchecker.h"
@@ -52,15 +51,15 @@ int MPI_Ineighbor_alltoallw(const void *sendbuf, const int sendcounts[], const M
5251
MPI_Request *request)
5352
{
5453
int i, err;
55-
int indegree, outdegree, weighted;
54+
int indegree, outdegree;
5655

5756
MEMCHECKER(
5857
ptrdiff_t recv_ext;
5958
ptrdiff_t send_ext;
6059

6160
memchecker_comm(comm);
6261

63-
err = ompi_comm_neighbors_count(comm, &indegree, &outdegree, &weighted);
62+
err = mca_topo_base_neighbor_count (comm, &indegree, &outdegree);
6463
if (MPI_SUCCESS == err) {
6564
if (MPI_IN_PLACE != sendbuf) {
6665
for ( i = 0; i < outdegree; i++ ) {
@@ -105,7 +104,7 @@ int MPI_Ineighbor_alltoallw(const void *sendbuf, const int sendcounts[], const M
105104
return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME);
106105
}
107106

108-
err = ompi_comm_neighbors_count(comm, &indegree, &outdegree, &weighted);
107+
err = mca_topo_base_neighbor_count (comm, &indegree, &outdegree);
109108
OMPI_ERRHANDLER_CHECK(err, comm, err, FUNC_NAME);
110109
for (i = 0; i < outdegree; ++i) {
111110
OMPI_CHECK_DATATYPE_FOR_SEND(err, sendtypes[i], sendcounts[i]);

ompi/mpi/c/neighbor_alltoallv.c

+4-5
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Copyright (c) 2004-2005 The Regents of the University of California.
1212
* All rights reserved.
1313
* Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
14-
* Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights
14+
* Copyright (c) 2012-2017 Los Alamos National Security, LLC. All rights
1515
* reserved.
1616
* Copyright (c) 2014-2015 Research Organization for Information Science
1717
* and Technology (RIST). All rights reserved.
@@ -32,7 +32,6 @@
3232
#include "ompi/errhandler/errhandler.h"
3333
#include "ompi/datatype/ompi_datatype.h"
3434
#include "ompi/memchecker.h"
35-
#include "ompi/communicator/comm_helpers.h"
3635
#include "ompi/mca/topo/topo.h"
3736
#include "ompi/mca/topo/base/base.h"
3837

@@ -52,7 +51,7 @@ int MPI_Neighbor_alltoallv(const void *sendbuf, const int sendcounts[], const in
5251
MPI_Datatype recvtype, MPI_Comm comm)
5352
{
5453
int i, err;
55-
int indegree, outdegree, weighted;
54+
int indegree, outdegree;
5655

5756
MEMCHECKER(
5857
ptrdiff_t recv_ext;
@@ -68,7 +67,7 @@ int MPI_Neighbor_alltoallv(const void *sendbuf, const int sendcounts[], const in
6867
memchecker_datatype(recvtype);
6968
ompi_datatype_type_extent(sendtype, &send_ext);
7069

71-
err = ompi_comm_neighbors_count(comm, &indegree, &outdegree, &weighted);
70+
err = mca_topo_base_neighbor_count (comm, &indegree, &outdegree);
7271
if (MPI_SUCCESS == err) {
7372
if (MPI_IN_PLACE != sendbuf) {
7473
for ( i = 0; i < outdegree; i++ ) {
@@ -105,7 +104,7 @@ int MPI_Neighbor_alltoallv(const void *sendbuf, const int sendcounts[], const in
105104
return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME);
106105
}
107106

108-
err = ompi_comm_neighbors_count(comm, &indegree, &outdegree, &weighted);
107+
err = mca_topo_base_neighbor_count (comm, &indegree, &outdegree);
109108
OMPI_ERRHANDLER_CHECK(err, comm, err, FUNC_NAME);
110109
for (i = 0; i < outdegree; ++i) {
111110
OMPI_CHECK_DATATYPE_FOR_SEND(err, sendtype, sendcounts[i]);

ompi/mpi/c/neighbor_alltoallw.c

+4-5
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Copyright (c) 2004-2005 The Regents of the University of California.
1212
* All rights reserved.
1313
* Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
14-
* Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights
14+
* Copyright (c) 2012-2017 Los Alamos National Security, LLC. All rights
1515
* reserved.
1616
* Copyright (c) 2014-2015 Research Organization for Information Science
1717
* and Technology (RIST). All rights reserved.
@@ -32,7 +32,6 @@
3232
#include "ompi/errhandler/errhandler.h"
3333
#include "ompi/datatype/ompi_datatype.h"
3434
#include "ompi/memchecker.h"
35-
#include "ompi/communicator/comm_helpers.h"
3635
#include "ompi/mca/topo/topo.h"
3736
#include "ompi/mca/topo/base/base.h"
3837

@@ -52,15 +51,15 @@ int MPI_Neighbor_alltoallw(const void *sendbuf, const int sendcounts[], const MP
5251
const MPI_Datatype recvtypes[], MPI_Comm comm)
5352
{
5453
int i, err;
55-
int indegree, outdegree, weighted;
54+
int indegree, outdegree;
5655

5756
MEMCHECKER(
5857
ptrdiff_t recv_ext;
5958
ptrdiff_t send_ext;
6059

6160
memchecker_comm(comm);
6261

63-
err = ompi_comm_neighbors_count(comm, &indegree, &outdegree, &weighted);
62+
err = mca_topo_base_neighbor_count (comm, &indegree, &outdegree);
6463
if (MPI_SUCCESS == err) {
6564
if (MPI_IN_PLACE != sendbuf) {
6665
for ( i = 0; i < outdegree; i++ ) {
@@ -101,7 +100,7 @@ int MPI_Neighbor_alltoallw(const void *sendbuf, const int sendcounts[], const MP
101100
return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME);
102101
}
103102

104-
err = ompi_comm_neighbors_count(comm, &indegree, &outdegree, &weighted);
103+
err = mca_topo_base_neighbor_count (comm, &indegree, &outdegree);
105104
OMPI_ERRHANDLER_CHECK(err, comm, err, FUNC_NAME);
106105
for (i = 0; i < outdegree; ++i) {
107106
OMPI_CHECK_DATATYPE_FOR_SEND(err, sendtypes[i], sendcounts[i]);

0 commit comments

Comments
 (0)