Skip to content
This repository was archived by the owner on Sep 30, 2022. It is now read-only.

Commit b3c8205

Browse files
author
rhc54
committed
Merge pull request #995 from ggouaillardet/topic/v1.10/mca_topo_base_dist_graph_neighbors
topo/base: correctly support MPI_UNWEIGHTED in mca_topo_base_dist_gra…
2 parents 5bee5d5 + 4afdab0 commit b3c8205

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ompi/mca/topo/base/topo_base_dist_graph_neighbors.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
* reserved.
99
* Copyright (c) 2011-2012 INRIA. All rights reserved.
1010
* Copyright (c) 2011-2012 Universite Bordeaux 1
11+
* Copyright (c) 2016 Research Organization for Information Science
12+
* and Technology (RIST). All rights reserved.
1113
*/
1214

1315
#include "ompi_config.h"
@@ -34,13 +36,13 @@ int mca_topo_base_dist_graph_neighbors(ompi_communicator_t *comm,
3436

3537
for (i = 0; (i < dg->indegree) && (i < maxindegree); ++i) {
3638
sources[i] = dg->in[i];
37-
if (NULL != dg->inw) {
39+
if (MPI_UNWEIGHTED != sourceweights && NULL != dg->inw) {
3840
sourceweights[i] = dg->inw[i];
3941
}
4042
}
4143
for (i = 0; (i < dg->outdegree) && (i < maxoutdegree); ++i) {
4244
destinations[i] = dg->out[i];
43-
if (NULL != dg->outw) {
45+
if (MPI_UNWEIGHTED != destweights && NULL != dg->outw) {
4446
destweights[i] = dg->outw[i];
4547
}
4648
}

0 commit comments

Comments
 (0)