Skip to content

Commit

Permalink
ompi: clean up topo helper functions
Browse files Browse the repository at this point in the history
This commit removes the communicator topo helper functions in favor
of functions in mca/topo/base.

Signed-off-by: Nathan Hjelm <[email protected]>
(cherry picked from commit 9b702fb)
Signed-off-by: Nathan Hjelm <[email protected]>
  • Loading branch information
hjelmn committed Jul 18, 2017
1 parent 3e9bae3 commit c19d561
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 158 deletions.
8 changes: 3 additions & 5 deletions ompi/communicator/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# University of Stuttgart. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2013 Los Alamos National Security, LLC. All rights
# Copyright (c) 2013-2017 Los Alamos National Security, LLC. All rights
# reserved.
# Copyright (c) 2014 Research Organization for Information Science
# and Technology (RIST). All rights reserved.
Expand All @@ -26,13 +26,11 @@

headers += \
communicator/communicator.h \
communicator/comm_request.h \
communicator/comm_helpers.h
communicator/comm_request.h

lib@OMPI_LIBMPI_NAME@_la_SOURCES += \
communicator/comm_init.c \
communicator/comm.c \
communicator/comm_cid.c \
communicator/comm_request.c \
communicator/comm_helpers.c
communicator/comm_request.c

92 changes: 0 additions & 92 deletions ompi/communicator/comm_helpers.c

This file was deleted.

41 changes: 0 additions & 41 deletions ompi/communicator/comm_helpers.h

This file was deleted.

9 changes: 4 additions & 5 deletions ompi/mpi/c/ineighbor_alltoallv.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights
* Copyright (c) 2012-2017 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2014-2015 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
Expand All @@ -29,7 +29,6 @@
#include "ompi/mpi/c/bindings.h"
#include "ompi/runtime/params.h"
#include "ompi/communicator/communicator.h"
#include "ompi/communicator/comm_helpers.h"
#include "ompi/errhandler/errhandler.h"
#include "ompi/datatype/ompi_datatype.h"
#include "ompi/memchecker.h"
Expand All @@ -52,7 +51,7 @@ int MPI_Ineighbor_alltoallv(const void *sendbuf, const int sendcounts[], const i
MPI_Request *request)
{
int i, err;
int indegree, outdegree, weighted;
int indegree, outdegree;

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

err = ompi_comm_neighbors_count(comm, &indegree, &outdegree, &weighted);
err = mca_topo_base_neighbor_count (comm, &indegree, &outdegree);
if (MPI_SUCCESS == err) {
if (MPI_IN_PLACE != sendbuf) {
for ( i = 0; i < outdegree; i++ ) {
Expand Down Expand Up @@ -105,7 +104,7 @@ int MPI_Ineighbor_alltoallv(const void *sendbuf, const int sendcounts[], const i
return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME);
}

err = ompi_comm_neighbors_count(comm, &indegree, &outdegree, &weighted);
err = mca_topo_base_neighbor_count (comm, &indegree, &outdegree);
OMPI_ERRHANDLER_CHECK(err, comm, err, FUNC_NAME);
for (i = 0; i < outdegree; ++i) {
OMPI_CHECK_DATATYPE_FOR_SEND(err, sendtype, sendcounts[i]);
Expand Down
9 changes: 4 additions & 5 deletions ompi/mpi/c/ineighbor_alltoallw.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights
* Copyright (c) 2012-2017 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2014-2015 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
Expand All @@ -29,7 +29,6 @@
#include "ompi/mpi/c/bindings.h"
#include "ompi/runtime/params.h"
#include "ompi/communicator/communicator.h"
#include "ompi/communicator/comm_helpers.h"
#include "ompi/errhandler/errhandler.h"
#include "ompi/datatype/ompi_datatype.h"
#include "ompi/memchecker.h"
Expand All @@ -52,15 +51,15 @@ int MPI_Ineighbor_alltoallw(const void *sendbuf, const int sendcounts[], const M
MPI_Request *request)
{
int i, err;
int indegree, outdegree, weighted;
int indegree, outdegree;

MEMCHECKER(
ptrdiff_t recv_ext;
ptrdiff_t send_ext;

memchecker_comm(comm);

err = ompi_comm_neighbors_count(comm, &indegree, &outdegree, &weighted);
err = mca_topo_base_neighbor_count (comm, &indegree, &outdegree);
if (MPI_SUCCESS == err) {
if (MPI_IN_PLACE != sendbuf) {
for ( i = 0; i < outdegree; i++ ) {
Expand Down Expand Up @@ -105,7 +104,7 @@ int MPI_Ineighbor_alltoallw(const void *sendbuf, const int sendcounts[], const M
return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME);
}

err = ompi_comm_neighbors_count(comm, &indegree, &outdegree, &weighted);
err = mca_topo_base_neighbor_count (comm, &indegree, &outdegree);
OMPI_ERRHANDLER_CHECK(err, comm, err, FUNC_NAME);
for (i = 0; i < outdegree; ++i) {
OMPI_CHECK_DATATYPE_FOR_SEND(err, sendtypes[i], sendcounts[i]);
Expand Down
9 changes: 4 additions & 5 deletions ompi/mpi/c/neighbor_alltoallv.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights
* Copyright (c) 2012-2017 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2014-2015 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
Expand All @@ -32,7 +32,6 @@
#include "ompi/errhandler/errhandler.h"
#include "ompi/datatype/ompi_datatype.h"
#include "ompi/memchecker.h"
#include "ompi/communicator/comm_helpers.h"
#include "ompi/mca/topo/topo.h"
#include "ompi/mca/topo/base/base.h"

Expand All @@ -52,7 +51,7 @@ int MPI_Neighbor_alltoallv(const void *sendbuf, const int sendcounts[], const in
MPI_Datatype recvtype, MPI_Comm comm)
{
int i, err;
int indegree, outdegree, weighted;
int indegree, outdegree;

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

err = ompi_comm_neighbors_count(comm, &indegree, &outdegree, &weighted);
err = mca_topo_base_neighbor_count (comm, &indegree, &outdegree);
if (MPI_SUCCESS == err) {
if (MPI_IN_PLACE != sendbuf) {
for ( i = 0; i < outdegree; i++ ) {
Expand Down Expand Up @@ -105,7 +104,7 @@ int MPI_Neighbor_alltoallv(const void *sendbuf, const int sendcounts[], const in
return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME);
}

err = ompi_comm_neighbors_count(comm, &indegree, &outdegree, &weighted);
err = mca_topo_base_neighbor_count (comm, &indegree, &outdegree);
OMPI_ERRHANDLER_CHECK(err, comm, err, FUNC_NAME);
for (i = 0; i < outdegree; ++i) {
OMPI_CHECK_DATATYPE_FOR_SEND(err, sendtype, sendcounts[i]);
Expand Down
9 changes: 4 additions & 5 deletions ompi/mpi/c/neighbor_alltoallw.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2012-2013 Los Alamos National Security, LLC. All rights
* Copyright (c) 2012-2017 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2014-2015 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
Expand All @@ -32,7 +32,6 @@
#include "ompi/errhandler/errhandler.h"
#include "ompi/datatype/ompi_datatype.h"
#include "ompi/memchecker.h"
#include "ompi/communicator/comm_helpers.h"
#include "ompi/mca/topo/topo.h"
#include "ompi/mca/topo/base/base.h"

Expand All @@ -52,15 +51,15 @@ int MPI_Neighbor_alltoallw(const void *sendbuf, const int sendcounts[], const MP
const MPI_Datatype recvtypes[], MPI_Comm comm)
{
int i, err;
int indegree, outdegree, weighted;
int indegree, outdegree;

MEMCHECKER(
ptrdiff_t recv_ext;
ptrdiff_t send_ext;

memchecker_comm(comm);

err = ompi_comm_neighbors_count(comm, &indegree, &outdegree, &weighted);
err = mca_topo_base_neighbor_count (comm, &indegree, &outdegree);
if (MPI_SUCCESS == err) {
if (MPI_IN_PLACE != sendbuf) {
for ( i = 0; i < outdegree; i++ ) {
Expand Down Expand Up @@ -101,7 +100,7 @@ int MPI_Neighbor_alltoallw(const void *sendbuf, const int sendcounts[], const MP
return OMPI_ERRHANDLER_INVOKE(comm, MPI_ERR_ARG, FUNC_NAME);
}

err = ompi_comm_neighbors_count(comm, &indegree, &outdegree, &weighted);
err = mca_topo_base_neighbor_count (comm, &indegree, &outdegree);
OMPI_ERRHANDLER_CHECK(err, comm, err, FUNC_NAME);
for (i = 0; i < outdegree; ++i) {
OMPI_CHECK_DATATYPE_FOR_SEND(err, sendtypes[i], sendcounts[i]);
Expand Down

0 comments on commit c19d561

Please sign in to comment.