diff options
author | Albert Cheng <acheng@hdfgroup.org> | 2011-01-16 10:12:42 (GMT) |
---|---|---|
committer | Albert Cheng <acheng@hdfgroup.org> | 2011-01-16 10:12:42 (GMT) |
commit | 4e7aa2650ad1a70bfab62dac21ffd04b7379614e (patch) | |
tree | ef0a679f4a4407b73380d2d4ae736f9ed8a2462f /testpar | |
parent | e6622c86a87c58e9158b512d6d6e873d8f85ea5f (diff) | |
download | hdf5-4e7aa2650ad1a70bfab62dac21ffd04b7379614e.zip hdf5-4e7aa2650ad1a70bfab62dac21ffd04b7379614e.tar.gz hdf5-4e7aa2650ad1a70bfab62dac21ffd04b7379614e.tar.bz2 |
[svn-r19961] Purpose:
The shape same tests ran too long. Break them into smaller subtests
so that they can finish sub-test in a shorter time. Easier to tell
which one sub-test is taking too much time and/or errors occur in
one fo the sub-tests.
This one breaks the contig_hyperslab_dr_pio_test() into 4 smaller
sub-tests.
Tested: h5committest
Diffstat (limited to 'testpar')
-rw-r--r-- | testpar/t_shapesame.c | 85 | ||||
-rw-r--r-- | testpar/testphdf5.h | 12 |
2 files changed, 76 insertions, 21 deletions
diff --git a/testpar/t_shapesame.c b/testpar/t_shapesame.c index 8f89f9f..ccbc660 100644 --- a/testpar/t_shapesame.c +++ b/testpar/t_shapesame.c @@ -1633,7 +1633,7 @@ contig_hyperslab_dr_pio_test__run_test(const int test_num, /*------------------------------------------------------------------------- - * Function: contig_hyperslab_dr_pio_test() + * Function: contig_hyperslab_dr_pio_test(ShapeSameTestMethods sstest_type) * * Purpose: Test I/O to/from hyperslab selections of different rank in * the parallel case. @@ -1652,12 +1652,15 @@ contig_hyperslab_dr_pio_test__run_test(const int test_num, * if two or more processes are banging on the same * block of memory. * JRM -- 9/10/10 + * Break this one big test into 4 smaller tests according + * to {independent,collective}x{contigous,chunked} datasets. + * AKC -- 2010/01/14 * *------------------------------------------------------------------------- */ void -contig_hyperslab_dr_pio_test(void) +contig_hyperslab_dr_pio_test(ShapeSameTestMethods sstest_type) { int test_num = 0; int edge_size = 10; @@ -1689,9 +1692,6 @@ contig_hyperslab_dr_pio_test(void) long long sample_times[4] = {0, 0, 0, 0}; struct timeval timeval_a; struct timeval timeval_b; - - MPI_Comm_size(MPI_COMM_WORLD, &mpi_size); - MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); #endif /* H5_HAVE_GETTIMEOFDAY */ HDcompile_assert(sizeof(uint32_t) == sizeof(unsigned)); @@ -1710,10 +1710,10 @@ contig_hyperslab_dr_pio_test(void) for ( large_rank = 3; large_rank <= PAR_SS_DR_MAX_RANK; large_rank++ ) { for ( small_rank = 2; small_rank < large_rank; small_rank++ ) { - - chunk_edge_size = 0; - + switch(sstest_type){ + case IND_CONTIG: /* contiguous data set, independent I/O */ + chunk_edge_size = 0; if ( skip_counters[ind_contig_idx] < skips[ind_contig_idx] ) { skip_counters[ind_contig_idx]++; @@ -1735,8 +1735,12 @@ contig_hyperslab_dr_pio_test(void) sample_times[col_contig_idx]); } test_num++; + break; + /* end of case IND_CONTIG */ + case COL_CONTIG: /* contiguous data set, collective I/O */ + chunk_edge_size = 0; if ( skip_counters[col_contig_idx] < skips[col_contig_idx] ) { skip_counters[col_contig_idx]++; @@ -1758,10 +1762,12 @@ contig_hyperslab_dr_pio_test(void) sample_times[ind_contig_idx]); } test_num++; + break; + /* end of case COL_CONTIG */ - chunk_edge_size = 5; - + case IND_CHUNKED: /* chunked data set, independent I/O */ + chunk_edge_size = 5; if ( skip_counters[ind_chunked_idx] < skips[ind_chunked_idx] ) { skip_counters[ind_chunked_idx]++; @@ -1783,8 +1789,12 @@ contig_hyperslab_dr_pio_test(void) sample_times[col_chunked_idx]); } test_num++; + break; + /* end of case IND_CHUNKED */ + case COL_CHUNKED: /* chunked data set, collective I/O */ + chunk_edge_size = 5; if ( skip_counters[col_chunked_idx] < skips[col_chunked_idx] ) { skip_counters[col_chunked_idx]++; @@ -1806,6 +1816,9 @@ contig_hyperslab_dr_pio_test(void) sample_times[ind_chunked_idx]); } test_num++; + break; + /* end of case COL_CHUNKED */ + } /* end of switch(sstest_type) */ #ifdef H5_HAVE_GETTIMEOFDAY if ( time_tests ) { @@ -4183,7 +4196,7 @@ int m; */ void -checker_board_hyperslab_dr_pio_test(void) +checker_board_hyperslab_dr_pio_test(ShapeSameTestMethods sstest_type) { int test_num = 0; int edge_size = 10; @@ -4466,7 +4479,7 @@ void *old_client_data; /* previous error handler arg.*/ #define NFILENAME 2 #define PARATESTFILE filenames[0] const char *FILENAME[NFILENAME]={ - "ParaTest", + "ShapeSameTest", NULL}; char filenames[NFILENAME][PATH_MAX]; hid_t fapl; /* file access property list */ @@ -4729,6 +4742,35 @@ create_faccess_plist(MPI_Comm comm, MPI_Info info, int l_facc_type, } +/* Shape Same test using contigous hyperslab using independent IO on contigous datasets */ +static void +sscontig1(void) +{ + contig_hyperslab_dr_pio_test(IND_CONTIG); +} + +/* Shape Same test using contigous hyperslab using collective IO on contigous datasets */ +static void +sscontig2(void) +{ + contig_hyperslab_dr_pio_test(COL_CONTIG); +} + +/* Shape Same test using contigous hyperslab using independent IO on chunked datasets */ +static void +sscontig3(void) +{ + contig_hyperslab_dr_pio_test(IND_CHUNKED); +} + +/* Shape Same test using contigous hyperslab using collective IO on chunked datasets */ +static void +sscontig4(void) +{ + contig_hyperslab_dr_pio_test(COL_CHUNKED); +} + + int main(int argc, char **argv) { int mpi_size, mpi_rank; /* mpi variables */ @@ -4750,7 +4792,7 @@ int main(int argc, char **argv) if (MAINPROCESS){ printf("===================================\n"); - printf("PHDF5 TESTS START\n"); + printf("Shape Same Tests Start\n"); printf("===================================\n"); } @@ -4768,12 +4810,17 @@ int main(int argc, char **argv) /* Initialize testing framework */ TestInit(argv[0], usage, parse_options); - /* rank projections / shape same tests */ - - AddTest("chsssdrpio", - contig_hyperslab_dr_pio_test, NULL, - "contiguous hyperslab shape same different rank PIO",PARATESTFILE); - + /* Shape Same tests using contigous hyperslab */ + AddTest("sscontig1", sscontig1, NULL, + "Shape Same test, contigous hyperslab, ind IO, contig datasets", PARATESTFILE); + AddTest("sscontig2", sscontig2, NULL, + "Shape Same test, contigous hyperslab, col IO, contig datasets", PARATESTFILE); + AddTest("sscontig3", sscontig3, NULL, + "Shape Same test, contigous hyperslab, ind IO, chunked datasets", PARATESTFILE); + AddTest("sscontig4", sscontig4, NULL, + "Shape Same test, contigous hyperslab, col IO, chunked datasets", PARATESTFILE); + + /* Shape Same tests using checker board hyperslab */ AddTest("cbhsssdrpio", checker_board_hyperslab_dr_pio_test, NULL, "checker board hyperslab shape same different rank PIO",PARATESTFILE); diff --git a/testpar/testphdf5.h b/testpar/testphdf5.h index 555f137..2b83047 100644 --- a/testpar/testphdf5.h +++ b/testpar/testphdf5.h @@ -186,6 +186,14 @@ typedef struct H5Ptest_param_t /* holds extra test parameters */ /* Dataset data type. Int's can be easily octo dumped. */ typedef int DATATYPE; +/* Shape Same Tests Definitions */ +typedef enum { + IND_CONTIG, /* Independent IO on contigous datasets */ + COL_CONTIG, /* Collective IO on contigous datasets */ + IND_CHUNKED, /* Independent IO on chunked datasets */ + COL_CHUNKED /* Collective IO on chunked datasets */ +} ShapeSameTestMethods; + /* Shared global variables */ extern int dim0, dim1; /*Dataset dimensions */ extern int chunkdim0, chunkdim1; /*Chunk dimensions */ @@ -242,8 +250,8 @@ void rr_obj_hdr_flush_confusion_reader(MPI_Comm comm); void rr_obj_hdr_flush_confusion_writer(MPI_Comm comm); void lower_dim_size_comp_test(void); void link_chunk_collective_io_test(void); -void contig_hyperslab_dr_pio_test(void); -void checker_board_hyperslab_dr_pio_test(void); +void contig_hyperslab_dr_pio_test(ShapeSameTestMethods sstest_type); +void checker_board_hyperslab_dr_pio_test(ShapeSameTestMethods sstest_type); #ifdef H5_HAVE_FILTER_DEFLATE void compress_readAll(void); #endif /* H5_HAVE_FILTER_DEFLATE */ |