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

Commit 595d45e

Browse files
committed
Merge pull request #996 from ggouaillardet/topic/v2.x/mca_topo_base_dist_graph_neighbors
topo/base: correctly support MPI_UNWEIGHTED in mca_topo_base_dist_gra…
2 parents 718ca8d + 8d48614 commit 595d45e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ompi/mca/topo/base/topo_base_dist_graph_neighbors.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* reserved.
99
* Copyright (c) 2011-2013 Inria. All rights reserved.
1010
* Copyright (c) 2011-2013 Universite Bordeaux 1
11-
* Copyright (c) 2014-2015 Research Organization for Information Science
11+
* Copyright (c) 2014-2016 Research Organization for Information Science
1212
* and Technology (RIST). All rights reserved.
1313
*/
1414

@@ -40,13 +40,13 @@ int mca_topo_base_dist_graph_neighbors(ompi_communicator_t *comm,
4040

4141
for (i = 0; i < maxindegree; ++i) {
4242
sources[i] = dg->in[i];
43-
if (NULL != dg->inw) {
43+
if (MPI_UNWEIGHTED != sourceweights && NULL != dg->inw) {
4444
sourceweights[i] = dg->inw[i];
4545
}
4646
}
4747
for (i = 0; i < maxoutdegree; ++i) {
4848
destinations[i] = dg->out[i];
49-
if (NULL != dg->outw) {
49+
if (MPI_UNWEIGHTED != destweights && NULL != dg->outw) {
5050
destweights[i] = dg->outw[i];
5151
}
5252
}

0 commit comments

Comments
 (0)