예제 #1
0
파일: read.c 프로젝트: tfogal/h5part
void test_read2(void)
{
	H5PartFile *file1;
	H5PartFile *file2;

	h5part_int64_t status;

	TEST(	"Opening file twice, read-only");
	file1 = OPEN(FILENAME,H5PART_READ);
	test_is_valid(file1);
	file2 = OPEN(FILENAME,H5PART_READ);
	test_is_valid(file2);

	test_read_strided_data32(file1, NPARTICLES, NTIMESTEPS+1);
	test_read_file_attribs(file2, 1);

	status = H5PartCloseFile(file1);
	RETURN(status, H5PART_SUCCESS, "H5PartCloseFile");
	status = H5PartCloseFile(file2);
	RETURN(status, H5PART_SUCCESS, "H5PartCloseFile");
}
예제 #2
0
void test_ids(void)
{
    /* Set the random # seed */
    HDsrandom((unsigned)HDtime(NULL));

    if (basic_id_test() < 0) TestErrPrintf("Basic ID test failed\n");
    if (id_predefined_test() < 0) TestErrPrintf("Predefined ID type test failed\n");
    if (test_is_valid() < 0) TestErrPrintf("H5Iis_valid test failed\n");
    if (test_get_type() < 0) TestErrPrintf("H5Iget_type test failed\n");
    if (test_id_type_list() < 0) TestErrPrintf("ID type list test failed\n");
    if (test_remove_clear_type() < 0) TestErrPrintf("ID remove during H5Iclear_type test failed\n");

}
예제 #3
0
파일: read.c 프로젝트: tfogal/h5part
void test_read4(void)
{
	H5PartFile *file1;
	H5PartFile *file2;

	h5part_int64_t status;

	TEST(	"Opening file twice, read-only, lustre filesystem "
		"MPI-IO Independent VFD, 64K alignment");
	file1 = OPENALIGN(FILENAME,
		H5PART_READ | H5PART_VFD_MPIIO_IND | H5PART_FS_LUSTRE,
		65536);
	test_is_valid(file1);
	file2 = OPENALIGN(FILENAME,
		H5PART_READ | H5PART_VFD_MPIIO_IND | H5PART_FS_LUSTRE,
		65536);
	test_is_valid(file2);

	TEST("Redefining step name");
	status = H5PartDefineStepName(file1, LONGNAME, 16);
	RETURN(status, H5PART_SUCCESS, "H5PartDefineStepName");

	status = H5PartDefineStepName(file2, LONGNAME, 16);
	RETURN(status, H5PART_SUCCESS, "H5PartDefineStepName");

	test_read_file_attribs(file1, 1);

	status = H5PartSetStep(file2, NTIMESTEPS);
	RETURN(status, H5PART_SUCCESS, "H5PartSetStep");

	test_read_data64(file2, NPARTICLES, NTIMESTEPS-2);

	status = H5PartCloseFile(file1);
	RETURN(status, H5PART_SUCCESS, "H5PartCloseFile");
	status = H5PartCloseFile(file2);
	RETURN(status, H5PART_SUCCESS, "H5PartCloseFile");
}
예제 #4
0
void test_write4(void)
{
	H5PartFile *file1;
	H5PartFile *file2;

	h5part_int64_t status;

	TEST(	"Opening file twice, write-append + read-only, "
		"lustre filesystem, MPI-IO Independent VFD, 1K alignment");
	file1 = OPENALIGN(FILENAME,
		H5PART_APPEND | H5PART_VFD_MPIIO_IND | H5PART_FS_LUSTRE,
		1024);
	test_is_valid(file1);
	file2 = OPENALIGN(FILENAME,
		H5PART_READ | H5PART_VFD_MPIIO_IND | H5PART_FS_LUSTRE,
		1024);
	test_is_valid(file2);

	TEST("Redefining step name");
	status = H5PartDefineStepName(file1, LONGNAME, 16);
	RETURN(status, H5PART_SUCCESS, "H5PartDefineStepName");

	status = H5PartDefineStepName(file2, LONGNAME, 16);
	RETURN(status, H5PART_SUCCESS, "H5PartDefineStepName");

	status = H5PartSetChunkSize(file1, NPARTICLES);
	RETURN(status, H5PART_SUCCESS, "H5PartSetChunkSize");

	test_write_data64(file1, NPARTICLES, NTIMESTEPS-2);
	test_write_file_attribs(file1, 1);

	status = H5PartCloseFile(file1);
	RETURN(status, H5PART_SUCCESS, "H5PartCloseFile");
	status = H5PartCloseFile(file2);
	RETURN(status, H5PART_SUCCESS, "H5PartCloseFile");
}
예제 #5
0
파일: read.c 프로젝트: tfogal/h5part
void test_read1(void)
{
	H5PartFile *file1;

	h5part_int64_t status;

	TEST("Opening file once, read-only");
	file1 = OPEN(FILENAME,H5PART_READ);
	test_is_valid(file1);

	test_read_file_attribs(file1, 0);
	test_read_data32(file1, NPARTICLES, 1);

	status = H5PartCloseFile(file1);
	RETURN(status, H5PART_SUCCESS, "H5PartCloseFile");
}
예제 #6
0
void test_write1(void)
{
	H5PartFile *file1;

	h5part_int64_t status;

	TEST("Opening file once, write-truncate");
	file1 = OPEN(FILENAME,H5PART_WRITE);
	test_is_valid(file1);

	test_write_data32(file1, NPARTICLES, 1);
	test_write_file_attribs(file1, 0);

	status = H5PartCloseFile(file1);
	RETURN(status, H5PART_SUCCESS, "H5PartCloseFile");
}
예제 #7
0
파일: read.c 프로젝트: tfogal/h5part
void test_read3(void)
{
	H5PartFile *file1;

	h5part_int64_t status;

	TEST(	"Opening file once, read-only, lustre filesystem, "
		"MPI-POSIX VFD, 64KB alignment");
	file1 = OPENALIGN(FILENAME,
		H5PART_READ | H5PART_VFD_MPIPOSIX | H5PART_FS_LUSTRE,
		65536);
	test_is_valid(file1);

	TEST("Redefining step name");
	status = H5PartDefineStepName(file1, LONGNAME, 16);
	RETURN(status, H5PART_SUCCESS, "H5PartDefineStepName");

	test_read_strided_data64(file1, NPARTICLES, 0);
	test_read_file_attribs(file1, 0);

	status = H5PartCloseFile(file1);
	RETURN(status, H5PART_SUCCESS, "H5PartCloseFile");
}
예제 #8
0
void test_write3(void)
{
	H5PartFile *file1;

	h5part_int64_t status;

	TEST(	"Opening file once, write-truncate, lustre filesyste, "
		"MPI-POSIX VFD, 1KB alignment");
	file1 = OPENALIGN(FILENAME,
		H5PART_WRITE | H5PART_VFD_MPIPOSIX | H5PART_FS_LUSTRE,
		1024);
	test_is_valid(file1);

	TEST("Redefining step name");
	status = H5PartDefineStepName(file1, LONGNAME, 16);
	RETURN(status, H5PART_SUCCESS, "H5PartDefineStepName");

	test_write_strided_data64(file1, NPARTICLES, 0);
	test_write_file_attribs(file1, 0);

	status = H5PartCloseFile(file1);
	RETURN(status, H5PART_SUCCESS, "H5PartCloseFile");
}