[mpich-commits] r10612 - mpich2/trunk/test/mpi/topo
gropp at mcs.anl.gov
gropp at mcs.anl.gov
Mon Nov 19 09:40:43 CST 2012
Author: gropp
Date: 2012-11-19 09:40:43 -0600 (Mon, 19 Nov 2012)
New Revision: 10612
Modified:
mpich2/trunk/test/mpi/topo/distgraph1.c
Log:
Correct test to mark off part that requires MPI-3 and use Mtest routine for verbose output
Modified: mpich2/trunk/test/mpi/topo/distgraph1.c
===================================================================
--- mpich2/trunk/test/mpi/topo/distgraph1.c 2012-11-19 15:36:49 UTC (rev 10611)
+++ mpich2/trunk/test/mpi/topo/distgraph1.c 2012-11-19 15:40:43 UTC (rev 10612)
@@ -15,10 +15,6 @@
#define NUM_GRAPHS 10
#define MAX_WEIGHT 100
-
-/* #define DPRINTF(arg_list_) printf arg_list_ */
-#define DPRINTF(arg_list_)
-
/* convenience globals */
int size, rank;
@@ -250,12 +246,12 @@
for (i = 0; i < NUM_GRAPHS; i++) {
create_graph_layout(i);
if (rank == 0) {
- DPRINTF(("using graph layout '%s'\n", graph_layout_name));
+ MTestPrintfMsg( 1, "using graph layout '%s'\n", graph_layout_name );
}
/* MPI_Dist_graph_create_adjacent */
if (rank == 0) {
- DPRINTF(("testing MPI_Dist_graph_create_adjacent\n"));
+ MTestPrintfMsg( 1, "testing MPI_Dist_graph_create_adjacent\n" );
}
indegree = 0;
k = 0;
@@ -299,7 +295,8 @@
/* MPI_Dist_graph_create() where each process specifies its
* outgoing edges */
if (rank == 0) {
- DPRINTF(("testing MPI_Dist_graph_create w/ outgoing only\n"));
+ MTestPrintfMsg( 1,
+ "testing MPI_Dist_graph_create w/ outgoing only\n" );
}
sources[0] = rank;
k = 0;
@@ -322,7 +319,8 @@
/* MPI_Dist_graph_create() where each process specifies its
* incoming edges */
if (rank == 0) {
- DPRINTF(("testing MPI_Dist_graph_create w/ incoming only\n"));
+ MTestPrintfMsg( 1,
+ "testing MPI_Dist_graph_create w/ incoming only\n" );
}
k = 0;
for (j = 0; j < size; j++) {
@@ -345,7 +343,8 @@
/* MPI_Dist_graph_create() where rank 0 specifies the entire
* graph */
if (rank == 0) {
- DPRINTF(("testing MPI_Dist_graph_create w/ rank 0 specifies only\n"));
+ MTestPrintfMsg( 1,
+ "testing MPI_Dist_graph_create w/ rank 0 specifies only\n" );
}
p = 0;
for (j = 0; j < size; j++) {
@@ -370,7 +369,8 @@
* graph and all other ranks pass NULL. Can catch implementation
* problems when MPI_UNWEIGHTED==NULL. */
if (rank == 0) {
- DPRINTF(("testing MPI_Dist_graph_create w/ rank 0 specifies only -- NULLs\n"));
+ MTestPrintfMsg( 1,
+ "testing MPI_Dist_graph_create w/ rank 0 specifies only -- NULLs\n");
}
p = 0;
for (j = 0; j < size; j++) {
@@ -412,7 +412,7 @@
/* MPI_Dist_graph_create() with no graph */
if (rank == 0) {
- DPRINTF(("testing MPI_Dist_graph_create w/ no graph\n"));
+ MTestPrintfMsg( 1, "testing MPI_Dist_graph_create w/ no graph\n" );
}
for (reorder = 0; reorder <= 1; reorder++) {
MPI_Dist_graph_create(MPI_COMM_WORLD, 0, sources, degrees,
@@ -425,9 +425,14 @@
MPI_Comm_free(&comm);
}
- /* MPI_Dist_graph_create() with no graph -- passing MPI_WEIGHTS_EMPTY instead */
+ /* MPI_Dist_graph_create() with no graph -- passing MPI_WEIGHTS_EMPTY
+ instead */
+ /* NOTE that MPI_WEIGHTS_EMPTY was added in MPI-3 and does not
+ appear before then. This part of the test thus requires a check
+ on the MPI major version */
+#if MPI_VERSION >= 3
if (rank == 0) {
- DPRINTF(("testing MPI_Dist_graph_create w/ no graph\n"));
+ MTestPrintfMsg( 1, "testing MPI_Dist_graph_create w/ no graph\n" );
}
for (reorder = 0; reorder <= 1; reorder++) {
MPI_Dist_graph_create(MPI_COMM_WORLD, 0, sources, degrees,
@@ -439,11 +444,12 @@
}
MPI_Comm_free(&comm);
}
+#endif
-
/* MPI_Dist_graph_create() with no graph -- passing NULLs instead */
if (rank == 0) {
- DPRINTF(("testing MPI_Dist_graph_create w/ no graph -- NULLs\n"));
+ MTestPrintfMsg( 1,
+ "testing MPI_Dist_graph_create w/ no graph -- NULLs\n" );
}
for (reorder = 0; reorder <= 1; reorder++) {
MPI_Dist_graph_create(MPI_COMM_WORLD, 0, NULL, NULL,
@@ -461,7 +467,8 @@
/* MPI_Dist_graph_create() with no graph -- passing NULLs+MPI_UNWEIGHTED instead */
if (rank == 0) {
- DPRINTF(("testing MPI_Dist_graph_create w/ no graph -- NULLs+MPI_UNWEIGHTED\n"));
+ MTestPrintfMsg( 1,
+ "testing MPI_Dist_graph_create w/ no graph -- NULLs+MPI_UNWEIGHTED\n" );
}
for (reorder = 0; reorder <= 1; reorder++) {
MPI_Dist_graph_create(MPI_COMM_WORLD, 0, NULL, NULL,
@@ -479,7 +486,8 @@
/* MPI_Dist_graph_create_adjacent() with no graph */
if (rank == 0) {
- DPRINTF(("testing MPI_Dist_graph_create_adjacent w/ no graph\n"));
+ MTestPrintfMsg( 1,
+ "testing MPI_Dist_graph_create_adjacent w/ no graph\n" );
}
for (reorder = 0; reorder <= 1; reorder++) {
MPI_Dist_graph_create_adjacent(MPI_COMM_WORLD, 0, sources, sweights,
@@ -493,8 +501,13 @@
}
/* MPI_Dist_graph_create_adjacent() with no graph -- passing MPI_WEIGHTS_EMPTY instead */
+ /* NOTE that MPI_WEIGHTS_EMPTY was added in MPI-3 and does not
+ appear before then. This part of the test thus requires a check
+ on the MPI major version */
+#if MPI_VERSION >= 3
if (rank == 0) {
- DPRINTF(("testing MPI_Dist_graph_create_adjacent w/ no graph -- MPI_WEIGHTS_EMPTY\n"));
+ MTestPrintfMsg( 1,
+ "testing MPI_Dist_graph_create_adjacent w/ no graph -- MPI_WEIGHTS_EMPTY\n" );
}
for (reorder = 0; reorder <= 1; reorder++) {
MPI_Dist_graph_create_adjacent(MPI_COMM_WORLD, 0, sources, MPI_WEIGHTS_EMPTY,
@@ -506,10 +519,12 @@
}
MPI_Comm_free(&comm);
}
+#endif
/* MPI_Dist_graph_create_adjacent() with no graph -- passing NULLs instead */
if (rank == 0) {
- DPRINTF(("testing MPI_Dist_graph_create_adjacent w/ no graph -- NULLs\n"));
+ MTestPrintfMsg( 1,
+ "testing MPI_Dist_graph_create_adjacent w/ no graph -- NULLs\n" );
}
for (reorder = 0; reorder <= 1; reorder++) {
MPI_Dist_graph_create_adjacent(MPI_COMM_WORLD, 0, NULL, NULL,
@@ -527,7 +542,8 @@
/* MPI_Dist_graph_create_adjacent() with no graph -- passing NULLs+MPI_UNWEIGHTED instead */
if (rank == 0) {
- DPRINTF(("testing MPI_Dist_graph_create_adjacent w/ no graph -- NULLs+MPI_UNWEIGHTED\n"));
+ MTestPrintfMsg( 1,
+"testing MPI_Dist_graph_create_adjacent w/ no graph -- NULLs+MPI_UNWEIGHTED\n");
}
for (reorder = 0; reorder <= 1; reorder++) {
MPI_Dist_graph_create_adjacent(MPI_COMM_WORLD, 0, NULL, MPI_UNWEIGHTED,
More information about the commits
mailing list