diff options
author | MuQun Yang <ymuqun@hdfgroup.org> | 2006-03-23 21:18:02 (GMT) |
---|---|---|
committer | MuQun Yang <ymuqun@hdfgroup.org> | 2006-03-23 21:18:02 (GMT) |
commit | b22b47ced52e18aa16fd5347d1333f7c7aaa82af (patch) | |
tree | e51fa930d9b499c5dc0cd3b23cdfaaa804a8c1c6 | |
parent | 9e0d6a4add26efeca8fff1c97481008d21709470 (diff) | |
download | hdf5-b22b47ced52e18aa16fd5347d1333f7c7aaa82af.zip hdf5-b22b47ced52e18aa16fd5347d1333f7c7aaa82af.tar.gz hdf5-b22b47ced52e18aa16fd5347d1333f7c7aaa82af.tar.bz2 |
[svn-r12148] Purpose:
Add tests for optional APIs to support collective chunk IO
Description:
In order to test whether library picks up the user's options,
The number of chunks need to be varied for different processes,
Selection of the number of processes selected in one chunk also
need to be varied.
Solution:
Create two cases,
1. Each chunk only selected by one unique process, this case
library should use independent for collective call.
2. One-third of the processes occupies the top half of the whole domain,
The rest of the processes occupies the lower half of the domain.
The total number of chunk is a fixed number 8.
Platforms tested:
Linux 2.4 with mpich 1.2.6(only)
Since I only checked in the code that handles the selection, haven't added any new tests yet. So it won't affect any platforms.
Misc. update:
-rw-r--r-- | testpar/t_coll_chunk.c | 32 | ||||
-rw-r--r-- | testpar/testphdf5.h | 2 |
2 files changed, 33 insertions, 1 deletions
diff --git a/testpar/t_coll_chunk.c b/testpar/t_coll_chunk.c index 1591764..49f0dfd 100644 --- a/testpar/t_coll_chunk.c +++ b/testpar/t_coll_chunk.c @@ -434,6 +434,7 @@ ccslab_set(int mpi_rank, hsize_t block[], int mode) { + switch (mode){ case BYROW_CONT: @@ -475,7 +476,36 @@ ccslab_set(int mpi_rank, start[1] = 0; break; - + + case BYROW_SELECTUNBALANCE: + /* The first one-third of the number of processes only + select top half of the domain, The rest will select the bottom + half of the domain. */ + + block[0] = 1; + count[0] = 2; + stride[0] = SPACE_DIM1*mpi_size/4+1; + block[1] = SPACE_DIM2; + count[1] = 1; + start[1] = 0; + stride[1] = 1; + if((mpi_rank *3)<(mpi_size*2)) start[0] = mpi_rank; + else start[0] = 1 + SPACE_DIM1*mpi_size/2 + (mpi_rank-2*mpi_size/3); break; + + case BYROW_SELECTINCHUNK: + /* Each process will only select one chunk */ + + block[0] = 1; + count[0] = 1; + start[0] = mpi_rank*SPACE_DIM1; + stride[0]= 1; + block[1] = SPACE_DIM2; + count[1] = 1; + stride[1]= 1; + start[1] = 0; + + break; + default: /* Unknown mode. Set it to cover the whole dataset. */ block[0] = SPACE_DIM1*mpi_size; diff --git a/testpar/testphdf5.h b/testpar/testphdf5.h index 0e35fcf..7c47e0a 100644 --- a/testpar/testphdf5.h +++ b/testpar/testphdf5.h @@ -56,6 +56,8 @@ #define BYROW_CONT 1 #define BYROW_DISCONT 2 #define BYROW_SELECTNONE 3 +#define BYROW_SELECTUNBALANCE 4 +#define BYROW_SELECTINCHUNK 5 #define DSET_COLLECTIVE_CHUNK_NAME "coll_chunk_name" |