[mpich2-commits] r7748 - in mpich2/trunk: src/mpi/topo test/mpi/topo
goodell at mcs.anl.gov
goodell at mcs.anl.gov
Tue Jan 18 17:16:54 CST 2011
Author: goodell
Date: 2011-01-18 17:16:54 -0600 (Tue, 18 Jan 2011)
New Revision: 7748
Modified:
mpich2/trunk/src/mpi/topo/dist_gr_create_adj.c
mpich2/trunk/test/mpi/topo/distgraph1.c
Log:
bugfix: erroneous ARGNULL check in MPI_Dist_graph_create_adjacent (tt#976)
MPI_UNWEIGHTED==NULL, so NULL actually is a valid value for sourceweights.
This change also adds a weak check for MPI_UNWEIGHTED in the distgraph1
test.
No reviewer.
Modified: mpich2/trunk/src/mpi/topo/dist_gr_create_adj.c
===================================================================
--- mpich2/trunk/src/mpi/topo/dist_gr_create_adj.c 2011-01-18 22:46:16 UTC (rev 7747)
+++ mpich2/trunk/src/mpi/topo/dist_gr_create_adj.c 2011-01-18 23:16:54 UTC (rev 7748)
@@ -117,8 +117,7 @@
if (sourceweights == MPI_UNWEIGHTED && destweights != MPI_UNWEIGHTED) {
MPIU_ERR_SET(mpi_errno, MPIR_ERR_RECOVERABLE, "**unweightedboth");
}
- MPIR_ERRTEST_ARGNULL(sourceweights, "sourceweights", mpi_errno);
- /* XXX DJG TODO check ranges for array elements too (**argarrayneg / **rankarray)*/
+ /* TODO check ranges for array elements too (**argarrayneg / **rankarray)*/
}
if (outdegree > 0) {
MPIR_ERRTEST_ARGNULL(destinations, "destinations", mpi_errno);
Modified: mpich2/trunk/test/mpi/topo/distgraph1.c
===================================================================
--- mpich2/trunk/test/mpi/topo/distgraph1.c 2011-01-18 22:46:16 UTC (rev 7747)
+++ mpich2/trunk/test/mpi/topo/distgraph1.c 2011-01-18 23:16:54 UTC (rev 7748)
@@ -260,7 +260,16 @@
MPI_Comm_free(&comm);
}
+ /* a weak check that passing MPI_UNWEIGHTED doesn't cause
+ * create_adjacent to explode */
+ MPI_Dist_graph_create_adjacent(MPI_COMM_WORLD, indegree, sources, MPI_UNWEIGHTED,
+ outdegree, destinations, MPI_UNWEIGHTED, MPI_INFO_NULL,
+ reorder, &comm);
+ MPI_Barrier(comm);
+ /* intentionally no verify here, weights won't match */
+ MPI_Comm_free(&comm);
+
/* MPI_Dist_graph_create() where each process specifies its
* outgoing edges */
if (rank == 0) DPRINTF(("testing MPI_Dist_graph_create w/ outgoing only\n"));
More information about the mpich2-commits
mailing list