[svn-r9649] Purpose:

Adding routines to test irrgular hyperslab selection inside one chunk.

Description:
For debugging purpose, tests are turned off now.

Solution:

Platforms tested:

AIX 5.1 and Linux 2.4 with parallel enabled.
Misc. update:
This commit is contained in:
MuQun Yang 2004-12-08 18:33:40 -05:00
parent 14f88c168f
commit e7e76b6876
3 changed files with 191 additions and 8 deletions

View File

@ -38,7 +38,169 @@
#include "testphdf5.h"
void coll_irregular_cont_write()
static void coll_write_test(int chunk_factor);
static void coll_read_test(int chunk_factor);
/*-------------------------------------------------------------------------
* Function: coll_irregular_cont_write
*
* Purpose: Test the collectively irregular hyperslab write in contiguous
storage
*
* Return: Success: 0
*
* Failure: -1
*
* Programmer: Unknown
* Dec 2nd, 2004
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
void
coll_irregular_cont_write(void)
{
coll_write_test(0);
}
/*-------------------------------------------------------------------------
* Function: coll_irregular_cont_read
*
* Purpose: Test the collectively irregular hyperslab read in contiguous
storage
*
* Return: Success: 0
*
* Failure: -1
*
* Programmer: Unknown
* Dec 2nd, 2004
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
void
coll_irregular_cont_read(void)
{
coll_read_test(0);
}
/*-------------------------------------------------------------------------
* Function: coll_irregular_simple_chunk_write
*
* Purpose: Test the collectively irregular hyperslab write in chunk
storage(1 chunk)
*
* Return: Success: 0
*
* Failure: -1
*
* Programmer: Unknown
* Dec 2nd, 2004
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
void
coll_irregular_simple_chunk_write(void)
{
coll_write_test(1);
}
/*-------------------------------------------------------------------------
* Function: coll_irregular_simple_chunk_read
*
* Purpose: Test the collectively irregular hyperslab read in chunk
storage(1 chunk)
*
* Return: Success: 0
*
* Failure: -1
*
* Programmer: Unknown
* Dec 2nd, 2004
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
void
coll_irregular_simple_chunk_read(void)
{
coll_read_test(1);
}
/*-------------------------------------------------------------------------
* Function: coll_irregular_complex_chunk_write
*
* Purpose: Test the collectively irregular hyperslab write in chunk
storage(4 chunks)
*
* Return: Success: 0
*
* Failure: -1
*
* Programmer: Unknown
* Dec 2nd, 2004
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
void
coll_irregular_complex_chunk_write(void)
{
coll_write_test(4);
}
/*-------------------------------------------------------------------------
* Function: coll_irregular_complex_chunk_read
*
* Purpose: Test the collectively irregular hyperslab read in chunk
storage(1 chunk)
*
* Return: Success: 0
*
* Failure: -1
*
* Programmer: Unknown
* Dec 2nd, 2004
*
* Modifications:
*
*-------------------------------------------------------------------------
*/
void
coll_irregular_complex_chunk_read(void)
{
coll_read_test(4);
}
void coll_write_test(int chunk_factor)
{
char *filename;
@ -61,7 +223,7 @@ void coll_irregular_cont_write()
hsize_t stride[2]; /* Stride of hyperslab */
hsize_t count[2]; /* Block count */
hsize_t block[2]; /* Block sizes */
hsize_t chunk_dims[RANK];
herr_t ret;
unsigned i,j;
@ -111,7 +273,14 @@ void coll_irregular_cont_write()
ret = H5Pset_fill_value(plist, H5T_NATIVE_INT, &fillvalue);
VRFY((ret >= 0),"Fill value creation property list succeeded");
if(chunk_factor != 0) {
chunk_dims[0] = FSPACE_DIM1/chunk_factor;
chunk_dims[1] = FSPACE_DIM2/chunk_factor;
ret = H5Pset_chunk(plist, 2, chunk_dims);
VRFY((ret >= 0),"chunk creation property list succeeded");
}
/*
* Create dataspace for the dataset in the file.
*/
@ -181,7 +350,7 @@ void coll_irregular_cont_write()
ret = H5Sselect_hyperslab(mspaceid1, H5S_SELECT_SET, start, stride, count, block);
VRFY((ret >= 0),"hyperslab selection succeeded");
ret = H5Dwrite(dataseti, H5T_NATIVE_INT, mspaceid1, fspaceid, H5P_DEFAULT, vector);
VRFY((ret >= 0),"dataset independent write succeed");
xfer_plist = H5Pcreate(H5P_DATASET_XFER);
@ -192,6 +361,7 @@ void coll_irregular_cont_write()
ret = H5Dwrite(datasetc, H5T_NATIVE_INT, mspaceid1, fspaceid, xfer_plist, vector);
/*ret = H5Dwrite(datasetc, H5T_NATIVE_INT, mspaceid1, fspaceid, H5P_DEFAULT, vector);*/
VRFY((ret >= 0),"dataset collective write succeed");
ret = H5Sclose(mspaceid1);
@ -391,7 +561,7 @@ void coll_irregular_cont_write()
}
void coll_irregular_cont_read()
void coll_read_test(int chunk_factor)
{
char *filename;

View File

@ -352,6 +352,7 @@ int main(int argc, char **argv)
TestInit(argv[0], usage, parse_options);
/* Tests are generally arranged from least to most complexity... */
AddTest("mpiodup", test_fapl_mpio_dup, NULL,
"fapl_mpio duplicate", NULL);
AddTest("posixdup", test_fapl_mpiposix_dup, NULL,
@ -433,13 +434,21 @@ int main(int argc, char **argv)
AddTest("cchunk4", coll_chunk4,NULL,
"collective to independent chunk io",PARATESTFILE);
}
/*#ifdef KYANG*/
#ifdef KYANG
#ifdef KYANG
AddTest("ccontw",coll_irregular_cont_write,NULL,
"collective irregular contiguous write",PARATESTFILE);
AddTest("ccontr",coll_irregular_cont_read,NULL,
"collective irregular contiguous read",PARATESTFILE);
#endif
AddTest("cschunkw",coll_irregular_simple_chunk_write,NULL,
"collective irregular simple chunk write",PARATESTFILE);
AddTest("cschunkr",coll_irregular_simple_chunk_read,NULL,
"collective irregular simple chunk read",PARATESTFILE);
#endif
AddTest("null", null_dataset, NULL,
"null dataset test", PARATESTFILE);

View File

@ -259,6 +259,10 @@ void coll_chunk3(void);
void coll_chunk4(void);
void coll_irregular_cont_read(void);
void coll_irregular_cont_write(void);
void coll_irregular_simple_chunk_read(void);
void coll_irregular_simple_chunk_write(void);
void coll_irregular_complex_chunk_read(void);
void coll_irregular_complex_chunk_write(void);
void io_mode_confusion(void);
#ifdef H5_HAVE_FILTER_DEFLATE
void compress_readAll(void);