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]; } }