test/h5{b,u}_{read,write}.c
- fixes for serial version - h5u_test_write4(): bugfix: we have to write new attributes since we are in append-only mode
This commit is contained in:
+3
-3
@@ -235,17 +235,17 @@ test_read_data32(h5_file_t file, int step)
|
||||
void h5b_test_read1(void)
|
||||
{
|
||||
h5_file_t file1;
|
||||
|
||||
h5_err_t status;
|
||||
MPI_Comm comm = MPI_COMM_WORLD;
|
||||
|
||||
TEST("Opening file once, read-only");
|
||||
h5_prop_t props = H5CreateFileProp ();
|
||||
#if defined(PARALLEL_IO)
|
||||
MPI_Comm comm = MPI_COMM_WORLD;
|
||||
status = H5SetPropFileMPIOCollective (props, &comm);
|
||||
RETURN(status, H5_SUCCESS, "H5SetPropFileMPIOCollective");
|
||||
status = H5SetPropFileThrottle (props, 2);
|
||||
RETURN(status, H5_SUCCESS, "H5SetPropFileThrottle");
|
||||
|
||||
#endif
|
||||
file1 = H5OpenFile(FILENAME, H5_O_RDONLY, props);
|
||||
status = H5CheckFile(file1);
|
||||
RETURN(status, H5_SUCCESS, "H5CheckFile");
|
||||
|
||||
+3
-3
@@ -177,17 +177,17 @@ test_write_data32(h5_file_t file, int step)
|
||||
void h5b_test_write1(void)
|
||||
{
|
||||
h5_file_t file1;
|
||||
|
||||
h5_err_t status;
|
||||
MPI_Comm comm = MPI_COMM_WORLD;
|
||||
|
||||
TEST("Opening file once, write-truncate");
|
||||
h5_prop_t props = H5CreateFileProp ();
|
||||
#if defined (PARALLEL_IO)
|
||||
MPI_Comm comm = MPI_COMM_WORLD;
|
||||
status = H5SetPropFileMPIOCollective (props, &comm);
|
||||
RETURN(status, H5_SUCCESS, "H5SetPropFileMPIOCollective");
|
||||
status = H5SetPropFileThrottle (props, 2);
|
||||
RETURN(status, H5_SUCCESS, "H5SetPropFileThrottle");
|
||||
|
||||
#endif
|
||||
file1 = H5OpenFile(FILENAME, H5_O_WRONLY, props);
|
||||
status = H5CheckFile(file1);
|
||||
RETURN(status, H5_SUCCESS, "H5CheckFile");
|
||||
|
||||
+7
-7
@@ -475,15 +475,15 @@ void h5u_test_read2(void)
|
||||
void h5u_test_read3(void)
|
||||
{
|
||||
h5_file_t file1;
|
||||
|
||||
h5_int64_t status;
|
||||
MPI_Comm comm = MPI_COMM_WORLD;
|
||||
|
||||
|
||||
TEST("Opening file once, read-only, MPI-POSIX VFD");
|
||||
h5_prop_t props = H5CreateFileProp ();
|
||||
#if defined(PARALLEL_IO)
|
||||
MPI_Comm comm = MPI_COMM_WORLD;
|
||||
status = H5SetPropFileMPIOPosix (props, &comm);
|
||||
RETURN(status, H5_SUCCESS, "H5SetPropFileMPIOPosix");
|
||||
|
||||
#endif
|
||||
file1 = H5OpenFile(FILENAME, H5_O_RDONLY, props);
|
||||
status = H5CheckFile(file1);
|
||||
RETURN(status, H5_SUCCESS, "H5CheckFile");
|
||||
@@ -504,15 +504,15 @@ void h5u_test_read4(void)
|
||||
{
|
||||
h5_file_t file1;
|
||||
h5_file_t file2;
|
||||
|
||||
h5_err_t status;
|
||||
MPI_Comm comm = MPI_COMM_WORLD;
|
||||
|
||||
TEST("Opening file twice, read-only, MPI-IO Independent VFD");
|
||||
h5_prop_t props = H5CreateFileProp ();
|
||||
#if defined(PARALLEL_IO)
|
||||
MPI_Comm comm = MPI_COMM_WORLD;
|
||||
status = H5SetPropFileMPIOIndependent (props, &comm);
|
||||
RETURN(status, H5_SUCCESS, "H5SetPropFileMPIOIndependent");
|
||||
|
||||
#endif
|
||||
file1 = H5OpenFile(FILENAME, H5_O_RDONLY, props);
|
||||
status = H5CheckFile(file1);
|
||||
RETURN(status, H5_SUCCESS, "H5CheckFile");
|
||||
|
||||
+19
-11
@@ -41,7 +41,7 @@ test_write_step_attribs(h5_file_t file, int position)
|
||||
h5_err_t status;
|
||||
char name[ATTR_NAME_SIZE];
|
||||
|
||||
TEST("Writing file attributes");
|
||||
TEST("Writing step attributes");
|
||||
|
||||
get_attr_name(name, "str", position);
|
||||
status = H5WriteStepAttribString(file, name, ATTR_STR_VAL);
|
||||
@@ -354,13 +354,15 @@ void h5u_test_write1(void)
|
||||
{
|
||||
h5_file_t file1;
|
||||
h5_err_t status;
|
||||
MPI_Comm comm = MPI_COMM_WORLD;
|
||||
|
||||
TEST("Opening file once, write-truncate");
|
||||
h5_prop_t props = H5CreateFileProp ();
|
||||
|
||||
#if defined(PARALLEL_IO)
|
||||
MPI_Comm comm = MPI_COMM_WORLD;
|
||||
status = H5SetPropFileMPIOCollective (props, &comm);
|
||||
RETURN(status, H5_SUCCESS, "H5SetPropFileMPIOCollective");
|
||||
|
||||
#endif
|
||||
file1 = H5OpenFile(FILENAME, H5_O_WRONLY, props);
|
||||
status = H5CheckFile(file1);
|
||||
RETURN(status, H5_SUCCESS, "H5CheckFile");
|
||||
@@ -380,13 +382,15 @@ void h5u_test_write2(void)
|
||||
h5_file_t file1;
|
||||
h5_file_t file2;
|
||||
h5_err_t status;
|
||||
MPI_Comm comm = MPI_COMM_WORLD;
|
||||
|
||||
TEST("Opening file twice, write-append + read-only");
|
||||
h5_prop_t props = H5CreateFileProp ();
|
||||
|
||||
#if defined(PARALLEL_IO)
|
||||
MPI_Comm comm = MPI_COMM_WORLD;
|
||||
status = H5SetPropFileMPIOCollective (props, &comm);
|
||||
RETURN(status, H5_SUCCESS, "H5SetPropFileMPIOCollective");
|
||||
|
||||
#endif
|
||||
file1 = H5OpenFile(FILENAME, H5_O_APPENDONLY, props);
|
||||
status = H5CheckFile(file1);
|
||||
RETURN(status, H5_SUCCESS, "H5CheckFile");
|
||||
@@ -411,15 +415,17 @@ void h5u_test_write2(void)
|
||||
void h5u_test_write3(void)
|
||||
{
|
||||
h5_file_t file1;
|
||||
|
||||
h5_err_t status;
|
||||
MPI_Comm comm = MPI_COMM_WORLD;
|
||||
|
||||
TEST("Opening file once, write-truncate, MPI-POSIX VFD");
|
||||
|
||||
h5_prop_t props = H5CreateFileProp ();
|
||||
|
||||
#if defined(PARALLEL_IO)
|
||||
MPI_Comm comm = MPI_COMM_WORLD;
|
||||
status = H5SetPropFileMPIOPosix (props, &comm);
|
||||
RETURN(status, H5_SUCCESS, "H5SetPropFileMPIOPosix");
|
||||
|
||||
#endif
|
||||
file1 = H5OpenFile(FILENAME, H5_O_WRONLY, props);
|
||||
|
||||
status = H5CheckFile(file1);
|
||||
@@ -447,13 +453,15 @@ void h5u_test_write4(void)
|
||||
|
||||
h5_err_t status;
|
||||
h5_prop_t props;
|
||||
MPI_Comm comm = MPI_COMM_WORLD;
|
||||
|
||||
TEST("Opening file twice, write-append + read-only, MPI-IO Independent VFD");
|
||||
|
||||
props = H5CreateFileProp ();
|
||||
#if defined(PARALLEL_IO)
|
||||
MPI_Comm comm = MPI_COMM_WORLD;
|
||||
status = H5SetPropFileMPIOIndependent (props, &comm);
|
||||
RETURN(status, H5_SUCCESS, "H5SetPropFileMPIOIndependent");
|
||||
|
||||
#endif
|
||||
file1 = H5OpenFile(FILENAME, H5_O_APPENDONLY, props);
|
||||
status = H5CheckFile(file1);
|
||||
RETURN(status, H5_SUCCESS, "H5CheckFile");
|
||||
@@ -476,7 +484,7 @@ void h5u_test_write4(void)
|
||||
RETURN(status, H5_SUCCESS, "H5PartSetChunk");
|
||||
|
||||
test_write_data64(file1, NPARTICLES, NTIMESTEPS-2);
|
||||
test_write_file_attribs(file1, 1);
|
||||
test_write_file_attribs(file1, 2);
|
||||
|
||||
status = H5CloseFile(file1);
|
||||
RETURN(status, H5_SUCCESS, "H5CloseFile");
|
||||
|
||||
Reference in New Issue
Block a user