Skip to content

Commit

Permalink
Removed all the ranks printing out testing information (#3457)
Browse files Browse the repository at this point in the history
  • Loading branch information
brtnfld authored Sep 1, 2023
1 parent b0333a0 commit 896270c
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 9 deletions.
1 change: 1 addition & 0 deletions test/h5test.h
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ H5TEST_DLLVAR size_t n_tests_passed_g;
H5TEST_DLLVAR size_t n_tests_failed_g;
H5TEST_DLLVAR size_t n_tests_skipped_g;
H5TEST_DLLVAR uint64_t vol_cap_flags_g;
H5TEST_DLLVAR int mpi_rank_framework_g;

H5TEST_DLL void h5_send_message(const char *file, const char *arg1, const char *arg2);
H5TEST_DLL herr_t h5_wait_message(const char *file);
Expand Down
16 changes: 10 additions & 6 deletions test/testframe.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ static const void *Test_parameters = NULL;
static const char *TestProgName = NULL;
static void (*TestPrivateUsage)(void) = NULL;
static int (*TestPrivateParser)(int ac, char *av[]) = NULL;
int mpi_rank_framework_g = 0;

/*
* Setup a test function and add it to the list of tests.
Expand Down Expand Up @@ -303,7 +304,8 @@ PerformTests(void)
MESSAGE(2, ("Skipping -- %s (%s) \n", Test[Loop].Description, Test[Loop].Name));
}
else {
MESSAGE(2, ("Testing -- %s (%s) \n", Test[Loop].Description, Test[Loop].Name));
if (mpi_rank_framework_g == 0)
MESSAGE(2, ("Testing -- %s (%s) \n", Test[Loop].Description, Test[Loop].Name));
MESSAGE(5, ("===============================================\n"));
Test[Loop].NumErrors = num_errs;
Test_parameters = Test[Loop].Parameters;
Expand All @@ -316,12 +318,14 @@ PerformTests(void)
}

Test_parameters = NULL; /* clear it. */
MESSAGE(2, ("\n\n"));

if (num_errs)
print_func("!!! %d Error(s) were detected !!!\n\n", (int)num_errs);
else
print_func("All tests were successful. \n\n");
if (mpi_rank_framework_g == 0) {
MESSAGE(2, ("\n\n"));
if (num_errs)
print_func("!!! %d Error(s) were detected !!!\n\n", (int)num_errs);
else
print_func("All tests were successful. \n\n");
}
}

/*
Expand Down
2 changes: 2 additions & 0 deletions testpar/t_2Gio.c
Original file line number Diff line number Diff line change
Expand Up @@ -4278,6 +4278,8 @@ main(int argc, char **argv)
MPI_Comm_size(test_comm, &mpi_size);
MPI_Comm_rank(test_comm, &mpi_rank);

mpi_rank_framework_g = mpi_rank;

memset(filenames, 0, sizeof(filenames));

dim0 = BIG_X_FACTOR;
Expand Down
2 changes: 2 additions & 0 deletions testpar/t_shapesame.c
Original file line number Diff line number Diff line change
Expand Up @@ -4260,6 +4260,8 @@ main(int argc, char **argv)
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);

mpi_rank_framework_g = mpi_rank;

dim0 = ROW_FACTOR * mpi_size;
dim1 = COL_FACTOR * mpi_size;

Expand Down
10 changes: 7 additions & 3 deletions testpar/testphdf5.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,11 @@ parse_options(int argc, char **argv)
nerrors++;
return (1);
}
printf("Test filenames are:\n");
for (i = 0; i < n; i++)
printf(" %s\n", filenames[i]);
if (mpi_rank == 0) {
printf("Test filenames are:\n");
for (i = 0; i < n; i++)
printf(" %s\n", filenames[i]);
}
}

return (0);
Expand Down Expand Up @@ -314,6 +316,8 @@ main(int argc, char **argv)
MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);

mpi_rank_framework_g = mpi_rank;

dim0 = ROW_FACTOR * mpi_size;
dim1 = COL_FACTOR * mpi_size;

Expand Down

0 comments on commit 896270c

Please sign in to comment.