From 23eb0393ded2c15d068fcc3c427cf4baf914d926 Mon Sep 17 00:00:00 2001 From: Christian Chilan Date: Thu, 9 Apr 2009 16:32:52 -0500 Subject: [svn-r16723] Modified dset and t_chunk_alloc tests to use dataset dimensions that are multiples of the number of processors. Tested on jam and abe. --- testpar/t_chunk_alloc.c | 18 ++++-------------- testpar/testphdf5.c | 21 ++++++++------------- testpar/testphdf5.h | 7 ++----- 3 files changed, 14 insertions(+), 32 deletions(-) diff --git a/testpar/t_chunk_alloc.c b/testpar/t_chunk_alloc.c index 250a63a..4c581f6 100644 --- a/testpar/t_chunk_alloc.c +++ b/testpar/t_chunk_alloc.c @@ -26,8 +26,7 @@ static int mpi_size, mpi_rank; #define DSET_NAME "ExtendibleArray" #define CHUNK_SIZE 1000 /* #elements per chunk */ -#define CHUNK_FACTOR 2000 /* default dataset size in terms of chunks */ -#define MIN_CHUNK_FACTOR 2 /* dataset size in terms of chunks if mpi_size reaches threshold */ +#define CHUNK_FACTOR 200 /* default dataset size in terms of chunks */ #define CLOSE 1 #define NO_CLOSE 0 @@ -111,10 +110,7 @@ create_chunked_dataset(const char *filename, int chunk_factor, write_type write_ /* Only MAINPROCESS should create the file. Others just wait. */ if (MAINPROCESS){ - if (mpi_size\tfilename prefix\n"); printf("\t-2\t\tuse Split-file together with MPIO\n"); printf("\t-p\t\tuse combo MPI-POSIX driver\n"); - printf("\t-d \tdataset dimensions. Defaults (%d,%d)\n", - DIM0, DIM1); + printf("\t-d \tdataset dimensions factors. Defaults (%d,%d)\n", + ROW_FACTOR, COL_FACTOR); printf("\t-c \tdataset chunk dimensions. Defaults (dim0/10,dim1/10)\n"); printf("\n"); } @@ -138,13 +138,8 @@ parse_options(int argc, char **argv) MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); /* setup default chunk-size. Make sure sizes are > 0 */ - if (mpi_size < PROCS_THRESHOLD) { - dim0 = ROW_FACTOR*mpi_size; - dim1 = COL_FACTOR*mpi_size; - } else { - dim0 = MIN_ROW_FACTOR*(mpi_size-PROCS_THRESHOLD)+ROW_FACTOR*PROCS_THRESHOLD; - dim1 = MIN_COL_FACTOR*(mpi_size-PROCS_THRESHOLD)+COL_FACTOR*PROCS_THRESHOLD; - } + dim0 = ROW_FACTOR*mpi_size; + dim1 = COL_FACTOR*mpi_size; chunkdim0 = (dim0+9)/10; chunkdim1 = (dim1+9)/10; @@ -192,9 +187,9 @@ parse_options(int argc, char **argv) nerrors++; return(1); } - dim0 = atoi(*(++argv)); + dim0 = atoi(*(++argv))*mpi_size; argc--; - dim1 = atoi(*(++argv)); + dim1 = atoi(*(++argv))*mpi_size; /* set default chunkdim sizes too */ chunkdim0 = (dim0+9)/10; chunkdim1 = (dim1+9)/10; diff --git a/testpar/testphdf5.h b/testpar/testphdf5.h index 5f37313..24c4432 100644 --- a/testpar/testphdf5.h +++ b/testpar/testphdf5.h @@ -36,11 +36,8 @@ enum H5TEST_COLL_CHUNK_API {API_NONE=0,API_LINK_HARD, /* Constants definitions */ #define DIM0 600 /* Default dataset sizes. */ #define DIM1 1200 /* Values are from a monitor pixel sizes */ -#define PROCS_THRESHOLD 32 /* Threshold for changing dimensions factors */ -#define ROW_FACTOR 20 /* Nominal row factor for dataset size */ -#define COL_FACTOR 40 /* Nominal column factor for dataset size */ -#define MIN_ROW_FACTOR 2 /* Row factor after threshold on processors */ -#define MIN_COL_FACTOR 4 /* Column factor after threshold on processors */ +#define ROW_FACTOR 8 /* Nominal row factor for dataset size */ +#define COL_FACTOR 16 /* Nominal column factor for dataset size */ #define RANK 2 #define DATASETNAME1 "Data1" #define DATASETNAME2 "Data2" -- cgit v0.12