From 8d486144f2d34aa3f3af03c603391e087201a7cc Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Tue, 1 Mar 2016 10:28:28 +0900 Subject: [PATCH] topo/base: correctly support MPI_UNWEIGHTED in mca_topo_base_dist_graph_neighbors() Thanks Jun Kudo for the bug report. (cherry picked from commit open-mpi/ompi@8aff67c3992c3b3f5f1235877d8131f9c59ab684) --- ompi/mca/topo/base/topo_base_dist_graph_neighbors.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ompi/mca/topo/base/topo_base_dist_graph_neighbors.c b/ompi/mca/topo/base/topo_base_dist_graph_neighbors.c index 47648a528f..af49fd7dd7 100644 --- a/ompi/mca/topo/base/topo_base_dist_graph_neighbors.c +++ b/ompi/mca/topo/base/topo_base_dist_graph_neighbors.c @@ -8,7 +8,7 @@ * reserved. * Copyright (c) 2011-2013 Inria. All rights reserved. * Copyright (c) 2011-2013 Universite Bordeaux 1 - * Copyright (c) 2014-2015 Research Organization for Information Science + * Copyright (c) 2014-2016 Research Organization for Information Science * and Technology (RIST). All rights reserved. */ @@ -40,13 +40,13 @@ int mca_topo_base_dist_graph_neighbors(ompi_communicator_t *comm, for (i = 0; i < maxindegree; ++i) { sources[i] = dg->in[i]; - if (NULL != dg->inw) { + if (MPI_UNWEIGHTED != sourceweights && NULL != dg->inw) { sourceweights[i] = dg->inw[i]; } } for (i = 0; i < maxoutdegree; ++i) { destinations[i] = dg->out[i]; - if (NULL != dg->outw) { + if (MPI_UNWEIGHTED != destweights && NULL != dg->outw) { destweights[i] = dg->outw[i]; } }