2012-11-08 01:11:22 +08:00
|
|
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
2020-09-30 22:27:10 +08:00
|
|
|
* Copyright by The HDF Group. *
|
|
|
|
* Copyright by the Board of Trustees of the University of Illinois. *
|
|
|
|
* All rights reserved. *
|
|
|
|
* *
|
|
|
|
* This file is part of HDF5. The full HDF5 copyright notice, including *
|
|
|
|
* terms governing use, modification, and redistribution, is contained in *
|
2017-04-18 03:32:16 +08:00
|
|
|
* the COPYING file, which can be found at the root of the source code *
|
2021-02-17 22:52:04 +08:00
|
|
|
* distribution tree, or in https://www.hdfgroup.org/licenses. *
|
2017-04-18 03:32:16 +08:00
|
|
|
* If you do not have access to either file, you may request a copy from *
|
|
|
|
* help@hdfgroup.org. *
|
2020-09-30 22:27:10 +08:00
|
|
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
2012-11-08 01:11:22 +08:00
|
|
|
|
2018-04-30 22:52:07 +08:00
|
|
|
#include "h5test.h"
|
2012-11-08 01:11:22 +08:00
|
|
|
|
2019-07-31 01:39:20 +08:00
|
|
|
#if defined(H5_HAVE_ZLIB_H) && !defined(H5_ZLIB_HEADER)
|
2020-09-30 22:27:10 +08:00
|
|
|
#define H5_ZLIB_HEADER "zlib.h"
|
2013-01-10 03:23:18 +08:00
|
|
|
#endif
|
|
|
|
#if defined(H5_ZLIB_HEADER)
|
2020-09-30 22:27:10 +08:00
|
|
|
#include H5_ZLIB_HEADER /* "zlib.h" */
|
2013-01-10 03:23:18 +08:00
|
|
|
#endif
|
|
|
|
|
2018-04-30 22:52:07 +08:00
|
|
|
#define FILE_NAME "direct_chunk.h5"
|
2012-11-08 01:11:22 +08:00
|
|
|
|
2017-05-15 23:25:15 +08:00
|
|
|
/* Datasets for Direct Write tests */
|
2021-06-17 04:45:26 +08:00
|
|
|
#ifdef H5_HAVE_FILTER_DEFLATE
|
2020-09-30 22:27:10 +08:00
|
|
|
#define DATASETNAME1 "direct_write"
|
2021-06-17 04:45:26 +08:00
|
|
|
#endif
|
2020-09-30 22:27:10 +08:00
|
|
|
#define DATASETNAME2 "skip_one_filter"
|
|
|
|
#define DATASETNAME3 "skip_two_filters"
|
|
|
|
#define DATASETNAME4 "data_conv"
|
|
|
|
#define DATASETNAME5 "contiguous_dset"
|
|
|
|
#define DATASETNAME6 "invalid_argue"
|
|
|
|
#define DATASETNAME7 "overwrite_chunk"
|
2017-05-15 23:25:15 +08:00
|
|
|
/* Datasets for Direct Read tests */
|
2021-06-17 04:45:26 +08:00
|
|
|
#ifdef H5_HAVE_FILTER_DEFLATE
|
2020-09-30 22:27:10 +08:00
|
|
|
#define DATASETNAME8 "disabled_chunk_cache"
|
|
|
|
#define DATASETNAME9 "flush_chunk_cache"
|
|
|
|
#define DATASETNAME10 "read_w_valid_cache"
|
2021-06-17 04:45:26 +08:00
|
|
|
#endif
|
2020-09-30 22:27:10 +08:00
|
|
|
#define DATASETNAME11 "unallocated_chunk"
|
|
|
|
#define DATASETNAME12 "unfiltered_data"
|
2017-05-15 23:25:15 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
#define RANK 2
|
|
|
|
#define NX 16
|
|
|
|
#define NY 16
|
|
|
|
#define CHUNK_NX 4
|
|
|
|
#define CHUNK_NY 4
|
2012-11-08 01:11:22 +08:00
|
|
|
|
2021-06-17 04:45:26 +08:00
|
|
|
#ifdef H5_HAVE_FILTER_DEFLATE
|
2020-09-30 22:27:10 +08:00
|
|
|
#define DEFLATE_SIZE_ADJUST(s) (HDceil(((double)(s)) * 1.001) + 12.0)
|
2021-06-17 04:45:26 +08:00
|
|
|
#endif
|
2012-11-08 01:11:22 +08:00
|
|
|
|
2012-12-05 03:47:35 +08:00
|
|
|
/* Temporary filter IDs used for testing */
|
2020-09-30 22:27:10 +08:00
|
|
|
#define H5Z_FILTER_BOGUS1 305
|
|
|
|
#define H5Z_FILTER_BOGUS2 306
|
2019-07-31 01:39:20 +08:00
|
|
|
#define ADD_ON 7
|
|
|
|
#define FACTOR 3
|
2012-12-05 03:47:35 +08:00
|
|
|
|
2017-05-12 11:31:57 +08:00
|
|
|
/* Constants for the overwrite test */
|
2020-09-30 22:27:10 +08:00
|
|
|
#define OVERWRITE_NDIMS 3
|
|
|
|
#define OVERWRITE_CHUNK_NX 3
|
|
|
|
#define OVERWRITE_CHUNK_2NX 6
|
|
|
|
#define OVERWRITE_CHUNK_NY 2
|
|
|
|
#define OVERWRITE_VALUE 42
|
2017-05-12 11:31:57 +08:00
|
|
|
|
2019-03-07 06:57:42 +08:00
|
|
|
/* Test configurations */
|
|
|
|
#define CONFIG_LATEST 0x01
|
|
|
|
#define CONFIG_REOPEN_FILE 0x02
|
|
|
|
#define CONFIG_REOPEN_DSET 0x04
|
|
|
|
#define CONFIG_DIRECT_WRITE 0x08
|
|
|
|
#define CONFIG_DIRECT_READ 0x10
|
|
|
|
#define CONFIG_END 0x20
|
|
|
|
|
2018-03-22 00:44:24 +08:00
|
|
|
/* Defines used in test_single_chunk_latest() */
|
2020-09-30 22:27:10 +08:00
|
|
|
#define FILE "single_latest.h5"
|
|
|
|
#define DATASET "dataset"
|
|
|
|
#define DIM0 4
|
|
|
|
#define DIM1 32
|
|
|
|
#define CHUNK0 DIM0
|
|
|
|
#define CHUNK1 DIM1
|
2018-03-22 00:44:24 +08:00
|
|
|
|
2012-12-05 03:47:35 +08:00
|
|
|
/* Local prototypes for filter functions */
|
2020-09-30 22:27:10 +08:00
|
|
|
static size_t filter_bogus1(unsigned int flags, size_t cd_nelmts, const unsigned int *cd_values,
|
|
|
|
size_t nbytes, size_t *buf_size, void **buf);
|
|
|
|
static size_t filter_bogus2(unsigned int flags, size_t cd_nelmts, const unsigned int *cd_values,
|
|
|
|
size_t nbytes, size_t *buf_size, void **buf);
|
2012-12-05 03:47:35 +08:00
|
|
|
|
|
|
|
/* This message derives from H5Z */
|
|
|
|
const H5Z_class2_t H5Z_BOGUS1[1] = {{
|
2020-09-30 22:27:10 +08:00
|
|
|
H5Z_CLASS_T_VERS, /* H5Z_class_t version */
|
|
|
|
H5Z_FILTER_BOGUS1, /* Filter id number */
|
|
|
|
1, 1, /* Encoding and decoding enabled */
|
|
|
|
"bogus1", /* Filter name for debugging */
|
|
|
|
NULL, /* The "can apply" callback */
|
|
|
|
NULL, /* The "set local" callback */
|
|
|
|
filter_bogus1, /* The actual filter function */
|
2012-12-05 03:47:35 +08:00
|
|
|
}};
|
|
|
|
|
|
|
|
const H5Z_class2_t H5Z_BOGUS2[1] = {{
|
2020-09-30 22:27:10 +08:00
|
|
|
H5Z_CLASS_T_VERS, /* H5Z_class_t version */
|
|
|
|
H5Z_FILTER_BOGUS2, /* Filter id number */
|
|
|
|
1, 1, /* Encoding and decoding enabled */
|
|
|
|
"bogus2", /* Filter name for debugging */
|
|
|
|
NULL, /* The "can apply" callback */
|
|
|
|
NULL, /* The "set local" callback */
|
|
|
|
filter_bogus2, /* The actual filter function */
|
2012-12-05 03:47:35 +08:00
|
|
|
}};
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
2019-07-31 01:39:20 +08:00
|
|
|
* Function: test_direct_chunk_write
|
2012-12-05 03:47:35 +08:00
|
|
|
*
|
2019-07-31 01:39:20 +08:00
|
|
|
* Purpose: Test the basic functionality of H5Dwrite_chunk
|
2012-12-05 03:47:35 +08:00
|
|
|
*
|
2019-07-31 01:39:20 +08:00
|
|
|
* Return: Success: 0
|
|
|
|
* Failure: 1
|
2012-12-05 03:47:35 +08:00
|
|
|
*
|
2019-07-31 01:39:20 +08:00
|
|
|
* Programmer: Raymond Lu
|
2012-12-05 03:47:35 +08:00
|
|
|
* 30 November 2012
|
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
2013-01-11 00:04:09 +08:00
|
|
|
#ifdef H5_HAVE_FILTER_DEFLATE
|
2012-11-08 01:11:22 +08:00
|
|
|
static int
|
2020-09-30 22:27:10 +08:00
|
|
|
test_direct_chunk_write(hid_t file)
|
2012-11-08 01:11:22 +08:00
|
|
|
{
|
2020-09-30 22:27:10 +08:00
|
|
|
hid_t dataspace = -1, dataset = -1;
|
|
|
|
hid_t mem_space = -1;
|
|
|
|
hid_t cparms = -1, dxpl = -1;
|
|
|
|
hsize_t dims[2] = {NX, NY};
|
|
|
|
hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
|
|
|
|
hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY};
|
|
|
|
herr_t status;
|
|
|
|
int ret;
|
|
|
|
int data[NX][NY];
|
|
|
|
int i, j, n;
|
|
|
|
|
|
|
|
unsigned filter_mask = 0;
|
|
|
|
int direct_buf[CHUNK_NX][CHUNK_NY];
|
|
|
|
int check_chunk[CHUNK_NX][CHUNK_NY];
|
|
|
|
hsize_t offset[2] = {0, 0};
|
|
|
|
size_t buf_size = CHUNK_NX * CHUNK_NY * sizeof(int);
|
|
|
|
|
|
|
|
const Bytef *z_src = (const Bytef *)(direct_buf);
|
|
|
|
Bytef * z_dst = NULL; /*destination buffer */
|
|
|
|
uLongf z_dst_nbytes = (uLongf)DEFLATE_SIZE_ADJUST(buf_size);
|
|
|
|
uLong z_src_nbytes = (uLong)buf_size;
|
|
|
|
int aggression = 9; /* Compression aggression setting */
|
|
|
|
void * outbuf = NULL; /* Pointer to new buffer */
|
2012-11-08 01:11:22 +08:00
|
|
|
|
|
|
|
hsize_t start[2]; /* Start of hyperslab */
|
|
|
|
hsize_t stride[2]; /* Stride of hyperslab */
|
|
|
|
hsize_t count[2]; /* Block count */
|
|
|
|
hsize_t block[2]; /* Block sizes */
|
|
|
|
|
2018-04-30 22:52:07 +08:00
|
|
|
TESTING("basic functionality of H5Dwrite_chunk");
|
2012-11-08 01:11:22 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Create the data space with unlimited dimensions.
|
|
|
|
*/
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((dataspace = H5Screate_simple(RANK, dims, maxdims)) < 0)
|
2012-11-08 01:11:22 +08:00
|
|
|
goto error;
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0)
|
2012-11-08 01:11:22 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Modify dataset creation properties, i.e. enable chunking and compression
|
|
|
|
*/
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0)
|
2012-11-08 01:11:22 +08:00
|
|
|
goto error;
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((status = H5Pset_chunk(cparms, RANK, chunk_dims)) < 0)
|
2012-11-08 01:11:22 +08:00
|
|
|
goto error;
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((status = H5Pset_deflate(cparms, (unsigned)aggression)) < 0)
|
2012-11-08 01:11:22 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Create a new dataset within the file using cparms
|
|
|
|
* creation properties.
|
|
|
|
*/
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((dataset =
|
|
|
|
H5Dcreate2(file, DATASETNAME1, H5T_NATIVE_INT, dataspace, H5P_DEFAULT, cparms, H5P_DEFAULT)) < 0)
|
2012-11-08 01:11:22 +08:00
|
|
|
goto error;
|
|
|
|
|
2017-05-15 23:25:15 +08:00
|
|
|
/* Initialize the dataset */
|
2020-09-30 22:27:10 +08:00
|
|
|
for (i = n = 0; i < NX; i++)
|
|
|
|
for (j = 0; j < NY; j++)
|
|
|
|
data[i][j] = n++;
|
2017-05-15 23:25:15 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
|
2012-11-08 01:11:22 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/*
|
2017-05-15 23:25:15 +08:00
|
|
|
* Write the data for the dataset. It should stay in the chunk cache.
|
2019-07-31 01:39:20 +08:00
|
|
|
* It will be evicted from the cache by the H5Dwrite_chunk calls.
|
2017-05-15 23:25:15 +08:00
|
|
|
*/
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((status = H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, data)) < 0)
|
2012-11-08 01:11:22 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/* Initialize data for one chunk */
|
2020-09-30 22:27:10 +08:00
|
|
|
for (i = n = 0; i < CHUNK_NX; i++)
|
|
|
|
for (j = 0; j < CHUNK_NY; j++)
|
|
|
|
direct_buf[i][j] = n++;
|
2012-11-08 01:11:22 +08:00
|
|
|
|
|
|
|
/* Allocate output (compressed) buffer */
|
2013-10-31 12:20:36 +08:00
|
|
|
outbuf = HDmalloc(z_dst_nbytes);
|
2020-09-30 22:27:10 +08:00
|
|
|
z_dst = (Bytef *)outbuf;
|
2012-11-08 01:11:22 +08:00
|
|
|
|
|
|
|
/* Perform compression from the source to the destination buffer */
|
|
|
|
ret = compress2(z_dst, &z_dst_nbytes, z_src, z_src_nbytes, aggression);
|
|
|
|
|
|
|
|
/* Check for various zlib errors */
|
2020-09-30 22:27:10 +08:00
|
|
|
if (Z_BUF_ERROR == ret) {
|
2017-04-26 07:08:53 +08:00
|
|
|
HDfprintf(stderr, "overflow");
|
2012-11-08 01:11:22 +08:00
|
|
|
goto error;
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
|
|
|
else if (Z_MEM_ERROR == ret) {
|
2017-04-26 07:08:53 +08:00
|
|
|
HDfprintf(stderr, "deflate memory error");
|
2012-11-08 01:11:22 +08:00
|
|
|
goto error;
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
|
|
|
else if (Z_OK != ret) {
|
2017-04-26 07:08:53 +08:00
|
|
|
HDfprintf(stderr, "other deflate error");
|
2012-11-08 01:11:22 +08:00
|
|
|
goto error;
|
|
|
|
}
|
|
|
|
|
2019-07-31 01:39:20 +08:00
|
|
|
/* Write the compressed chunk data repeatedly to cover all the chunks in the
|
|
|
|
* dataset, using the direct writing function. */
|
2020-09-30 22:27:10 +08:00
|
|
|
for (i = 0; i < NX / CHUNK_NX; i++) {
|
|
|
|
for (j = 0; j < NY / CHUNK_NY; j++) {
|
2018-04-30 22:52:07 +08:00
|
|
|
status = H5Dwrite_chunk(dataset, dxpl, filter_mask, offset, z_dst_nbytes, outbuf);
|
2012-11-08 01:11:22 +08:00
|
|
|
offset[1] += CHUNK_NY;
|
|
|
|
}
|
|
|
|
offset[0] += CHUNK_NX;
|
|
|
|
offset[1] = 0;
|
|
|
|
}
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if (outbuf)
|
2013-10-31 12:20:36 +08:00
|
|
|
HDfree(outbuf);
|
2012-11-08 01:11:22 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Fflush(dataset, H5F_SCOPE_LOCAL) < 0)
|
2012-11-08 01:11:22 +08:00
|
|
|
goto error;
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Dclose(dataset) < 0)
|
2012-11-08 01:11:22 +08:00
|
|
|
goto error;
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((dataset = H5Dopen2(file, DATASETNAME1, H5P_DEFAULT)) < 0)
|
2012-11-08 01:11:22 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Select hyperslab for one chunk in the file
|
|
|
|
*/
|
2020-09-30 22:27:10 +08:00
|
|
|
start[0] = CHUNK_NX;
|
|
|
|
start[1] = CHUNK_NY;
|
|
|
|
stride[0] = 1;
|
|
|
|
stride[1] = 1;
|
|
|
|
count[0] = 1;
|
|
|
|
count[1] = 1;
|
|
|
|
block[0] = CHUNK_NX;
|
|
|
|
block[1] = CHUNK_NY;
|
|
|
|
if ((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0)
|
2012-11-08 01:11:22 +08:00
|
|
|
goto error;
|
|
|
|
|
2017-05-15 23:25:15 +08:00
|
|
|
/* Read the chunk back */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((status = H5Dread(dataset, H5T_NATIVE_INT, mem_space, dataspace, H5P_DEFAULT, check_chunk)) < 0)
|
2012-11-08 01:11:22 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/* Check that the values read are the same as the values written */
|
2020-09-30 22:27:10 +08:00
|
|
|
for (i = 0; i < CHUNK_NX; i++) {
|
|
|
|
for (j = 0; j < CHUNK_NY; j++) {
|
|
|
|
if (direct_buf[i][j] != check_chunk[i][j]) {
|
2017-05-15 23:25:15 +08:00
|
|
|
HDprintf(" 1. Read different values than written.");
|
|
|
|
HDprintf(" At index %d,%d\n", i, j);
|
2019-07-31 01:39:20 +08:00
|
|
|
HDprintf(" direct_buf=%d, check_chunk=%d\n", direct_buf[i][j], check_chunk[i][j]);
|
2012-11-08 01:11:22 +08:00
|
|
|
goto error;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Reinitialize different data for one chunk */
|
2020-09-30 22:27:10 +08:00
|
|
|
for (i = 0; i < CHUNK_NX; i++)
|
|
|
|
for (j = 0; j < CHUNK_NY; j++)
|
|
|
|
direct_buf[i][j] = i + j;
|
2012-11-08 01:11:22 +08:00
|
|
|
|
|
|
|
/* Allocate output (compressed) buffer */
|
2013-10-31 12:20:36 +08:00
|
|
|
outbuf = HDmalloc(z_dst_nbytes);
|
2020-09-30 22:27:10 +08:00
|
|
|
z_dst = (Bytef *)outbuf;
|
2012-11-08 01:11:22 +08:00
|
|
|
|
|
|
|
/* Perform compression from the source to the destination buffer */
|
|
|
|
ret = compress2(z_dst, &z_dst_nbytes, z_src, z_src_nbytes, aggression);
|
|
|
|
|
|
|
|
/* Check for various zlib errors */
|
2020-09-30 22:27:10 +08:00
|
|
|
if (Z_BUF_ERROR == ret) {
|
2017-04-26 07:08:53 +08:00
|
|
|
HDfprintf(stderr, "overflow");
|
2012-11-08 01:11:22 +08:00
|
|
|
goto error;
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
|
|
|
else if (Z_MEM_ERROR == ret) {
|
2017-04-26 07:08:53 +08:00
|
|
|
HDfprintf(stderr, "deflate memory error");
|
2012-11-08 01:11:22 +08:00
|
|
|
goto error;
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
|
|
|
else if (Z_OK != ret) {
|
2017-04-26 07:08:53 +08:00
|
|
|
HDfprintf(stderr, "other deflate error");
|
2012-11-08 01:11:22 +08:00
|
|
|
goto error;
|
|
|
|
}
|
|
|
|
|
2019-07-31 01:39:20 +08:00
|
|
|
/* Rewrite the compressed chunk data repeatedly to cover all the chunks in the
|
|
|
|
* dataset, using the direct writing function. */
|
2012-11-08 01:11:22 +08:00
|
|
|
offset[0] = offset[1] = 0;
|
2020-09-30 22:27:10 +08:00
|
|
|
for (i = 0; i < NX / CHUNK_NX; i++) {
|
|
|
|
for (j = 0; j < NY / CHUNK_NY; j++) {
|
2018-04-30 22:52:07 +08:00
|
|
|
status = H5Dwrite_chunk(dataset, dxpl, filter_mask, offset, z_dst_nbytes, outbuf);
|
2012-11-08 01:11:22 +08:00
|
|
|
offset[1] += CHUNK_NY;
|
|
|
|
}
|
|
|
|
offset[0] += CHUNK_NX;
|
|
|
|
offset[1] = 0;
|
|
|
|
}
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if (outbuf)
|
2013-10-31 12:20:36 +08:00
|
|
|
HDfree(outbuf);
|
2012-11-08 01:11:22 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Fflush(dataset, H5F_SCOPE_LOCAL) < 0)
|
2012-11-08 01:11:22 +08:00
|
|
|
goto error;
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Dclose(dataset) < 0)
|
2012-11-08 01:11:22 +08:00
|
|
|
goto error;
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((dataset = H5Dopen2(file, DATASETNAME1, H5P_DEFAULT)) < 0)
|
2012-11-08 01:11:22 +08:00
|
|
|
goto error;
|
|
|
|
|
2017-05-15 23:25:15 +08:00
|
|
|
/* Read the chunk back */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((status = H5Dread(dataset, H5T_NATIVE_INT, mem_space, dataspace, H5P_DEFAULT, check_chunk)) < 0)
|
2012-11-08 01:11:22 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/* Check that the values read are the same as the values written */
|
2020-09-30 22:27:10 +08:00
|
|
|
for (i = 0; i < CHUNK_NX; i++) {
|
|
|
|
for (j = 0; j < CHUNK_NY; j++) {
|
|
|
|
if (direct_buf[i][j] != check_chunk[i][j]) {
|
2017-05-15 23:25:15 +08:00
|
|
|
HDprintf(" 2. Read different values than written.");
|
|
|
|
HDprintf(" At index %d,%d\n", i, j);
|
2019-07-31 01:39:20 +08:00
|
|
|
HDprintf(" direct_buf=%d, check_chunk=%d\n", direct_buf[i][j], check_chunk[i][j]);
|
2012-11-08 01:11:22 +08:00
|
|
|
goto error;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Close/release resources.
|
|
|
|
*/
|
|
|
|
H5Dclose(dataset);
|
|
|
|
H5Sclose(mem_space);
|
|
|
|
H5Sclose(dataspace);
|
|
|
|
H5Pclose(cparms);
|
|
|
|
H5Pclose(dxpl);
|
2019-07-31 01:39:20 +08:00
|
|
|
|
2012-11-08 01:11:22 +08:00
|
|
|
PASSED();
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
error:
|
2020-09-30 22:27:10 +08:00
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
2012-11-08 01:11:22 +08:00
|
|
|
H5Dclose(dataset);
|
|
|
|
H5Sclose(mem_space);
|
|
|
|
H5Sclose(dataspace);
|
|
|
|
H5Pclose(cparms);
|
|
|
|
H5Pclose(dxpl);
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
|
|
|
H5E_END_TRY;
|
2012-11-08 01:11:22 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if (outbuf)
|
2013-10-31 12:20:36 +08:00
|
|
|
HDfree(outbuf);
|
2012-11-08 01:11:22 +08:00
|
|
|
|
2017-05-15 23:25:15 +08:00
|
|
|
H5_FAILED();
|
2012-11-08 01:11:22 +08:00
|
|
|
return 1;
|
2017-05-15 23:25:15 +08:00
|
|
|
} /* test_direct_chunk_write() */
|
2013-01-11 00:04:09 +08:00
|
|
|
#endif /* H5_HAVE_FILTER_DEFLATE */
|
2012-11-08 01:11:22 +08:00
|
|
|
|
2017-05-12 11:31:57 +08:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
* Function: test_direct_chunk_overwrite_data
|
|
|
|
*
|
|
|
|
* Purpose: Test overwriting a chunk with new data.
|
|
|
|
*
|
|
|
|
* Return: Success: 0
|
|
|
|
* Failure: 1
|
|
|
|
*
|
|
|
|
* Programmer: Dana Robinson
|
|
|
|
* Spring 2017
|
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
static int
|
|
|
|
test_direct_chunk_overwrite_data(hid_t fid)
|
|
|
|
{
|
2020-09-30 22:27:10 +08:00
|
|
|
size_t buf_size = OVERWRITE_CHUNK_NX * OVERWRITE_CHUNK_NY * sizeof(int16_t);
|
|
|
|
int16_t data_buf[OVERWRITE_CHUNK_NY][OVERWRITE_CHUNK_NX];
|
|
|
|
int16_t overwrite_buf[OVERWRITE_CHUNK_NY][OVERWRITE_CHUNK_NX];
|
|
|
|
uint32_t filter_mask = 0;
|
|
|
|
hid_t tid = H5T_NATIVE_UINT16;
|
|
|
|
hid_t dcpl_id = -1;
|
|
|
|
hid_t sid = -1;
|
|
|
|
hid_t did = -1;
|
|
|
|
uint16_t fill_value = 0;
|
|
|
|
hsize_t dset_dims[] = {1, OVERWRITE_CHUNK_NY, OVERWRITE_CHUNK_2NX};
|
|
|
|
hsize_t dset_max_dims[] = {H5S_UNLIMITED, OVERWRITE_CHUNK_NY, OVERWRITE_CHUNK_2NX};
|
|
|
|
hsize_t chunk_dims[] = {1, OVERWRITE_CHUNK_NY, OVERWRITE_CHUNK_NX};
|
|
|
|
hsize_t offset[] = {0, 0, 0};
|
|
|
|
hsize_t i, j;
|
|
|
|
int16_t n;
|
|
|
|
int16_t read_buf[OVERWRITE_CHUNK_NY][OVERWRITE_CHUNK_2NX];
|
2017-05-12 11:31:57 +08:00
|
|
|
|
2018-04-30 22:52:07 +08:00
|
|
|
TESTING("overwriting existing data with H5Dwrite_chunk");
|
2017-05-12 11:31:57 +08:00
|
|
|
|
|
|
|
/* Create the dataset's data space */
|
|
|
|
if ((sid = H5Screate_simple(OVERWRITE_NDIMS, dset_dims, dset_max_dims)) < 0)
|
2022-05-04 23:49:01 +08:00
|
|
|
FAIL_STACK_ERROR;
|
2017-05-12 11:31:57 +08:00
|
|
|
|
|
|
|
/* Set chunk size and filll value */
|
|
|
|
if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0)
|
2022-05-04 23:49:01 +08:00
|
|
|
FAIL_STACK_ERROR;
|
2017-05-12 11:31:57 +08:00
|
|
|
if (H5Pset_fill_value(dcpl_id, tid, &fill_value) < 0)
|
2022-05-04 23:49:01 +08:00
|
|
|
FAIL_STACK_ERROR;
|
2017-05-12 11:31:57 +08:00
|
|
|
if (H5Pset_chunk(dcpl_id, OVERWRITE_NDIMS, chunk_dims) < 0)
|
2022-05-04 23:49:01 +08:00
|
|
|
FAIL_STACK_ERROR;
|
2017-05-12 11:31:57 +08:00
|
|
|
|
|
|
|
/* Create dataset */
|
|
|
|
if ((did = H5Dcreate2(fid, DATASETNAME7, tid, sid, H5P_DEFAULT, dcpl_id, H5P_DEFAULT)) < 0)
|
2022-05-04 23:49:01 +08:00
|
|
|
FAIL_STACK_ERROR;
|
2017-05-12 11:31:57 +08:00
|
|
|
|
|
|
|
/* Initialize data buffers */
|
|
|
|
n = 0;
|
|
|
|
for (i = 0; i < OVERWRITE_CHUNK_NY; i++) {
|
|
|
|
for (j = 0; j < OVERWRITE_CHUNK_NX; j++) {
|
2020-09-30 22:27:10 +08:00
|
|
|
data_buf[i][j] = n++;
|
2017-05-12 11:31:57 +08:00
|
|
|
overwrite_buf[i][j] = OVERWRITE_VALUE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Write chunk data using the direct write function. */
|
2018-04-30 22:52:07 +08:00
|
|
|
if (H5Dwrite_chunk(did, H5P_DEFAULT, filter_mask, offset, buf_size, data_buf) < 0)
|
2022-05-04 23:49:01 +08:00
|
|
|
FAIL_STACK_ERROR;
|
2017-05-12 11:31:57 +08:00
|
|
|
|
|
|
|
/* Write second chunk. */
|
|
|
|
offset[2] = OVERWRITE_CHUNK_NX;
|
2018-04-30 22:52:07 +08:00
|
|
|
if (H5Dwrite_chunk(did, H5P_DEFAULT, filter_mask, offset, buf_size, data_buf) < 0)
|
2022-05-04 23:49:01 +08:00
|
|
|
FAIL_STACK_ERROR;
|
2017-05-12 11:31:57 +08:00
|
|
|
|
|
|
|
/* Overwrite first chunk. */
|
|
|
|
offset[2] = 0;
|
2018-04-30 22:52:07 +08:00
|
|
|
if (H5Dwrite_chunk(did, H5P_DEFAULT, filter_mask, offset, buf_size, overwrite_buf) < 0)
|
2022-05-04 23:49:01 +08:00
|
|
|
FAIL_STACK_ERROR;
|
2017-05-12 11:31:57 +08:00
|
|
|
|
|
|
|
/* Read the data back out */
|
|
|
|
if (H5Dread(did, tid, H5S_ALL, H5S_ALL, H5P_DEFAULT, read_buf) < 0)
|
2022-05-04 23:49:01 +08:00
|
|
|
FAIL_STACK_ERROR;
|
2017-05-12 11:31:57 +08:00
|
|
|
|
|
|
|
/* Ensure that the data are correct in chunk 1 */
|
|
|
|
for (i = 0; i < OVERWRITE_CHUNK_NY; i++)
|
|
|
|
for (j = 0; j < OVERWRITE_CHUNK_NX; j++) {
|
|
|
|
if (read_buf[i][j] != OVERWRITE_VALUE)
|
2022-05-04 23:49:01 +08:00
|
|
|
TEST_ERROR;
|
2017-05-12 11:31:57 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
if (H5Pclose(dcpl_id) < 0)
|
2022-05-04 23:49:01 +08:00
|
|
|
FAIL_STACK_ERROR;
|
2017-05-12 11:31:57 +08:00
|
|
|
if (H5Sclose(sid) < 0)
|
2022-05-04 23:49:01 +08:00
|
|
|
FAIL_STACK_ERROR;
|
2017-05-12 11:31:57 +08:00
|
|
|
if (H5Dclose(did) < 0)
|
2022-05-04 23:49:01 +08:00
|
|
|
FAIL_STACK_ERROR;
|
2017-05-12 11:31:57 +08:00
|
|
|
|
|
|
|
PASSED();
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
error:
|
2020-09-30 22:27:10 +08:00
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
2017-05-12 11:31:57 +08:00
|
|
|
H5Pclose(dcpl_id);
|
|
|
|
H5Sclose(sid);
|
|
|
|
H5Dclose(did);
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
|
|
|
H5E_END_TRY;
|
2017-05-12 11:31:57 +08:00
|
|
|
|
2017-05-15 23:25:15 +08:00
|
|
|
H5_FAILED();
|
2017-05-12 11:31:57 +08:00
|
|
|
return 1;
|
|
|
|
} /* end test_direct_chunk_overwrite_data() */
|
|
|
|
|
2012-11-08 01:11:22 +08:00
|
|
|
/*-------------------------------------------------------------------------
|
2019-07-31 01:39:20 +08:00
|
|
|
* Function: test_skip_compress_write1
|
2012-12-05 03:47:35 +08:00
|
|
|
*
|
2019-07-31 01:39:20 +08:00
|
|
|
* Purpose: Test skipping compression filter when it is the only filter
|
2012-12-05 03:47:35 +08:00
|
|
|
* for the dataset
|
|
|
|
*
|
2019-07-31 01:39:20 +08:00
|
|
|
* Return: Success: 0
|
|
|
|
* Failure: 1
|
2012-12-05 03:47:35 +08:00
|
|
|
*
|
2019-07-31 01:39:20 +08:00
|
|
|
* Programmer: Raymond Lu
|
2012-12-05 03:47:35 +08:00
|
|
|
* 30 November 2012
|
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
static int
|
|
|
|
test_skip_compress_write1(hid_t file)
|
|
|
|
{
|
2020-09-30 22:27:10 +08:00
|
|
|
hid_t dataspace = -1, dataset = -1;
|
|
|
|
hid_t mem_space = -1;
|
|
|
|
hid_t cparms = -1, dxpl = -1;
|
|
|
|
hsize_t dims[2] = {NX, NY};
|
|
|
|
hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
|
|
|
|
hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY};
|
|
|
|
herr_t status;
|
|
|
|
int i, j, n;
|
|
|
|
|
|
|
|
unsigned filter_mask = 0;
|
|
|
|
int direct_buf[CHUNK_NX][CHUNK_NY];
|
|
|
|
int check_chunk[CHUNK_NX][CHUNK_NY];
|
|
|
|
hsize_t offset[2] = {0, 0};
|
|
|
|
size_t buf_size = CHUNK_NX * CHUNK_NY * sizeof(int);
|
|
|
|
int aggression = 9; /* Compression aggression setting */
|
|
|
|
|
|
|
|
unsigned read_filter_mask = 0; /* filter mask after direct read */
|
|
|
|
int read_direct_buf[CHUNK_NX][CHUNK_NY];
|
|
|
|
hsize_t read_buf_size = 0; /* buf size */
|
2017-05-15 23:25:15 +08:00
|
|
|
|
2012-12-05 03:47:35 +08:00
|
|
|
hsize_t start[2]; /* Start of hyperslab */
|
|
|
|
hsize_t stride[2]; /* Stride of hyperslab */
|
|
|
|
hsize_t count[2]; /* Block count */
|
|
|
|
hsize_t block[2]; /* Block sizes */
|
|
|
|
|
2018-04-30 22:52:07 +08:00
|
|
|
TESTING("skipping compression filter for H5Dwrite_chunk/H5Dread_chunk");
|
2012-12-05 03:47:35 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Create the data space with unlimited dimensions.
|
|
|
|
*/
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((dataspace = H5Screate_simple(RANK, dims, maxdims)) < 0)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Modify dataset creation properties, i.e. enable chunking and compression
|
|
|
|
*/
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((status = H5Pset_chunk(cparms, RANK, chunk_dims)) < 0)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((status = H5Pset_deflate(cparms, (unsigned)aggression)) < 0)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Create a new dataset within the file using cparms
|
|
|
|
* creation properties.
|
|
|
|
*/
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((dataset =
|
|
|
|
H5Dcreate2(file, DATASETNAME2, H5T_NATIVE_INT, dataspace, H5P_DEFAULT, cparms, H5P_DEFAULT)) < 0)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/* Initialize data for one chunk */
|
2020-09-30 22:27:10 +08:00
|
|
|
for (i = n = 0; i < CHUNK_NX; i++)
|
|
|
|
for (j = 0; j < CHUNK_NY; j++) {
|
2017-04-26 07:08:53 +08:00
|
|
|
direct_buf[i][j] = n++;
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
2012-12-05 03:47:35 +08:00
|
|
|
|
2017-05-15 23:25:15 +08:00
|
|
|
/* write the uncompressed chunk data repeatedly to dataset, using the direct writing function.
|
|
|
|
* Indicate skipping the compression filter. */
|
2012-12-05 03:47:35 +08:00
|
|
|
offset[0] = CHUNK_NX;
|
|
|
|
offset[1] = CHUNK_NY;
|
|
|
|
|
|
|
|
filter_mask = 0x00000001;
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((status = H5Dwrite_chunk(dataset, dxpl, filter_mask, offset, buf_size, direct_buf)) < 0)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Fflush(dataset, H5F_SCOPE_LOCAL) < 0)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Dclose(dataset) < 0)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((dataset = H5Dopen2(file, DATASETNAME2, H5P_DEFAULT)) < 0)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
2017-05-15 23:25:15 +08:00
|
|
|
/*
|
|
|
|
* Select hyperslab for the chunk just written in the file
|
|
|
|
*/
|
2020-09-30 22:27:10 +08:00
|
|
|
start[0] = CHUNK_NX;
|
|
|
|
start[1] = CHUNK_NY;
|
|
|
|
stride[0] = 1;
|
|
|
|
stride[1] = 1;
|
|
|
|
count[0] = 1;
|
|
|
|
count[1] = 1;
|
|
|
|
block[0] = CHUNK_NX;
|
|
|
|
block[1] = CHUNK_NY;
|
|
|
|
if ((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0)
|
2017-04-26 07:08:53 +08:00
|
|
|
goto error;
|
|
|
|
|
2017-05-15 23:25:15 +08:00
|
|
|
/* Read the chunk back */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((status = H5Dread(dataset, H5T_NATIVE_INT, mem_space, dataspace, H5P_DEFAULT, check_chunk)) < 0)
|
2017-04-26 07:08:53 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/* Check that the values read are the same as the values written */
|
2020-09-30 22:27:10 +08:00
|
|
|
for (i = 0; i < CHUNK_NX; i++) {
|
|
|
|
for (j = 0; j < CHUNK_NY; j++) {
|
|
|
|
if (direct_buf[i][j] != check_chunk[i][j]) {
|
2017-05-15 23:25:15 +08:00
|
|
|
HDprintf(" 1. Read different values than written.");
|
|
|
|
HDprintf(" At index %d,%d\n", i, j);
|
|
|
|
HDprintf(" direct_buf=%d, check_chunk=%d\n", direct_buf[i][j], check_chunk[i][j]);
|
2017-04-26 07:08:53 +08:00
|
|
|
goto error;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-05-15 23:25:15 +08:00
|
|
|
/* Query chunk storage size */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((status = H5Dget_chunk_storage_size(dataset, offset, &read_buf_size)) < 0)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
2020-09-30 22:27:10 +08:00
|
|
|
if (read_buf_size != buf_size)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
2017-05-15 23:25:15 +08:00
|
|
|
/* Read the raw chunk back */
|
|
|
|
HDmemset(&read_direct_buf, 0, sizeof(read_direct_buf));
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((status = H5Dread_chunk(dataset, H5P_DEFAULT, offset, &read_filter_mask, read_direct_buf)) < 0)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
2020-09-30 22:27:10 +08:00
|
|
|
if (read_filter_mask != filter_mask)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
2017-05-15 23:25:15 +08:00
|
|
|
/* Check that the direct chunk read is the same as the chunk written */
|
2020-09-30 22:27:10 +08:00
|
|
|
for (i = 0; i < CHUNK_NX; i++) {
|
|
|
|
for (j = 0; j < CHUNK_NY; j++) {
|
|
|
|
if (direct_buf[i][j] != read_direct_buf[i][j]) {
|
2017-05-15 23:25:15 +08:00
|
|
|
HDprintf(" 1. Read different values than written.");
|
|
|
|
HDprintf(" At index %d,%d\n", i, j);
|
|
|
|
HDprintf(" direct_buf=%d, read_direct_buf=%d\n", direct_buf[i][j], read_direct_buf[i][j]);
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Close/release resources.
|
|
|
|
*/
|
|
|
|
H5Dclose(dataset);
|
|
|
|
H5Sclose(mem_space);
|
|
|
|
H5Sclose(dataspace);
|
|
|
|
H5Pclose(cparms);
|
|
|
|
H5Pclose(dxpl);
|
2017-05-15 23:25:15 +08:00
|
|
|
|
2012-12-05 03:47:35 +08:00
|
|
|
PASSED();
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
error:
|
2020-09-30 22:27:10 +08:00
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
2012-12-05 03:47:35 +08:00
|
|
|
H5Dclose(dataset);
|
|
|
|
H5Sclose(mem_space);
|
|
|
|
H5Sclose(dataspace);
|
|
|
|
H5Pclose(cparms);
|
|
|
|
H5Pclose(dxpl);
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
|
|
|
H5E_END_TRY;
|
2012-12-05 03:47:35 +08:00
|
|
|
|
2017-05-15 23:25:15 +08:00
|
|
|
H5_FAILED();
|
2012-12-05 03:47:35 +08:00
|
|
|
return 1;
|
2017-05-15 23:25:15 +08:00
|
|
|
} /* test_skip_compress_write1() */
|
2012-12-05 03:47:35 +08:00
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
2019-07-31 01:39:20 +08:00
|
|
|
* Function: filter_bogus1
|
2012-12-05 03:47:35 +08:00
|
|
|
*
|
2019-07-31 01:39:20 +08:00
|
|
|
* Purpose: A bogus filter that adds ADD_ON to the original value
|
2012-12-05 03:47:35 +08:00
|
|
|
*
|
2019-07-31 01:39:20 +08:00
|
|
|
* Return: Success: Data chunk size
|
2012-12-05 03:47:35 +08:00
|
|
|
*
|
2019-07-31 01:39:20 +08:00
|
|
|
* Programmer: Raymond Lu
|
2012-12-05 03:47:35 +08:00
|
|
|
* 30 November 2012
|
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
static size_t
|
2015-06-02 03:38:09 +08:00
|
|
|
filter_bogus1(unsigned int flags, size_t H5_ATTR_UNUSED cd_nelmts,
|
2020-09-30 22:27:10 +08:00
|
|
|
const unsigned int H5_ATTR_UNUSED *cd_values, size_t nbytes, size_t *buf_size, void **buf)
|
2012-12-05 03:47:35 +08:00
|
|
|
{
|
2020-09-30 22:27:10 +08:00
|
|
|
int * int_ptr = (int *)*buf; /* Pointer to the data values */
|
|
|
|
size_t buf_left = *buf_size; /* Amount of data buffer left to process */
|
2012-12-05 03:47:35 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if (flags & H5Z_FLAG_REVERSE) { /* read */
|
2021-12-07 22:27:29 +08:00
|
|
|
/* Subtract the "add on" value to all the data values */
|
2020-09-30 22:27:10 +08:00
|
|
|
while (buf_left > 0) {
|
2012-12-05 03:47:35 +08:00
|
|
|
*int_ptr++ -= (int)ADD_ON;
|
2020-01-17 05:29:34 +08:00
|
|
|
buf_left -= sizeof(int);
|
2020-09-30 22:27:10 +08:00
|
|
|
} /* end while */
|
|
|
|
} /* end if */
|
2012-12-05 03:47:35 +08:00
|
|
|
else { /* write */
|
|
|
|
/* Add the "add on" value to all the data values */
|
2020-09-30 22:27:10 +08:00
|
|
|
while (buf_left > 0) {
|
2012-12-05 03:47:35 +08:00
|
|
|
*int_ptr++ += (int)ADD_ON;
|
2020-01-17 05:29:34 +08:00
|
|
|
buf_left -= sizeof(int);
|
2012-12-05 03:47:35 +08:00
|
|
|
} /* end while */
|
2020-09-30 22:27:10 +08:00
|
|
|
} /* end else */
|
2012-12-05 03:47:35 +08:00
|
|
|
|
|
|
|
return nbytes;
|
2017-05-15 23:25:15 +08:00
|
|
|
} /* filter_bogus1() */
|
2012-12-05 03:47:35 +08:00
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
2019-07-31 01:39:20 +08:00
|
|
|
* Function: filter_bogus2
|
2012-12-05 03:47:35 +08:00
|
|
|
*
|
2019-07-31 01:39:20 +08:00
|
|
|
* Purpose: A bogus filter that multiplies the original value by FACTOR.
|
2012-12-05 03:47:35 +08:00
|
|
|
*
|
2019-07-31 01:39:20 +08:00
|
|
|
* Return: Success: Data chunk size
|
2012-12-05 03:47:35 +08:00
|
|
|
*
|
2019-07-31 01:39:20 +08:00
|
|
|
* Programmer: Raymond Lu
|
2012-12-05 03:47:35 +08:00
|
|
|
* 30 November 2012
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
static size_t
|
2015-06-02 03:38:09 +08:00
|
|
|
filter_bogus2(unsigned int flags, size_t H5_ATTR_UNUSED cd_nelmts,
|
2020-09-30 22:27:10 +08:00
|
|
|
const unsigned int H5_ATTR_UNUSED *cd_values, size_t nbytes, size_t *buf_size, void **buf)
|
2012-12-05 03:47:35 +08:00
|
|
|
{
|
2020-09-30 22:27:10 +08:00
|
|
|
int * int_ptr = (int *)*buf; /* Pointer to the data values */
|
|
|
|
size_t buf_left = *buf_size; /* Amount of data buffer left to process */
|
2012-12-05 03:47:35 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if (flags & H5Z_FLAG_REVERSE) { /* read */
|
2021-12-07 22:27:29 +08:00
|
|
|
/* Subtract the "add on" value to all the data values */
|
2020-09-30 22:27:10 +08:00
|
|
|
while (buf_left > 0) {
|
2012-12-05 03:47:35 +08:00
|
|
|
*int_ptr++ /= (int)FACTOR;
|
2020-01-17 05:29:34 +08:00
|
|
|
buf_left -= sizeof(int);
|
2020-09-30 22:27:10 +08:00
|
|
|
} /* end while */
|
|
|
|
} /* end if */
|
2012-12-05 03:47:35 +08:00
|
|
|
else { /* write */
|
|
|
|
/* Add the "add on" value to all the data values */
|
2020-09-30 22:27:10 +08:00
|
|
|
while (buf_left > 0) {
|
2012-12-05 03:47:35 +08:00
|
|
|
*int_ptr++ *= (int)FACTOR;
|
2020-01-17 05:29:34 +08:00
|
|
|
buf_left -= sizeof(int);
|
2012-12-05 03:47:35 +08:00
|
|
|
} /* end while */
|
2020-09-30 22:27:10 +08:00
|
|
|
} /* end else */
|
2012-12-05 03:47:35 +08:00
|
|
|
|
|
|
|
return nbytes;
|
2017-05-15 23:25:15 +08:00
|
|
|
} /* filter_bogus2() */
|
2012-12-05 03:47:35 +08:00
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
2019-07-31 01:39:20 +08:00
|
|
|
* Function: test_skip_compress_write2
|
2012-12-05 03:47:35 +08:00
|
|
|
*
|
2019-07-31 01:39:20 +08:00
|
|
|
* Purpose: Test skipping compression filter when there are three filters
|
2012-12-05 03:47:35 +08:00
|
|
|
* for the dataset
|
|
|
|
*
|
2019-07-31 01:39:20 +08:00
|
|
|
* Return: Success: 0
|
|
|
|
* Failure: 1
|
2012-12-05 03:47:35 +08:00
|
|
|
*
|
2019-07-31 01:39:20 +08:00
|
|
|
* Programmer: Raymond Lu
|
2012-12-05 03:47:35 +08:00
|
|
|
* 30 November 2012
|
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
static int
|
|
|
|
test_skip_compress_write2(hid_t file)
|
|
|
|
{
|
2020-09-30 22:27:10 +08:00
|
|
|
hid_t dataspace = -1, dataset = -1;
|
|
|
|
hid_t mem_space = -1;
|
|
|
|
hid_t cparms = -1, dxpl = -1;
|
|
|
|
hsize_t dims[2] = {NX, NY};
|
|
|
|
hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
|
|
|
|
hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY};
|
|
|
|
herr_t status;
|
|
|
|
int i, j, n;
|
|
|
|
|
|
|
|
unsigned filter_mask = 0; /* orig filter mask */
|
|
|
|
int origin_direct_buf[CHUNK_NX][CHUNK_NY];
|
|
|
|
int direct_buf[CHUNK_NX][CHUNK_NY];
|
|
|
|
int check_chunk[CHUNK_NX][CHUNK_NY];
|
|
|
|
hsize_t offset[2] = {0, 0};
|
|
|
|
size_t buf_size = CHUNK_NX * CHUNK_NY * sizeof(int);
|
|
|
|
int aggression = 9; /* Compression aggression setting */
|
|
|
|
|
|
|
|
unsigned read_filter_mask = 0; /* filter mask after direct read */
|
|
|
|
int read_direct_buf[CHUNK_NX][CHUNK_NY];
|
|
|
|
hsize_t read_buf_size = 0; /* buf size */
|
|
|
|
|
|
|
|
hsize_t start[2]; /* Start of hyperslab */
|
|
|
|
hsize_t stride[2]; /* Stride of hyperslab */
|
|
|
|
hsize_t count[2]; /* Block count */
|
|
|
|
hsize_t block[2]; /* Block sizes */
|
2012-12-05 03:47:35 +08:00
|
|
|
|
|
|
|
TESTING("skipping compression filters but keep two other filters");
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Create the data space with unlimited dimensions.
|
|
|
|
*/
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((dataspace = H5Screate_simple(RANK, dims, maxdims)) < 0)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Modify dataset creation properties, i.e. enable chunking and compression.
|
|
|
|
* The order of filters is bogus 1 + deflate + bogus 2.
|
|
|
|
*/
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((status = H5Pset_chunk(cparms, RANK, chunk_dims)) < 0)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/* Register and enable first bogus filter */
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Zregister(H5Z_BOGUS1) < 0)
|
2017-04-26 07:08:53 +08:00
|
|
|
goto error;
|
2012-12-05 03:47:35 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Pset_filter(cparms, H5Z_FILTER_BOGUS1, 0, (size_t)0, NULL) < 0)
|
2017-04-26 07:08:53 +08:00
|
|
|
goto error;
|
2012-12-05 03:47:35 +08:00
|
|
|
|
|
|
|
/* Enable compression filter */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((status = H5Pset_deflate(cparms, (unsigned)aggression)) < 0)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/* Register and enable second bogus filter */
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Zregister(H5Z_BOGUS2) < 0)
|
2017-04-26 07:08:53 +08:00
|
|
|
goto error;
|
2012-12-05 03:47:35 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Pset_filter(cparms, H5Z_FILTER_BOGUS2, 0, (size_t)0, NULL) < 0)
|
2017-04-26 07:08:53 +08:00
|
|
|
goto error;
|
2012-12-05 03:47:35 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Create a new dataset within the file using cparms
|
|
|
|
* creation properties.
|
|
|
|
*/
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((dataset =
|
|
|
|
H5Dcreate2(file, DATASETNAME3, H5T_NATIVE_INT, dataspace, H5P_DEFAULT, cparms, H5P_DEFAULT)) < 0)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/* Initialize data for one chunk. Apply operations of two bogus filters to the chunk */
|
2020-09-30 22:27:10 +08:00
|
|
|
for (i = n = 0; i < CHUNK_NX; i++)
|
|
|
|
for (j = 0; j < CHUNK_NY; j++) {
|
2017-04-26 07:08:53 +08:00
|
|
|
origin_direct_buf[i][j] = n++;
|
2020-09-30 22:27:10 +08:00
|
|
|
direct_buf[i][j] = (origin_direct_buf[i][j] + ADD_ON) * FACTOR;
|
2017-04-26 07:08:53 +08:00
|
|
|
}
|
2012-12-05 03:47:35 +08:00
|
|
|
|
2017-05-15 23:25:15 +08:00
|
|
|
/* write the uncompressed chunk data repeatedly to dataset, using the direct writing function.
|
|
|
|
* Indicate skipping the compression filter but keep the other two bogus filters */
|
2012-12-05 03:47:35 +08:00
|
|
|
offset[0] = CHUNK_NX;
|
|
|
|
offset[1] = CHUNK_NY;
|
|
|
|
|
|
|
|
/* compression filter is the middle one to be skipped */
|
|
|
|
filter_mask = 0x00000002;
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((status = H5Dwrite_chunk(dataset, dxpl, filter_mask, offset, buf_size, direct_buf)) < 0)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Fflush(dataset, H5F_SCOPE_LOCAL) < 0)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Dclose(dataset) < 0)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((dataset = H5Dopen2(file, DATASETNAME3, H5P_DEFAULT)) < 0)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
2017-05-15 23:25:15 +08:00
|
|
|
/*
|
|
|
|
* Select hyperslab for one chunk in the file
|
|
|
|
*/
|
2020-09-30 22:27:10 +08:00
|
|
|
start[0] = CHUNK_NX;
|
|
|
|
start[1] = CHUNK_NY;
|
|
|
|
stride[0] = 1;
|
|
|
|
stride[1] = 1;
|
|
|
|
count[0] = 1;
|
|
|
|
count[1] = 1;
|
|
|
|
block[0] = CHUNK_NX;
|
|
|
|
block[1] = CHUNK_NY;
|
|
|
|
if ((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0)
|
2017-04-26 07:08:53 +08:00
|
|
|
goto error;
|
|
|
|
|
2017-05-15 23:25:15 +08:00
|
|
|
/* Read the chunk back */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((status = H5Dread(dataset, H5T_NATIVE_INT, mem_space, dataspace, H5P_DEFAULT, check_chunk)) < 0)
|
2017-04-26 07:08:53 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/* Check that the values read are the same as the values written */
|
2020-09-30 22:27:10 +08:00
|
|
|
for (i = 0; i < CHUNK_NX; i++) {
|
|
|
|
for (j = 0; j < CHUNK_NY; j++) {
|
|
|
|
if (origin_direct_buf[i][j] != check_chunk[i][j]) {
|
2017-05-15 23:25:15 +08:00
|
|
|
HDprintf(" 1. Read different values than written.");
|
|
|
|
HDprintf(" At index %d,%d\n", i, j);
|
2020-09-30 22:27:10 +08:00
|
|
|
HDprintf(" origin_direct_buf=%d, check_chunk=%d\n", origin_direct_buf[i][j],
|
|
|
|
check_chunk[i][j]);
|
2017-04-26 07:08:53 +08:00
|
|
|
goto error;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-05-15 23:25:15 +08:00
|
|
|
/* Query chunk storage size */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((status = H5Dget_chunk_storage_size(dataset, offset, &read_buf_size)) < 0)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
2020-09-30 22:27:10 +08:00
|
|
|
if (read_buf_size != buf_size)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
2017-05-15 23:25:15 +08:00
|
|
|
/* Read the raw chunk back */
|
|
|
|
HDmemset(&read_direct_buf, 0, sizeof(read_direct_buf));
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((status = H5Dread_chunk(dataset, H5P_DEFAULT, offset, &read_filter_mask, read_direct_buf)) < 0)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
2020-09-30 22:27:10 +08:00
|
|
|
if (read_filter_mask != filter_mask)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
2017-05-15 23:25:15 +08:00
|
|
|
/* Check that the direct chunk read is the same as the chunk written */
|
2020-09-30 22:27:10 +08:00
|
|
|
for (i = 0; i < CHUNK_NX; i++) {
|
|
|
|
for (j = 0; j < CHUNK_NY; j++) {
|
|
|
|
if (direct_buf[i][j] != read_direct_buf[i][j]) {
|
2017-05-15 23:25:15 +08:00
|
|
|
HDprintf(" 1. Read different values than written.");
|
|
|
|
HDprintf(" At index %d,%d\n", i, j);
|
|
|
|
HDprintf(" direct_buf=%d, read_direct_buf=%d\n", direct_buf[i][j], read_direct_buf[i][j]);
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Close/release resources.
|
|
|
|
*/
|
|
|
|
H5Dclose(dataset);
|
|
|
|
H5Sclose(mem_space);
|
|
|
|
H5Sclose(dataspace);
|
|
|
|
H5Pclose(cparms);
|
|
|
|
H5Pclose(dxpl);
|
2017-05-15 23:25:15 +08:00
|
|
|
|
2012-12-05 03:47:35 +08:00
|
|
|
PASSED();
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
error:
|
2020-09-30 22:27:10 +08:00
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
2012-12-05 03:47:35 +08:00
|
|
|
H5Dclose(dataset);
|
|
|
|
H5Sclose(mem_space);
|
|
|
|
H5Sclose(dataspace);
|
|
|
|
H5Pclose(cparms);
|
|
|
|
H5Pclose(dxpl);
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
|
|
|
H5E_END_TRY;
|
2012-12-05 03:47:35 +08:00
|
|
|
|
2017-05-15 23:25:15 +08:00
|
|
|
H5_FAILED();
|
2012-12-05 03:47:35 +08:00
|
|
|
return 1;
|
2017-05-15 23:25:15 +08:00
|
|
|
} /* test_skip_compress_write2() */
|
2012-12-05 03:47:35 +08:00
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
2019-07-31 01:39:20 +08:00
|
|
|
* Function: test_data_conv
|
2012-12-05 03:47:35 +08:00
|
|
|
*
|
2019-07-31 01:39:20 +08:00
|
|
|
* Purpose: Test data conversion
|
2012-12-05 03:47:35 +08:00
|
|
|
*
|
2019-07-31 01:39:20 +08:00
|
|
|
* Return: Success: 0
|
|
|
|
* Failure: 1
|
2012-12-05 03:47:35 +08:00
|
|
|
*
|
2019-07-31 01:39:20 +08:00
|
|
|
* Programmer: Raymond Lu
|
2012-12-05 03:47:35 +08:00
|
|
|
* 30 November 2012
|
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
static int
|
|
|
|
test_data_conv(hid_t file)
|
|
|
|
{
|
|
|
|
typedef struct {
|
2017-04-26 07:08:53 +08:00
|
|
|
int a, b, c[4], d, e;
|
2012-12-05 03:47:35 +08:00
|
|
|
} src_type_t;
|
|
|
|
typedef struct {
|
2020-09-30 22:27:10 +08:00
|
|
|
int a, c[4], e;
|
2012-12-05 03:47:35 +08:00
|
|
|
} dst_type_t;
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
hid_t dataspace = -1, dataset = -1;
|
|
|
|
hid_t mem_space = -1;
|
|
|
|
hid_t cparms = -1, dxpl = -1;
|
|
|
|
hsize_t dims[2] = {NX, NY};
|
|
|
|
hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
|
|
|
|
hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY};
|
|
|
|
herr_t status;
|
|
|
|
int i, j, n;
|
|
|
|
const hsize_t four = 4;
|
|
|
|
hid_t st = -1, dt = -1;
|
|
|
|
hid_t array_dt;
|
|
|
|
|
|
|
|
unsigned filter_mask = 0;
|
|
|
|
src_type_t direct_buf[CHUNK_NX][CHUNK_NY];
|
|
|
|
dst_type_t check_chunk[CHUNK_NX][CHUNK_NY];
|
|
|
|
src_type_t read_chunk[CHUNK_NX][CHUNK_NY]; /* For H5Dread_chunk */
|
|
|
|
|
|
|
|
hsize_t offset[2] = {0, 0};
|
|
|
|
size_t buf_size = CHUNK_NX * CHUNK_NY * sizeof(src_type_t);
|
2012-12-05 03:47:35 +08:00
|
|
|
|
|
|
|
hsize_t start[2]; /* Start of hyperslab */
|
|
|
|
hsize_t stride[2]; /* Stride of hyperslab */
|
|
|
|
hsize_t count[2]; /* Block count */
|
|
|
|
hsize_t block[2]; /* Block sizes */
|
|
|
|
|
2018-04-30 22:52:07 +08:00
|
|
|
TESTING("data conversion for H5Dwrite_chunk/H5Dread_chunk");
|
2012-12-05 03:47:35 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Create the data space with unlimited dimensions.
|
|
|
|
*/
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((dataspace = H5Screate_simple(RANK, dims, maxdims)) < 0)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Modify dataset creation properties, i.e. enable chunking
|
|
|
|
*/
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((status = H5Pset_chunk(cparms, RANK, chunk_dims)) < 0)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/* Build hdf5 datatypes */
|
|
|
|
array_dt = H5Tarray_create2(H5T_NATIVE_INT, 1, &four);
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((st = H5Tcreate(H5T_COMPOUND, sizeof(src_type_t))) < 0 ||
|
|
|
|
H5Tinsert(st, "a", HOFFSET(src_type_t, a), H5T_NATIVE_INT) < 0 ||
|
|
|
|
H5Tinsert(st, "b", HOFFSET(src_type_t, b), H5T_NATIVE_INT) < 0 ||
|
|
|
|
H5Tinsert(st, "c", HOFFSET(src_type_t, c), array_dt) < 0 ||
|
|
|
|
H5Tinsert(st, "d", HOFFSET(src_type_t, d), H5T_NATIVE_INT) < 0 ||
|
|
|
|
H5Tinsert(st, "e", HOFFSET(src_type_t, e), H5T_NATIVE_INT) < 0)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Tclose(array_dt) < 0)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
array_dt = H5Tarray_create2(H5T_NATIVE_INT, 1, &four);
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((dt = H5Tcreate(H5T_COMPOUND, sizeof(dst_type_t))) < 0 ||
|
|
|
|
H5Tinsert(dt, "a", HOFFSET(dst_type_t, a), H5T_NATIVE_INT) < 0 ||
|
|
|
|
H5Tinsert(dt, "c", HOFFSET(dst_type_t, c), array_dt) < 0 ||
|
|
|
|
H5Tinsert(dt, "e", HOFFSET(dst_type_t, e), H5T_NATIVE_INT) < 0)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Tclose(array_dt) < 0)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Create a new dataset within the file using cparms
|
|
|
|
* creation properties.
|
|
|
|
*/
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((dataset = H5Dcreate2(file, DATASETNAME4, st, dataspace, H5P_DEFAULT, cparms, H5P_DEFAULT)) < 0)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/* Initialize data for one chunk */
|
2020-09-30 22:27:10 +08:00
|
|
|
for (i = n = 0; i < CHUNK_NX; i++) {
|
|
|
|
for (j = 0; j < CHUNK_NY; j++) {
|
|
|
|
(direct_buf[i][j]).a = i * j + 0;
|
|
|
|
(direct_buf[i][j]).b = i * j + 1;
|
|
|
|
(direct_buf[i][j]).c[0] = i * j + 2;
|
|
|
|
(direct_buf[i][j]).c[1] = i * j + 3;
|
|
|
|
(direct_buf[i][j]).c[2] = i * j + 4;
|
|
|
|
(direct_buf[i][j]).c[3] = i * j + 5;
|
|
|
|
(direct_buf[i][j]).d = i * j + 6;
|
|
|
|
(direct_buf[i][j]).e = i * j + 7;
|
2012-12-05 03:47:35 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-07-31 01:39:20 +08:00
|
|
|
/* write the chunk data to dataset, using the direct writing function.
|
2012-12-05 03:47:35 +08:00
|
|
|
* There should be no data conversion involved. */
|
|
|
|
offset[0] = CHUNK_NX;
|
|
|
|
offset[1] = CHUNK_NY;
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((status = H5Dwrite_chunk(dataset, dxpl, filter_mask, offset, buf_size, direct_buf)) < 0)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Fflush(dataset, H5F_SCOPE_LOCAL) < 0)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Dclose(dataset) < 0)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((dataset = H5Dopen2(file, DATASETNAME4, H5P_DEFAULT)) < 0)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
2018-04-30 22:52:07 +08:00
|
|
|
/* Use H5Dread_chunk() to read the uncompressed data */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((status = H5Dread_chunk(dataset, dxpl, offset, &filter_mask, read_chunk)) < 0)
|
2017-04-26 07:08:53 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/* Check that the values read are the same as the values written */
|
2020-09-30 22:27:10 +08:00
|
|
|
for (i = 0; i < CHUNK_NX; i++) {
|
|
|
|
for (j = 0; j < CHUNK_NY; j++) {
|
|
|
|
if ((direct_buf[i][j]).a != (read_chunk[i][j]).a ||
|
|
|
|
(direct_buf[i][j]).b != (read_chunk[i][j]).b ||
|
2017-04-26 07:08:53 +08:00
|
|
|
(direct_buf[i][j]).c[0] != (read_chunk[i][j]).c[0] ||
|
|
|
|
(direct_buf[i][j]).c[1] != (read_chunk[i][j]).c[1] ||
|
|
|
|
(direct_buf[i][j]).c[2] != (read_chunk[i][j]).c[2] ||
|
|
|
|
(direct_buf[i][j]).c[3] != (read_chunk[i][j]).c[3] ||
|
2020-09-30 22:27:10 +08:00
|
|
|
(direct_buf[i][j]).d != (read_chunk[i][j]).d ||
|
|
|
|
(direct_buf[i][j]).e != (read_chunk[i][j]).e) {
|
|
|
|
HDprintf(" 1. Read different values than written.");
|
|
|
|
HDprintf(" At index %d,%d\n", i, j);
|
|
|
|
HDprintf(" src={a=%d, b=%d, c=[%d,%d,%d,%d], d=%d, e=%d\n", (direct_buf[i][j]).a,
|
|
|
|
(direct_buf[i][j]).b, (direct_buf[i][j]).c[0], (direct_buf[i][j]).c[1],
|
|
|
|
(direct_buf[i][j]).c[2], (direct_buf[i][j]).c[3], (direct_buf[i][j]).d,
|
|
|
|
(direct_buf[i][j]).e);
|
|
|
|
HDprintf(" dst={a=%d, b=%d, c=[%d,%d,%d,%d], d=%d, e=%d\n", (read_chunk[i][j]).a,
|
|
|
|
(read_chunk[i][j]).b, (read_chunk[i][j]).c[0], (read_chunk[i][j]).c[1],
|
|
|
|
(read_chunk[i][j]).c[2], (read_chunk[i][j]).c[3], (read_chunk[i][j]).d,
|
|
|
|
(read_chunk[i][j]).e);
|
|
|
|
|
|
|
|
goto error;
|
2017-04-26 07:08:53 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-12-05 03:47:35 +08:00
|
|
|
/*
|
|
|
|
* Select hyperslab for the chunk just written in the file
|
|
|
|
*/
|
2020-09-30 22:27:10 +08:00
|
|
|
start[0] = CHUNK_NX;
|
|
|
|
start[1] = CHUNK_NY;
|
|
|
|
stride[0] = 1;
|
|
|
|
stride[1] = 1;
|
|
|
|
count[0] = 1;
|
|
|
|
count[1] = 1;
|
|
|
|
block[0] = CHUNK_NX;
|
|
|
|
block[1] = CHUNK_NY;
|
|
|
|
if ((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/* Read the chunk back. Data should be converted */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((status = H5Dread(dataset, dt, mem_space, dataspace, H5P_DEFAULT, check_chunk)) < 0)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/* Check that the values read are the same as the values written */
|
2020-09-30 22:27:10 +08:00
|
|
|
for (i = 0; i < CHUNK_NX; i++) {
|
|
|
|
for (j = 0; j < CHUNK_NY; j++) {
|
|
|
|
if ((direct_buf[i][j]).a != (check_chunk[i][j]).a ||
|
2017-05-15 23:25:15 +08:00
|
|
|
(direct_buf[i][j]).c[0] != (check_chunk[i][j]).c[0] ||
|
|
|
|
(direct_buf[i][j]).c[1] != (check_chunk[i][j]).c[1] ||
|
|
|
|
(direct_buf[i][j]).c[2] != (check_chunk[i][j]).c[2] ||
|
|
|
|
(direct_buf[i][j]).c[3] != (check_chunk[i][j]).c[3] ||
|
2020-09-30 22:27:10 +08:00
|
|
|
(direct_buf[i][j]).e != (check_chunk[i][j]).e) {
|
|
|
|
HDprintf(" 1. Read different values than written.");
|
|
|
|
HDprintf(" At index %d,%d\n", i, j);
|
|
|
|
HDprintf(" src={a=%d, b=%d, c=[%d,%d,%d,%d], d=%d, e=%d\n", (direct_buf[i][j]).a,
|
|
|
|
(direct_buf[i][j]).b, (direct_buf[i][j]).c[0], (direct_buf[i][j]).c[1],
|
|
|
|
(direct_buf[i][j]).c[2], (direct_buf[i][j]).c[3], (direct_buf[i][j]).d,
|
|
|
|
(direct_buf[i][j]).e);
|
|
|
|
HDprintf(" dst={a=%d, c=[%d,%d,%d,%d], e=%d\n", (check_chunk[i][j]).a,
|
|
|
|
(check_chunk[i][j]).c[0], (check_chunk[i][j]).c[1], (check_chunk[i][j]).c[2],
|
|
|
|
(check_chunk[i][j]).c[3], (check_chunk[i][j]).e);
|
|
|
|
|
|
|
|
goto error;
|
2012-12-05 03:47:35 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Close/release resources.
|
|
|
|
*/
|
|
|
|
H5Dclose(dataset);
|
|
|
|
H5Sclose(mem_space);
|
|
|
|
H5Sclose(dataspace);
|
|
|
|
H5Pclose(cparms);
|
|
|
|
H5Pclose(dxpl);
|
|
|
|
H5Tclose(st);
|
|
|
|
H5Tclose(dt);
|
|
|
|
|
|
|
|
PASSED();
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
error:
|
2020-09-30 22:27:10 +08:00
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
2012-12-05 03:47:35 +08:00
|
|
|
H5Dclose(dataset);
|
|
|
|
H5Sclose(mem_space);
|
|
|
|
H5Sclose(dataspace);
|
|
|
|
H5Pclose(cparms);
|
|
|
|
H5Pclose(dxpl);
|
|
|
|
H5Tclose(st);
|
|
|
|
H5Tclose(dt);
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
|
|
|
H5E_END_TRY;
|
2012-12-05 03:47:35 +08:00
|
|
|
|
2017-05-15 23:25:15 +08:00
|
|
|
H5_FAILED();
|
2012-12-05 03:47:35 +08:00
|
|
|
return 1;
|
2017-05-15 23:25:15 +08:00
|
|
|
} /* test_data_conv() */
|
2012-12-05 03:47:35 +08:00
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
2019-07-31 01:39:20 +08:00
|
|
|
* Function: test_invalid_parameters
|
2012-12-05 03:47:35 +08:00
|
|
|
*
|
2018-04-30 22:52:07 +08:00
|
|
|
* Purpose: Test invalid parameters for H5Dwrite_chunk and H5Dread_chunk
|
2012-12-05 03:47:35 +08:00
|
|
|
*
|
2019-07-31 01:39:20 +08:00
|
|
|
* Return: Success: 0
|
|
|
|
* Failure: 1
|
2012-12-05 03:47:35 +08:00
|
|
|
*
|
2019-07-31 01:39:20 +08:00
|
|
|
* Programmer: Raymond Lu
|
2012-12-05 03:47:35 +08:00
|
|
|
* 30 November 2012
|
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
static int
|
|
|
|
test_invalid_parameters(hid_t file)
|
|
|
|
{
|
2020-09-30 22:27:10 +08:00
|
|
|
hid_t dataspace = -1, dataset = -1;
|
|
|
|
hid_t mem_space = -1;
|
|
|
|
hid_t cparms = -1, dxpl = -1;
|
|
|
|
hsize_t dims[2] = {NX, NY};
|
|
|
|
hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY};
|
|
|
|
herr_t status;
|
|
|
|
int i, j, n;
|
|
|
|
|
|
|
|
unsigned filter_mask = 0;
|
|
|
|
int direct_buf[CHUNK_NX][CHUNK_NY];
|
|
|
|
hsize_t offset[2] = {0, 0};
|
|
|
|
size_t buf_size = CHUNK_NX * CHUNK_NY * sizeof(int);
|
|
|
|
int aggression = 9; /* Compression aggression setting */
|
|
|
|
|
|
|
|
hsize_t chunk_nbytes; /* Chunk size */
|
2017-04-26 07:08:53 +08:00
|
|
|
|
2018-04-30 22:52:07 +08:00
|
|
|
TESTING("invalid parameters for H5Dwrite_chunk/H5Dread_chunk");
|
2012-12-05 03:47:35 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Create the data space with unlimited dimensions.
|
|
|
|
*/
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((dataspace = H5Screate_simple(RANK, dims, NULL)) < 0)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Modify dataset creation properties
|
|
|
|
*/
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/*
|
2018-04-30 22:52:07 +08:00
|
|
|
* Create a new contiguous dataset to verify H5Dwrite_chunk/H5Dread_chunk doesn't work
|
2012-12-05 03:47:35 +08:00
|
|
|
*/
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((dataset =
|
|
|
|
H5Dcreate2(file, DATASETNAME5, H5T_NATIVE_INT, dataspace, H5P_DEFAULT, cparms, H5P_DEFAULT)) < 0)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/* Initialize data for one chunk */
|
2020-09-30 22:27:10 +08:00
|
|
|
for (i = n = 0; i < CHUNK_NX; i++)
|
|
|
|
for (j = 0; j < CHUNK_NY; j++) {
|
2017-04-26 07:08:53 +08:00
|
|
|
direct_buf[i][j] = n++;
|
|
|
|
}
|
2012-12-05 03:47:35 +08:00
|
|
|
|
|
|
|
/* Try to write the chunk data to contiguous dataset. It should fail */
|
|
|
|
offset[0] = CHUNK_NX;
|
|
|
|
offset[1] = CHUNK_NY;
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
|
|
|
if ((status = H5Dwrite_chunk(dataset, dxpl, filter_mask, offset, buf_size, direct_buf)) != FAIL)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
|
|
|
H5E_END_TRY;
|
2012-12-05 03:47:35 +08:00
|
|
|
|
2017-05-15 23:25:15 +08:00
|
|
|
/* Try to get chunk size for a contiguous dataset. It should fail */
|
2020-09-30 22:27:10 +08:00
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
|
|
|
if ((status = H5Dget_chunk_storage_size(dataset, offset, &chunk_nbytes)) != FAIL)
|
2017-04-26 07:08:53 +08:00
|
|
|
goto error;
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
|
|
|
H5E_END_TRY;
|
2017-04-26 07:08:53 +08:00
|
|
|
|
2018-04-30 22:52:07 +08:00
|
|
|
/* Try to H5Dread_chunk from the contiguous dataset. It should fail */
|
2020-09-30 22:27:10 +08:00
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
|
|
|
if ((status = H5Dread_chunk(dataset, dxpl, offset, &filter_mask, direct_buf)) != FAIL)
|
2017-04-26 07:08:53 +08:00
|
|
|
goto error;
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
|
|
|
H5E_END_TRY;
|
2017-04-26 07:08:53 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Dclose(dataset) < 0)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/* Create a chunked dataset with compression filter */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((status = H5Pset_chunk(cparms, RANK, chunk_dims)) < 0)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((status = H5Pset_deflate(cparms, (unsigned)aggression)) < 0)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Create a new dataset within the file using cparms
|
|
|
|
* creation properties.
|
|
|
|
*/
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((dataset =
|
|
|
|
H5Dcreate2(file, DATASETNAME6, H5T_NATIVE_INT, dataspace, H5P_DEFAULT, cparms, H5P_DEFAULT)) < 0)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
2019-07-31 01:39:20 +08:00
|
|
|
/* Check invalid dataset ID for H5Dwrite_chunk and H5Dread_chunk */
|
2020-09-30 22:27:10 +08:00
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
|
|
|
if ((status = H5Dwrite_chunk((hid_t)-1, dxpl, filter_mask, offset, buf_size, direct_buf)) != FAIL)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
|
|
|
H5E_END_TRY;
|
2012-12-05 03:47:35 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
|
|
|
if ((status = H5Dread_chunk((hid_t)-1, dxpl, offset, &filter_mask, direct_buf)) != FAIL)
|
2017-04-26 07:08:53 +08:00
|
|
|
goto error;
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
|
|
|
H5E_END_TRY;
|
2017-04-26 07:08:53 +08:00
|
|
|
|
2018-04-30 22:52:07 +08:00
|
|
|
/* Check invalid DXPL ID for H5Dwrite_chunk and H5Dread_chunk */
|
2020-09-30 22:27:10 +08:00
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
|
|
|
if ((status = H5Dwrite_chunk(dataset, (hid_t)-1, filter_mask, offset, buf_size, direct_buf)) != FAIL)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
|
|
|
H5E_END_TRY;
|
2012-12-05 03:47:35 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
|
|
|
if ((status = H5Dread_chunk(dataset, (hid_t)-1, offset, &filter_mask, direct_buf)) != FAIL)
|
2017-04-26 07:08:53 +08:00
|
|
|
goto error;
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
|
|
|
H5E_END_TRY;
|
2017-04-26 07:08:53 +08:00
|
|
|
|
2018-04-30 22:52:07 +08:00
|
|
|
/* Check invalid OFFSET for H5Dwrite_chunk and H5Dread_chunk */
|
2020-09-30 22:27:10 +08:00
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
|
|
|
if ((status = H5Dwrite_chunk(dataset, dxpl, filter_mask, NULL, buf_size, direct_buf)) != FAIL)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
|
|
|
H5E_END_TRY;
|
2012-12-05 03:47:35 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
|
|
|
if ((status = H5Dread_chunk(dataset, dxpl, NULL, &filter_mask, direct_buf)) != FAIL)
|
2017-04-26 07:08:53 +08:00
|
|
|
goto error;
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
|
|
|
H5E_END_TRY;
|
2017-04-26 07:08:53 +08:00
|
|
|
|
2018-04-30 22:52:07 +08:00
|
|
|
/* Check when OFFSET is out of dataset range for H5Dwrite_chunk and H5Dread_chunk */
|
2012-12-05 03:47:35 +08:00
|
|
|
offset[0] = NX + 1;
|
|
|
|
offset[1] = NY;
|
2020-09-30 22:27:10 +08:00
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
|
|
|
if ((status = H5Dwrite_chunk(dataset, dxpl, filter_mask, offset, buf_size, direct_buf)) != FAIL)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
|
|
|
H5E_END_TRY;
|
2012-12-05 03:47:35 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
|
|
|
if ((status = H5Dread_chunk(dataset, dxpl, offset, &filter_mask, direct_buf)) != FAIL)
|
2017-04-26 07:08:53 +08:00
|
|
|
goto error;
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
|
|
|
H5E_END_TRY;
|
2017-04-26 07:08:53 +08:00
|
|
|
|
2018-04-30 22:52:07 +08:00
|
|
|
/* Check when OFFSET is not on chunk boundary for H5Dwrite_chunk and H5Dread_chunk */
|
2012-12-05 03:47:35 +08:00
|
|
|
offset[0] = CHUNK_NX;
|
|
|
|
offset[1] = CHUNK_NY + 1;
|
2020-09-30 22:27:10 +08:00
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
|
|
|
if ((status = H5Dwrite_chunk(dataset, dxpl, filter_mask, offset, buf_size, direct_buf)) != FAIL)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
|
|
|
H5E_END_TRY;
|
2012-12-05 03:47:35 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
|
|
|
if ((status = H5Dread_chunk(dataset, dxpl, offset, &filter_mask, direct_buf)) != FAIL)
|
2017-04-26 07:08:53 +08:00
|
|
|
goto error;
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
|
|
|
H5E_END_TRY;
|
2017-04-26 07:08:53 +08:00
|
|
|
|
2018-04-30 22:52:07 +08:00
|
|
|
/* Check invalid buffer size for H5Dwrite_chunk only */
|
2012-12-05 03:47:35 +08:00
|
|
|
offset[0] = CHUNK_NX;
|
|
|
|
offset[1] = CHUNK_NY;
|
2020-09-30 22:27:10 +08:00
|
|
|
buf_size = 0;
|
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
|
|
|
if ((status = H5Dwrite_chunk(dataset, dxpl, filter_mask, offset, buf_size, direct_buf)) != FAIL)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
|
|
|
H5E_END_TRY;
|
2012-12-05 03:47:35 +08:00
|
|
|
|
2018-04-30 22:52:07 +08:00
|
|
|
/* Check invalid data buffer for H5Dwrite_chunk and H5Dread_chunk */
|
2020-09-30 22:27:10 +08:00
|
|
|
buf_size = CHUNK_NX * CHUNK_NY * sizeof(int);
|
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
|
|
|
if ((status = H5Dwrite_chunk(dataset, dxpl, filter_mask, offset, buf_size, NULL)) != FAIL)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
|
|
|
H5E_END_TRY;
|
2012-12-05 03:47:35 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
|
|
|
if ((status = H5Dread_chunk(dataset, dxpl, offset, &filter_mask, NULL)) != FAIL)
|
2017-04-26 07:08:53 +08:00
|
|
|
goto error;
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
|
|
|
H5E_END_TRY;
|
2017-04-26 07:08:53 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Dclose(dataset) < 0)
|
2012-12-05 03:47:35 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Close/release resources.
|
|
|
|
*/
|
|
|
|
H5Sclose(mem_space);
|
|
|
|
H5Sclose(dataspace);
|
|
|
|
H5Pclose(cparms);
|
|
|
|
H5Pclose(dxpl);
|
2019-07-31 01:39:20 +08:00
|
|
|
|
2012-12-05 03:47:35 +08:00
|
|
|
PASSED();
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
error:
|
2020-09-30 22:27:10 +08:00
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
2012-12-05 03:47:35 +08:00
|
|
|
H5Dclose(dataset);
|
|
|
|
H5Sclose(mem_space);
|
|
|
|
H5Sclose(dataspace);
|
|
|
|
H5Pclose(cparms);
|
|
|
|
H5Pclose(dxpl);
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
|
|
|
H5E_END_TRY;
|
2012-12-05 03:47:35 +08:00
|
|
|
|
2017-05-15 23:25:15 +08:00
|
|
|
H5_FAILED();
|
2012-12-05 03:47:35 +08:00
|
|
|
return 1;
|
2017-05-15 23:25:15 +08:00
|
|
|
} /* test_invalid_parameters() */
|
2012-12-05 03:47:35 +08:00
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
2017-05-15 23:25:15 +08:00
|
|
|
* Function: test_direct_chunk_read_no_cache
|
2012-12-05 03:47:35 +08:00
|
|
|
*
|
2018-04-30 22:52:07 +08:00
|
|
|
* Purpose: Test the basic functionality of H5Dread_chunk with the
|
2021-12-07 22:27:29 +08:00
|
|
|
* chunk cache disabled.
|
2012-12-05 03:47:35 +08:00
|
|
|
*
|
2017-05-15 23:25:15 +08:00
|
|
|
* Return: Success: 0
|
|
|
|
* Failure: 1
|
2012-12-05 03:47:35 +08:00
|
|
|
*
|
2017-05-15 23:25:15 +08:00
|
|
|
* Programmer: Matthew Strong (GE Healthcare)
|
|
|
|
* 14 February 2016
|
2012-12-05 03:47:35 +08:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
2017-05-15 23:25:15 +08:00
|
|
|
#ifdef H5_HAVE_FILTER_DEFLATE
|
|
|
|
static int
|
2020-09-30 22:27:10 +08:00
|
|
|
test_direct_chunk_read_no_cache(hid_t file)
|
2012-11-08 01:11:22 +08:00
|
|
|
{
|
2020-09-30 22:27:10 +08:00
|
|
|
hid_t dataspace = -1, dataset = -1;
|
|
|
|
hid_t mem_space = -1;
|
|
|
|
hid_t cparms = -1, dxpl = -1, dapl = -1;
|
|
|
|
hsize_t dims[2] = {NX, NY};
|
|
|
|
hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
|
|
|
|
hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY};
|
|
|
|
herr_t status; /* status from H5 function calls */
|
|
|
|
int ret; /* deflate return status */
|
|
|
|
int data[NX][NY];
|
|
|
|
int i, j, k, l, n; /* local index variables */
|
|
|
|
|
|
|
|
unsigned filter_mask = 0; /* filter mask returned from H5Dread_chunk */
|
|
|
|
int direct_buf[CHUNK_NX][CHUNK_NY]; /* chunk read with H5Dread and manually decompressed */
|
|
|
|
int check_chunk[CHUNK_NX][CHUNK_NY]; /* chunk read with H5Dread */
|
|
|
|
hsize_t offset[2]; /* chunk offset used for H5Dread_chunk */
|
|
|
|
size_t buf_size = CHUNK_NX * CHUNK_NY * sizeof(int);
|
|
|
|
|
|
|
|
Bytef *z_src = NULL; /* source buffer */
|
|
|
|
uLongf z_src_nbytes = (uLongf)DEFLATE_SIZE_ADJUST(buf_size);
|
|
|
|
Bytef *z_dst = (Bytef *)(direct_buf);
|
|
|
|
uLong z_dst_nbytes = (uLong)buf_size;
|
|
|
|
int aggression = 9; /* Compression aggression setting */
|
|
|
|
void * outbuf = NULL; /* Pointer to new buffer */
|
2012-12-05 03:47:35 +08:00
|
|
|
|
2017-05-15 23:25:15 +08:00
|
|
|
hsize_t start[2]; /* Start of hyperslab */
|
|
|
|
hsize_t stride[2]; /* Stride of hyperslab */
|
|
|
|
hsize_t count[2]; /* Block count */
|
|
|
|
hsize_t block[2]; /* Block sizes */
|
2012-11-08 01:11:22 +08:00
|
|
|
|
2018-04-30 22:52:07 +08:00
|
|
|
TESTING("basic functionality of H5Dread_chunk (chunk cache disabled)");
|
2012-11-08 01:11:22 +08:00
|
|
|
|
2017-05-15 23:25:15 +08:00
|
|
|
/* Create the data space with unlimited dimensions. */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((dataspace = H5Screate_simple(RANK, dims, maxdims)) < 0)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/* Modify dataset creation properties, i.e. enable chunking and compression */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((status = H5Pset_chunk(cparms, RANK, chunk_dims)) < 0)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((status = H5Pset_deflate(cparms, (unsigned)aggression)) < 0)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((dapl = H5Pcreate(H5P_DATASET_ACCESS)) < 0)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/* Disable chunk cache by setting number of slots to 0 */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((status = H5Pset_chunk_cache(dapl, 0, H5D_CHUNK_CACHE_NBYTES_DEFAULT, H5D_CHUNK_CACHE_W0_DEFAULT)) <
|
|
|
|
0)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/* Create a new dataset within the file using cparms creation properties. */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((dataset = H5Dcreate2(file, DATASETNAME8, H5T_NATIVE_INT, dataspace, H5P_DEFAULT, cparms, dapl)) < 0)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/* Initialize the dataset */
|
2020-09-30 22:27:10 +08:00
|
|
|
for (i = n = 0; i < NX; i++)
|
|
|
|
for (j = 0; j < NY; j++)
|
2017-05-15 23:25:15 +08:00
|
|
|
data[i][j] = n++;
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/* Write the data for the dataset.
|
|
|
|
* Data will skip chunk cache and go directly to disk. */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((status = H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, data)) < 0)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/* Allocate output (compressed) buffer */
|
|
|
|
outbuf = HDmalloc(z_src_nbytes);
|
2020-09-30 22:27:10 +08:00
|
|
|
z_src = (Bytef *)outbuf;
|
2017-05-15 23:25:15 +08:00
|
|
|
|
2018-04-30 22:52:07 +08:00
|
|
|
/* For each chunk in the dataset, compare the result of H5Dread and H5Dread_chunk. */
|
2020-09-30 22:27:10 +08:00
|
|
|
for (i = 0; i < NX / CHUNK_NX; i++) {
|
|
|
|
for (j = 0; j < NY / CHUNK_NY; j++) {
|
2017-05-15 23:25:15 +08:00
|
|
|
/* Select hyperslab for one chunk in the file */
|
2020-09-30 22:27:10 +08:00
|
|
|
start[0] = (hsize_t)i * CHUNK_NX;
|
|
|
|
start[1] = (hsize_t)j * CHUNK_NY;
|
|
|
|
stride[0] = 1;
|
|
|
|
stride[1] = 1;
|
|
|
|
count[0] = 1;
|
|
|
|
count[1] = 1;
|
|
|
|
block[0] = CHUNK_NX;
|
|
|
|
block[1] = CHUNK_NY;
|
2017-05-15 23:25:15 +08:00
|
|
|
|
|
|
|
/* Hyperslab selection equals single chunk */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/* Read the chunk back */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((status = H5Dread(dataset, H5T_NATIVE_INT, mem_space, dataspace, H5P_DEFAULT, check_chunk)) <
|
|
|
|
0)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
offset[0] = (hsize_t)i * CHUNK_NX;
|
|
|
|
offset[1] = (hsize_t)j * CHUNK_NY;
|
2017-05-15 23:25:15 +08:00
|
|
|
/* Read the compressed chunk back using the direct read function. */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((status = H5Dread_chunk(dataset, dxpl, offset, &filter_mask, outbuf)) < 0)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/* Check filter mask return value */
|
2020-09-30 22:27:10 +08:00
|
|
|
if (filter_mask != 0)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/* Perform decompression from the source to the destination buffer */
|
|
|
|
ret = uncompress(z_dst, &z_dst_nbytes, z_src, z_src_nbytes);
|
|
|
|
|
|
|
|
/* Check for various zlib errors */
|
2020-09-30 22:27:10 +08:00
|
|
|
if (Z_BUF_ERROR == ret) {
|
2017-05-15 23:25:15 +08:00
|
|
|
HDfprintf(stderr, "overflow\n");
|
|
|
|
goto error;
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
|
|
|
else if (Z_MEM_ERROR == ret) {
|
2017-05-15 23:25:15 +08:00
|
|
|
HDfprintf(stderr, "deflate memory error\n");
|
|
|
|
goto error;
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
|
|
|
else if (Z_DATA_ERROR == ret) {
|
2017-05-15 23:25:15 +08:00
|
|
|
HDfprintf(stderr, "corrupted data\n");
|
|
|
|
goto error;
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
|
|
|
else if (Z_OK != ret) {
|
2017-05-15 23:25:15 +08:00
|
|
|
HDfprintf(stderr, "other deflate error\n");
|
|
|
|
goto error;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Check that the decompressed values match those read from H5Dread */
|
2020-09-30 22:27:10 +08:00
|
|
|
for (k = 0; k < CHUNK_NX; k++) {
|
|
|
|
for (l = 0; l < CHUNK_NY; l++) {
|
|
|
|
if (direct_buf[k][l] != check_chunk[k][l]) {
|
2017-05-15 23:25:15 +08:00
|
|
|
HDprintf("\n 1. Read different values than written.");
|
|
|
|
HDprintf(" At index %d,%d\n", k, l);
|
|
|
|
HDprintf(" direct_buf=%d, check_chunk=%d\n", direct_buf[k][l], check_chunk[k][l]);
|
|
|
|
goto error;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Close/release resources. */
|
|
|
|
H5Dclose(dataset);
|
|
|
|
H5Sclose(mem_space);
|
|
|
|
H5Sclose(dataspace);
|
|
|
|
H5Pclose(cparms);
|
|
|
|
H5Pclose(dxpl);
|
|
|
|
H5Pclose(dapl);
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if (outbuf)
|
2017-05-15 23:25:15 +08:00
|
|
|
HDfree(outbuf);
|
|
|
|
|
|
|
|
PASSED();
|
|
|
|
return 0;
|
2012-11-08 01:11:22 +08:00
|
|
|
|
|
|
|
error:
|
2020-09-30 22:27:10 +08:00
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
2017-05-15 23:25:15 +08:00
|
|
|
H5Dclose(dataset);
|
|
|
|
H5Sclose(mem_space);
|
|
|
|
H5Sclose(dataspace);
|
|
|
|
H5Pclose(cparms);
|
|
|
|
H5Pclose(dxpl);
|
|
|
|
H5Pclose(dapl);
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
|
|
|
H5E_END_TRY;
|
2017-05-15 23:25:15 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if (outbuf)
|
2017-05-15 23:25:15 +08:00
|
|
|
HDfree(outbuf);
|
|
|
|
|
|
|
|
H5_FAILED();
|
2012-11-08 01:11:22 +08:00
|
|
|
return 1;
|
2017-05-15 23:25:15 +08:00
|
|
|
} /* test_direct_chunk_read_no_cache() */
|
|
|
|
#endif /* H5_HAVE_FILTER_DEFLATE */
|
|
|
|
|
|
|
|
#ifdef H5_HAVE_FILTER_DEFLATE
|
|
|
|
static int
|
2020-09-30 22:27:10 +08:00
|
|
|
test_direct_chunk_read_cache(hid_t file, hbool_t flush)
|
2017-05-15 23:25:15 +08:00
|
|
|
{
|
2020-09-30 22:27:10 +08:00
|
|
|
hid_t dataspace = -1, dataset = -1;
|
|
|
|
hid_t mem_space = -1;
|
|
|
|
hid_t cparms = -1, dxpl = -1;
|
|
|
|
hsize_t dims[2] = {NX, NY};
|
|
|
|
hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
|
|
|
|
hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY};
|
|
|
|
herr_t status; /* status from H5 function calls */
|
|
|
|
int ret; /* deflate return status */
|
|
|
|
int data[NX][NY];
|
|
|
|
int i, j, k, l, n; /* local index variables */
|
|
|
|
|
|
|
|
unsigned filter_mask = 0; /* filter mask returned from H5Dread_chunk */
|
|
|
|
int direct_buf[CHUNK_NX][CHUNK_NY]; /* chunk read with H5Dread and manually decompressed */
|
|
|
|
int check_chunk[CHUNK_NX][CHUNK_NY]; /* chunk read with H5Dread */
|
|
|
|
hsize_t offset[2]; /* chunk offset used for H5Dread_chunk */
|
|
|
|
size_t buf_size = CHUNK_NX * CHUNK_NY * sizeof(int);
|
|
|
|
|
|
|
|
Bytef * z_src = NULL; /* source buffer */
|
|
|
|
uLongf z_src_nbytes = (uLongf)DEFLATE_SIZE_ADJUST(buf_size);
|
|
|
|
Bytef * z_dst = (Bytef *)(direct_buf);
|
|
|
|
uLong z_dst_nbytes = (uLong)buf_size;
|
|
|
|
int aggression = 9; /* Compression aggression setting */
|
|
|
|
void * outbuf = NULL; /* Pointer to new buffer */
|
|
|
|
hsize_t read_buf_size = 0;
|
2017-05-15 23:25:15 +08:00
|
|
|
|
|
|
|
hsize_t start[2]; /* Start of hyperslab */
|
|
|
|
hsize_t stride[2]; /* Stride of hyperslab */
|
|
|
|
hsize_t count[2]; /* Block count */
|
|
|
|
hsize_t block[2]; /* Block sizes */
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if (flush) {
|
2018-04-30 22:52:07 +08:00
|
|
|
TESTING("basic functionality of H5Dread_chunk (flush chunk cache)");
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
|
|
|
else {
|
2018-04-30 22:52:07 +08:00
|
|
|
TESTING("basic functionality of H5Dread_chunk (does not flush chunk cache)");
|
2017-05-15 23:25:15 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Create the data space with unlimited dimensions. */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((dataspace = H5Screate_simple(RANK, dims, maxdims)) < 0)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/* Modify dataset creation properties, i.e. enable chunking and compression */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((status = H5Pset_chunk(cparms, RANK, chunk_dims)) < 0)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((status = H5Pset_deflate(cparms, (unsigned)aggression)) < 0)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/* Create a new dataset within the file using cparms creation properties. */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((dataset = H5Dcreate2(file, flush ? DATASETNAME9 : DATASETNAME10, H5T_NATIVE_INT, dataspace,
|
|
|
|
H5P_DEFAULT, cparms, H5P_DEFAULT)) < 0)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/* Initialize the dataset */
|
2020-09-30 22:27:10 +08:00
|
|
|
for (i = n = 0; i < NX; i++)
|
|
|
|
for (j = 0; j < NY; j++)
|
2017-05-15 23:25:15 +08:00
|
|
|
data[i][j] = n++;
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/* Write the data for the dataset.
|
|
|
|
* It should stay in the chunk cache. */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((status = H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, data)) < 0)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if (flush) {
|
2017-05-15 23:25:15 +08:00
|
|
|
/* Flush the chunk cache to disk. Cache entry is not evicted. */
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Fflush(dataset, H5F_SCOPE_LOCAL) < 0)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Allocate output (compressed) buffer */
|
|
|
|
outbuf = HDmalloc(z_src_nbytes);
|
2020-09-30 22:27:10 +08:00
|
|
|
z_src = (Bytef *)outbuf;
|
2017-05-15 23:25:15 +08:00
|
|
|
|
2018-04-30 22:52:07 +08:00
|
|
|
/* For each chunk in the dataset, compare the result of H5Dread and H5Dread_chunk. */
|
2020-09-30 22:27:10 +08:00
|
|
|
for (i = 0; i < NX / CHUNK_NX; i++) {
|
|
|
|
for (j = 0; j < NY / CHUNK_NY; j++) {
|
2017-05-15 23:25:15 +08:00
|
|
|
/* Select hyperslab for one chunk in the file */
|
2020-09-30 22:27:10 +08:00
|
|
|
start[0] = (hsize_t)i * CHUNK_NX;
|
|
|
|
start[1] = (hsize_t)j * CHUNK_NY;
|
|
|
|
stride[0] = 1;
|
|
|
|
stride[1] = 1;
|
|
|
|
count[0] = 1;
|
|
|
|
count[1] = 1;
|
|
|
|
block[0] = CHUNK_NX;
|
|
|
|
block[1] = CHUNK_NY;
|
2017-05-15 23:25:15 +08:00
|
|
|
|
|
|
|
/* Hyperslab selection equals single chunk */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/* Read the chunk back */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((status = H5Dread(dataset, H5T_NATIVE_INT, mem_space, dataspace, H5P_DEFAULT, check_chunk)) <
|
|
|
|
0)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
offset[0] = (hsize_t)i * CHUNK_NX;
|
|
|
|
offset[1] = (hsize_t)j * CHUNK_NY;
|
2017-05-15 23:25:15 +08:00
|
|
|
|
|
|
|
/* Query chunk storage size */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((status = H5Dget_chunk_storage_size(dataset, offset, &read_buf_size)) < 0)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
2020-09-30 22:27:10 +08:00
|
|
|
if (read_buf_size == 0)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
2019-07-31 01:39:20 +08:00
|
|
|
|
2017-05-15 23:25:15 +08:00
|
|
|
/* Read the compressed chunk back using the direct read function. */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((status = H5Dread_chunk(dataset, dxpl, offset, &filter_mask, outbuf)) < 0)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/* Check filter mask return value */
|
2020-09-30 22:27:10 +08:00
|
|
|
if (filter_mask != 0)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/* Perform decompression from the source to the destination buffer */
|
|
|
|
ret = uncompress(z_dst, &z_dst_nbytes, z_src, z_src_nbytes);
|
|
|
|
|
|
|
|
/* Check for various zlib errors */
|
2020-09-30 22:27:10 +08:00
|
|
|
if (Z_BUF_ERROR == ret) {
|
2017-05-15 23:25:15 +08:00
|
|
|
HDfprintf(stderr, "overflow\n");
|
|
|
|
goto error;
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
|
|
|
else if (Z_MEM_ERROR == ret) {
|
2017-05-15 23:25:15 +08:00
|
|
|
HDfprintf(stderr, "deflate memory error\n");
|
|
|
|
goto error;
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
|
|
|
else if (Z_DATA_ERROR == ret) {
|
2017-05-15 23:25:15 +08:00
|
|
|
HDfprintf(stderr, "corrupted data\n");
|
|
|
|
goto error;
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
|
|
|
else if (Z_OK != ret) {
|
2017-05-15 23:25:15 +08:00
|
|
|
HDfprintf(stderr, "other deflate error\n");
|
|
|
|
goto error;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Check that the decompressed values match those read from H5Dread */
|
2020-09-30 22:27:10 +08:00
|
|
|
for (k = 0; k < CHUNK_NX; k++) {
|
|
|
|
for (l = 0; l < CHUNK_NY; l++) {
|
|
|
|
if (direct_buf[k][l] != check_chunk[k][l]) {
|
2017-05-15 23:25:15 +08:00
|
|
|
HDprintf("\n 1. Read different values than written.");
|
|
|
|
HDprintf(" At index %d,%d\n", k, l);
|
|
|
|
HDprintf(" direct_buf=%d, check_chunk=%d\n", direct_buf[k][l], check_chunk[k][l]);
|
|
|
|
goto error;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Close/release resources. */
|
|
|
|
H5Dclose(dataset);
|
|
|
|
H5Sclose(mem_space);
|
|
|
|
H5Sclose(dataspace);
|
|
|
|
H5Pclose(cparms);
|
|
|
|
H5Pclose(dxpl);
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if (outbuf)
|
2017-05-15 23:25:15 +08:00
|
|
|
HDfree(outbuf);
|
|
|
|
|
|
|
|
PASSED();
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
error:
|
2020-09-30 22:27:10 +08:00
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
2017-05-15 23:25:15 +08:00
|
|
|
H5Dclose(dataset);
|
|
|
|
H5Sclose(mem_space);
|
|
|
|
H5Sclose(dataspace);
|
|
|
|
H5Pclose(cparms);
|
|
|
|
H5Pclose(dxpl);
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
|
|
|
H5E_END_TRY;
|
2017-05-15 23:25:15 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if (outbuf)
|
2017-05-15 23:25:15 +08:00
|
|
|
HDfree(outbuf);
|
|
|
|
|
|
|
|
H5_FAILED();
|
|
|
|
return 1;
|
|
|
|
} /* test_direct_chunk_read_cache() */
|
|
|
|
#endif /* H5_HAVE_FILTER_DEFLATE */
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
* Function: test_read_unfiltered_dset
|
|
|
|
*
|
2018-04-30 22:52:07 +08:00
|
|
|
* Purpose: Test the basic functionality of H5Dread_chunk on a dataset
|
2017-05-15 23:25:15 +08:00
|
|
|
* without no filters applied.
|
|
|
|
*
|
|
|
|
* Return: Success: 0
|
|
|
|
* Failure: 1
|
|
|
|
*
|
|
|
|
* Programmer: Matthew Strong (GE Healthcare)
|
|
|
|
* 30 November 2016
|
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
static int
|
|
|
|
test_read_unfiltered_dset(hid_t file)
|
|
|
|
{
|
2020-09-30 22:27:10 +08:00
|
|
|
hid_t dataspace = -1, dataset = -1;
|
|
|
|
hid_t mem_space = -1;
|
|
|
|
hid_t cparms = -1, dxpl = -1;
|
|
|
|
hsize_t dims[2] = {NX, NY};
|
|
|
|
hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
|
|
|
|
hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY};
|
|
|
|
herr_t status;
|
|
|
|
int data[NX][NY];
|
|
|
|
int i, j, k, l, n;
|
|
|
|
|
|
|
|
unsigned filter_mask = 0;
|
|
|
|
int direct_buf[CHUNK_NX][CHUNK_NY];
|
|
|
|
int check_chunk[CHUNK_NX][CHUNK_NY]; /* chunk read with H5Dread */
|
|
|
|
hsize_t offset[2] = {0, 0};
|
|
|
|
size_t buf_size = CHUNK_NX * CHUNK_NY * sizeof(int);
|
|
|
|
hsize_t read_buf_size = 0;
|
2017-05-15 23:25:15 +08:00
|
|
|
|
|
|
|
hsize_t start[2]; /* Start of hyperslab */
|
|
|
|
hsize_t stride[2]; /* Stride of hyperslab */
|
|
|
|
hsize_t count[2]; /* Block count */
|
|
|
|
hsize_t block[2]; /* Block sizes */
|
|
|
|
|
2018-04-30 22:52:07 +08:00
|
|
|
TESTING("basic functionality of H5Dread_chunk on unfiltered datasets");
|
2017-05-15 23:25:15 +08:00
|
|
|
|
|
|
|
/* Create the data space with unlimited dimensions. */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((dataspace = H5Screate_simple(RANK, dims, maxdims)) < 0)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/* Modify dataset creation properties, i.e. enable chunking, no compression */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((status = H5Pset_chunk(cparms, RANK, chunk_dims)) < 0)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/* Create a new dataset within the file using cparms creation properties. */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((dataset = H5Dcreate2(file, DATASETNAME12, H5T_NATIVE_INT, dataspace, H5P_DEFAULT, cparms,
|
|
|
|
H5P_DEFAULT)) < 0)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/* Initialize the dataset */
|
2020-09-30 22:27:10 +08:00
|
|
|
for (i = n = 0; i < NX; i++)
|
|
|
|
for (j = 0; j < NY; j++)
|
2017-05-15 23:25:15 +08:00
|
|
|
data[i][j] = n++;
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/* Write the data for the dataset.
|
|
|
|
* It should stay in the chunk cache and will be evicted/flushed by
|
2018-04-30 22:52:07 +08:00
|
|
|
* the H5Dread_chunk function call. */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((status = H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, dxpl, data)) < 0)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Fflush(dataset, H5F_SCOPE_LOCAL) < 0)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
|
|
|
|
2018-04-30 22:52:07 +08:00
|
|
|
/* For each chunk in the dataset, compare the result of H5Dread and H5Dread_chunk. */
|
2020-09-30 22:27:10 +08:00
|
|
|
for (i = 0; i < NX / CHUNK_NX; i++) {
|
|
|
|
for (j = 0; j < NY / CHUNK_NY; j++) {
|
2017-05-15 23:25:15 +08:00
|
|
|
/* Select hyperslab for one chunk in the file */
|
2020-09-30 22:27:10 +08:00
|
|
|
start[0] = (hsize_t)i * CHUNK_NX;
|
|
|
|
start[1] = (hsize_t)j * CHUNK_NY;
|
|
|
|
stride[0] = 1;
|
|
|
|
stride[1] = 1;
|
|
|
|
count[0] = 1;
|
|
|
|
count[1] = 1;
|
|
|
|
block[0] = CHUNK_NX;
|
|
|
|
block[1] = CHUNK_NY;
|
2017-05-15 23:25:15 +08:00
|
|
|
|
|
|
|
/* Hyperslab selection equals single chunk */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, start, stride, count, block)) < 0)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/* Read the chunk back */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((status = H5Dread(dataset, H5T_NATIVE_INT, mem_space, dataspace, H5P_DEFAULT, check_chunk)) <
|
|
|
|
0)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/* Query chunk storage size */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((status = H5Dget_chunk_storage_size(dataset, offset, &read_buf_size)) < 0)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if (read_buf_size != buf_size)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
offset[0] = (hsize_t)i * CHUNK_NX;
|
|
|
|
offset[1] = (hsize_t)j * CHUNK_NY;
|
2017-05-15 23:25:15 +08:00
|
|
|
/* Read the raw chunk back */
|
|
|
|
HDmemset(&direct_buf, 0, sizeof(direct_buf));
|
|
|
|
filter_mask = UINT_MAX;
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((status = H5Dread_chunk(dataset, dxpl, offset, &filter_mask, direct_buf)) < 0)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/* Check filter mask return value */
|
2020-09-30 22:27:10 +08:00
|
|
|
if (filter_mask != 0)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/* Check that the decompressed values match those read from H5Dread */
|
2020-09-30 22:27:10 +08:00
|
|
|
for (k = 0; k < CHUNK_NX; k++) {
|
|
|
|
for (l = 0; l < CHUNK_NY; l++) {
|
|
|
|
if (direct_buf[k][l] != check_chunk[k][l]) {
|
2017-05-15 23:25:15 +08:00
|
|
|
HDprintf("\n 1. Read different values than written.");
|
|
|
|
HDprintf(" At index %d,%d\n", k, l);
|
|
|
|
HDprintf(" direct_buf=%d, check_chunk=%d\n", direct_buf[k][l], check_chunk[k][l]);
|
|
|
|
goto error;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Close/release resources. */
|
|
|
|
H5Dclose(dataset);
|
|
|
|
H5Sclose(mem_space);
|
|
|
|
H5Sclose(dataspace);
|
|
|
|
H5Pclose(cparms);
|
|
|
|
H5Pclose(dxpl);
|
|
|
|
|
|
|
|
PASSED();
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
error:
|
2020-09-30 22:27:10 +08:00
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
2017-05-15 23:25:15 +08:00
|
|
|
H5Dclose(dataset);
|
|
|
|
H5Sclose(mem_space);
|
|
|
|
H5Sclose(dataspace);
|
|
|
|
H5Pclose(cparms);
|
|
|
|
H5Pclose(dxpl);
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
|
|
|
H5E_END_TRY;
|
2017-05-15 23:25:15 +08:00
|
|
|
|
|
|
|
H5_FAILED();
|
|
|
|
return 1;
|
|
|
|
} /* test_read_unfiltered_dset() */
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
* Function: test_read_unallocated_chunk
|
|
|
|
*
|
2018-04-30 22:52:07 +08:00
|
|
|
* Purpose: Tests the H5Dread_chunk and H5Dget_chunk_storage_size with valid
|
2021-12-07 22:27:29 +08:00
|
|
|
* offsets to chunks that have not been written to the dataset and are
|
2017-05-15 23:25:15 +08:00
|
|
|
* not allocated in the chunk storage on disk.
|
|
|
|
*
|
|
|
|
* Return: Success: 0
|
|
|
|
* Failure: 1
|
|
|
|
*
|
|
|
|
* Programmer: Matthew Strong (GE Healthcare)
|
|
|
|
* 30 November 2016
|
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
static int
|
2020-09-30 22:27:10 +08:00
|
|
|
test_read_unallocated_chunk(hid_t file)
|
2017-05-15 23:25:15 +08:00
|
|
|
{
|
2020-09-30 22:27:10 +08:00
|
|
|
hid_t dataspace = -1, dataset = -1;
|
|
|
|
hid_t mem_space = -1;
|
|
|
|
hid_t cparms = -1, dxpl = -1;
|
|
|
|
hsize_t dims[2] = {NX, NY};
|
|
|
|
hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED};
|
|
|
|
hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY};
|
|
|
|
hsize_t chunk_nbytes = CHUNK_NX * CHUNK_NY * sizeof(int);
|
|
|
|
hsize_t direct_chunk_nbytes = 0; /* size (bytes) of the on-disk chunk */
|
|
|
|
herr_t status; /* status from H5 function calls */
|
|
|
|
hsize_t i, j; /* local index variables */
|
|
|
|
|
|
|
|
unsigned filter_mask = 0; /* filter mask returned from H5Dread_chunk */
|
|
|
|
int direct_buf[CHUNK_NX][CHUNK_NY]; /* chunk read with H5Dread and manually decompressed */
|
|
|
|
hsize_t offset[2]; /* chunk offset used for H5Dread_chunk */
|
2017-05-15 23:25:15 +08:00
|
|
|
|
2018-04-30 22:52:07 +08:00
|
|
|
TESTING("H5Dread_chunk with unallocated chunks");
|
2017-05-15 23:25:15 +08:00
|
|
|
|
|
|
|
/* Create the data space with unlimited dimensions. */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((dataspace = H5Screate_simple(RANK, dims, maxdims)) < 0)
|
Combo set of async and other changes (#161)
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* Apply patch for dynamically registering optional VOL operations
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Remove H5Dwait & H5Fwait (moved to the async connector). Added H5atclose
routine. Updated 'optional op' operations.
* Fix missed merge marker, and reformatted line
* Update API tracing infrastructure for H5atclose callback
* Clean up some warnings
* Normalize against develop branch
* Correct level of indirection
* Add doxygen info for H5is_library_terminating and regression tests for it and H5atclose
* Relocate prototype (and doxygen info) for H5Aclose
* Align w/changes on develop
* Move group package initialization code to H5Gint.c, and update tracing macros
* Change non-static function declarations to be static
* Correct GCC diagnostic macro
* Ensure that H5TSpublic.h header gets installed (#129)
* Finish moving API routines that invoke VOL framework to main source files.
* Fix position of H5Fmount and H5Funmount
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Add wrappers for dynamically registered optional operations
* Fix typo
* Update doxygen comment for H5atclose with additional detail.
* Add H5VL\*_vararg versions of H5VL routines that use va_list parameters
* Implement and test H5S_BLOCK
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Finish another iteration on public H5ES routines, along with running the code reformatter
* Another round of reformatting
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
* Remove H5Dwait and H5Fwait calls, which were incorrectly brought back in
* Tiny cleanup of H5Lcreate_hard_async
* Run source formatter
* Allow for canceled operation in wait_cb
* Attempt to fix switch on string value
* Re-run source formatter
* Add H5S_BLOCK testfile to CMake clean target
* Add H5Pset_vol_async API routine and 'get_cap_flags' VOL introspection callback
* Clean up warnings
* Add H5P(set\|get)_vol_implicit_async API routines to allow \/ disallow implicit asynchronous operations (default is disallowed)
* Run formatting script
* Remove H5VL_REQUEST_WAIT\*
* Warning cleanup
* Eliminate strdup()s on statically allocated strings
* Warning cleanup
* Split H5VLrestore_lib_state into H5VLstart_lib_state and H5VLrestore_lib_state, and rename H5VLreset_lib_state to H5VLfinish_lib_state.
* Duplicate strings when building err_info to return to applicatin
* Move connector author routines into seperate header files, all included in the new hdf5dev.h header
* Run bin/trace to add TRACE macros
* Allow H5ES_NONE as a valid, but no-op, parameter to all H5ES API routines that accept an event set ID
* Clean up formatting
* Remove H5Pset/get_vol_implicit_async
* Clean up warning
* Remove H5Pget_vol_async and replace with more generic H5Pget_vol_cap_flags
* Clean up warnings
* Add H5ESfree_err_info convenience routine
* Fix typo
* Correct matching for cached VOL plugins
* Add developer header file
* Update for C99 compatibility
* Add missing trace macro
* Stop clang-format from messing with the trace macros. Don't set up VOL wrappers for 'infrastructure' objects like requests and blobs
* Fix warning about formatting a directory
* Clean up formatting for H5E_BEGIN_TRY / H5E_END_TRY
* Reduce scope of H5ES__close
* Enable CMake checks for various types on MacOS
* Clean up properly when H5CX_retrieve_state() fails. Also clean up many compiler warnings.
* Committing clang-format changes
* Merge from develop
* Fix mis-placed assert
* Remove commented-out code
* Re-add macro for unsetenv on Windows (I think it accidentally was merged out)
* Strengthen sanity check from error report to assertion
* Committing clang-format changes
* Add units to the comments for a few fields
* Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it.
* Committing clang-format changes
* Remove H5ESget_time_estimate
* Committing clang-format changes
* Create developer header for datatype routines and move type conversion register/unregister routines there.
* Simplify internal H5VL_setup_name_args and H5VL_setup_idx_args routines
* Add H5VLlink_optional_op, allowing dynamicly registered optional operations for the link VOL subclass, also added H5VL_loc_params argument to the link 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Add H5VLobject_optional_op, allowing dynamicly registered optional operations for the object VOL subclass, also added H5VL_loc_params argument to the object 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Committing clang-format changes
* Revert "Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it."
This reverts commit 5ac92014da2682bdba62d7a2524b8d90e38f6b19.
* Committing clang-format changes
* Convert attribute 'get' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Update tracing macros
* Convert attribute 'specific' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert dataset 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to attribute 'get' and 'specific' operation parameters.
* Convert datatype 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to H5O_refresh_metadata arguments.
* Reduce warnings
* Reduce warnings
* Track change to datatype 'get' callback
* Fix bug with file pointer getting invalidated when object closed
* Reformat source
* Convert file and group VOL classes 'get' and 'specific' operations to use
struct-of-tagged-union pattern for VOL callback arguments, instead of using
varargs. Also small cleanup to the attribute get name operation. Also moved
'mount' and 'unmount' operations to be group specific operations, instead of
file specific, to better align with their behavior (mounted files are on
groups, so a group is what is operated on).
* Remove remainder of merge conflict marking
* Convert link VOL class 'create' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Remove some unused local variables
* Convert link VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor 'get name by idx' routines to return actual length of name with a parameter instead of the return value, and move some callback context structs for the link interface from the private header file into the source code module, to reduce their visibility scope.
* Update tracing macros
* Convert link VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor H5G_loc_exists, et al, to return 'exists' flag in a parameter and errors with the function return value, instead of overloading both into the return value. And, corrected logic error in test/links.c around non-existant objects in a file.
* Convert request VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert blob VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also removes the H5VL_BLOB_GETSIZE operation, as it's unused in the library and the blob ID size for a container is now returned with H5VL_FILE_GET_CONT_INFO.
* Add 'const' to several parameters that are only queried.
* Convert all VOL classes' 'optional' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Convert several 'get' routines to return the length of an array in a parameter instead of combining it into the return value. Move several routines to be in less public namespace. Correct direct_chunk test to verify that parameters aren't modified on error.
* Switch get/specific/optional VOL callback argument structures to be 'async-friendly'. Also other minor cleanups and bug-fixes.
* Add H5Pset_dataset_io_hyperslab_selection / H5S_PLIST feature, to allow skipping H5Dget_space + H5Sselect_hyperslab for async operation
* Add dynamic optional operations for request objects
* Update dynamic operation test for optional request operations
* Update a comment for an operation argument
* Run trace and format_source scripts
* Committing clang-format changes
* Committing clang-format changes
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-03 04:29:46 +08:00
|
|
|
FAIL_STACK_ERROR;
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((mem_space = H5Screate_simple(RANK, chunk_dims, NULL)) < 0)
|
Combo set of async and other changes (#161)
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* Apply patch for dynamically registering optional VOL operations
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Remove H5Dwait & H5Fwait (moved to the async connector). Added H5atclose
routine. Updated 'optional op' operations.
* Fix missed merge marker, and reformatted line
* Update API tracing infrastructure for H5atclose callback
* Clean up some warnings
* Normalize against develop branch
* Correct level of indirection
* Add doxygen info for H5is_library_terminating and regression tests for it and H5atclose
* Relocate prototype (and doxygen info) for H5Aclose
* Align w/changes on develop
* Move group package initialization code to H5Gint.c, and update tracing macros
* Change non-static function declarations to be static
* Correct GCC diagnostic macro
* Ensure that H5TSpublic.h header gets installed (#129)
* Finish moving API routines that invoke VOL framework to main source files.
* Fix position of H5Fmount and H5Funmount
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Add wrappers for dynamically registered optional operations
* Fix typo
* Update doxygen comment for H5atclose with additional detail.
* Add H5VL\*_vararg versions of H5VL routines that use va_list parameters
* Implement and test H5S_BLOCK
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Finish another iteration on public H5ES routines, along with running the code reformatter
* Another round of reformatting
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
* Remove H5Dwait and H5Fwait calls, which were incorrectly brought back in
* Tiny cleanup of H5Lcreate_hard_async
* Run source formatter
* Allow for canceled operation in wait_cb
* Attempt to fix switch on string value
* Re-run source formatter
* Add H5S_BLOCK testfile to CMake clean target
* Add H5Pset_vol_async API routine and 'get_cap_flags' VOL introspection callback
* Clean up warnings
* Add H5P(set\|get)_vol_implicit_async API routines to allow \/ disallow implicit asynchronous operations (default is disallowed)
* Run formatting script
* Remove H5VL_REQUEST_WAIT\*
* Warning cleanup
* Eliminate strdup()s on statically allocated strings
* Warning cleanup
* Split H5VLrestore_lib_state into H5VLstart_lib_state and H5VLrestore_lib_state, and rename H5VLreset_lib_state to H5VLfinish_lib_state.
* Duplicate strings when building err_info to return to applicatin
* Move connector author routines into seperate header files, all included in the new hdf5dev.h header
* Run bin/trace to add TRACE macros
* Allow H5ES_NONE as a valid, but no-op, parameter to all H5ES API routines that accept an event set ID
* Clean up formatting
* Remove H5Pset/get_vol_implicit_async
* Clean up warning
* Remove H5Pget_vol_async and replace with more generic H5Pget_vol_cap_flags
* Clean up warnings
* Add H5ESfree_err_info convenience routine
* Fix typo
* Correct matching for cached VOL plugins
* Add developer header file
* Update for C99 compatibility
* Add missing trace macro
* Stop clang-format from messing with the trace macros. Don't set up VOL wrappers for 'infrastructure' objects like requests and blobs
* Fix warning about formatting a directory
* Clean up formatting for H5E_BEGIN_TRY / H5E_END_TRY
* Reduce scope of H5ES__close
* Enable CMake checks for various types on MacOS
* Clean up properly when H5CX_retrieve_state() fails. Also clean up many compiler warnings.
* Committing clang-format changes
* Merge from develop
* Fix mis-placed assert
* Remove commented-out code
* Re-add macro for unsetenv on Windows (I think it accidentally was merged out)
* Strengthen sanity check from error report to assertion
* Committing clang-format changes
* Add units to the comments for a few fields
* Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it.
* Committing clang-format changes
* Remove H5ESget_time_estimate
* Committing clang-format changes
* Create developer header for datatype routines and move type conversion register/unregister routines there.
* Simplify internal H5VL_setup_name_args and H5VL_setup_idx_args routines
* Add H5VLlink_optional_op, allowing dynamicly registered optional operations for the link VOL subclass, also added H5VL_loc_params argument to the link 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Add H5VLobject_optional_op, allowing dynamicly registered optional operations for the object VOL subclass, also added H5VL_loc_params argument to the object 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Committing clang-format changes
* Revert "Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it."
This reverts commit 5ac92014da2682bdba62d7a2524b8d90e38f6b19.
* Committing clang-format changes
* Convert attribute 'get' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Update tracing macros
* Convert attribute 'specific' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert dataset 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to attribute 'get' and 'specific' operation parameters.
* Convert datatype 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to H5O_refresh_metadata arguments.
* Reduce warnings
* Reduce warnings
* Track change to datatype 'get' callback
* Fix bug with file pointer getting invalidated when object closed
* Reformat source
* Convert file and group VOL classes 'get' and 'specific' operations to use
struct-of-tagged-union pattern for VOL callback arguments, instead of using
varargs. Also small cleanup to the attribute get name operation. Also moved
'mount' and 'unmount' operations to be group specific operations, instead of
file specific, to better align with their behavior (mounted files are on
groups, so a group is what is operated on).
* Remove remainder of merge conflict marking
* Convert link VOL class 'create' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Remove some unused local variables
* Convert link VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor 'get name by idx' routines to return actual length of name with a parameter instead of the return value, and move some callback context structs for the link interface from the private header file into the source code module, to reduce their visibility scope.
* Update tracing macros
* Convert link VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor H5G_loc_exists, et al, to return 'exists' flag in a parameter and errors with the function return value, instead of overloading both into the return value. And, corrected logic error in test/links.c around non-existant objects in a file.
* Convert request VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert blob VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also removes the H5VL_BLOB_GETSIZE operation, as it's unused in the library and the blob ID size for a container is now returned with H5VL_FILE_GET_CONT_INFO.
* Add 'const' to several parameters that are only queried.
* Convert all VOL classes' 'optional' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Convert several 'get' routines to return the length of an array in a parameter instead of combining it into the return value. Move several routines to be in less public namespace. Correct direct_chunk test to verify that parameters aren't modified on error.
* Switch get/specific/optional VOL callback argument structures to be 'async-friendly'. Also other minor cleanups and bug-fixes.
* Add H5Pset_dataset_io_hyperslab_selection / H5S_PLIST feature, to allow skipping H5Dget_space + H5Sselect_hyperslab for async operation
* Add dynamic optional operations for request objects
* Update dynamic operation test for optional request operations
* Update a comment for an operation argument
* Run trace and format_source scripts
* Committing clang-format changes
* Committing clang-format changes
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-03 04:29:46 +08:00
|
|
|
FAIL_STACK_ERROR;
|
2017-05-15 23:25:15 +08:00
|
|
|
|
|
|
|
/* Modify dataset creation properties, i.e. enable chunking, no compression */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((cparms = H5Pcreate(H5P_DATASET_CREATE)) < 0)
|
Combo set of async and other changes (#161)
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* Apply patch for dynamically registering optional VOL operations
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Remove H5Dwait & H5Fwait (moved to the async connector). Added H5atclose
routine. Updated 'optional op' operations.
* Fix missed merge marker, and reformatted line
* Update API tracing infrastructure for H5atclose callback
* Clean up some warnings
* Normalize against develop branch
* Correct level of indirection
* Add doxygen info for H5is_library_terminating and regression tests for it and H5atclose
* Relocate prototype (and doxygen info) for H5Aclose
* Align w/changes on develop
* Move group package initialization code to H5Gint.c, and update tracing macros
* Change non-static function declarations to be static
* Correct GCC diagnostic macro
* Ensure that H5TSpublic.h header gets installed (#129)
* Finish moving API routines that invoke VOL framework to main source files.
* Fix position of H5Fmount and H5Funmount
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Add wrappers for dynamically registered optional operations
* Fix typo
* Update doxygen comment for H5atclose with additional detail.
* Add H5VL\*_vararg versions of H5VL routines that use va_list parameters
* Implement and test H5S_BLOCK
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Finish another iteration on public H5ES routines, along with running the code reformatter
* Another round of reformatting
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
* Remove H5Dwait and H5Fwait calls, which were incorrectly brought back in
* Tiny cleanup of H5Lcreate_hard_async
* Run source formatter
* Allow for canceled operation in wait_cb
* Attempt to fix switch on string value
* Re-run source formatter
* Add H5S_BLOCK testfile to CMake clean target
* Add H5Pset_vol_async API routine and 'get_cap_flags' VOL introspection callback
* Clean up warnings
* Add H5P(set\|get)_vol_implicit_async API routines to allow \/ disallow implicit asynchronous operations (default is disallowed)
* Run formatting script
* Remove H5VL_REQUEST_WAIT\*
* Warning cleanup
* Eliminate strdup()s on statically allocated strings
* Warning cleanup
* Split H5VLrestore_lib_state into H5VLstart_lib_state and H5VLrestore_lib_state, and rename H5VLreset_lib_state to H5VLfinish_lib_state.
* Duplicate strings when building err_info to return to applicatin
* Move connector author routines into seperate header files, all included in the new hdf5dev.h header
* Run bin/trace to add TRACE macros
* Allow H5ES_NONE as a valid, but no-op, parameter to all H5ES API routines that accept an event set ID
* Clean up formatting
* Remove H5Pset/get_vol_implicit_async
* Clean up warning
* Remove H5Pget_vol_async and replace with more generic H5Pget_vol_cap_flags
* Clean up warnings
* Add H5ESfree_err_info convenience routine
* Fix typo
* Correct matching for cached VOL plugins
* Add developer header file
* Update for C99 compatibility
* Add missing trace macro
* Stop clang-format from messing with the trace macros. Don't set up VOL wrappers for 'infrastructure' objects like requests and blobs
* Fix warning about formatting a directory
* Clean up formatting for H5E_BEGIN_TRY / H5E_END_TRY
* Reduce scope of H5ES__close
* Enable CMake checks for various types on MacOS
* Clean up properly when H5CX_retrieve_state() fails. Also clean up many compiler warnings.
* Committing clang-format changes
* Merge from develop
* Fix mis-placed assert
* Remove commented-out code
* Re-add macro for unsetenv on Windows (I think it accidentally was merged out)
* Strengthen sanity check from error report to assertion
* Committing clang-format changes
* Add units to the comments for a few fields
* Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it.
* Committing clang-format changes
* Remove H5ESget_time_estimate
* Committing clang-format changes
* Create developer header for datatype routines and move type conversion register/unregister routines there.
* Simplify internal H5VL_setup_name_args and H5VL_setup_idx_args routines
* Add H5VLlink_optional_op, allowing dynamicly registered optional operations for the link VOL subclass, also added H5VL_loc_params argument to the link 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Add H5VLobject_optional_op, allowing dynamicly registered optional operations for the object VOL subclass, also added H5VL_loc_params argument to the object 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Committing clang-format changes
* Revert "Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it."
This reverts commit 5ac92014da2682bdba62d7a2524b8d90e38f6b19.
* Committing clang-format changes
* Convert attribute 'get' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Update tracing macros
* Convert attribute 'specific' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert dataset 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to attribute 'get' and 'specific' operation parameters.
* Convert datatype 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to H5O_refresh_metadata arguments.
* Reduce warnings
* Reduce warnings
* Track change to datatype 'get' callback
* Fix bug with file pointer getting invalidated when object closed
* Reformat source
* Convert file and group VOL classes 'get' and 'specific' operations to use
struct-of-tagged-union pattern for VOL callback arguments, instead of using
varargs. Also small cleanup to the attribute get name operation. Also moved
'mount' and 'unmount' operations to be group specific operations, instead of
file specific, to better align with their behavior (mounted files are on
groups, so a group is what is operated on).
* Remove remainder of merge conflict marking
* Convert link VOL class 'create' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Remove some unused local variables
* Convert link VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor 'get name by idx' routines to return actual length of name with a parameter instead of the return value, and move some callback context structs for the link interface from the private header file into the source code module, to reduce their visibility scope.
* Update tracing macros
* Convert link VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor H5G_loc_exists, et al, to return 'exists' flag in a parameter and errors with the function return value, instead of overloading both into the return value. And, corrected logic error in test/links.c around non-existant objects in a file.
* Convert request VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert blob VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also removes the H5VL_BLOB_GETSIZE operation, as it's unused in the library and the blob ID size for a container is now returned with H5VL_FILE_GET_CONT_INFO.
* Add 'const' to several parameters that are only queried.
* Convert all VOL classes' 'optional' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Convert several 'get' routines to return the length of an array in a parameter instead of combining it into the return value. Move several routines to be in less public namespace. Correct direct_chunk test to verify that parameters aren't modified on error.
* Switch get/specific/optional VOL callback argument structures to be 'async-friendly'. Also other minor cleanups and bug-fixes.
* Add H5Pset_dataset_io_hyperslab_selection / H5S_PLIST feature, to allow skipping H5Dget_space + H5Sselect_hyperslab for async operation
* Add dynamic optional operations for request objects
* Update dynamic operation test for optional request operations
* Update a comment for an operation argument
* Run trace and format_source scripts
* Committing clang-format changes
* Committing clang-format changes
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-03 04:29:46 +08:00
|
|
|
FAIL_STACK_ERROR;
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((status = H5Pset_chunk(cparms, RANK, chunk_dims)) < 0)
|
Combo set of async and other changes (#161)
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* Apply patch for dynamically registering optional VOL operations
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Remove H5Dwait & H5Fwait (moved to the async connector). Added H5atclose
routine. Updated 'optional op' operations.
* Fix missed merge marker, and reformatted line
* Update API tracing infrastructure for H5atclose callback
* Clean up some warnings
* Normalize against develop branch
* Correct level of indirection
* Add doxygen info for H5is_library_terminating and regression tests for it and H5atclose
* Relocate prototype (and doxygen info) for H5Aclose
* Align w/changes on develop
* Move group package initialization code to H5Gint.c, and update tracing macros
* Change non-static function declarations to be static
* Correct GCC diagnostic macro
* Ensure that H5TSpublic.h header gets installed (#129)
* Finish moving API routines that invoke VOL framework to main source files.
* Fix position of H5Fmount and H5Funmount
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Add wrappers for dynamically registered optional operations
* Fix typo
* Update doxygen comment for H5atclose with additional detail.
* Add H5VL\*_vararg versions of H5VL routines that use va_list parameters
* Implement and test H5S_BLOCK
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Finish another iteration on public H5ES routines, along with running the code reformatter
* Another round of reformatting
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
* Remove H5Dwait and H5Fwait calls, which were incorrectly brought back in
* Tiny cleanup of H5Lcreate_hard_async
* Run source formatter
* Allow for canceled operation in wait_cb
* Attempt to fix switch on string value
* Re-run source formatter
* Add H5S_BLOCK testfile to CMake clean target
* Add H5Pset_vol_async API routine and 'get_cap_flags' VOL introspection callback
* Clean up warnings
* Add H5P(set\|get)_vol_implicit_async API routines to allow \/ disallow implicit asynchronous operations (default is disallowed)
* Run formatting script
* Remove H5VL_REQUEST_WAIT\*
* Warning cleanup
* Eliminate strdup()s on statically allocated strings
* Warning cleanup
* Split H5VLrestore_lib_state into H5VLstart_lib_state and H5VLrestore_lib_state, and rename H5VLreset_lib_state to H5VLfinish_lib_state.
* Duplicate strings when building err_info to return to applicatin
* Move connector author routines into seperate header files, all included in the new hdf5dev.h header
* Run bin/trace to add TRACE macros
* Allow H5ES_NONE as a valid, but no-op, parameter to all H5ES API routines that accept an event set ID
* Clean up formatting
* Remove H5Pset/get_vol_implicit_async
* Clean up warning
* Remove H5Pget_vol_async and replace with more generic H5Pget_vol_cap_flags
* Clean up warnings
* Add H5ESfree_err_info convenience routine
* Fix typo
* Correct matching for cached VOL plugins
* Add developer header file
* Update for C99 compatibility
* Add missing trace macro
* Stop clang-format from messing with the trace macros. Don't set up VOL wrappers for 'infrastructure' objects like requests and blobs
* Fix warning about formatting a directory
* Clean up formatting for H5E_BEGIN_TRY / H5E_END_TRY
* Reduce scope of H5ES__close
* Enable CMake checks for various types on MacOS
* Clean up properly when H5CX_retrieve_state() fails. Also clean up many compiler warnings.
* Committing clang-format changes
* Merge from develop
* Fix mis-placed assert
* Remove commented-out code
* Re-add macro for unsetenv on Windows (I think it accidentally was merged out)
* Strengthen sanity check from error report to assertion
* Committing clang-format changes
* Add units to the comments for a few fields
* Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it.
* Committing clang-format changes
* Remove H5ESget_time_estimate
* Committing clang-format changes
* Create developer header for datatype routines and move type conversion register/unregister routines there.
* Simplify internal H5VL_setup_name_args and H5VL_setup_idx_args routines
* Add H5VLlink_optional_op, allowing dynamicly registered optional operations for the link VOL subclass, also added H5VL_loc_params argument to the link 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Add H5VLobject_optional_op, allowing dynamicly registered optional operations for the object VOL subclass, also added H5VL_loc_params argument to the object 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Committing clang-format changes
* Revert "Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it."
This reverts commit 5ac92014da2682bdba62d7a2524b8d90e38f6b19.
* Committing clang-format changes
* Convert attribute 'get' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Update tracing macros
* Convert attribute 'specific' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert dataset 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to attribute 'get' and 'specific' operation parameters.
* Convert datatype 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to H5O_refresh_metadata arguments.
* Reduce warnings
* Reduce warnings
* Track change to datatype 'get' callback
* Fix bug with file pointer getting invalidated when object closed
* Reformat source
* Convert file and group VOL classes 'get' and 'specific' operations to use
struct-of-tagged-union pattern for VOL callback arguments, instead of using
varargs. Also small cleanup to the attribute get name operation. Also moved
'mount' and 'unmount' operations to be group specific operations, instead of
file specific, to better align with their behavior (mounted files are on
groups, so a group is what is operated on).
* Remove remainder of merge conflict marking
* Convert link VOL class 'create' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Remove some unused local variables
* Convert link VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor 'get name by idx' routines to return actual length of name with a parameter instead of the return value, and move some callback context structs for the link interface from the private header file into the source code module, to reduce their visibility scope.
* Update tracing macros
* Convert link VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor H5G_loc_exists, et al, to return 'exists' flag in a parameter and errors with the function return value, instead of overloading both into the return value. And, corrected logic error in test/links.c around non-existant objects in a file.
* Convert request VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert blob VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also removes the H5VL_BLOB_GETSIZE operation, as it's unused in the library and the blob ID size for a container is now returned with H5VL_FILE_GET_CONT_INFO.
* Add 'const' to several parameters that are only queried.
* Convert all VOL classes' 'optional' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Convert several 'get' routines to return the length of an array in a parameter instead of combining it into the return value. Move several routines to be in less public namespace. Correct direct_chunk test to verify that parameters aren't modified on error.
* Switch get/specific/optional VOL callback argument structures to be 'async-friendly'. Also other minor cleanups and bug-fixes.
* Add H5Pset_dataset_io_hyperslab_selection / H5S_PLIST feature, to allow skipping H5Dget_space + H5Sselect_hyperslab for async operation
* Add dynamic optional operations for request objects
* Update dynamic operation test for optional request operations
* Update a comment for an operation argument
* Run trace and format_source scripts
* Committing clang-format changes
* Committing clang-format changes
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-03 04:29:46 +08:00
|
|
|
FAIL_STACK_ERROR;
|
2017-05-15 23:25:15 +08:00
|
|
|
|
|
|
|
/* Create a new dataset within the file using cparms creation properties. */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((dataset = H5Dcreate2(file, DATASETNAME11, H5T_NATIVE_INT, dataspace, H5P_DEFAULT, cparms,
|
|
|
|
H5P_DEFAULT)) < 0)
|
Combo set of async and other changes (#161)
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* Apply patch for dynamically registering optional VOL operations
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Remove H5Dwait & H5Fwait (moved to the async connector). Added H5atclose
routine. Updated 'optional op' operations.
* Fix missed merge marker, and reformatted line
* Update API tracing infrastructure for H5atclose callback
* Clean up some warnings
* Normalize against develop branch
* Correct level of indirection
* Add doxygen info for H5is_library_terminating and regression tests for it and H5atclose
* Relocate prototype (and doxygen info) for H5Aclose
* Align w/changes on develop
* Move group package initialization code to H5Gint.c, and update tracing macros
* Change non-static function declarations to be static
* Correct GCC diagnostic macro
* Ensure that H5TSpublic.h header gets installed (#129)
* Finish moving API routines that invoke VOL framework to main source files.
* Fix position of H5Fmount and H5Funmount
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Add wrappers for dynamically registered optional operations
* Fix typo
* Update doxygen comment for H5atclose with additional detail.
* Add H5VL\*_vararg versions of H5VL routines that use va_list parameters
* Implement and test H5S_BLOCK
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Finish another iteration on public H5ES routines, along with running the code reformatter
* Another round of reformatting
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
* Remove H5Dwait and H5Fwait calls, which were incorrectly brought back in
* Tiny cleanup of H5Lcreate_hard_async
* Run source formatter
* Allow for canceled operation in wait_cb
* Attempt to fix switch on string value
* Re-run source formatter
* Add H5S_BLOCK testfile to CMake clean target
* Add H5Pset_vol_async API routine and 'get_cap_flags' VOL introspection callback
* Clean up warnings
* Add H5P(set\|get)_vol_implicit_async API routines to allow \/ disallow implicit asynchronous operations (default is disallowed)
* Run formatting script
* Remove H5VL_REQUEST_WAIT\*
* Warning cleanup
* Eliminate strdup()s on statically allocated strings
* Warning cleanup
* Split H5VLrestore_lib_state into H5VLstart_lib_state and H5VLrestore_lib_state, and rename H5VLreset_lib_state to H5VLfinish_lib_state.
* Duplicate strings when building err_info to return to applicatin
* Move connector author routines into seperate header files, all included in the new hdf5dev.h header
* Run bin/trace to add TRACE macros
* Allow H5ES_NONE as a valid, but no-op, parameter to all H5ES API routines that accept an event set ID
* Clean up formatting
* Remove H5Pset/get_vol_implicit_async
* Clean up warning
* Remove H5Pget_vol_async and replace with more generic H5Pget_vol_cap_flags
* Clean up warnings
* Add H5ESfree_err_info convenience routine
* Fix typo
* Correct matching for cached VOL plugins
* Add developer header file
* Update for C99 compatibility
* Add missing trace macro
* Stop clang-format from messing with the trace macros. Don't set up VOL wrappers for 'infrastructure' objects like requests and blobs
* Fix warning about formatting a directory
* Clean up formatting for H5E_BEGIN_TRY / H5E_END_TRY
* Reduce scope of H5ES__close
* Enable CMake checks for various types on MacOS
* Clean up properly when H5CX_retrieve_state() fails. Also clean up many compiler warnings.
* Committing clang-format changes
* Merge from develop
* Fix mis-placed assert
* Remove commented-out code
* Re-add macro for unsetenv on Windows (I think it accidentally was merged out)
* Strengthen sanity check from error report to assertion
* Committing clang-format changes
* Add units to the comments for a few fields
* Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it.
* Committing clang-format changes
* Remove H5ESget_time_estimate
* Committing clang-format changes
* Create developer header for datatype routines and move type conversion register/unregister routines there.
* Simplify internal H5VL_setup_name_args and H5VL_setup_idx_args routines
* Add H5VLlink_optional_op, allowing dynamicly registered optional operations for the link VOL subclass, also added H5VL_loc_params argument to the link 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Add H5VLobject_optional_op, allowing dynamicly registered optional operations for the object VOL subclass, also added H5VL_loc_params argument to the object 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Committing clang-format changes
* Revert "Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it."
This reverts commit 5ac92014da2682bdba62d7a2524b8d90e38f6b19.
* Committing clang-format changes
* Convert attribute 'get' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Update tracing macros
* Convert attribute 'specific' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert dataset 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to attribute 'get' and 'specific' operation parameters.
* Convert datatype 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to H5O_refresh_metadata arguments.
* Reduce warnings
* Reduce warnings
* Track change to datatype 'get' callback
* Fix bug with file pointer getting invalidated when object closed
* Reformat source
* Convert file and group VOL classes 'get' and 'specific' operations to use
struct-of-tagged-union pattern for VOL callback arguments, instead of using
varargs. Also small cleanup to the attribute get name operation. Also moved
'mount' and 'unmount' operations to be group specific operations, instead of
file specific, to better align with their behavior (mounted files are on
groups, so a group is what is operated on).
* Remove remainder of merge conflict marking
* Convert link VOL class 'create' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Remove some unused local variables
* Convert link VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor 'get name by idx' routines to return actual length of name with a parameter instead of the return value, and move some callback context structs for the link interface from the private header file into the source code module, to reduce their visibility scope.
* Update tracing macros
* Convert link VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor H5G_loc_exists, et al, to return 'exists' flag in a parameter and errors with the function return value, instead of overloading both into the return value. And, corrected logic error in test/links.c around non-existant objects in a file.
* Convert request VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert blob VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also removes the H5VL_BLOB_GETSIZE operation, as it's unused in the library and the blob ID size for a container is now returned with H5VL_FILE_GET_CONT_INFO.
* Add 'const' to several parameters that are only queried.
* Convert all VOL classes' 'optional' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Convert several 'get' routines to return the length of an array in a parameter instead of combining it into the return value. Move several routines to be in less public namespace. Correct direct_chunk test to verify that parameters aren't modified on error.
* Switch get/specific/optional VOL callback argument structures to be 'async-friendly'. Also other minor cleanups and bug-fixes.
* Add H5Pset_dataset_io_hyperslab_selection / H5S_PLIST feature, to allow skipping H5Dget_space + H5Sselect_hyperslab for async operation
* Add dynamic optional operations for request objects
* Update dynamic operation test for optional request operations
* Update a comment for an operation argument
* Run trace and format_source scripts
* Committing clang-format changes
* Committing clang-format changes
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-03 04:29:46 +08:00
|
|
|
FAIL_STACK_ERROR;
|
2017-05-15 23:25:15 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((dxpl = H5Pcreate(H5P_DATASET_XFER)) < 0)
|
Combo set of async and other changes (#161)
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* Apply patch for dynamically registering optional VOL operations
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Remove H5Dwait & H5Fwait (moved to the async connector). Added H5atclose
routine. Updated 'optional op' operations.
* Fix missed merge marker, and reformatted line
* Update API tracing infrastructure for H5atclose callback
* Clean up some warnings
* Normalize against develop branch
* Correct level of indirection
* Add doxygen info for H5is_library_terminating and regression tests for it and H5atclose
* Relocate prototype (and doxygen info) for H5Aclose
* Align w/changes on develop
* Move group package initialization code to H5Gint.c, and update tracing macros
* Change non-static function declarations to be static
* Correct GCC diagnostic macro
* Ensure that H5TSpublic.h header gets installed (#129)
* Finish moving API routines that invoke VOL framework to main source files.
* Fix position of H5Fmount and H5Funmount
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Add wrappers for dynamically registered optional operations
* Fix typo
* Update doxygen comment for H5atclose with additional detail.
* Add H5VL\*_vararg versions of H5VL routines that use va_list parameters
* Implement and test H5S_BLOCK
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Finish another iteration on public H5ES routines, along with running the code reformatter
* Another round of reformatting
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
* Remove H5Dwait and H5Fwait calls, which were incorrectly brought back in
* Tiny cleanup of H5Lcreate_hard_async
* Run source formatter
* Allow for canceled operation in wait_cb
* Attempt to fix switch on string value
* Re-run source formatter
* Add H5S_BLOCK testfile to CMake clean target
* Add H5Pset_vol_async API routine and 'get_cap_flags' VOL introspection callback
* Clean up warnings
* Add H5P(set\|get)_vol_implicit_async API routines to allow \/ disallow implicit asynchronous operations (default is disallowed)
* Run formatting script
* Remove H5VL_REQUEST_WAIT\*
* Warning cleanup
* Eliminate strdup()s on statically allocated strings
* Warning cleanup
* Split H5VLrestore_lib_state into H5VLstart_lib_state and H5VLrestore_lib_state, and rename H5VLreset_lib_state to H5VLfinish_lib_state.
* Duplicate strings when building err_info to return to applicatin
* Move connector author routines into seperate header files, all included in the new hdf5dev.h header
* Run bin/trace to add TRACE macros
* Allow H5ES_NONE as a valid, but no-op, parameter to all H5ES API routines that accept an event set ID
* Clean up formatting
* Remove H5Pset/get_vol_implicit_async
* Clean up warning
* Remove H5Pget_vol_async and replace with more generic H5Pget_vol_cap_flags
* Clean up warnings
* Add H5ESfree_err_info convenience routine
* Fix typo
* Correct matching for cached VOL plugins
* Add developer header file
* Update for C99 compatibility
* Add missing trace macro
* Stop clang-format from messing with the trace macros. Don't set up VOL wrappers for 'infrastructure' objects like requests and blobs
* Fix warning about formatting a directory
* Clean up formatting for H5E_BEGIN_TRY / H5E_END_TRY
* Reduce scope of H5ES__close
* Enable CMake checks for various types on MacOS
* Clean up properly when H5CX_retrieve_state() fails. Also clean up many compiler warnings.
* Committing clang-format changes
* Merge from develop
* Fix mis-placed assert
* Remove commented-out code
* Re-add macro for unsetenv on Windows (I think it accidentally was merged out)
* Strengthen sanity check from error report to assertion
* Committing clang-format changes
* Add units to the comments for a few fields
* Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it.
* Committing clang-format changes
* Remove H5ESget_time_estimate
* Committing clang-format changes
* Create developer header for datatype routines and move type conversion register/unregister routines there.
* Simplify internal H5VL_setup_name_args and H5VL_setup_idx_args routines
* Add H5VLlink_optional_op, allowing dynamicly registered optional operations for the link VOL subclass, also added H5VL_loc_params argument to the link 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Add H5VLobject_optional_op, allowing dynamicly registered optional operations for the object VOL subclass, also added H5VL_loc_params argument to the object 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Committing clang-format changes
* Revert "Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it."
This reverts commit 5ac92014da2682bdba62d7a2524b8d90e38f6b19.
* Committing clang-format changes
* Convert attribute 'get' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Update tracing macros
* Convert attribute 'specific' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert dataset 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to attribute 'get' and 'specific' operation parameters.
* Convert datatype 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to H5O_refresh_metadata arguments.
* Reduce warnings
* Reduce warnings
* Track change to datatype 'get' callback
* Fix bug with file pointer getting invalidated when object closed
* Reformat source
* Convert file and group VOL classes 'get' and 'specific' operations to use
struct-of-tagged-union pattern for VOL callback arguments, instead of using
varargs. Also small cleanup to the attribute get name operation. Also moved
'mount' and 'unmount' operations to be group specific operations, instead of
file specific, to better align with their behavior (mounted files are on
groups, so a group is what is operated on).
* Remove remainder of merge conflict marking
* Convert link VOL class 'create' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Remove some unused local variables
* Convert link VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor 'get name by idx' routines to return actual length of name with a parameter instead of the return value, and move some callback context structs for the link interface from the private header file into the source code module, to reduce their visibility scope.
* Update tracing macros
* Convert link VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor H5G_loc_exists, et al, to return 'exists' flag in a parameter and errors with the function return value, instead of overloading both into the return value. And, corrected logic error in test/links.c around non-existant objects in a file.
* Convert request VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert blob VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also removes the H5VL_BLOB_GETSIZE operation, as it's unused in the library and the blob ID size for a container is now returned with H5VL_FILE_GET_CONT_INFO.
* Add 'const' to several parameters that are only queried.
* Convert all VOL classes' 'optional' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Convert several 'get' routines to return the length of an array in a parameter instead of combining it into the return value. Move several routines to be in less public namespace. Correct direct_chunk test to verify that parameters aren't modified on error.
* Switch get/specific/optional VOL callback argument structures to be 'async-friendly'. Also other minor cleanups and bug-fixes.
* Add H5Pset_dataset_io_hyperslab_selection / H5S_PLIST feature, to allow skipping H5Dget_space + H5Sselect_hyperslab for async operation
* Add dynamic optional operations for request objects
* Update dynamic operation test for optional request operations
* Update a comment for an operation argument
* Run trace and format_source scripts
* Committing clang-format changes
* Committing clang-format changes
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-03 04:29:46 +08:00
|
|
|
FAIL_STACK_ERROR;
|
2017-05-15 23:25:15 +08:00
|
|
|
|
2021-12-07 22:27:29 +08:00
|
|
|
/* Write a single chunk to initialize the chunk storage */
|
2019-01-17 13:37:07 +08:00
|
|
|
HDmemset(direct_buf, 0, CHUNK_NX * CHUNK_NY * sizeof(int));
|
2020-09-30 22:27:10 +08:00
|
|
|
offset[0] = 0;
|
|
|
|
offset[1] = 0;
|
2017-05-15 23:25:15 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Dwrite_chunk(dataset, dxpl, filter_mask, offset, chunk_nbytes, direct_buf) < 0)
|
Combo set of async and other changes (#161)
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* Apply patch for dynamically registering optional VOL operations
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Remove H5Dwait & H5Fwait (moved to the async connector). Added H5atclose
routine. Updated 'optional op' operations.
* Fix missed merge marker, and reformatted line
* Update API tracing infrastructure for H5atclose callback
* Clean up some warnings
* Normalize against develop branch
* Correct level of indirection
* Add doxygen info for H5is_library_terminating and regression tests for it and H5atclose
* Relocate prototype (and doxygen info) for H5Aclose
* Align w/changes on develop
* Move group package initialization code to H5Gint.c, and update tracing macros
* Change non-static function declarations to be static
* Correct GCC diagnostic macro
* Ensure that H5TSpublic.h header gets installed (#129)
* Finish moving API routines that invoke VOL framework to main source files.
* Fix position of H5Fmount and H5Funmount
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Add wrappers for dynamically registered optional operations
* Fix typo
* Update doxygen comment for H5atclose with additional detail.
* Add H5VL\*_vararg versions of H5VL routines that use va_list parameters
* Implement and test H5S_BLOCK
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Finish another iteration on public H5ES routines, along with running the code reformatter
* Another round of reformatting
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
* Remove H5Dwait and H5Fwait calls, which were incorrectly brought back in
* Tiny cleanup of H5Lcreate_hard_async
* Run source formatter
* Allow for canceled operation in wait_cb
* Attempt to fix switch on string value
* Re-run source formatter
* Add H5S_BLOCK testfile to CMake clean target
* Add H5Pset_vol_async API routine and 'get_cap_flags' VOL introspection callback
* Clean up warnings
* Add H5P(set\|get)_vol_implicit_async API routines to allow \/ disallow implicit asynchronous operations (default is disallowed)
* Run formatting script
* Remove H5VL_REQUEST_WAIT\*
* Warning cleanup
* Eliminate strdup()s on statically allocated strings
* Warning cleanup
* Split H5VLrestore_lib_state into H5VLstart_lib_state and H5VLrestore_lib_state, and rename H5VLreset_lib_state to H5VLfinish_lib_state.
* Duplicate strings when building err_info to return to applicatin
* Move connector author routines into seperate header files, all included in the new hdf5dev.h header
* Run bin/trace to add TRACE macros
* Allow H5ES_NONE as a valid, but no-op, parameter to all H5ES API routines that accept an event set ID
* Clean up formatting
* Remove H5Pset/get_vol_implicit_async
* Clean up warning
* Remove H5Pget_vol_async and replace with more generic H5Pget_vol_cap_flags
* Clean up warnings
* Add H5ESfree_err_info convenience routine
* Fix typo
* Correct matching for cached VOL plugins
* Add developer header file
* Update for C99 compatibility
* Add missing trace macro
* Stop clang-format from messing with the trace macros. Don't set up VOL wrappers for 'infrastructure' objects like requests and blobs
* Fix warning about formatting a directory
* Clean up formatting for H5E_BEGIN_TRY / H5E_END_TRY
* Reduce scope of H5ES__close
* Enable CMake checks for various types on MacOS
* Clean up properly when H5CX_retrieve_state() fails. Also clean up many compiler warnings.
* Committing clang-format changes
* Merge from develop
* Fix mis-placed assert
* Remove commented-out code
* Re-add macro for unsetenv on Windows (I think it accidentally was merged out)
* Strengthen sanity check from error report to assertion
* Committing clang-format changes
* Add units to the comments for a few fields
* Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it.
* Committing clang-format changes
* Remove H5ESget_time_estimate
* Committing clang-format changes
* Create developer header for datatype routines and move type conversion register/unregister routines there.
* Simplify internal H5VL_setup_name_args and H5VL_setup_idx_args routines
* Add H5VLlink_optional_op, allowing dynamicly registered optional operations for the link VOL subclass, also added H5VL_loc_params argument to the link 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Add H5VLobject_optional_op, allowing dynamicly registered optional operations for the object VOL subclass, also added H5VL_loc_params argument to the object 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Committing clang-format changes
* Revert "Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it."
This reverts commit 5ac92014da2682bdba62d7a2524b8d90e38f6b19.
* Committing clang-format changes
* Convert attribute 'get' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Update tracing macros
* Convert attribute 'specific' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert dataset 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to attribute 'get' and 'specific' operation parameters.
* Convert datatype 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to H5O_refresh_metadata arguments.
* Reduce warnings
* Reduce warnings
* Track change to datatype 'get' callback
* Fix bug with file pointer getting invalidated when object closed
* Reformat source
* Convert file and group VOL classes 'get' and 'specific' operations to use
struct-of-tagged-union pattern for VOL callback arguments, instead of using
varargs. Also small cleanup to the attribute get name operation. Also moved
'mount' and 'unmount' operations to be group specific operations, instead of
file specific, to better align with their behavior (mounted files are on
groups, so a group is what is operated on).
* Remove remainder of merge conflict marking
* Convert link VOL class 'create' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Remove some unused local variables
* Convert link VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor 'get name by idx' routines to return actual length of name with a parameter instead of the return value, and move some callback context structs for the link interface from the private header file into the source code module, to reduce their visibility scope.
* Update tracing macros
* Convert link VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor H5G_loc_exists, et al, to return 'exists' flag in a parameter and errors with the function return value, instead of overloading both into the return value. And, corrected logic error in test/links.c around non-existant objects in a file.
* Convert request VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert blob VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also removes the H5VL_BLOB_GETSIZE operation, as it's unused in the library and the blob ID size for a container is now returned with H5VL_FILE_GET_CONT_INFO.
* Add 'const' to several parameters that are only queried.
* Convert all VOL classes' 'optional' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Convert several 'get' routines to return the length of an array in a parameter instead of combining it into the return value. Move several routines to be in less public namespace. Correct direct_chunk test to verify that parameters aren't modified on error.
* Switch get/specific/optional VOL callback argument structures to be 'async-friendly'. Also other minor cleanups and bug-fixes.
* Add H5Pset_dataset_io_hyperslab_selection / H5S_PLIST feature, to allow skipping H5Dget_space + H5Sselect_hyperslab for async operation
* Add dynamic optional operations for request objects
* Update dynamic operation test for optional request operations
* Update a comment for an operation argument
* Run trace and format_source scripts
* Committing clang-format changes
* Committing clang-format changes
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-03 04:29:46 +08:00
|
|
|
FAIL_STACK_ERROR;
|
2017-05-15 23:25:15 +08:00
|
|
|
|
|
|
|
/* Attempt to read each chunk in the dataset. Chunks are not allocated,
|
2018-04-30 22:52:07 +08:00
|
|
|
* therefore we expect the result of H5Dread_chunk to fail. Chunk idx starts
|
2017-05-15 23:25:15 +08:00
|
|
|
* at 1, since one chunk was written to init the chunk storage. */
|
2020-09-30 22:27:10 +08:00
|
|
|
for (i = 1; i < NX / CHUNK_NX; i++) {
|
|
|
|
for (j = 0; j < NY / CHUNK_NY; j++) {
|
2017-05-15 23:25:15 +08:00
|
|
|
|
|
|
|
offset[0] = i * CHUNK_NX;
|
|
|
|
offset[1] = j * CHUNK_NY;
|
|
|
|
|
2021-12-07 22:27:29 +08:00
|
|
|
/* Read a non-existent chunk using the direct read function. */
|
2021-03-17 23:25:39 +08:00
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
|
|
|
status = H5Dread_chunk(dataset, dxpl, offset, &filter_mask, &direct_buf);
|
|
|
|
}
|
2020-09-30 22:27:10 +08:00
|
|
|
H5E_END_TRY;
|
2017-05-15 23:25:15 +08:00
|
|
|
|
|
|
|
/* Check that the chunk read call does not succeed. */
|
2020-09-30 22:27:10 +08:00
|
|
|
if (status != -1)
|
2022-05-04 23:49:01 +08:00
|
|
|
TEST_ERROR;
|
2017-05-15 23:25:15 +08:00
|
|
|
|
2021-12-07 22:27:29 +08:00
|
|
|
/* Query the size of the non-existent chunk */
|
2017-05-15 23:25:15 +08:00
|
|
|
direct_chunk_nbytes = ULONG_MAX;
|
2021-03-17 23:25:39 +08:00
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
|
|
|
status = H5Dget_chunk_storage_size(dataset, offset, &direct_chunk_nbytes);
|
|
|
|
}
|
2020-09-30 22:27:10 +08:00
|
|
|
H5E_END_TRY;
|
2017-05-15 23:25:15 +08:00
|
|
|
|
|
|
|
/* Check that the chunk storage size call does not succeed. */
|
2020-09-30 22:27:10 +08:00
|
|
|
if (status != -1)
|
2022-05-04 23:49:01 +08:00
|
|
|
TEST_ERROR;
|
Combo set of async and other changes (#161)
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* Apply patch for dynamically registering optional VOL operations
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Remove H5Dwait & H5Fwait (moved to the async connector). Added H5atclose
routine. Updated 'optional op' operations.
* Fix missed merge marker, and reformatted line
* Update API tracing infrastructure for H5atclose callback
* Clean up some warnings
* Normalize against develop branch
* Correct level of indirection
* Add doxygen info for H5is_library_terminating and regression tests for it and H5atclose
* Relocate prototype (and doxygen info) for H5Aclose
* Align w/changes on develop
* Move group package initialization code to H5Gint.c, and update tracing macros
* Change non-static function declarations to be static
* Correct GCC diagnostic macro
* Ensure that H5TSpublic.h header gets installed (#129)
* Finish moving API routines that invoke VOL framework to main source files.
* Fix position of H5Fmount and H5Funmount
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Add wrappers for dynamically registered optional operations
* Fix typo
* Update doxygen comment for H5atclose with additional detail.
* Add H5VL\*_vararg versions of H5VL routines that use va_list parameters
* Implement and test H5S_BLOCK
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Finish another iteration on public H5ES routines, along with running the code reformatter
* Another round of reformatting
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
* Remove H5Dwait and H5Fwait calls, which were incorrectly brought back in
* Tiny cleanup of H5Lcreate_hard_async
* Run source formatter
* Allow for canceled operation in wait_cb
* Attempt to fix switch on string value
* Re-run source formatter
* Add H5S_BLOCK testfile to CMake clean target
* Add H5Pset_vol_async API routine and 'get_cap_flags' VOL introspection callback
* Clean up warnings
* Add H5P(set\|get)_vol_implicit_async API routines to allow \/ disallow implicit asynchronous operations (default is disallowed)
* Run formatting script
* Remove H5VL_REQUEST_WAIT\*
* Warning cleanup
* Eliminate strdup()s on statically allocated strings
* Warning cleanup
* Split H5VLrestore_lib_state into H5VLstart_lib_state and H5VLrestore_lib_state, and rename H5VLreset_lib_state to H5VLfinish_lib_state.
* Duplicate strings when building err_info to return to applicatin
* Move connector author routines into seperate header files, all included in the new hdf5dev.h header
* Run bin/trace to add TRACE macros
* Allow H5ES_NONE as a valid, but no-op, parameter to all H5ES API routines that accept an event set ID
* Clean up formatting
* Remove H5Pset/get_vol_implicit_async
* Clean up warning
* Remove H5Pget_vol_async and replace with more generic H5Pget_vol_cap_flags
* Clean up warnings
* Add H5ESfree_err_info convenience routine
* Fix typo
* Correct matching for cached VOL plugins
* Add developer header file
* Update for C99 compatibility
* Add missing trace macro
* Stop clang-format from messing with the trace macros. Don't set up VOL wrappers for 'infrastructure' objects like requests and blobs
* Fix warning about formatting a directory
* Clean up formatting for H5E_BEGIN_TRY / H5E_END_TRY
* Reduce scope of H5ES__close
* Enable CMake checks for various types on MacOS
* Clean up properly when H5CX_retrieve_state() fails. Also clean up many compiler warnings.
* Committing clang-format changes
* Merge from develop
* Fix mis-placed assert
* Remove commented-out code
* Re-add macro for unsetenv on Windows (I think it accidentally was merged out)
* Strengthen sanity check from error report to assertion
* Committing clang-format changes
* Add units to the comments for a few fields
* Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it.
* Committing clang-format changes
* Remove H5ESget_time_estimate
* Committing clang-format changes
* Create developer header for datatype routines and move type conversion register/unregister routines there.
* Simplify internal H5VL_setup_name_args and H5VL_setup_idx_args routines
* Add H5VLlink_optional_op, allowing dynamicly registered optional operations for the link VOL subclass, also added H5VL_loc_params argument to the link 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Add H5VLobject_optional_op, allowing dynamicly registered optional operations for the object VOL subclass, also added H5VL_loc_params argument to the object 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Committing clang-format changes
* Revert "Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it."
This reverts commit 5ac92014da2682bdba62d7a2524b8d90e38f6b19.
* Committing clang-format changes
* Convert attribute 'get' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Update tracing macros
* Convert attribute 'specific' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert dataset 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to attribute 'get' and 'specific' operation parameters.
* Convert datatype 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to H5O_refresh_metadata arguments.
* Reduce warnings
* Reduce warnings
* Track change to datatype 'get' callback
* Fix bug with file pointer getting invalidated when object closed
* Reformat source
* Convert file and group VOL classes 'get' and 'specific' operations to use
struct-of-tagged-union pattern for VOL callback arguments, instead of using
varargs. Also small cleanup to the attribute get name operation. Also moved
'mount' and 'unmount' operations to be group specific operations, instead of
file specific, to better align with their behavior (mounted files are on
groups, so a group is what is operated on).
* Remove remainder of merge conflict marking
* Convert link VOL class 'create' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Remove some unused local variables
* Convert link VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor 'get name by idx' routines to return actual length of name with a parameter instead of the return value, and move some callback context structs for the link interface from the private header file into the source code module, to reduce their visibility scope.
* Update tracing macros
* Convert link VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor H5G_loc_exists, et al, to return 'exists' flag in a parameter and errors with the function return value, instead of overloading both into the return value. And, corrected logic error in test/links.c around non-existant objects in a file.
* Convert request VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert blob VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also removes the H5VL_BLOB_GETSIZE operation, as it's unused in the library and the blob ID size for a container is now returned with H5VL_FILE_GET_CONT_INFO.
* Add 'const' to several parameters that are only queried.
* Convert all VOL classes' 'optional' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Convert several 'get' routines to return the length of an array in a parameter instead of combining it into the return value. Move several routines to be in less public namespace. Correct direct_chunk test to verify that parameters aren't modified on error.
* Switch get/specific/optional VOL callback argument structures to be 'async-friendly'. Also other minor cleanups and bug-fixes.
* Add H5Pset_dataset_io_hyperslab_selection / H5S_PLIST feature, to allow skipping H5Dget_space + H5Sselect_hyperslab for async operation
* Add dynamic optional operations for request objects
* Update dynamic operation test for optional request operations
* Update a comment for an operation argument
* Run trace and format_source scripts
* Committing clang-format changes
* Committing clang-format changes
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-03 04:29:46 +08:00
|
|
|
if (direct_chunk_nbytes != ULONG_MAX)
|
2022-05-04 23:49:01 +08:00
|
|
|
TEST_ERROR;
|
2017-05-15 23:25:15 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Close/release resources. */
|
Combo set of async and other changes (#161)
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* Apply patch for dynamically registering optional VOL operations
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Remove H5Dwait & H5Fwait (moved to the async connector). Added H5atclose
routine. Updated 'optional op' operations.
* Fix missed merge marker, and reformatted line
* Update API tracing infrastructure for H5atclose callback
* Clean up some warnings
* Normalize against develop branch
* Correct level of indirection
* Add doxygen info for H5is_library_terminating and regression tests for it and H5atclose
* Relocate prototype (and doxygen info) for H5Aclose
* Align w/changes on develop
* Move group package initialization code to H5Gint.c, and update tracing macros
* Change non-static function declarations to be static
* Correct GCC diagnostic macro
* Ensure that H5TSpublic.h header gets installed (#129)
* Finish moving API routines that invoke VOL framework to main source files.
* Fix position of H5Fmount and H5Funmount
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Add wrappers for dynamically registered optional operations
* Fix typo
* Update doxygen comment for H5atclose with additional detail.
* Add H5VL\*_vararg versions of H5VL routines that use va_list parameters
* Implement and test H5S_BLOCK
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Finish another iteration on public H5ES routines, along with running the code reformatter
* Another round of reformatting
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
* Remove H5Dwait and H5Fwait calls, which were incorrectly brought back in
* Tiny cleanup of H5Lcreate_hard_async
* Run source formatter
* Allow for canceled operation in wait_cb
* Attempt to fix switch on string value
* Re-run source formatter
* Add H5S_BLOCK testfile to CMake clean target
* Add H5Pset_vol_async API routine and 'get_cap_flags' VOL introspection callback
* Clean up warnings
* Add H5P(set\|get)_vol_implicit_async API routines to allow \/ disallow implicit asynchronous operations (default is disallowed)
* Run formatting script
* Remove H5VL_REQUEST_WAIT\*
* Warning cleanup
* Eliminate strdup()s on statically allocated strings
* Warning cleanup
* Split H5VLrestore_lib_state into H5VLstart_lib_state and H5VLrestore_lib_state, and rename H5VLreset_lib_state to H5VLfinish_lib_state.
* Duplicate strings when building err_info to return to applicatin
* Move connector author routines into seperate header files, all included in the new hdf5dev.h header
* Run bin/trace to add TRACE macros
* Allow H5ES_NONE as a valid, but no-op, parameter to all H5ES API routines that accept an event set ID
* Clean up formatting
* Remove H5Pset/get_vol_implicit_async
* Clean up warning
* Remove H5Pget_vol_async and replace with more generic H5Pget_vol_cap_flags
* Clean up warnings
* Add H5ESfree_err_info convenience routine
* Fix typo
* Correct matching for cached VOL plugins
* Add developer header file
* Update for C99 compatibility
* Add missing trace macro
* Stop clang-format from messing with the trace macros. Don't set up VOL wrappers for 'infrastructure' objects like requests and blobs
* Fix warning about formatting a directory
* Clean up formatting for H5E_BEGIN_TRY / H5E_END_TRY
* Reduce scope of H5ES__close
* Enable CMake checks for various types on MacOS
* Clean up properly when H5CX_retrieve_state() fails. Also clean up many compiler warnings.
* Committing clang-format changes
* Merge from develop
* Fix mis-placed assert
* Remove commented-out code
* Re-add macro for unsetenv on Windows (I think it accidentally was merged out)
* Strengthen sanity check from error report to assertion
* Committing clang-format changes
* Add units to the comments for a few fields
* Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it.
* Committing clang-format changes
* Remove H5ESget_time_estimate
* Committing clang-format changes
* Create developer header for datatype routines and move type conversion register/unregister routines there.
* Simplify internal H5VL_setup_name_args and H5VL_setup_idx_args routines
* Add H5VLlink_optional_op, allowing dynamicly registered optional operations for the link VOL subclass, also added H5VL_loc_params argument to the link 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Add H5VLobject_optional_op, allowing dynamicly registered optional operations for the object VOL subclass, also added H5VL_loc_params argument to the object 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Committing clang-format changes
* Revert "Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it."
This reverts commit 5ac92014da2682bdba62d7a2524b8d90e38f6b19.
* Committing clang-format changes
* Convert attribute 'get' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Update tracing macros
* Convert attribute 'specific' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert dataset 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to attribute 'get' and 'specific' operation parameters.
* Convert datatype 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to H5O_refresh_metadata arguments.
* Reduce warnings
* Reduce warnings
* Track change to datatype 'get' callback
* Fix bug with file pointer getting invalidated when object closed
* Reformat source
* Convert file and group VOL classes 'get' and 'specific' operations to use
struct-of-tagged-union pattern for VOL callback arguments, instead of using
varargs. Also small cleanup to the attribute get name operation. Also moved
'mount' and 'unmount' operations to be group specific operations, instead of
file specific, to better align with their behavior (mounted files are on
groups, so a group is what is operated on).
* Remove remainder of merge conflict marking
* Convert link VOL class 'create' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Remove some unused local variables
* Convert link VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor 'get name by idx' routines to return actual length of name with a parameter instead of the return value, and move some callback context structs for the link interface from the private header file into the source code module, to reduce their visibility scope.
* Update tracing macros
* Convert link VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor H5G_loc_exists, et al, to return 'exists' flag in a parameter and errors with the function return value, instead of overloading both into the return value. And, corrected logic error in test/links.c around non-existant objects in a file.
* Convert request VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert blob VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also removes the H5VL_BLOB_GETSIZE operation, as it's unused in the library and the blob ID size for a container is now returned with H5VL_FILE_GET_CONT_INFO.
* Add 'const' to several parameters that are only queried.
* Convert all VOL classes' 'optional' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Convert several 'get' routines to return the length of an array in a parameter instead of combining it into the return value. Move several routines to be in less public namespace. Correct direct_chunk test to verify that parameters aren't modified on error.
* Switch get/specific/optional VOL callback argument structures to be 'async-friendly'. Also other minor cleanups and bug-fixes.
* Add H5Pset_dataset_io_hyperslab_selection / H5S_PLIST feature, to allow skipping H5Dget_space + H5Sselect_hyperslab for async operation
* Add dynamic optional operations for request objects
* Update dynamic operation test for optional request operations
* Update a comment for an operation argument
* Run trace and format_source scripts
* Committing clang-format changes
* Committing clang-format changes
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-03 04:29:46 +08:00
|
|
|
if (H5Dclose(dataset) < 0)
|
|
|
|
FAIL_STACK_ERROR;
|
|
|
|
if (H5Sclose(mem_space) < 0)
|
|
|
|
FAIL_STACK_ERROR;
|
|
|
|
if (H5Sclose(dataspace) < 0)
|
|
|
|
FAIL_STACK_ERROR;
|
|
|
|
if (H5Pclose(cparms) < 0)
|
|
|
|
FAIL_STACK_ERROR;
|
|
|
|
if (H5Pclose(dxpl) < 0)
|
|
|
|
FAIL_STACK_ERROR;
|
2017-05-15 23:25:15 +08:00
|
|
|
|
|
|
|
PASSED();
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
error:
|
2020-09-30 22:27:10 +08:00
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
2017-05-15 23:25:15 +08:00
|
|
|
H5Dclose(dataset);
|
|
|
|
H5Sclose(mem_space);
|
|
|
|
H5Sclose(dataspace);
|
|
|
|
H5Pclose(cparms);
|
|
|
|
H5Pclose(dxpl);
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
|
|
|
H5E_END_TRY;
|
2017-05-15 23:25:15 +08:00
|
|
|
|
|
|
|
H5_FAILED();
|
|
|
|
return 1;
|
|
|
|
} /* test_read_unallocated_chunk() */
|
|
|
|
|
2018-03-22 00:44:24 +08:00
|
|
|
/*-------------------------------------------------------------------------
|
2019-03-07 06:57:42 +08:00
|
|
|
* Function: test_single_chunk
|
2018-03-22 00:44:24 +08:00
|
|
|
*
|
|
|
|
* Purpose: This is to verify the fix for jira issue HDFFV-10425.
|
|
|
|
* The problem was due to a bug in the internal ilbrary routine
|
|
|
|
* H5D__chunk_direct_write() which passed a null dataset
|
|
|
|
* pointer to the insert callback for the chunk index type.
|
|
|
|
* Currently, the single chunk index is the only one that
|
|
|
|
* used the dataset pointer in the insert callback.
|
|
|
|
*
|
|
|
|
* This routine is based on the test program attached to
|
|
|
|
* this jira issue:
|
|
|
|
* Create a file with the latest format and a chunked dataset
|
|
|
|
* with one single chunk. The library will use single chunk
|
2019-07-31 01:39:20 +08:00
|
|
|
* index for the dataset.
|
2018-03-22 00:44:24 +08:00
|
|
|
* Verify that the data read is the same as the written data.
|
|
|
|
*
|
2019-03-07 06:57:42 +08:00
|
|
|
* Since expanded to test multiple combinations of cases
|
|
|
|
* involving a single chunk
|
|
|
|
*
|
2018-03-22 00:44:24 +08:00
|
|
|
* Return: Success: 0
|
|
|
|
* Failure: 1
|
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
static int
|
2019-03-07 06:57:42 +08:00
|
|
|
test_single_chunk(unsigned config)
|
2018-03-22 00:44:24 +08:00
|
|
|
{
|
2020-09-30 22:27:10 +08:00
|
|
|
hid_t fid = H5I_INVALID_HID; /* File ID */
|
|
|
|
hid_t fapl = H5I_INVALID_HID; /* File access property list ID */
|
|
|
|
hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
|
|
|
|
hid_t did = H5I_INVALID_HID; /* Dataset ID */
|
|
|
|
hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */
|
|
|
|
hsize_t dims[2] = {DIM0, DIM1}; /* Dimension sizes */
|
|
|
|
hsize_t chunk[2] = {CHUNK0, CHUNK1}; /* Chunk dimension sizes */
|
|
|
|
hsize_t offset[2] = {0, 0}; /* Offset for writing */
|
|
|
|
uint32_t filters; /* Filter mask out */
|
|
|
|
int wdata[DIM0][DIM1]; /* Write buffer */
|
|
|
|
int rdata[DIM0][DIM1]; /* Read buffer */
|
|
|
|
int i, j; /* Local index variable */
|
2018-03-22 00:44:24 +08:00
|
|
|
|
2019-03-07 06:57:42 +08:00
|
|
|
TESTING("Single chunk I/O");
|
2018-03-22 00:44:24 +08:00
|
|
|
|
|
|
|
/* Initialize data */
|
Combo set of async and other changes (#161)
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* Apply patch for dynamically registering optional VOL operations
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Remove H5Dwait & H5Fwait (moved to the async connector). Added H5atclose
routine. Updated 'optional op' operations.
* Fix missed merge marker, and reformatted line
* Update API tracing infrastructure for H5atclose callback
* Clean up some warnings
* Normalize against develop branch
* Correct level of indirection
* Add doxygen info for H5is_library_terminating and regression tests for it and H5atclose
* Relocate prototype (and doxygen info) for H5Aclose
* Align w/changes on develop
* Move group package initialization code to H5Gint.c, and update tracing macros
* Change non-static function declarations to be static
* Correct GCC diagnostic macro
* Ensure that H5TSpublic.h header gets installed (#129)
* Finish moving API routines that invoke VOL framework to main source files.
* Fix position of H5Fmount and H5Funmount
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Add wrappers for dynamically registered optional operations
* Fix typo
* Update doxygen comment for H5atclose with additional detail.
* Add H5VL\*_vararg versions of H5VL routines that use va_list parameters
* Implement and test H5S_BLOCK
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Finish another iteration on public H5ES routines, along with running the code reformatter
* Another round of reformatting
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
* Remove H5Dwait and H5Fwait calls, which were incorrectly brought back in
* Tiny cleanup of H5Lcreate_hard_async
* Run source formatter
* Allow for canceled operation in wait_cb
* Attempt to fix switch on string value
* Re-run source formatter
* Add H5S_BLOCK testfile to CMake clean target
* Add H5Pset_vol_async API routine and 'get_cap_flags' VOL introspection callback
* Clean up warnings
* Add H5P(set\|get)_vol_implicit_async API routines to allow \/ disallow implicit asynchronous operations (default is disallowed)
* Run formatting script
* Remove H5VL_REQUEST_WAIT\*
* Warning cleanup
* Eliminate strdup()s on statically allocated strings
* Warning cleanup
* Split H5VLrestore_lib_state into H5VLstart_lib_state and H5VLrestore_lib_state, and rename H5VLreset_lib_state to H5VLfinish_lib_state.
* Duplicate strings when building err_info to return to applicatin
* Move connector author routines into seperate header files, all included in the new hdf5dev.h header
* Run bin/trace to add TRACE macros
* Allow H5ES_NONE as a valid, but no-op, parameter to all H5ES API routines that accept an event set ID
* Clean up formatting
* Remove H5Pset/get_vol_implicit_async
* Clean up warning
* Remove H5Pget_vol_async and replace with more generic H5Pget_vol_cap_flags
* Clean up warnings
* Add H5ESfree_err_info convenience routine
* Fix typo
* Correct matching for cached VOL plugins
* Add developer header file
* Update for C99 compatibility
* Add missing trace macro
* Stop clang-format from messing with the trace macros. Don't set up VOL wrappers for 'infrastructure' objects like requests and blobs
* Fix warning about formatting a directory
* Clean up formatting for H5E_BEGIN_TRY / H5E_END_TRY
* Reduce scope of H5ES__close
* Enable CMake checks for various types on MacOS
* Clean up properly when H5CX_retrieve_state() fails. Also clean up many compiler warnings.
* Committing clang-format changes
* Merge from develop
* Fix mis-placed assert
* Remove commented-out code
* Re-add macro for unsetenv on Windows (I think it accidentally was merged out)
* Strengthen sanity check from error report to assertion
* Committing clang-format changes
* Add units to the comments for a few fields
* Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it.
* Committing clang-format changes
* Remove H5ESget_time_estimate
* Committing clang-format changes
* Create developer header for datatype routines and move type conversion register/unregister routines there.
* Simplify internal H5VL_setup_name_args and H5VL_setup_idx_args routines
* Add H5VLlink_optional_op, allowing dynamicly registered optional operations for the link VOL subclass, also added H5VL_loc_params argument to the link 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Add H5VLobject_optional_op, allowing dynamicly registered optional operations for the object VOL subclass, also added H5VL_loc_params argument to the object 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Committing clang-format changes
* Revert "Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it."
This reverts commit 5ac92014da2682bdba62d7a2524b8d90e38f6b19.
* Committing clang-format changes
* Convert attribute 'get' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Update tracing macros
* Convert attribute 'specific' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert dataset 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to attribute 'get' and 'specific' operation parameters.
* Convert datatype 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to H5O_refresh_metadata arguments.
* Reduce warnings
* Reduce warnings
* Track change to datatype 'get' callback
* Fix bug with file pointer getting invalidated when object closed
* Reformat source
* Convert file and group VOL classes 'get' and 'specific' operations to use
struct-of-tagged-union pattern for VOL callback arguments, instead of using
varargs. Also small cleanup to the attribute get name operation. Also moved
'mount' and 'unmount' operations to be group specific operations, instead of
file specific, to better align with their behavior (mounted files are on
groups, so a group is what is operated on).
* Remove remainder of merge conflict marking
* Convert link VOL class 'create' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Remove some unused local variables
* Convert link VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor 'get name by idx' routines to return actual length of name with a parameter instead of the return value, and move some callback context structs for the link interface from the private header file into the source code module, to reduce their visibility scope.
* Update tracing macros
* Convert link VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor H5G_loc_exists, et al, to return 'exists' flag in a parameter and errors with the function return value, instead of overloading both into the return value. And, corrected logic error in test/links.c around non-existant objects in a file.
* Convert request VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert blob VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also removes the H5VL_BLOB_GETSIZE operation, as it's unused in the library and the blob ID size for a container is now returned with H5VL_FILE_GET_CONT_INFO.
* Add 'const' to several parameters that are only queried.
* Convert all VOL classes' 'optional' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Convert several 'get' routines to return the length of an array in a parameter instead of combining it into the return value. Move several routines to be in less public namespace. Correct direct_chunk test to verify that parameters aren't modified on error.
* Switch get/specific/optional VOL callback argument structures to be 'async-friendly'. Also other minor cleanups and bug-fixes.
* Add H5Pset_dataset_io_hyperslab_selection / H5S_PLIST feature, to allow skipping H5Dget_space + H5Sselect_hyperslab for async operation
* Add dynamic optional operations for request objects
* Update dynamic operation test for optional request operations
* Update a comment for an operation argument
* Run trace and format_source scripts
* Committing clang-format changes
* Committing clang-format changes
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-03 04:29:46 +08:00
|
|
|
for (i = 0; i < DIM0; i++)
|
2020-09-30 22:27:10 +08:00
|
|
|
for (j = 0; j < DIM1; j++)
|
|
|
|
wdata[i][j] = j / CHUNK0;
|
2018-03-22 00:44:24 +08:00
|
|
|
|
|
|
|
/* Create a new file with the latest format */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0)
|
Combo set of async and other changes (#161)
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* Apply patch for dynamically registering optional VOL operations
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Remove H5Dwait & H5Fwait (moved to the async connector). Added H5atclose
routine. Updated 'optional op' operations.
* Fix missed merge marker, and reformatted line
* Update API tracing infrastructure for H5atclose callback
* Clean up some warnings
* Normalize against develop branch
* Correct level of indirection
* Add doxygen info for H5is_library_terminating and regression tests for it and H5atclose
* Relocate prototype (and doxygen info) for H5Aclose
* Align w/changes on develop
* Move group package initialization code to H5Gint.c, and update tracing macros
* Change non-static function declarations to be static
* Correct GCC diagnostic macro
* Ensure that H5TSpublic.h header gets installed (#129)
* Finish moving API routines that invoke VOL framework to main source files.
* Fix position of H5Fmount and H5Funmount
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Add wrappers for dynamically registered optional operations
* Fix typo
* Update doxygen comment for H5atclose with additional detail.
* Add H5VL\*_vararg versions of H5VL routines that use va_list parameters
* Implement and test H5S_BLOCK
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Finish another iteration on public H5ES routines, along with running the code reformatter
* Another round of reformatting
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
* Remove H5Dwait and H5Fwait calls, which were incorrectly brought back in
* Tiny cleanup of H5Lcreate_hard_async
* Run source formatter
* Allow for canceled operation in wait_cb
* Attempt to fix switch on string value
* Re-run source formatter
* Add H5S_BLOCK testfile to CMake clean target
* Add H5Pset_vol_async API routine and 'get_cap_flags' VOL introspection callback
* Clean up warnings
* Add H5P(set\|get)_vol_implicit_async API routines to allow \/ disallow implicit asynchronous operations (default is disallowed)
* Run formatting script
* Remove H5VL_REQUEST_WAIT\*
* Warning cleanup
* Eliminate strdup()s on statically allocated strings
* Warning cleanup
* Split H5VLrestore_lib_state into H5VLstart_lib_state and H5VLrestore_lib_state, and rename H5VLreset_lib_state to H5VLfinish_lib_state.
* Duplicate strings when building err_info to return to applicatin
* Move connector author routines into seperate header files, all included in the new hdf5dev.h header
* Run bin/trace to add TRACE macros
* Allow H5ES_NONE as a valid, but no-op, parameter to all H5ES API routines that accept an event set ID
* Clean up formatting
* Remove H5Pset/get_vol_implicit_async
* Clean up warning
* Remove H5Pget_vol_async and replace with more generic H5Pget_vol_cap_flags
* Clean up warnings
* Add H5ESfree_err_info convenience routine
* Fix typo
* Correct matching for cached VOL plugins
* Add developer header file
* Update for C99 compatibility
* Add missing trace macro
* Stop clang-format from messing with the trace macros. Don't set up VOL wrappers for 'infrastructure' objects like requests and blobs
* Fix warning about formatting a directory
* Clean up formatting for H5E_BEGIN_TRY / H5E_END_TRY
* Reduce scope of H5ES__close
* Enable CMake checks for various types on MacOS
* Clean up properly when H5CX_retrieve_state() fails. Also clean up many compiler warnings.
* Committing clang-format changes
* Merge from develop
* Fix mis-placed assert
* Remove commented-out code
* Re-add macro for unsetenv on Windows (I think it accidentally was merged out)
* Strengthen sanity check from error report to assertion
* Committing clang-format changes
* Add units to the comments for a few fields
* Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it.
* Committing clang-format changes
* Remove H5ESget_time_estimate
* Committing clang-format changes
* Create developer header for datatype routines and move type conversion register/unregister routines there.
* Simplify internal H5VL_setup_name_args and H5VL_setup_idx_args routines
* Add H5VLlink_optional_op, allowing dynamicly registered optional operations for the link VOL subclass, also added H5VL_loc_params argument to the link 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Add H5VLobject_optional_op, allowing dynamicly registered optional operations for the object VOL subclass, also added H5VL_loc_params argument to the object 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Committing clang-format changes
* Revert "Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it."
This reverts commit 5ac92014da2682bdba62d7a2524b8d90e38f6b19.
* Committing clang-format changes
* Convert attribute 'get' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Update tracing macros
* Convert attribute 'specific' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert dataset 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to attribute 'get' and 'specific' operation parameters.
* Convert datatype 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to H5O_refresh_metadata arguments.
* Reduce warnings
* Reduce warnings
* Track change to datatype 'get' callback
* Fix bug with file pointer getting invalidated when object closed
* Reformat source
* Convert file and group VOL classes 'get' and 'specific' operations to use
struct-of-tagged-union pattern for VOL callback arguments, instead of using
varargs. Also small cleanup to the attribute get name operation. Also moved
'mount' and 'unmount' operations to be group specific operations, instead of
file specific, to better align with their behavior (mounted files are on
groups, so a group is what is operated on).
* Remove remainder of merge conflict marking
* Convert link VOL class 'create' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Remove some unused local variables
* Convert link VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor 'get name by idx' routines to return actual length of name with a parameter instead of the return value, and move some callback context structs for the link interface from the private header file into the source code module, to reduce their visibility scope.
* Update tracing macros
* Convert link VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor H5G_loc_exists, et al, to return 'exists' flag in a parameter and errors with the function return value, instead of overloading both into the return value. And, corrected logic error in test/links.c around non-existant objects in a file.
* Convert request VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert blob VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also removes the H5VL_BLOB_GETSIZE operation, as it's unused in the library and the blob ID size for a container is now returned with H5VL_FILE_GET_CONT_INFO.
* Add 'const' to several parameters that are only queried.
* Convert all VOL classes' 'optional' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Convert several 'get' routines to return the length of an array in a parameter instead of combining it into the return value. Move several routines to be in less public namespace. Correct direct_chunk test to verify that parameters aren't modified on error.
* Switch get/specific/optional VOL callback argument structures to be 'async-friendly'. Also other minor cleanups and bug-fixes.
* Add H5Pset_dataset_io_hyperslab_selection / H5S_PLIST feature, to allow skipping H5Dget_space + H5Sselect_hyperslab for async operation
* Add dynamic optional operations for request objects
* Update dynamic operation test for optional request operations
* Update a comment for an operation argument
* Run trace and format_source scripts
* Committing clang-format changes
* Committing clang-format changes
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-03 04:29:46 +08:00
|
|
|
FAIL_STACK_ERROR;
|
2020-09-30 22:27:10 +08:00
|
|
|
if (config & CONFIG_LATEST)
|
|
|
|
if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
|
Combo set of async and other changes (#161)
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* Apply patch for dynamically registering optional VOL operations
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Remove H5Dwait & H5Fwait (moved to the async connector). Added H5atclose
routine. Updated 'optional op' operations.
* Fix missed merge marker, and reformatted line
* Update API tracing infrastructure for H5atclose callback
* Clean up some warnings
* Normalize against develop branch
* Correct level of indirection
* Add doxygen info for H5is_library_terminating and regression tests for it and H5atclose
* Relocate prototype (and doxygen info) for H5Aclose
* Align w/changes on develop
* Move group package initialization code to H5Gint.c, and update tracing macros
* Change non-static function declarations to be static
* Correct GCC diagnostic macro
* Ensure that H5TSpublic.h header gets installed (#129)
* Finish moving API routines that invoke VOL framework to main source files.
* Fix position of H5Fmount and H5Funmount
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Add wrappers for dynamically registered optional operations
* Fix typo
* Update doxygen comment for H5atclose with additional detail.
* Add H5VL\*_vararg versions of H5VL routines that use va_list parameters
* Implement and test H5S_BLOCK
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Finish another iteration on public H5ES routines, along with running the code reformatter
* Another round of reformatting
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
* Remove H5Dwait and H5Fwait calls, which were incorrectly brought back in
* Tiny cleanup of H5Lcreate_hard_async
* Run source formatter
* Allow for canceled operation in wait_cb
* Attempt to fix switch on string value
* Re-run source formatter
* Add H5S_BLOCK testfile to CMake clean target
* Add H5Pset_vol_async API routine and 'get_cap_flags' VOL introspection callback
* Clean up warnings
* Add H5P(set\|get)_vol_implicit_async API routines to allow \/ disallow implicit asynchronous operations (default is disallowed)
* Run formatting script
* Remove H5VL_REQUEST_WAIT\*
* Warning cleanup
* Eliminate strdup()s on statically allocated strings
* Warning cleanup
* Split H5VLrestore_lib_state into H5VLstart_lib_state and H5VLrestore_lib_state, and rename H5VLreset_lib_state to H5VLfinish_lib_state.
* Duplicate strings when building err_info to return to applicatin
* Move connector author routines into seperate header files, all included in the new hdf5dev.h header
* Run bin/trace to add TRACE macros
* Allow H5ES_NONE as a valid, but no-op, parameter to all H5ES API routines that accept an event set ID
* Clean up formatting
* Remove H5Pset/get_vol_implicit_async
* Clean up warning
* Remove H5Pget_vol_async and replace with more generic H5Pget_vol_cap_flags
* Clean up warnings
* Add H5ESfree_err_info convenience routine
* Fix typo
* Correct matching for cached VOL plugins
* Add developer header file
* Update for C99 compatibility
* Add missing trace macro
* Stop clang-format from messing with the trace macros. Don't set up VOL wrappers for 'infrastructure' objects like requests and blobs
* Fix warning about formatting a directory
* Clean up formatting for H5E_BEGIN_TRY / H5E_END_TRY
* Reduce scope of H5ES__close
* Enable CMake checks for various types on MacOS
* Clean up properly when H5CX_retrieve_state() fails. Also clean up many compiler warnings.
* Committing clang-format changes
* Merge from develop
* Fix mis-placed assert
* Remove commented-out code
* Re-add macro for unsetenv on Windows (I think it accidentally was merged out)
* Strengthen sanity check from error report to assertion
* Committing clang-format changes
* Add units to the comments for a few fields
* Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it.
* Committing clang-format changes
* Remove H5ESget_time_estimate
* Committing clang-format changes
* Create developer header for datatype routines and move type conversion register/unregister routines there.
* Simplify internal H5VL_setup_name_args and H5VL_setup_idx_args routines
* Add H5VLlink_optional_op, allowing dynamicly registered optional operations for the link VOL subclass, also added H5VL_loc_params argument to the link 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Add H5VLobject_optional_op, allowing dynamicly registered optional operations for the object VOL subclass, also added H5VL_loc_params argument to the object 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Committing clang-format changes
* Revert "Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it."
This reverts commit 5ac92014da2682bdba62d7a2524b8d90e38f6b19.
* Committing clang-format changes
* Convert attribute 'get' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Update tracing macros
* Convert attribute 'specific' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert dataset 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to attribute 'get' and 'specific' operation parameters.
* Convert datatype 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to H5O_refresh_metadata arguments.
* Reduce warnings
* Reduce warnings
* Track change to datatype 'get' callback
* Fix bug with file pointer getting invalidated when object closed
* Reformat source
* Convert file and group VOL classes 'get' and 'specific' operations to use
struct-of-tagged-union pattern for VOL callback arguments, instead of using
varargs. Also small cleanup to the attribute get name operation. Also moved
'mount' and 'unmount' operations to be group specific operations, instead of
file specific, to better align with their behavior (mounted files are on
groups, so a group is what is operated on).
* Remove remainder of merge conflict marking
* Convert link VOL class 'create' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Remove some unused local variables
* Convert link VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor 'get name by idx' routines to return actual length of name with a parameter instead of the return value, and move some callback context structs for the link interface from the private header file into the source code module, to reduce their visibility scope.
* Update tracing macros
* Convert link VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor H5G_loc_exists, et al, to return 'exists' flag in a parameter and errors with the function return value, instead of overloading both into the return value. And, corrected logic error in test/links.c around non-existant objects in a file.
* Convert request VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert blob VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also removes the H5VL_BLOB_GETSIZE operation, as it's unused in the library and the blob ID size for a container is now returned with H5VL_FILE_GET_CONT_INFO.
* Add 'const' to several parameters that are only queried.
* Convert all VOL classes' 'optional' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Convert several 'get' routines to return the length of an array in a parameter instead of combining it into the return value. Move several routines to be in less public namespace. Correct direct_chunk test to verify that parameters aren't modified on error.
* Switch get/specific/optional VOL callback argument structures to be 'async-friendly'. Also other minor cleanups and bug-fixes.
* Add H5Pset_dataset_io_hyperslab_selection / H5S_PLIST feature, to allow skipping H5Dget_space + H5Sselect_hyperslab for async operation
* Add dynamic optional operations for request objects
* Update dynamic operation test for optional request operations
* Update a comment for an operation argument
* Run trace and format_source scripts
* Committing clang-format changes
* Committing clang-format changes
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-03 04:29:46 +08:00
|
|
|
FAIL_STACK_ERROR;
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((fid = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
|
Combo set of async and other changes (#161)
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* Apply patch for dynamically registering optional VOL operations
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Remove H5Dwait & H5Fwait (moved to the async connector). Added H5atclose
routine. Updated 'optional op' operations.
* Fix missed merge marker, and reformatted line
* Update API tracing infrastructure for H5atclose callback
* Clean up some warnings
* Normalize against develop branch
* Correct level of indirection
* Add doxygen info for H5is_library_terminating and regression tests for it and H5atclose
* Relocate prototype (and doxygen info) for H5Aclose
* Align w/changes on develop
* Move group package initialization code to H5Gint.c, and update tracing macros
* Change non-static function declarations to be static
* Correct GCC diagnostic macro
* Ensure that H5TSpublic.h header gets installed (#129)
* Finish moving API routines that invoke VOL framework to main source files.
* Fix position of H5Fmount and H5Funmount
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Add wrappers for dynamically registered optional operations
* Fix typo
* Update doxygen comment for H5atclose with additional detail.
* Add H5VL\*_vararg versions of H5VL routines that use va_list parameters
* Implement and test H5S_BLOCK
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Finish another iteration on public H5ES routines, along with running the code reformatter
* Another round of reformatting
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
* Remove H5Dwait and H5Fwait calls, which were incorrectly brought back in
* Tiny cleanup of H5Lcreate_hard_async
* Run source formatter
* Allow for canceled operation in wait_cb
* Attempt to fix switch on string value
* Re-run source formatter
* Add H5S_BLOCK testfile to CMake clean target
* Add H5Pset_vol_async API routine and 'get_cap_flags' VOL introspection callback
* Clean up warnings
* Add H5P(set\|get)_vol_implicit_async API routines to allow \/ disallow implicit asynchronous operations (default is disallowed)
* Run formatting script
* Remove H5VL_REQUEST_WAIT\*
* Warning cleanup
* Eliminate strdup()s on statically allocated strings
* Warning cleanup
* Split H5VLrestore_lib_state into H5VLstart_lib_state and H5VLrestore_lib_state, and rename H5VLreset_lib_state to H5VLfinish_lib_state.
* Duplicate strings when building err_info to return to applicatin
* Move connector author routines into seperate header files, all included in the new hdf5dev.h header
* Run bin/trace to add TRACE macros
* Allow H5ES_NONE as a valid, but no-op, parameter to all H5ES API routines that accept an event set ID
* Clean up formatting
* Remove H5Pset/get_vol_implicit_async
* Clean up warning
* Remove H5Pget_vol_async and replace with more generic H5Pget_vol_cap_flags
* Clean up warnings
* Add H5ESfree_err_info convenience routine
* Fix typo
* Correct matching for cached VOL plugins
* Add developer header file
* Update for C99 compatibility
* Add missing trace macro
* Stop clang-format from messing with the trace macros. Don't set up VOL wrappers for 'infrastructure' objects like requests and blobs
* Fix warning about formatting a directory
* Clean up formatting for H5E_BEGIN_TRY / H5E_END_TRY
* Reduce scope of H5ES__close
* Enable CMake checks for various types on MacOS
* Clean up properly when H5CX_retrieve_state() fails. Also clean up many compiler warnings.
* Committing clang-format changes
* Merge from develop
* Fix mis-placed assert
* Remove commented-out code
* Re-add macro for unsetenv on Windows (I think it accidentally was merged out)
* Strengthen sanity check from error report to assertion
* Committing clang-format changes
* Add units to the comments for a few fields
* Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it.
* Committing clang-format changes
* Remove H5ESget_time_estimate
* Committing clang-format changes
* Create developer header for datatype routines and move type conversion register/unregister routines there.
* Simplify internal H5VL_setup_name_args and H5VL_setup_idx_args routines
* Add H5VLlink_optional_op, allowing dynamicly registered optional operations for the link VOL subclass, also added H5VL_loc_params argument to the link 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Add H5VLobject_optional_op, allowing dynamicly registered optional operations for the object VOL subclass, also added H5VL_loc_params argument to the object 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Committing clang-format changes
* Revert "Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it."
This reverts commit 5ac92014da2682bdba62d7a2524b8d90e38f6b19.
* Committing clang-format changes
* Convert attribute 'get' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Update tracing macros
* Convert attribute 'specific' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert dataset 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to attribute 'get' and 'specific' operation parameters.
* Convert datatype 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to H5O_refresh_metadata arguments.
* Reduce warnings
* Reduce warnings
* Track change to datatype 'get' callback
* Fix bug with file pointer getting invalidated when object closed
* Reformat source
* Convert file and group VOL classes 'get' and 'specific' operations to use
struct-of-tagged-union pattern for VOL callback arguments, instead of using
varargs. Also small cleanup to the attribute get name operation. Also moved
'mount' and 'unmount' operations to be group specific operations, instead of
file specific, to better align with their behavior (mounted files are on
groups, so a group is what is operated on).
* Remove remainder of merge conflict marking
* Convert link VOL class 'create' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Remove some unused local variables
* Convert link VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor 'get name by idx' routines to return actual length of name with a parameter instead of the return value, and move some callback context structs for the link interface from the private header file into the source code module, to reduce their visibility scope.
* Update tracing macros
* Convert link VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor H5G_loc_exists, et al, to return 'exists' flag in a parameter and errors with the function return value, instead of overloading both into the return value. And, corrected logic error in test/links.c around non-existant objects in a file.
* Convert request VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert blob VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also removes the H5VL_BLOB_GETSIZE operation, as it's unused in the library and the blob ID size for a container is now returned with H5VL_FILE_GET_CONT_INFO.
* Add 'const' to several parameters that are only queried.
* Convert all VOL classes' 'optional' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Convert several 'get' routines to return the length of an array in a parameter instead of combining it into the return value. Move several routines to be in less public namespace. Correct direct_chunk test to verify that parameters aren't modified on error.
* Switch get/specific/optional VOL callback argument structures to be 'async-friendly'. Also other minor cleanups and bug-fixes.
* Add H5Pset_dataset_io_hyperslab_selection / H5S_PLIST feature, to allow skipping H5Dget_space + H5Sselect_hyperslab for async operation
* Add dynamic optional operations for request objects
* Update dynamic operation test for optional request operations
* Update a comment for an operation argument
* Run trace and format_source scripts
* Committing clang-format changes
* Committing clang-format changes
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-03 04:29:46 +08:00
|
|
|
FAIL_STACK_ERROR;
|
2018-03-22 00:44:24 +08:00
|
|
|
|
|
|
|
/* Create dataspace */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((sid = H5Screate_simple(2, dims, NULL)) < 0)
|
Combo set of async and other changes (#161)
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* Apply patch for dynamically registering optional VOL operations
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Remove H5Dwait & H5Fwait (moved to the async connector). Added H5atclose
routine. Updated 'optional op' operations.
* Fix missed merge marker, and reformatted line
* Update API tracing infrastructure for H5atclose callback
* Clean up some warnings
* Normalize against develop branch
* Correct level of indirection
* Add doxygen info for H5is_library_terminating and regression tests for it and H5atclose
* Relocate prototype (and doxygen info) for H5Aclose
* Align w/changes on develop
* Move group package initialization code to H5Gint.c, and update tracing macros
* Change non-static function declarations to be static
* Correct GCC diagnostic macro
* Ensure that H5TSpublic.h header gets installed (#129)
* Finish moving API routines that invoke VOL framework to main source files.
* Fix position of H5Fmount and H5Funmount
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Add wrappers for dynamically registered optional operations
* Fix typo
* Update doxygen comment for H5atclose with additional detail.
* Add H5VL\*_vararg versions of H5VL routines that use va_list parameters
* Implement and test H5S_BLOCK
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Finish another iteration on public H5ES routines, along with running the code reformatter
* Another round of reformatting
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
* Remove H5Dwait and H5Fwait calls, which were incorrectly brought back in
* Tiny cleanup of H5Lcreate_hard_async
* Run source formatter
* Allow for canceled operation in wait_cb
* Attempt to fix switch on string value
* Re-run source formatter
* Add H5S_BLOCK testfile to CMake clean target
* Add H5Pset_vol_async API routine and 'get_cap_flags' VOL introspection callback
* Clean up warnings
* Add H5P(set\|get)_vol_implicit_async API routines to allow \/ disallow implicit asynchronous operations (default is disallowed)
* Run formatting script
* Remove H5VL_REQUEST_WAIT\*
* Warning cleanup
* Eliminate strdup()s on statically allocated strings
* Warning cleanup
* Split H5VLrestore_lib_state into H5VLstart_lib_state and H5VLrestore_lib_state, and rename H5VLreset_lib_state to H5VLfinish_lib_state.
* Duplicate strings when building err_info to return to applicatin
* Move connector author routines into seperate header files, all included in the new hdf5dev.h header
* Run bin/trace to add TRACE macros
* Allow H5ES_NONE as a valid, but no-op, parameter to all H5ES API routines that accept an event set ID
* Clean up formatting
* Remove H5Pset/get_vol_implicit_async
* Clean up warning
* Remove H5Pget_vol_async and replace with more generic H5Pget_vol_cap_flags
* Clean up warnings
* Add H5ESfree_err_info convenience routine
* Fix typo
* Correct matching for cached VOL plugins
* Add developer header file
* Update for C99 compatibility
* Add missing trace macro
* Stop clang-format from messing with the trace macros. Don't set up VOL wrappers for 'infrastructure' objects like requests and blobs
* Fix warning about formatting a directory
* Clean up formatting for H5E_BEGIN_TRY / H5E_END_TRY
* Reduce scope of H5ES__close
* Enable CMake checks for various types on MacOS
* Clean up properly when H5CX_retrieve_state() fails. Also clean up many compiler warnings.
* Committing clang-format changes
* Merge from develop
* Fix mis-placed assert
* Remove commented-out code
* Re-add macro for unsetenv on Windows (I think it accidentally was merged out)
* Strengthen sanity check from error report to assertion
* Committing clang-format changes
* Add units to the comments for a few fields
* Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it.
* Committing clang-format changes
* Remove H5ESget_time_estimate
* Committing clang-format changes
* Create developer header for datatype routines and move type conversion register/unregister routines there.
* Simplify internal H5VL_setup_name_args and H5VL_setup_idx_args routines
* Add H5VLlink_optional_op, allowing dynamicly registered optional operations for the link VOL subclass, also added H5VL_loc_params argument to the link 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Add H5VLobject_optional_op, allowing dynamicly registered optional operations for the object VOL subclass, also added H5VL_loc_params argument to the object 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Committing clang-format changes
* Revert "Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it."
This reverts commit 5ac92014da2682bdba62d7a2524b8d90e38f6b19.
* Committing clang-format changes
* Convert attribute 'get' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Update tracing macros
* Convert attribute 'specific' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert dataset 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to attribute 'get' and 'specific' operation parameters.
* Convert datatype 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to H5O_refresh_metadata arguments.
* Reduce warnings
* Reduce warnings
* Track change to datatype 'get' callback
* Fix bug with file pointer getting invalidated when object closed
* Reformat source
* Convert file and group VOL classes 'get' and 'specific' operations to use
struct-of-tagged-union pattern for VOL callback arguments, instead of using
varargs. Also small cleanup to the attribute get name operation. Also moved
'mount' and 'unmount' operations to be group specific operations, instead of
file specific, to better align with their behavior (mounted files are on
groups, so a group is what is operated on).
* Remove remainder of merge conflict marking
* Convert link VOL class 'create' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Remove some unused local variables
* Convert link VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor 'get name by idx' routines to return actual length of name with a parameter instead of the return value, and move some callback context structs for the link interface from the private header file into the source code module, to reduce their visibility scope.
* Update tracing macros
* Convert link VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor H5G_loc_exists, et al, to return 'exists' flag in a parameter and errors with the function return value, instead of overloading both into the return value. And, corrected logic error in test/links.c around non-existant objects in a file.
* Convert request VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert blob VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also removes the H5VL_BLOB_GETSIZE operation, as it's unused in the library and the blob ID size for a container is now returned with H5VL_FILE_GET_CONT_INFO.
* Add 'const' to several parameters that are only queried.
* Convert all VOL classes' 'optional' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Convert several 'get' routines to return the length of an array in a parameter instead of combining it into the return value. Move several routines to be in less public namespace. Correct direct_chunk test to verify that parameters aren't modified on error.
* Switch get/specific/optional VOL callback argument structures to be 'async-friendly'. Also other minor cleanups and bug-fixes.
* Add H5Pset_dataset_io_hyperslab_selection / H5S_PLIST feature, to allow skipping H5Dget_space + H5Sselect_hyperslab for async operation
* Add dynamic optional operations for request objects
* Update dynamic operation test for optional request operations
* Update a comment for an operation argument
* Run trace and format_source scripts
* Committing clang-format changes
* Committing clang-format changes
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-03 04:29:46 +08:00
|
|
|
FAIL_STACK_ERROR;
|
2018-03-22 00:44:24 +08:00
|
|
|
|
|
|
|
/* Create the dataset creation property list and set the chunk size */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0)
|
Combo set of async and other changes (#161)
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* Apply patch for dynamically registering optional VOL operations
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Remove H5Dwait & H5Fwait (moved to the async connector). Added H5atclose
routine. Updated 'optional op' operations.
* Fix missed merge marker, and reformatted line
* Update API tracing infrastructure for H5atclose callback
* Clean up some warnings
* Normalize against develop branch
* Correct level of indirection
* Add doxygen info for H5is_library_terminating and regression tests for it and H5atclose
* Relocate prototype (and doxygen info) for H5Aclose
* Align w/changes on develop
* Move group package initialization code to H5Gint.c, and update tracing macros
* Change non-static function declarations to be static
* Correct GCC diagnostic macro
* Ensure that H5TSpublic.h header gets installed (#129)
* Finish moving API routines that invoke VOL framework to main source files.
* Fix position of H5Fmount and H5Funmount
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Add wrappers for dynamically registered optional operations
* Fix typo
* Update doxygen comment for H5atclose with additional detail.
* Add H5VL\*_vararg versions of H5VL routines that use va_list parameters
* Implement and test H5S_BLOCK
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Finish another iteration on public H5ES routines, along with running the code reformatter
* Another round of reformatting
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
* Remove H5Dwait and H5Fwait calls, which were incorrectly brought back in
* Tiny cleanup of H5Lcreate_hard_async
* Run source formatter
* Allow for canceled operation in wait_cb
* Attempt to fix switch on string value
* Re-run source formatter
* Add H5S_BLOCK testfile to CMake clean target
* Add H5Pset_vol_async API routine and 'get_cap_flags' VOL introspection callback
* Clean up warnings
* Add H5P(set\|get)_vol_implicit_async API routines to allow \/ disallow implicit asynchronous operations (default is disallowed)
* Run formatting script
* Remove H5VL_REQUEST_WAIT\*
* Warning cleanup
* Eliminate strdup()s on statically allocated strings
* Warning cleanup
* Split H5VLrestore_lib_state into H5VLstart_lib_state and H5VLrestore_lib_state, and rename H5VLreset_lib_state to H5VLfinish_lib_state.
* Duplicate strings when building err_info to return to applicatin
* Move connector author routines into seperate header files, all included in the new hdf5dev.h header
* Run bin/trace to add TRACE macros
* Allow H5ES_NONE as a valid, but no-op, parameter to all H5ES API routines that accept an event set ID
* Clean up formatting
* Remove H5Pset/get_vol_implicit_async
* Clean up warning
* Remove H5Pget_vol_async and replace with more generic H5Pget_vol_cap_flags
* Clean up warnings
* Add H5ESfree_err_info convenience routine
* Fix typo
* Correct matching for cached VOL plugins
* Add developer header file
* Update for C99 compatibility
* Add missing trace macro
* Stop clang-format from messing with the trace macros. Don't set up VOL wrappers for 'infrastructure' objects like requests and blobs
* Fix warning about formatting a directory
* Clean up formatting for H5E_BEGIN_TRY / H5E_END_TRY
* Reduce scope of H5ES__close
* Enable CMake checks for various types on MacOS
* Clean up properly when H5CX_retrieve_state() fails. Also clean up many compiler warnings.
* Committing clang-format changes
* Merge from develop
* Fix mis-placed assert
* Remove commented-out code
* Re-add macro for unsetenv on Windows (I think it accidentally was merged out)
* Strengthen sanity check from error report to assertion
* Committing clang-format changes
* Add units to the comments for a few fields
* Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it.
* Committing clang-format changes
* Remove H5ESget_time_estimate
* Committing clang-format changes
* Create developer header for datatype routines and move type conversion register/unregister routines there.
* Simplify internal H5VL_setup_name_args and H5VL_setup_idx_args routines
* Add H5VLlink_optional_op, allowing dynamicly registered optional operations for the link VOL subclass, also added H5VL_loc_params argument to the link 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Add H5VLobject_optional_op, allowing dynamicly registered optional operations for the object VOL subclass, also added H5VL_loc_params argument to the object 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Committing clang-format changes
* Revert "Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it."
This reverts commit 5ac92014da2682bdba62d7a2524b8d90e38f6b19.
* Committing clang-format changes
* Convert attribute 'get' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Update tracing macros
* Convert attribute 'specific' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert dataset 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to attribute 'get' and 'specific' operation parameters.
* Convert datatype 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to H5O_refresh_metadata arguments.
* Reduce warnings
* Reduce warnings
* Track change to datatype 'get' callback
* Fix bug with file pointer getting invalidated when object closed
* Reformat source
* Convert file and group VOL classes 'get' and 'specific' operations to use
struct-of-tagged-union pattern for VOL callback arguments, instead of using
varargs. Also small cleanup to the attribute get name operation. Also moved
'mount' and 'unmount' operations to be group specific operations, instead of
file specific, to better align with their behavior (mounted files are on
groups, so a group is what is operated on).
* Remove remainder of merge conflict marking
* Convert link VOL class 'create' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Remove some unused local variables
* Convert link VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor 'get name by idx' routines to return actual length of name with a parameter instead of the return value, and move some callback context structs for the link interface from the private header file into the source code module, to reduce their visibility scope.
* Update tracing macros
* Convert link VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor H5G_loc_exists, et al, to return 'exists' flag in a parameter and errors with the function return value, instead of overloading both into the return value. And, corrected logic error in test/links.c around non-existant objects in a file.
* Convert request VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert blob VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also removes the H5VL_BLOB_GETSIZE operation, as it's unused in the library and the blob ID size for a container is now returned with H5VL_FILE_GET_CONT_INFO.
* Add 'const' to several parameters that are only queried.
* Convert all VOL classes' 'optional' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Convert several 'get' routines to return the length of an array in a parameter instead of combining it into the return value. Move several routines to be in less public namespace. Correct direct_chunk test to verify that parameters aren't modified on error.
* Switch get/specific/optional VOL callback argument structures to be 'async-friendly'. Also other minor cleanups and bug-fixes.
* Add H5Pset_dataset_io_hyperslab_selection / H5S_PLIST feature, to allow skipping H5Dget_space + H5Sselect_hyperslab for async operation
* Add dynamic optional operations for request objects
* Update dynamic operation test for optional request operations
* Update a comment for an operation argument
* Run trace and format_source scripts
* Committing clang-format changes
* Committing clang-format changes
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-03 04:29:46 +08:00
|
|
|
FAIL_STACK_ERROR;
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Pset_chunk(dcpl, 2, chunk) < 0)
|
Combo set of async and other changes (#161)
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* Apply patch for dynamically registering optional VOL operations
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Remove H5Dwait & H5Fwait (moved to the async connector). Added H5atclose
routine. Updated 'optional op' operations.
* Fix missed merge marker, and reformatted line
* Update API tracing infrastructure for H5atclose callback
* Clean up some warnings
* Normalize against develop branch
* Correct level of indirection
* Add doxygen info for H5is_library_terminating and regression tests for it and H5atclose
* Relocate prototype (and doxygen info) for H5Aclose
* Align w/changes on develop
* Move group package initialization code to H5Gint.c, and update tracing macros
* Change non-static function declarations to be static
* Correct GCC diagnostic macro
* Ensure that H5TSpublic.h header gets installed (#129)
* Finish moving API routines that invoke VOL framework to main source files.
* Fix position of H5Fmount and H5Funmount
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Add wrappers for dynamically registered optional operations
* Fix typo
* Update doxygen comment for H5atclose with additional detail.
* Add H5VL\*_vararg versions of H5VL routines that use va_list parameters
* Implement and test H5S_BLOCK
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Finish another iteration on public H5ES routines, along with running the code reformatter
* Another round of reformatting
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
* Remove H5Dwait and H5Fwait calls, which were incorrectly brought back in
* Tiny cleanup of H5Lcreate_hard_async
* Run source formatter
* Allow for canceled operation in wait_cb
* Attempt to fix switch on string value
* Re-run source formatter
* Add H5S_BLOCK testfile to CMake clean target
* Add H5Pset_vol_async API routine and 'get_cap_flags' VOL introspection callback
* Clean up warnings
* Add H5P(set\|get)_vol_implicit_async API routines to allow \/ disallow implicit asynchronous operations (default is disallowed)
* Run formatting script
* Remove H5VL_REQUEST_WAIT\*
* Warning cleanup
* Eliminate strdup()s on statically allocated strings
* Warning cleanup
* Split H5VLrestore_lib_state into H5VLstart_lib_state and H5VLrestore_lib_state, and rename H5VLreset_lib_state to H5VLfinish_lib_state.
* Duplicate strings when building err_info to return to applicatin
* Move connector author routines into seperate header files, all included in the new hdf5dev.h header
* Run bin/trace to add TRACE macros
* Allow H5ES_NONE as a valid, but no-op, parameter to all H5ES API routines that accept an event set ID
* Clean up formatting
* Remove H5Pset/get_vol_implicit_async
* Clean up warning
* Remove H5Pget_vol_async and replace with more generic H5Pget_vol_cap_flags
* Clean up warnings
* Add H5ESfree_err_info convenience routine
* Fix typo
* Correct matching for cached VOL plugins
* Add developer header file
* Update for C99 compatibility
* Add missing trace macro
* Stop clang-format from messing with the trace macros. Don't set up VOL wrappers for 'infrastructure' objects like requests and blobs
* Fix warning about formatting a directory
* Clean up formatting for H5E_BEGIN_TRY / H5E_END_TRY
* Reduce scope of H5ES__close
* Enable CMake checks for various types on MacOS
* Clean up properly when H5CX_retrieve_state() fails. Also clean up many compiler warnings.
* Committing clang-format changes
* Merge from develop
* Fix mis-placed assert
* Remove commented-out code
* Re-add macro for unsetenv on Windows (I think it accidentally was merged out)
* Strengthen sanity check from error report to assertion
* Committing clang-format changes
* Add units to the comments for a few fields
* Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it.
* Committing clang-format changes
* Remove H5ESget_time_estimate
* Committing clang-format changes
* Create developer header for datatype routines and move type conversion register/unregister routines there.
* Simplify internal H5VL_setup_name_args and H5VL_setup_idx_args routines
* Add H5VLlink_optional_op, allowing dynamicly registered optional operations for the link VOL subclass, also added H5VL_loc_params argument to the link 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Add H5VLobject_optional_op, allowing dynamicly registered optional operations for the object VOL subclass, also added H5VL_loc_params argument to the object 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Committing clang-format changes
* Revert "Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it."
This reverts commit 5ac92014da2682bdba62d7a2524b8d90e38f6b19.
* Committing clang-format changes
* Convert attribute 'get' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Update tracing macros
* Convert attribute 'specific' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert dataset 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to attribute 'get' and 'specific' operation parameters.
* Convert datatype 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to H5O_refresh_metadata arguments.
* Reduce warnings
* Reduce warnings
* Track change to datatype 'get' callback
* Fix bug with file pointer getting invalidated when object closed
* Reformat source
* Convert file and group VOL classes 'get' and 'specific' operations to use
struct-of-tagged-union pattern for VOL callback arguments, instead of using
varargs. Also small cleanup to the attribute get name operation. Also moved
'mount' and 'unmount' operations to be group specific operations, instead of
file specific, to better align with their behavior (mounted files are on
groups, so a group is what is operated on).
* Remove remainder of merge conflict marking
* Convert link VOL class 'create' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Remove some unused local variables
* Convert link VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor 'get name by idx' routines to return actual length of name with a parameter instead of the return value, and move some callback context structs for the link interface from the private header file into the source code module, to reduce their visibility scope.
* Update tracing macros
* Convert link VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor H5G_loc_exists, et al, to return 'exists' flag in a parameter and errors with the function return value, instead of overloading both into the return value. And, corrected logic error in test/links.c around non-existant objects in a file.
* Convert request VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert blob VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also removes the H5VL_BLOB_GETSIZE operation, as it's unused in the library and the blob ID size for a container is now returned with H5VL_FILE_GET_CONT_INFO.
* Add 'const' to several parameters that are only queried.
* Convert all VOL classes' 'optional' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Convert several 'get' routines to return the length of an array in a parameter instead of combining it into the return value. Move several routines to be in less public namespace. Correct direct_chunk test to verify that parameters aren't modified on error.
* Switch get/specific/optional VOL callback argument structures to be 'async-friendly'. Also other minor cleanups and bug-fixes.
* Add H5Pset_dataset_io_hyperslab_selection / H5S_PLIST feature, to allow skipping H5Dget_space + H5Sselect_hyperslab for async operation
* Add dynamic optional operations for request objects
* Update dynamic operation test for optional request operations
* Update a comment for an operation argument
* Run trace and format_source scripts
* Committing clang-format changes
* Committing clang-format changes
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-03 04:29:46 +08:00
|
|
|
FAIL_STACK_ERROR;
|
2018-03-22 00:44:24 +08:00
|
|
|
|
|
|
|
/* Create the dataset */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((did = H5Dcreate2(fid, DATASET, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0)
|
Combo set of async and other changes (#161)
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* Apply patch for dynamically registering optional VOL operations
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Remove H5Dwait & H5Fwait (moved to the async connector). Added H5atclose
routine. Updated 'optional op' operations.
* Fix missed merge marker, and reformatted line
* Update API tracing infrastructure for H5atclose callback
* Clean up some warnings
* Normalize against develop branch
* Correct level of indirection
* Add doxygen info for H5is_library_terminating and regression tests for it and H5atclose
* Relocate prototype (and doxygen info) for H5Aclose
* Align w/changes on develop
* Move group package initialization code to H5Gint.c, and update tracing macros
* Change non-static function declarations to be static
* Correct GCC diagnostic macro
* Ensure that H5TSpublic.h header gets installed (#129)
* Finish moving API routines that invoke VOL framework to main source files.
* Fix position of H5Fmount and H5Funmount
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Add wrappers for dynamically registered optional operations
* Fix typo
* Update doxygen comment for H5atclose with additional detail.
* Add H5VL\*_vararg versions of H5VL routines that use va_list parameters
* Implement and test H5S_BLOCK
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Finish another iteration on public H5ES routines, along with running the code reformatter
* Another round of reformatting
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
* Remove H5Dwait and H5Fwait calls, which were incorrectly brought back in
* Tiny cleanup of H5Lcreate_hard_async
* Run source formatter
* Allow for canceled operation in wait_cb
* Attempt to fix switch on string value
* Re-run source formatter
* Add H5S_BLOCK testfile to CMake clean target
* Add H5Pset_vol_async API routine and 'get_cap_flags' VOL introspection callback
* Clean up warnings
* Add H5P(set\|get)_vol_implicit_async API routines to allow \/ disallow implicit asynchronous operations (default is disallowed)
* Run formatting script
* Remove H5VL_REQUEST_WAIT\*
* Warning cleanup
* Eliminate strdup()s on statically allocated strings
* Warning cleanup
* Split H5VLrestore_lib_state into H5VLstart_lib_state and H5VLrestore_lib_state, and rename H5VLreset_lib_state to H5VLfinish_lib_state.
* Duplicate strings when building err_info to return to applicatin
* Move connector author routines into seperate header files, all included in the new hdf5dev.h header
* Run bin/trace to add TRACE macros
* Allow H5ES_NONE as a valid, but no-op, parameter to all H5ES API routines that accept an event set ID
* Clean up formatting
* Remove H5Pset/get_vol_implicit_async
* Clean up warning
* Remove H5Pget_vol_async and replace with more generic H5Pget_vol_cap_flags
* Clean up warnings
* Add H5ESfree_err_info convenience routine
* Fix typo
* Correct matching for cached VOL plugins
* Add developer header file
* Update for C99 compatibility
* Add missing trace macro
* Stop clang-format from messing with the trace macros. Don't set up VOL wrappers for 'infrastructure' objects like requests and blobs
* Fix warning about formatting a directory
* Clean up formatting for H5E_BEGIN_TRY / H5E_END_TRY
* Reduce scope of H5ES__close
* Enable CMake checks for various types on MacOS
* Clean up properly when H5CX_retrieve_state() fails. Also clean up many compiler warnings.
* Committing clang-format changes
* Merge from develop
* Fix mis-placed assert
* Remove commented-out code
* Re-add macro for unsetenv on Windows (I think it accidentally was merged out)
* Strengthen sanity check from error report to assertion
* Committing clang-format changes
* Add units to the comments for a few fields
* Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it.
* Committing clang-format changes
* Remove H5ESget_time_estimate
* Committing clang-format changes
* Create developer header for datatype routines and move type conversion register/unregister routines there.
* Simplify internal H5VL_setup_name_args and H5VL_setup_idx_args routines
* Add H5VLlink_optional_op, allowing dynamicly registered optional operations for the link VOL subclass, also added H5VL_loc_params argument to the link 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Add H5VLobject_optional_op, allowing dynamicly registered optional operations for the object VOL subclass, also added H5VL_loc_params argument to the object 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Committing clang-format changes
* Revert "Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it."
This reverts commit 5ac92014da2682bdba62d7a2524b8d90e38f6b19.
* Committing clang-format changes
* Convert attribute 'get' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Update tracing macros
* Convert attribute 'specific' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert dataset 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to attribute 'get' and 'specific' operation parameters.
* Convert datatype 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to H5O_refresh_metadata arguments.
* Reduce warnings
* Reduce warnings
* Track change to datatype 'get' callback
* Fix bug with file pointer getting invalidated when object closed
* Reformat source
* Convert file and group VOL classes 'get' and 'specific' operations to use
struct-of-tagged-union pattern for VOL callback arguments, instead of using
varargs. Also small cleanup to the attribute get name operation. Also moved
'mount' and 'unmount' operations to be group specific operations, instead of
file specific, to better align with their behavior (mounted files are on
groups, so a group is what is operated on).
* Remove remainder of merge conflict marking
* Convert link VOL class 'create' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Remove some unused local variables
* Convert link VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor 'get name by idx' routines to return actual length of name with a parameter instead of the return value, and move some callback context structs for the link interface from the private header file into the source code module, to reduce their visibility scope.
* Update tracing macros
* Convert link VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor H5G_loc_exists, et al, to return 'exists' flag in a parameter and errors with the function return value, instead of overloading both into the return value. And, corrected logic error in test/links.c around non-existant objects in a file.
* Convert request VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert blob VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also removes the H5VL_BLOB_GETSIZE operation, as it's unused in the library and the blob ID size for a container is now returned with H5VL_FILE_GET_CONT_INFO.
* Add 'const' to several parameters that are only queried.
* Convert all VOL classes' 'optional' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Convert several 'get' routines to return the length of an array in a parameter instead of combining it into the return value. Move several routines to be in less public namespace. Correct direct_chunk test to verify that parameters aren't modified on error.
* Switch get/specific/optional VOL callback argument structures to be 'async-friendly'. Also other minor cleanups and bug-fixes.
* Add H5Pset_dataset_io_hyperslab_selection / H5S_PLIST feature, to allow skipping H5Dget_space + H5Sselect_hyperslab for async operation
* Add dynamic optional operations for request objects
* Update dynamic operation test for optional request operations
* Update a comment for an operation argument
* Run trace and format_source scripts
* Committing clang-format changes
* Committing clang-format changes
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-03 04:29:46 +08:00
|
|
|
FAIL_STACK_ERROR;
|
2018-03-22 00:44:24 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if (config & CONFIG_DIRECT_WRITE) {
|
2019-03-07 06:57:42 +08:00
|
|
|
/* Write the data directly to the dataset */
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Dwrite_chunk(did, H5P_DEFAULT, 0, offset, CHUNK0 * CHUNK1 * 4, (void *)wdata) < 0)
|
Combo set of async and other changes (#161)
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* Apply patch for dynamically registering optional VOL operations
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Remove H5Dwait & H5Fwait (moved to the async connector). Added H5atclose
routine. Updated 'optional op' operations.
* Fix missed merge marker, and reformatted line
* Update API tracing infrastructure for H5atclose callback
* Clean up some warnings
* Normalize against develop branch
* Correct level of indirection
* Add doxygen info for H5is_library_terminating and regression tests for it and H5atclose
* Relocate prototype (and doxygen info) for H5Aclose
* Align w/changes on develop
* Move group package initialization code to H5Gint.c, and update tracing macros
* Change non-static function declarations to be static
* Correct GCC diagnostic macro
* Ensure that H5TSpublic.h header gets installed (#129)
* Finish moving API routines that invoke VOL framework to main source files.
* Fix position of H5Fmount and H5Funmount
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Add wrappers for dynamically registered optional operations
* Fix typo
* Update doxygen comment for H5atclose with additional detail.
* Add H5VL\*_vararg versions of H5VL routines that use va_list parameters
* Implement and test H5S_BLOCK
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Finish another iteration on public H5ES routines, along with running the code reformatter
* Another round of reformatting
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
* Remove H5Dwait and H5Fwait calls, which were incorrectly brought back in
* Tiny cleanup of H5Lcreate_hard_async
* Run source formatter
* Allow for canceled operation in wait_cb
* Attempt to fix switch on string value
* Re-run source formatter
* Add H5S_BLOCK testfile to CMake clean target
* Add H5Pset_vol_async API routine and 'get_cap_flags' VOL introspection callback
* Clean up warnings
* Add H5P(set\|get)_vol_implicit_async API routines to allow \/ disallow implicit asynchronous operations (default is disallowed)
* Run formatting script
* Remove H5VL_REQUEST_WAIT\*
* Warning cleanup
* Eliminate strdup()s on statically allocated strings
* Warning cleanup
* Split H5VLrestore_lib_state into H5VLstart_lib_state and H5VLrestore_lib_state, and rename H5VLreset_lib_state to H5VLfinish_lib_state.
* Duplicate strings when building err_info to return to applicatin
* Move connector author routines into seperate header files, all included in the new hdf5dev.h header
* Run bin/trace to add TRACE macros
* Allow H5ES_NONE as a valid, but no-op, parameter to all H5ES API routines that accept an event set ID
* Clean up formatting
* Remove H5Pset/get_vol_implicit_async
* Clean up warning
* Remove H5Pget_vol_async and replace with more generic H5Pget_vol_cap_flags
* Clean up warnings
* Add H5ESfree_err_info convenience routine
* Fix typo
* Correct matching for cached VOL plugins
* Add developer header file
* Update for C99 compatibility
* Add missing trace macro
* Stop clang-format from messing with the trace macros. Don't set up VOL wrappers for 'infrastructure' objects like requests and blobs
* Fix warning about formatting a directory
* Clean up formatting for H5E_BEGIN_TRY / H5E_END_TRY
* Reduce scope of H5ES__close
* Enable CMake checks for various types on MacOS
* Clean up properly when H5CX_retrieve_state() fails. Also clean up many compiler warnings.
* Committing clang-format changes
* Merge from develop
* Fix mis-placed assert
* Remove commented-out code
* Re-add macro for unsetenv on Windows (I think it accidentally was merged out)
* Strengthen sanity check from error report to assertion
* Committing clang-format changes
* Add units to the comments for a few fields
* Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it.
* Committing clang-format changes
* Remove H5ESget_time_estimate
* Committing clang-format changes
* Create developer header for datatype routines and move type conversion register/unregister routines there.
* Simplify internal H5VL_setup_name_args and H5VL_setup_idx_args routines
* Add H5VLlink_optional_op, allowing dynamicly registered optional operations for the link VOL subclass, also added H5VL_loc_params argument to the link 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Add H5VLobject_optional_op, allowing dynamicly registered optional operations for the object VOL subclass, also added H5VL_loc_params argument to the object 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Committing clang-format changes
* Revert "Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it."
This reverts commit 5ac92014da2682bdba62d7a2524b8d90e38f6b19.
* Committing clang-format changes
* Convert attribute 'get' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Update tracing macros
* Convert attribute 'specific' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert dataset 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to attribute 'get' and 'specific' operation parameters.
* Convert datatype 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to H5O_refresh_metadata arguments.
* Reduce warnings
* Reduce warnings
* Track change to datatype 'get' callback
* Fix bug with file pointer getting invalidated when object closed
* Reformat source
* Convert file and group VOL classes 'get' and 'specific' operations to use
struct-of-tagged-union pattern for VOL callback arguments, instead of using
varargs. Also small cleanup to the attribute get name operation. Also moved
'mount' and 'unmount' operations to be group specific operations, instead of
file specific, to better align with their behavior (mounted files are on
groups, so a group is what is operated on).
* Remove remainder of merge conflict marking
* Convert link VOL class 'create' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Remove some unused local variables
* Convert link VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor 'get name by idx' routines to return actual length of name with a parameter instead of the return value, and move some callback context structs for the link interface from the private header file into the source code module, to reduce their visibility scope.
* Update tracing macros
* Convert link VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor H5G_loc_exists, et al, to return 'exists' flag in a parameter and errors with the function return value, instead of overloading both into the return value. And, corrected logic error in test/links.c around non-existant objects in a file.
* Convert request VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert blob VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also removes the H5VL_BLOB_GETSIZE operation, as it's unused in the library and the blob ID size for a container is now returned with H5VL_FILE_GET_CONT_INFO.
* Add 'const' to several parameters that are only queried.
* Convert all VOL classes' 'optional' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Convert several 'get' routines to return the length of an array in a parameter instead of combining it into the return value. Move several routines to be in less public namespace. Correct direct_chunk test to verify that parameters aren't modified on error.
* Switch get/specific/optional VOL callback argument structures to be 'async-friendly'. Also other minor cleanups and bug-fixes.
* Add H5Pset_dataset_io_hyperslab_selection / H5S_PLIST feature, to allow skipping H5Dget_space + H5Sselect_hyperslab for async operation
* Add dynamic optional operations for request objects
* Update dynamic operation test for optional request operations
* Update a comment for an operation argument
* Run trace and format_source scripts
* Committing clang-format changes
* Committing clang-format changes
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-03 04:29:46 +08:00
|
|
|
FAIL_STACK_ERROR;
|
2019-03-07 06:57:42 +08:00
|
|
|
} /* end if */
|
|
|
|
else
|
|
|
|
/* Write the data to the dataset */
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, (void *)wdata) < 0)
|
Combo set of async and other changes (#161)
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* Apply patch for dynamically registering optional VOL operations
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Remove H5Dwait & H5Fwait (moved to the async connector). Added H5atclose
routine. Updated 'optional op' operations.
* Fix missed merge marker, and reformatted line
* Update API tracing infrastructure for H5atclose callback
* Clean up some warnings
* Normalize against develop branch
* Correct level of indirection
* Add doxygen info for H5is_library_terminating and regression tests for it and H5atclose
* Relocate prototype (and doxygen info) for H5Aclose
* Align w/changes on develop
* Move group package initialization code to H5Gint.c, and update tracing macros
* Change non-static function declarations to be static
* Correct GCC diagnostic macro
* Ensure that H5TSpublic.h header gets installed (#129)
* Finish moving API routines that invoke VOL framework to main source files.
* Fix position of H5Fmount and H5Funmount
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Add wrappers for dynamically registered optional operations
* Fix typo
* Update doxygen comment for H5atclose with additional detail.
* Add H5VL\*_vararg versions of H5VL routines that use va_list parameters
* Implement and test H5S_BLOCK
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Finish another iteration on public H5ES routines, along with running the code reformatter
* Another round of reformatting
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
* Remove H5Dwait and H5Fwait calls, which were incorrectly brought back in
* Tiny cleanup of H5Lcreate_hard_async
* Run source formatter
* Allow for canceled operation in wait_cb
* Attempt to fix switch on string value
* Re-run source formatter
* Add H5S_BLOCK testfile to CMake clean target
* Add H5Pset_vol_async API routine and 'get_cap_flags' VOL introspection callback
* Clean up warnings
* Add H5P(set\|get)_vol_implicit_async API routines to allow \/ disallow implicit asynchronous operations (default is disallowed)
* Run formatting script
* Remove H5VL_REQUEST_WAIT\*
* Warning cleanup
* Eliminate strdup()s on statically allocated strings
* Warning cleanup
* Split H5VLrestore_lib_state into H5VLstart_lib_state and H5VLrestore_lib_state, and rename H5VLreset_lib_state to H5VLfinish_lib_state.
* Duplicate strings when building err_info to return to applicatin
* Move connector author routines into seperate header files, all included in the new hdf5dev.h header
* Run bin/trace to add TRACE macros
* Allow H5ES_NONE as a valid, but no-op, parameter to all H5ES API routines that accept an event set ID
* Clean up formatting
* Remove H5Pset/get_vol_implicit_async
* Clean up warning
* Remove H5Pget_vol_async and replace with more generic H5Pget_vol_cap_flags
* Clean up warnings
* Add H5ESfree_err_info convenience routine
* Fix typo
* Correct matching for cached VOL plugins
* Add developer header file
* Update for C99 compatibility
* Add missing trace macro
* Stop clang-format from messing with the trace macros. Don't set up VOL wrappers for 'infrastructure' objects like requests and blobs
* Fix warning about formatting a directory
* Clean up formatting for H5E_BEGIN_TRY / H5E_END_TRY
* Reduce scope of H5ES__close
* Enable CMake checks for various types on MacOS
* Clean up properly when H5CX_retrieve_state() fails. Also clean up many compiler warnings.
* Committing clang-format changes
* Merge from develop
* Fix mis-placed assert
* Remove commented-out code
* Re-add macro for unsetenv on Windows (I think it accidentally was merged out)
* Strengthen sanity check from error report to assertion
* Committing clang-format changes
* Add units to the comments for a few fields
* Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it.
* Committing clang-format changes
* Remove H5ESget_time_estimate
* Committing clang-format changes
* Create developer header for datatype routines and move type conversion register/unregister routines there.
* Simplify internal H5VL_setup_name_args and H5VL_setup_idx_args routines
* Add H5VLlink_optional_op, allowing dynamicly registered optional operations for the link VOL subclass, also added H5VL_loc_params argument to the link 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Add H5VLobject_optional_op, allowing dynamicly registered optional operations for the object VOL subclass, also added H5VL_loc_params argument to the object 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Committing clang-format changes
* Revert "Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it."
This reverts commit 5ac92014da2682bdba62d7a2524b8d90e38f6b19.
* Committing clang-format changes
* Convert attribute 'get' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Update tracing macros
* Convert attribute 'specific' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert dataset 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to attribute 'get' and 'specific' operation parameters.
* Convert datatype 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to H5O_refresh_metadata arguments.
* Reduce warnings
* Reduce warnings
* Track change to datatype 'get' callback
* Fix bug with file pointer getting invalidated when object closed
* Reformat source
* Convert file and group VOL classes 'get' and 'specific' operations to use
struct-of-tagged-union pattern for VOL callback arguments, instead of using
varargs. Also small cleanup to the attribute get name operation. Also moved
'mount' and 'unmount' operations to be group specific operations, instead of
file specific, to better align with their behavior (mounted files are on
groups, so a group is what is operated on).
* Remove remainder of merge conflict marking
* Convert link VOL class 'create' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Remove some unused local variables
* Convert link VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor 'get name by idx' routines to return actual length of name with a parameter instead of the return value, and move some callback context structs for the link interface from the private header file into the source code module, to reduce their visibility scope.
* Update tracing macros
* Convert link VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor H5G_loc_exists, et al, to return 'exists' flag in a parameter and errors with the function return value, instead of overloading both into the return value. And, corrected logic error in test/links.c around non-existant objects in a file.
* Convert request VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert blob VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also removes the H5VL_BLOB_GETSIZE operation, as it's unused in the library and the blob ID size for a container is now returned with H5VL_FILE_GET_CONT_INFO.
* Add 'const' to several parameters that are only queried.
* Convert all VOL classes' 'optional' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Convert several 'get' routines to return the length of an array in a parameter instead of combining it into the return value. Move several routines to be in less public namespace. Correct direct_chunk test to verify that parameters aren't modified on error.
* Switch get/specific/optional VOL callback argument structures to be 'async-friendly'. Also other minor cleanups and bug-fixes.
* Add H5Pset_dataset_io_hyperslab_selection / H5S_PLIST feature, to allow skipping H5Dget_space + H5Sselect_hyperslab for async operation
* Add dynamic optional operations for request objects
* Update dynamic operation test for optional request operations
* Update a comment for an operation argument
* Run trace and format_source scripts
* Committing clang-format changes
* Committing clang-format changes
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-03 04:29:46 +08:00
|
|
|
FAIL_STACK_ERROR;
|
2018-03-22 00:44:24 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Close and release resources.
|
|
|
|
*/
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Pclose(dcpl) < 0)
|
Combo set of async and other changes (#161)
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* Apply patch for dynamically registering optional VOL operations
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Remove H5Dwait & H5Fwait (moved to the async connector). Added H5atclose
routine. Updated 'optional op' operations.
* Fix missed merge marker, and reformatted line
* Update API tracing infrastructure for H5atclose callback
* Clean up some warnings
* Normalize against develop branch
* Correct level of indirection
* Add doxygen info for H5is_library_terminating and regression tests for it and H5atclose
* Relocate prototype (and doxygen info) for H5Aclose
* Align w/changes on develop
* Move group package initialization code to H5Gint.c, and update tracing macros
* Change non-static function declarations to be static
* Correct GCC diagnostic macro
* Ensure that H5TSpublic.h header gets installed (#129)
* Finish moving API routines that invoke VOL framework to main source files.
* Fix position of H5Fmount and H5Funmount
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Add wrappers for dynamically registered optional operations
* Fix typo
* Update doxygen comment for H5atclose with additional detail.
* Add H5VL\*_vararg versions of H5VL routines that use va_list parameters
* Implement and test H5S_BLOCK
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Finish another iteration on public H5ES routines, along with running the code reformatter
* Another round of reformatting
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
* Remove H5Dwait and H5Fwait calls, which were incorrectly brought back in
* Tiny cleanup of H5Lcreate_hard_async
* Run source formatter
* Allow for canceled operation in wait_cb
* Attempt to fix switch on string value
* Re-run source formatter
* Add H5S_BLOCK testfile to CMake clean target
* Add H5Pset_vol_async API routine and 'get_cap_flags' VOL introspection callback
* Clean up warnings
* Add H5P(set\|get)_vol_implicit_async API routines to allow \/ disallow implicit asynchronous operations (default is disallowed)
* Run formatting script
* Remove H5VL_REQUEST_WAIT\*
* Warning cleanup
* Eliminate strdup()s on statically allocated strings
* Warning cleanup
* Split H5VLrestore_lib_state into H5VLstart_lib_state and H5VLrestore_lib_state, and rename H5VLreset_lib_state to H5VLfinish_lib_state.
* Duplicate strings when building err_info to return to applicatin
* Move connector author routines into seperate header files, all included in the new hdf5dev.h header
* Run bin/trace to add TRACE macros
* Allow H5ES_NONE as a valid, but no-op, parameter to all H5ES API routines that accept an event set ID
* Clean up formatting
* Remove H5Pset/get_vol_implicit_async
* Clean up warning
* Remove H5Pget_vol_async and replace with more generic H5Pget_vol_cap_flags
* Clean up warnings
* Add H5ESfree_err_info convenience routine
* Fix typo
* Correct matching for cached VOL plugins
* Add developer header file
* Update for C99 compatibility
* Add missing trace macro
* Stop clang-format from messing with the trace macros. Don't set up VOL wrappers for 'infrastructure' objects like requests and blobs
* Fix warning about formatting a directory
* Clean up formatting for H5E_BEGIN_TRY / H5E_END_TRY
* Reduce scope of H5ES__close
* Enable CMake checks for various types on MacOS
* Clean up properly when H5CX_retrieve_state() fails. Also clean up many compiler warnings.
* Committing clang-format changes
* Merge from develop
* Fix mis-placed assert
* Remove commented-out code
* Re-add macro for unsetenv on Windows (I think it accidentally was merged out)
* Strengthen sanity check from error report to assertion
* Committing clang-format changes
* Add units to the comments for a few fields
* Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it.
* Committing clang-format changes
* Remove H5ESget_time_estimate
* Committing clang-format changes
* Create developer header for datatype routines and move type conversion register/unregister routines there.
* Simplify internal H5VL_setup_name_args and H5VL_setup_idx_args routines
* Add H5VLlink_optional_op, allowing dynamicly registered optional operations for the link VOL subclass, also added H5VL_loc_params argument to the link 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Add H5VLobject_optional_op, allowing dynamicly registered optional operations for the object VOL subclass, also added H5VL_loc_params argument to the object 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Committing clang-format changes
* Revert "Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it."
This reverts commit 5ac92014da2682bdba62d7a2524b8d90e38f6b19.
* Committing clang-format changes
* Convert attribute 'get' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Update tracing macros
* Convert attribute 'specific' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert dataset 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to attribute 'get' and 'specific' operation parameters.
* Convert datatype 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to H5O_refresh_metadata arguments.
* Reduce warnings
* Reduce warnings
* Track change to datatype 'get' callback
* Fix bug with file pointer getting invalidated when object closed
* Reformat source
* Convert file and group VOL classes 'get' and 'specific' operations to use
struct-of-tagged-union pattern for VOL callback arguments, instead of using
varargs. Also small cleanup to the attribute get name operation. Also moved
'mount' and 'unmount' operations to be group specific operations, instead of
file specific, to better align with their behavior (mounted files are on
groups, so a group is what is operated on).
* Remove remainder of merge conflict marking
* Convert link VOL class 'create' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Remove some unused local variables
* Convert link VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor 'get name by idx' routines to return actual length of name with a parameter instead of the return value, and move some callback context structs for the link interface from the private header file into the source code module, to reduce their visibility scope.
* Update tracing macros
* Convert link VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor H5G_loc_exists, et al, to return 'exists' flag in a parameter and errors with the function return value, instead of overloading both into the return value. And, corrected logic error in test/links.c around non-existant objects in a file.
* Convert request VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert blob VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also removes the H5VL_BLOB_GETSIZE operation, as it's unused in the library and the blob ID size for a container is now returned with H5VL_FILE_GET_CONT_INFO.
* Add 'const' to several parameters that are only queried.
* Convert all VOL classes' 'optional' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Convert several 'get' routines to return the length of an array in a parameter instead of combining it into the return value. Move several routines to be in less public namespace. Correct direct_chunk test to verify that parameters aren't modified on error.
* Switch get/specific/optional VOL callback argument structures to be 'async-friendly'. Also other minor cleanups and bug-fixes.
* Add H5Pset_dataset_io_hyperslab_selection / H5S_PLIST feature, to allow skipping H5Dget_space + H5Sselect_hyperslab for async operation
* Add dynamic optional operations for request objects
* Update dynamic operation test for optional request operations
* Update a comment for an operation argument
* Run trace and format_source scripts
* Committing clang-format changes
* Committing clang-format changes
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-03 04:29:46 +08:00
|
|
|
FAIL_STACK_ERROR;
|
2020-09-30 22:27:10 +08:00
|
|
|
if (config & CONFIG_REOPEN_DSET)
|
|
|
|
if (H5Dclose(did) < 0)
|
Combo set of async and other changes (#161)
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* Apply patch for dynamically registering optional VOL operations
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Remove H5Dwait & H5Fwait (moved to the async connector). Added H5atclose
routine. Updated 'optional op' operations.
* Fix missed merge marker, and reformatted line
* Update API tracing infrastructure for H5atclose callback
* Clean up some warnings
* Normalize against develop branch
* Correct level of indirection
* Add doxygen info for H5is_library_terminating and regression tests for it and H5atclose
* Relocate prototype (and doxygen info) for H5Aclose
* Align w/changes on develop
* Move group package initialization code to H5Gint.c, and update tracing macros
* Change non-static function declarations to be static
* Correct GCC diagnostic macro
* Ensure that H5TSpublic.h header gets installed (#129)
* Finish moving API routines that invoke VOL framework to main source files.
* Fix position of H5Fmount and H5Funmount
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Add wrappers for dynamically registered optional operations
* Fix typo
* Update doxygen comment for H5atclose with additional detail.
* Add H5VL\*_vararg versions of H5VL routines that use va_list parameters
* Implement and test H5S_BLOCK
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Finish another iteration on public H5ES routines, along with running the code reformatter
* Another round of reformatting
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
* Remove H5Dwait and H5Fwait calls, which were incorrectly brought back in
* Tiny cleanup of H5Lcreate_hard_async
* Run source formatter
* Allow for canceled operation in wait_cb
* Attempt to fix switch on string value
* Re-run source formatter
* Add H5S_BLOCK testfile to CMake clean target
* Add H5Pset_vol_async API routine and 'get_cap_flags' VOL introspection callback
* Clean up warnings
* Add H5P(set\|get)_vol_implicit_async API routines to allow \/ disallow implicit asynchronous operations (default is disallowed)
* Run formatting script
* Remove H5VL_REQUEST_WAIT\*
* Warning cleanup
* Eliminate strdup()s on statically allocated strings
* Warning cleanup
* Split H5VLrestore_lib_state into H5VLstart_lib_state and H5VLrestore_lib_state, and rename H5VLreset_lib_state to H5VLfinish_lib_state.
* Duplicate strings when building err_info to return to applicatin
* Move connector author routines into seperate header files, all included in the new hdf5dev.h header
* Run bin/trace to add TRACE macros
* Allow H5ES_NONE as a valid, but no-op, parameter to all H5ES API routines that accept an event set ID
* Clean up formatting
* Remove H5Pset/get_vol_implicit_async
* Clean up warning
* Remove H5Pget_vol_async and replace with more generic H5Pget_vol_cap_flags
* Clean up warnings
* Add H5ESfree_err_info convenience routine
* Fix typo
* Correct matching for cached VOL plugins
* Add developer header file
* Update for C99 compatibility
* Add missing trace macro
* Stop clang-format from messing with the trace macros. Don't set up VOL wrappers for 'infrastructure' objects like requests and blobs
* Fix warning about formatting a directory
* Clean up formatting for H5E_BEGIN_TRY / H5E_END_TRY
* Reduce scope of H5ES__close
* Enable CMake checks for various types on MacOS
* Clean up properly when H5CX_retrieve_state() fails. Also clean up many compiler warnings.
* Committing clang-format changes
* Merge from develop
* Fix mis-placed assert
* Remove commented-out code
* Re-add macro for unsetenv on Windows (I think it accidentally was merged out)
* Strengthen sanity check from error report to assertion
* Committing clang-format changes
* Add units to the comments for a few fields
* Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it.
* Committing clang-format changes
* Remove H5ESget_time_estimate
* Committing clang-format changes
* Create developer header for datatype routines and move type conversion register/unregister routines there.
* Simplify internal H5VL_setup_name_args and H5VL_setup_idx_args routines
* Add H5VLlink_optional_op, allowing dynamicly registered optional operations for the link VOL subclass, also added H5VL_loc_params argument to the link 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Add H5VLobject_optional_op, allowing dynamicly registered optional operations for the object VOL subclass, also added H5VL_loc_params argument to the object 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Committing clang-format changes
* Revert "Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it."
This reverts commit 5ac92014da2682bdba62d7a2524b8d90e38f6b19.
* Committing clang-format changes
* Convert attribute 'get' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Update tracing macros
* Convert attribute 'specific' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert dataset 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to attribute 'get' and 'specific' operation parameters.
* Convert datatype 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to H5O_refresh_metadata arguments.
* Reduce warnings
* Reduce warnings
* Track change to datatype 'get' callback
* Fix bug with file pointer getting invalidated when object closed
* Reformat source
* Convert file and group VOL classes 'get' and 'specific' operations to use
struct-of-tagged-union pattern for VOL callback arguments, instead of using
varargs. Also small cleanup to the attribute get name operation. Also moved
'mount' and 'unmount' operations to be group specific operations, instead of
file specific, to better align with their behavior (mounted files are on
groups, so a group is what is operated on).
* Remove remainder of merge conflict marking
* Convert link VOL class 'create' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Remove some unused local variables
* Convert link VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor 'get name by idx' routines to return actual length of name with a parameter instead of the return value, and move some callback context structs for the link interface from the private header file into the source code module, to reduce their visibility scope.
* Update tracing macros
* Convert link VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor H5G_loc_exists, et al, to return 'exists' flag in a parameter and errors with the function return value, instead of overloading both into the return value. And, corrected logic error in test/links.c around non-existant objects in a file.
* Convert request VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert blob VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also removes the H5VL_BLOB_GETSIZE operation, as it's unused in the library and the blob ID size for a container is now returned with H5VL_FILE_GET_CONT_INFO.
* Add 'const' to several parameters that are only queried.
* Convert all VOL classes' 'optional' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Convert several 'get' routines to return the length of an array in a parameter instead of combining it into the return value. Move several routines to be in less public namespace. Correct direct_chunk test to verify that parameters aren't modified on error.
* Switch get/specific/optional VOL callback argument structures to be 'async-friendly'. Also other minor cleanups and bug-fixes.
* Add H5Pset_dataset_io_hyperslab_selection / H5S_PLIST feature, to allow skipping H5Dget_space + H5Sselect_hyperslab for async operation
* Add dynamic optional operations for request objects
* Update dynamic operation test for optional request operations
* Update a comment for an operation argument
* Run trace and format_source scripts
* Committing clang-format changes
* Committing clang-format changes
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-03 04:29:46 +08:00
|
|
|
FAIL_STACK_ERROR;
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Sclose(sid) < 0)
|
Combo set of async and other changes (#161)
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* Apply patch for dynamically registering optional VOL operations
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Remove H5Dwait & H5Fwait (moved to the async connector). Added H5atclose
routine. Updated 'optional op' operations.
* Fix missed merge marker, and reformatted line
* Update API tracing infrastructure for H5atclose callback
* Clean up some warnings
* Normalize against develop branch
* Correct level of indirection
* Add doxygen info for H5is_library_terminating and regression tests for it and H5atclose
* Relocate prototype (and doxygen info) for H5Aclose
* Align w/changes on develop
* Move group package initialization code to H5Gint.c, and update tracing macros
* Change non-static function declarations to be static
* Correct GCC diagnostic macro
* Ensure that H5TSpublic.h header gets installed (#129)
* Finish moving API routines that invoke VOL framework to main source files.
* Fix position of H5Fmount and H5Funmount
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Add wrappers for dynamically registered optional operations
* Fix typo
* Update doxygen comment for H5atclose with additional detail.
* Add H5VL\*_vararg versions of H5VL routines that use va_list parameters
* Implement and test H5S_BLOCK
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Finish another iteration on public H5ES routines, along with running the code reformatter
* Another round of reformatting
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
* Remove H5Dwait and H5Fwait calls, which were incorrectly brought back in
* Tiny cleanup of H5Lcreate_hard_async
* Run source formatter
* Allow for canceled operation in wait_cb
* Attempt to fix switch on string value
* Re-run source formatter
* Add H5S_BLOCK testfile to CMake clean target
* Add H5Pset_vol_async API routine and 'get_cap_flags' VOL introspection callback
* Clean up warnings
* Add H5P(set\|get)_vol_implicit_async API routines to allow \/ disallow implicit asynchronous operations (default is disallowed)
* Run formatting script
* Remove H5VL_REQUEST_WAIT\*
* Warning cleanup
* Eliminate strdup()s on statically allocated strings
* Warning cleanup
* Split H5VLrestore_lib_state into H5VLstart_lib_state and H5VLrestore_lib_state, and rename H5VLreset_lib_state to H5VLfinish_lib_state.
* Duplicate strings when building err_info to return to applicatin
* Move connector author routines into seperate header files, all included in the new hdf5dev.h header
* Run bin/trace to add TRACE macros
* Allow H5ES_NONE as a valid, but no-op, parameter to all H5ES API routines that accept an event set ID
* Clean up formatting
* Remove H5Pset/get_vol_implicit_async
* Clean up warning
* Remove H5Pget_vol_async and replace with more generic H5Pget_vol_cap_flags
* Clean up warnings
* Add H5ESfree_err_info convenience routine
* Fix typo
* Correct matching for cached VOL plugins
* Add developer header file
* Update for C99 compatibility
* Add missing trace macro
* Stop clang-format from messing with the trace macros. Don't set up VOL wrappers for 'infrastructure' objects like requests and blobs
* Fix warning about formatting a directory
* Clean up formatting for H5E_BEGIN_TRY / H5E_END_TRY
* Reduce scope of H5ES__close
* Enable CMake checks for various types on MacOS
* Clean up properly when H5CX_retrieve_state() fails. Also clean up many compiler warnings.
* Committing clang-format changes
* Merge from develop
* Fix mis-placed assert
* Remove commented-out code
* Re-add macro for unsetenv on Windows (I think it accidentally was merged out)
* Strengthen sanity check from error report to assertion
* Committing clang-format changes
* Add units to the comments for a few fields
* Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it.
* Committing clang-format changes
* Remove H5ESget_time_estimate
* Committing clang-format changes
* Create developer header for datatype routines and move type conversion register/unregister routines there.
* Simplify internal H5VL_setup_name_args and H5VL_setup_idx_args routines
* Add H5VLlink_optional_op, allowing dynamicly registered optional operations for the link VOL subclass, also added H5VL_loc_params argument to the link 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Add H5VLobject_optional_op, allowing dynamicly registered optional operations for the object VOL subclass, also added H5VL_loc_params argument to the object 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Committing clang-format changes
* Revert "Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it."
This reverts commit 5ac92014da2682bdba62d7a2524b8d90e38f6b19.
* Committing clang-format changes
* Convert attribute 'get' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Update tracing macros
* Convert attribute 'specific' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert dataset 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to attribute 'get' and 'specific' operation parameters.
* Convert datatype 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to H5O_refresh_metadata arguments.
* Reduce warnings
* Reduce warnings
* Track change to datatype 'get' callback
* Fix bug with file pointer getting invalidated when object closed
* Reformat source
* Convert file and group VOL classes 'get' and 'specific' operations to use
struct-of-tagged-union pattern for VOL callback arguments, instead of using
varargs. Also small cleanup to the attribute get name operation. Also moved
'mount' and 'unmount' operations to be group specific operations, instead of
file specific, to better align with their behavior (mounted files are on
groups, so a group is what is operated on).
* Remove remainder of merge conflict marking
* Convert link VOL class 'create' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Remove some unused local variables
* Convert link VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor 'get name by idx' routines to return actual length of name with a parameter instead of the return value, and move some callback context structs for the link interface from the private header file into the source code module, to reduce their visibility scope.
* Update tracing macros
* Convert link VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor H5G_loc_exists, et al, to return 'exists' flag in a parameter and errors with the function return value, instead of overloading both into the return value. And, corrected logic error in test/links.c around non-existant objects in a file.
* Convert request VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert blob VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also removes the H5VL_BLOB_GETSIZE operation, as it's unused in the library and the blob ID size for a container is now returned with H5VL_FILE_GET_CONT_INFO.
* Add 'const' to several parameters that are only queried.
* Convert all VOL classes' 'optional' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Convert several 'get' routines to return the length of an array in a parameter instead of combining it into the return value. Move several routines to be in less public namespace. Correct direct_chunk test to verify that parameters aren't modified on error.
* Switch get/specific/optional VOL callback argument structures to be 'async-friendly'. Also other minor cleanups and bug-fixes.
* Add H5Pset_dataset_io_hyperslab_selection / H5S_PLIST feature, to allow skipping H5Dget_space + H5Sselect_hyperslab for async operation
* Add dynamic optional operations for request objects
* Update dynamic operation test for optional request operations
* Update a comment for an operation argument
* Run trace and format_source scripts
* Committing clang-format changes
* Committing clang-format changes
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-03 04:29:46 +08:00
|
|
|
FAIL_STACK_ERROR;
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Pclose(fapl) < 0)
|
Combo set of async and other changes (#161)
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* Apply patch for dynamically registering optional VOL operations
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Remove H5Dwait & H5Fwait (moved to the async connector). Added H5atclose
routine. Updated 'optional op' operations.
* Fix missed merge marker, and reformatted line
* Update API tracing infrastructure for H5atclose callback
* Clean up some warnings
* Normalize against develop branch
* Correct level of indirection
* Add doxygen info for H5is_library_terminating and regression tests for it and H5atclose
* Relocate prototype (and doxygen info) for H5Aclose
* Align w/changes on develop
* Move group package initialization code to H5Gint.c, and update tracing macros
* Change non-static function declarations to be static
* Correct GCC diagnostic macro
* Ensure that H5TSpublic.h header gets installed (#129)
* Finish moving API routines that invoke VOL framework to main source files.
* Fix position of H5Fmount and H5Funmount
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Add wrappers for dynamically registered optional operations
* Fix typo
* Update doxygen comment for H5atclose with additional detail.
* Add H5VL\*_vararg versions of H5VL routines that use va_list parameters
* Implement and test H5S_BLOCK
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Finish another iteration on public H5ES routines, along with running the code reformatter
* Another round of reformatting
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
* Remove H5Dwait and H5Fwait calls, which were incorrectly brought back in
* Tiny cleanup of H5Lcreate_hard_async
* Run source formatter
* Allow for canceled operation in wait_cb
* Attempt to fix switch on string value
* Re-run source formatter
* Add H5S_BLOCK testfile to CMake clean target
* Add H5Pset_vol_async API routine and 'get_cap_flags' VOL introspection callback
* Clean up warnings
* Add H5P(set\|get)_vol_implicit_async API routines to allow \/ disallow implicit asynchronous operations (default is disallowed)
* Run formatting script
* Remove H5VL_REQUEST_WAIT\*
* Warning cleanup
* Eliminate strdup()s on statically allocated strings
* Warning cleanup
* Split H5VLrestore_lib_state into H5VLstart_lib_state and H5VLrestore_lib_state, and rename H5VLreset_lib_state to H5VLfinish_lib_state.
* Duplicate strings when building err_info to return to applicatin
* Move connector author routines into seperate header files, all included in the new hdf5dev.h header
* Run bin/trace to add TRACE macros
* Allow H5ES_NONE as a valid, but no-op, parameter to all H5ES API routines that accept an event set ID
* Clean up formatting
* Remove H5Pset/get_vol_implicit_async
* Clean up warning
* Remove H5Pget_vol_async and replace with more generic H5Pget_vol_cap_flags
* Clean up warnings
* Add H5ESfree_err_info convenience routine
* Fix typo
* Correct matching for cached VOL plugins
* Add developer header file
* Update for C99 compatibility
* Add missing trace macro
* Stop clang-format from messing with the trace macros. Don't set up VOL wrappers for 'infrastructure' objects like requests and blobs
* Fix warning about formatting a directory
* Clean up formatting for H5E_BEGIN_TRY / H5E_END_TRY
* Reduce scope of H5ES__close
* Enable CMake checks for various types on MacOS
* Clean up properly when H5CX_retrieve_state() fails. Also clean up many compiler warnings.
* Committing clang-format changes
* Merge from develop
* Fix mis-placed assert
* Remove commented-out code
* Re-add macro for unsetenv on Windows (I think it accidentally was merged out)
* Strengthen sanity check from error report to assertion
* Committing clang-format changes
* Add units to the comments for a few fields
* Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it.
* Committing clang-format changes
* Remove H5ESget_time_estimate
* Committing clang-format changes
* Create developer header for datatype routines and move type conversion register/unregister routines there.
* Simplify internal H5VL_setup_name_args and H5VL_setup_idx_args routines
* Add H5VLlink_optional_op, allowing dynamicly registered optional operations for the link VOL subclass, also added H5VL_loc_params argument to the link 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Add H5VLobject_optional_op, allowing dynamicly registered optional operations for the object VOL subclass, also added H5VL_loc_params argument to the object 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Committing clang-format changes
* Revert "Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it."
This reverts commit 5ac92014da2682bdba62d7a2524b8d90e38f6b19.
* Committing clang-format changes
* Convert attribute 'get' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Update tracing macros
* Convert attribute 'specific' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert dataset 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to attribute 'get' and 'specific' operation parameters.
* Convert datatype 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to H5O_refresh_metadata arguments.
* Reduce warnings
* Reduce warnings
* Track change to datatype 'get' callback
* Fix bug with file pointer getting invalidated when object closed
* Reformat source
* Convert file and group VOL classes 'get' and 'specific' operations to use
struct-of-tagged-union pattern for VOL callback arguments, instead of using
varargs. Also small cleanup to the attribute get name operation. Also moved
'mount' and 'unmount' operations to be group specific operations, instead of
file specific, to better align with their behavior (mounted files are on
groups, so a group is what is operated on).
* Remove remainder of merge conflict marking
* Convert link VOL class 'create' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Remove some unused local variables
* Convert link VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor 'get name by idx' routines to return actual length of name with a parameter instead of the return value, and move some callback context structs for the link interface from the private header file into the source code module, to reduce their visibility scope.
* Update tracing macros
* Convert link VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor H5G_loc_exists, et al, to return 'exists' flag in a parameter and errors with the function return value, instead of overloading both into the return value. And, corrected logic error in test/links.c around non-existant objects in a file.
* Convert request VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert blob VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also removes the H5VL_BLOB_GETSIZE operation, as it's unused in the library and the blob ID size for a container is now returned with H5VL_FILE_GET_CONT_INFO.
* Add 'const' to several parameters that are only queried.
* Convert all VOL classes' 'optional' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Convert several 'get' routines to return the length of an array in a parameter instead of combining it into the return value. Move several routines to be in less public namespace. Correct direct_chunk test to verify that parameters aren't modified on error.
* Switch get/specific/optional VOL callback argument structures to be 'async-friendly'. Also other minor cleanups and bug-fixes.
* Add H5Pset_dataset_io_hyperslab_selection / H5S_PLIST feature, to allow skipping H5Dget_space + H5Sselect_hyperslab for async operation
* Add dynamic optional operations for request objects
* Update dynamic operation test for optional request operations
* Update a comment for an operation argument
* Run trace and format_source scripts
* Committing clang-format changes
* Committing clang-format changes
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-03 04:29:46 +08:00
|
|
|
FAIL_STACK_ERROR;
|
2020-09-30 22:27:10 +08:00
|
|
|
if (config & CONFIG_REOPEN_FILE)
|
|
|
|
if (H5Fclose(fid) < 0)
|
Combo set of async and other changes (#161)
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* Apply patch for dynamically registering optional VOL operations
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Remove H5Dwait & H5Fwait (moved to the async connector). Added H5atclose
routine. Updated 'optional op' operations.
* Fix missed merge marker, and reformatted line
* Update API tracing infrastructure for H5atclose callback
* Clean up some warnings
* Normalize against develop branch
* Correct level of indirection
* Add doxygen info for H5is_library_terminating and regression tests for it and H5atclose
* Relocate prototype (and doxygen info) for H5Aclose
* Align w/changes on develop
* Move group package initialization code to H5Gint.c, and update tracing macros
* Change non-static function declarations to be static
* Correct GCC diagnostic macro
* Ensure that H5TSpublic.h header gets installed (#129)
* Finish moving API routines that invoke VOL framework to main source files.
* Fix position of H5Fmount and H5Funmount
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Add wrappers for dynamically registered optional operations
* Fix typo
* Update doxygen comment for H5atclose with additional detail.
* Add H5VL\*_vararg versions of H5VL routines that use va_list parameters
* Implement and test H5S_BLOCK
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Finish another iteration on public H5ES routines, along with running the code reformatter
* Another round of reformatting
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
* Remove H5Dwait and H5Fwait calls, which were incorrectly brought back in
* Tiny cleanup of H5Lcreate_hard_async
* Run source formatter
* Allow for canceled operation in wait_cb
* Attempt to fix switch on string value
* Re-run source formatter
* Add H5S_BLOCK testfile to CMake clean target
* Add H5Pset_vol_async API routine and 'get_cap_flags' VOL introspection callback
* Clean up warnings
* Add H5P(set\|get)_vol_implicit_async API routines to allow \/ disallow implicit asynchronous operations (default is disallowed)
* Run formatting script
* Remove H5VL_REQUEST_WAIT\*
* Warning cleanup
* Eliminate strdup()s on statically allocated strings
* Warning cleanup
* Split H5VLrestore_lib_state into H5VLstart_lib_state and H5VLrestore_lib_state, and rename H5VLreset_lib_state to H5VLfinish_lib_state.
* Duplicate strings when building err_info to return to applicatin
* Move connector author routines into seperate header files, all included in the new hdf5dev.h header
* Run bin/trace to add TRACE macros
* Allow H5ES_NONE as a valid, but no-op, parameter to all H5ES API routines that accept an event set ID
* Clean up formatting
* Remove H5Pset/get_vol_implicit_async
* Clean up warning
* Remove H5Pget_vol_async and replace with more generic H5Pget_vol_cap_flags
* Clean up warnings
* Add H5ESfree_err_info convenience routine
* Fix typo
* Correct matching for cached VOL plugins
* Add developer header file
* Update for C99 compatibility
* Add missing trace macro
* Stop clang-format from messing with the trace macros. Don't set up VOL wrappers for 'infrastructure' objects like requests and blobs
* Fix warning about formatting a directory
* Clean up formatting for H5E_BEGIN_TRY / H5E_END_TRY
* Reduce scope of H5ES__close
* Enable CMake checks for various types on MacOS
* Clean up properly when H5CX_retrieve_state() fails. Also clean up many compiler warnings.
* Committing clang-format changes
* Merge from develop
* Fix mis-placed assert
* Remove commented-out code
* Re-add macro for unsetenv on Windows (I think it accidentally was merged out)
* Strengthen sanity check from error report to assertion
* Committing clang-format changes
* Add units to the comments for a few fields
* Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it.
* Committing clang-format changes
* Remove H5ESget_time_estimate
* Committing clang-format changes
* Create developer header for datatype routines and move type conversion register/unregister routines there.
* Simplify internal H5VL_setup_name_args and H5VL_setup_idx_args routines
* Add H5VLlink_optional_op, allowing dynamicly registered optional operations for the link VOL subclass, also added H5VL_loc_params argument to the link 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Add H5VLobject_optional_op, allowing dynamicly registered optional operations for the object VOL subclass, also added H5VL_loc_params argument to the object 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Committing clang-format changes
* Revert "Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it."
This reverts commit 5ac92014da2682bdba62d7a2524b8d90e38f6b19.
* Committing clang-format changes
* Convert attribute 'get' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Update tracing macros
* Convert attribute 'specific' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert dataset 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to attribute 'get' and 'specific' operation parameters.
* Convert datatype 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to H5O_refresh_metadata arguments.
* Reduce warnings
* Reduce warnings
* Track change to datatype 'get' callback
* Fix bug with file pointer getting invalidated when object closed
* Reformat source
* Convert file and group VOL classes 'get' and 'specific' operations to use
struct-of-tagged-union pattern for VOL callback arguments, instead of using
varargs. Also small cleanup to the attribute get name operation. Also moved
'mount' and 'unmount' operations to be group specific operations, instead of
file specific, to better align with their behavior (mounted files are on
groups, so a group is what is operated on).
* Remove remainder of merge conflict marking
* Convert link VOL class 'create' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Remove some unused local variables
* Convert link VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor 'get name by idx' routines to return actual length of name with a parameter instead of the return value, and move some callback context structs for the link interface from the private header file into the source code module, to reduce their visibility scope.
* Update tracing macros
* Convert link VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor H5G_loc_exists, et al, to return 'exists' flag in a parameter and errors with the function return value, instead of overloading both into the return value. And, corrected logic error in test/links.c around non-existant objects in a file.
* Convert request VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert blob VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also removes the H5VL_BLOB_GETSIZE operation, as it's unused in the library and the blob ID size for a container is now returned with H5VL_FILE_GET_CONT_INFO.
* Add 'const' to several parameters that are only queried.
* Convert all VOL classes' 'optional' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Convert several 'get' routines to return the length of an array in a parameter instead of combining it into the return value. Move several routines to be in less public namespace. Correct direct_chunk test to verify that parameters aren't modified on error.
* Switch get/specific/optional VOL callback argument structures to be 'async-friendly'. Also other minor cleanups and bug-fixes.
* Add H5Pset_dataset_io_hyperslab_selection / H5S_PLIST feature, to allow skipping H5Dget_space + H5Sselect_hyperslab for async operation
* Add dynamic optional operations for request objects
* Update dynamic operation test for optional request operations
* Update a comment for an operation argument
* Run trace and format_source scripts
* Committing clang-format changes
* Committing clang-format changes
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-03 04:29:46 +08:00
|
|
|
FAIL_STACK_ERROR;
|
2018-03-22 00:44:24 +08:00
|
|
|
|
|
|
|
/* Open the file and dataset with default properties */
|
2020-09-30 22:27:10 +08:00
|
|
|
if (config & CONFIG_REOPEN_FILE)
|
|
|
|
if ((fid = H5Fopen(FILE, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0)
|
Combo set of async and other changes (#161)
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* Apply patch for dynamically registering optional VOL operations
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Remove H5Dwait & H5Fwait (moved to the async connector). Added H5atclose
routine. Updated 'optional op' operations.
* Fix missed merge marker, and reformatted line
* Update API tracing infrastructure for H5atclose callback
* Clean up some warnings
* Normalize against develop branch
* Correct level of indirection
* Add doxygen info for H5is_library_terminating and regression tests for it and H5atclose
* Relocate prototype (and doxygen info) for H5Aclose
* Align w/changes on develop
* Move group package initialization code to H5Gint.c, and update tracing macros
* Change non-static function declarations to be static
* Correct GCC diagnostic macro
* Ensure that H5TSpublic.h header gets installed (#129)
* Finish moving API routines that invoke VOL framework to main source files.
* Fix position of H5Fmount and H5Funmount
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Add wrappers for dynamically registered optional operations
* Fix typo
* Update doxygen comment for H5atclose with additional detail.
* Add H5VL\*_vararg versions of H5VL routines that use va_list parameters
* Implement and test H5S_BLOCK
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Finish another iteration on public H5ES routines, along with running the code reformatter
* Another round of reformatting
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
* Remove H5Dwait and H5Fwait calls, which were incorrectly brought back in
* Tiny cleanup of H5Lcreate_hard_async
* Run source formatter
* Allow for canceled operation in wait_cb
* Attempt to fix switch on string value
* Re-run source formatter
* Add H5S_BLOCK testfile to CMake clean target
* Add H5Pset_vol_async API routine and 'get_cap_flags' VOL introspection callback
* Clean up warnings
* Add H5P(set\|get)_vol_implicit_async API routines to allow \/ disallow implicit asynchronous operations (default is disallowed)
* Run formatting script
* Remove H5VL_REQUEST_WAIT\*
* Warning cleanup
* Eliminate strdup()s on statically allocated strings
* Warning cleanup
* Split H5VLrestore_lib_state into H5VLstart_lib_state and H5VLrestore_lib_state, and rename H5VLreset_lib_state to H5VLfinish_lib_state.
* Duplicate strings when building err_info to return to applicatin
* Move connector author routines into seperate header files, all included in the new hdf5dev.h header
* Run bin/trace to add TRACE macros
* Allow H5ES_NONE as a valid, but no-op, parameter to all H5ES API routines that accept an event set ID
* Clean up formatting
* Remove H5Pset/get_vol_implicit_async
* Clean up warning
* Remove H5Pget_vol_async and replace with more generic H5Pget_vol_cap_flags
* Clean up warnings
* Add H5ESfree_err_info convenience routine
* Fix typo
* Correct matching for cached VOL plugins
* Add developer header file
* Update for C99 compatibility
* Add missing trace macro
* Stop clang-format from messing with the trace macros. Don't set up VOL wrappers for 'infrastructure' objects like requests and blobs
* Fix warning about formatting a directory
* Clean up formatting for H5E_BEGIN_TRY / H5E_END_TRY
* Reduce scope of H5ES__close
* Enable CMake checks for various types on MacOS
* Clean up properly when H5CX_retrieve_state() fails. Also clean up many compiler warnings.
* Committing clang-format changes
* Merge from develop
* Fix mis-placed assert
* Remove commented-out code
* Re-add macro for unsetenv on Windows (I think it accidentally was merged out)
* Strengthen sanity check from error report to assertion
* Committing clang-format changes
* Add units to the comments for a few fields
* Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it.
* Committing clang-format changes
* Remove H5ESget_time_estimate
* Committing clang-format changes
* Create developer header for datatype routines and move type conversion register/unregister routines there.
* Simplify internal H5VL_setup_name_args and H5VL_setup_idx_args routines
* Add H5VLlink_optional_op, allowing dynamicly registered optional operations for the link VOL subclass, also added H5VL_loc_params argument to the link 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Add H5VLobject_optional_op, allowing dynamicly registered optional operations for the object VOL subclass, also added H5VL_loc_params argument to the object 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Committing clang-format changes
* Revert "Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it."
This reverts commit 5ac92014da2682bdba62d7a2524b8d90e38f6b19.
* Committing clang-format changes
* Convert attribute 'get' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Update tracing macros
* Convert attribute 'specific' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert dataset 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to attribute 'get' and 'specific' operation parameters.
* Convert datatype 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to H5O_refresh_metadata arguments.
* Reduce warnings
* Reduce warnings
* Track change to datatype 'get' callback
* Fix bug with file pointer getting invalidated when object closed
* Reformat source
* Convert file and group VOL classes 'get' and 'specific' operations to use
struct-of-tagged-union pattern for VOL callback arguments, instead of using
varargs. Also small cleanup to the attribute get name operation. Also moved
'mount' and 'unmount' operations to be group specific operations, instead of
file specific, to better align with their behavior (mounted files are on
groups, so a group is what is operated on).
* Remove remainder of merge conflict marking
* Convert link VOL class 'create' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Remove some unused local variables
* Convert link VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor 'get name by idx' routines to return actual length of name with a parameter instead of the return value, and move some callback context structs for the link interface from the private header file into the source code module, to reduce their visibility scope.
* Update tracing macros
* Convert link VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor H5G_loc_exists, et al, to return 'exists' flag in a parameter and errors with the function return value, instead of overloading both into the return value. And, corrected logic error in test/links.c around non-existant objects in a file.
* Convert request VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert blob VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also removes the H5VL_BLOB_GETSIZE operation, as it's unused in the library and the blob ID size for a container is now returned with H5VL_FILE_GET_CONT_INFO.
* Add 'const' to several parameters that are only queried.
* Convert all VOL classes' 'optional' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Convert several 'get' routines to return the length of an array in a parameter instead of combining it into the return value. Move several routines to be in less public namespace. Correct direct_chunk test to verify that parameters aren't modified on error.
* Switch get/specific/optional VOL callback argument structures to be 'async-friendly'. Also other minor cleanups and bug-fixes.
* Add H5Pset_dataset_io_hyperslab_selection / H5S_PLIST feature, to allow skipping H5Dget_space + H5Sselect_hyperslab for async operation
* Add dynamic optional operations for request objects
* Update dynamic operation test for optional request operations
* Update a comment for an operation argument
* Run trace and format_source scripts
* Committing clang-format changes
* Committing clang-format changes
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-03 04:29:46 +08:00
|
|
|
FAIL_STACK_ERROR;
|
2020-09-30 22:27:10 +08:00
|
|
|
if (config & CONFIG_REOPEN_DSET)
|
|
|
|
if ((did = H5Dopen2(fid, DATASET, H5P_DEFAULT)) < 0)
|
Combo set of async and other changes (#161)
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* Apply patch for dynamically registering optional VOL operations
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Remove H5Dwait & H5Fwait (moved to the async connector). Added H5atclose
routine. Updated 'optional op' operations.
* Fix missed merge marker, and reformatted line
* Update API tracing infrastructure for H5atclose callback
* Clean up some warnings
* Normalize against develop branch
* Correct level of indirection
* Add doxygen info for H5is_library_terminating and regression tests for it and H5atclose
* Relocate prototype (and doxygen info) for H5Aclose
* Align w/changes on develop
* Move group package initialization code to H5Gint.c, and update tracing macros
* Change non-static function declarations to be static
* Correct GCC diagnostic macro
* Ensure that H5TSpublic.h header gets installed (#129)
* Finish moving API routines that invoke VOL framework to main source files.
* Fix position of H5Fmount and H5Funmount
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Add wrappers for dynamically registered optional operations
* Fix typo
* Update doxygen comment for H5atclose with additional detail.
* Add H5VL\*_vararg versions of H5VL routines that use va_list parameters
* Implement and test H5S_BLOCK
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Finish another iteration on public H5ES routines, along with running the code reformatter
* Another round of reformatting
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
* Remove H5Dwait and H5Fwait calls, which were incorrectly brought back in
* Tiny cleanup of H5Lcreate_hard_async
* Run source formatter
* Allow for canceled operation in wait_cb
* Attempt to fix switch on string value
* Re-run source formatter
* Add H5S_BLOCK testfile to CMake clean target
* Add H5Pset_vol_async API routine and 'get_cap_flags' VOL introspection callback
* Clean up warnings
* Add H5P(set\|get)_vol_implicit_async API routines to allow \/ disallow implicit asynchronous operations (default is disallowed)
* Run formatting script
* Remove H5VL_REQUEST_WAIT\*
* Warning cleanup
* Eliminate strdup()s on statically allocated strings
* Warning cleanup
* Split H5VLrestore_lib_state into H5VLstart_lib_state and H5VLrestore_lib_state, and rename H5VLreset_lib_state to H5VLfinish_lib_state.
* Duplicate strings when building err_info to return to applicatin
* Move connector author routines into seperate header files, all included in the new hdf5dev.h header
* Run bin/trace to add TRACE macros
* Allow H5ES_NONE as a valid, but no-op, parameter to all H5ES API routines that accept an event set ID
* Clean up formatting
* Remove H5Pset/get_vol_implicit_async
* Clean up warning
* Remove H5Pget_vol_async and replace with more generic H5Pget_vol_cap_flags
* Clean up warnings
* Add H5ESfree_err_info convenience routine
* Fix typo
* Correct matching for cached VOL plugins
* Add developer header file
* Update for C99 compatibility
* Add missing trace macro
* Stop clang-format from messing with the trace macros. Don't set up VOL wrappers for 'infrastructure' objects like requests and blobs
* Fix warning about formatting a directory
* Clean up formatting for H5E_BEGIN_TRY / H5E_END_TRY
* Reduce scope of H5ES__close
* Enable CMake checks for various types on MacOS
* Clean up properly when H5CX_retrieve_state() fails. Also clean up many compiler warnings.
* Committing clang-format changes
* Merge from develop
* Fix mis-placed assert
* Remove commented-out code
* Re-add macro for unsetenv on Windows (I think it accidentally was merged out)
* Strengthen sanity check from error report to assertion
* Committing clang-format changes
* Add units to the comments for a few fields
* Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it.
* Committing clang-format changes
* Remove H5ESget_time_estimate
* Committing clang-format changes
* Create developer header for datatype routines and move type conversion register/unregister routines there.
* Simplify internal H5VL_setup_name_args and H5VL_setup_idx_args routines
* Add H5VLlink_optional_op, allowing dynamicly registered optional operations for the link VOL subclass, also added H5VL_loc_params argument to the link 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Add H5VLobject_optional_op, allowing dynamicly registered optional operations for the object VOL subclass, also added H5VL_loc_params argument to the object 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Committing clang-format changes
* Revert "Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it."
This reverts commit 5ac92014da2682bdba62d7a2524b8d90e38f6b19.
* Committing clang-format changes
* Convert attribute 'get' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Update tracing macros
* Convert attribute 'specific' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert dataset 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to attribute 'get' and 'specific' operation parameters.
* Convert datatype 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to H5O_refresh_metadata arguments.
* Reduce warnings
* Reduce warnings
* Track change to datatype 'get' callback
* Fix bug with file pointer getting invalidated when object closed
* Reformat source
* Convert file and group VOL classes 'get' and 'specific' operations to use
struct-of-tagged-union pattern for VOL callback arguments, instead of using
varargs. Also small cleanup to the attribute get name operation. Also moved
'mount' and 'unmount' operations to be group specific operations, instead of
file specific, to better align with their behavior (mounted files are on
groups, so a group is what is operated on).
* Remove remainder of merge conflict marking
* Convert link VOL class 'create' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Remove some unused local variables
* Convert link VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor 'get name by idx' routines to return actual length of name with a parameter instead of the return value, and move some callback context structs for the link interface from the private header file into the source code module, to reduce their visibility scope.
* Update tracing macros
* Convert link VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor H5G_loc_exists, et al, to return 'exists' flag in a parameter and errors with the function return value, instead of overloading both into the return value. And, corrected logic error in test/links.c around non-existant objects in a file.
* Convert request VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert blob VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also removes the H5VL_BLOB_GETSIZE operation, as it's unused in the library and the blob ID size for a container is now returned with H5VL_FILE_GET_CONT_INFO.
* Add 'const' to several parameters that are only queried.
* Convert all VOL classes' 'optional' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Convert several 'get' routines to return the length of an array in a parameter instead of combining it into the return value. Move several routines to be in less public namespace. Correct direct_chunk test to verify that parameters aren't modified on error.
* Switch get/specific/optional VOL callback argument structures to be 'async-friendly'. Also other minor cleanups and bug-fixes.
* Add H5Pset_dataset_io_hyperslab_selection / H5S_PLIST feature, to allow skipping H5Dget_space + H5Sselect_hyperslab for async operation
* Add dynamic optional operations for request objects
* Update dynamic operation test for optional request operations
* Update a comment for an operation argument
* Run trace and format_source scripts
* Committing clang-format changes
* Committing clang-format changes
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-03 04:29:46 +08:00
|
|
|
FAIL_STACK_ERROR;
|
2018-03-22 00:44:24 +08:00
|
|
|
|
|
|
|
/* Retrieve dataset creation property list */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((dcpl = H5Dget_create_plist(did)) < 0)
|
Combo set of async and other changes (#161)
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* Apply patch for dynamically registering optional VOL operations
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Remove H5Dwait & H5Fwait (moved to the async connector). Added H5atclose
routine. Updated 'optional op' operations.
* Fix missed merge marker, and reformatted line
* Update API tracing infrastructure for H5atclose callback
* Clean up some warnings
* Normalize against develop branch
* Correct level of indirection
* Add doxygen info for H5is_library_terminating and regression tests for it and H5atclose
* Relocate prototype (and doxygen info) for H5Aclose
* Align w/changes on develop
* Move group package initialization code to H5Gint.c, and update tracing macros
* Change non-static function declarations to be static
* Correct GCC diagnostic macro
* Ensure that H5TSpublic.h header gets installed (#129)
* Finish moving API routines that invoke VOL framework to main source files.
* Fix position of H5Fmount and H5Funmount
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Add wrappers for dynamically registered optional operations
* Fix typo
* Update doxygen comment for H5atclose with additional detail.
* Add H5VL\*_vararg versions of H5VL routines that use va_list parameters
* Implement and test H5S_BLOCK
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Finish another iteration on public H5ES routines, along with running the code reformatter
* Another round of reformatting
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
* Remove H5Dwait and H5Fwait calls, which were incorrectly brought back in
* Tiny cleanup of H5Lcreate_hard_async
* Run source formatter
* Allow for canceled operation in wait_cb
* Attempt to fix switch on string value
* Re-run source formatter
* Add H5S_BLOCK testfile to CMake clean target
* Add H5Pset_vol_async API routine and 'get_cap_flags' VOL introspection callback
* Clean up warnings
* Add H5P(set\|get)_vol_implicit_async API routines to allow \/ disallow implicit asynchronous operations (default is disallowed)
* Run formatting script
* Remove H5VL_REQUEST_WAIT\*
* Warning cleanup
* Eliminate strdup()s on statically allocated strings
* Warning cleanup
* Split H5VLrestore_lib_state into H5VLstart_lib_state and H5VLrestore_lib_state, and rename H5VLreset_lib_state to H5VLfinish_lib_state.
* Duplicate strings when building err_info to return to applicatin
* Move connector author routines into seperate header files, all included in the new hdf5dev.h header
* Run bin/trace to add TRACE macros
* Allow H5ES_NONE as a valid, but no-op, parameter to all H5ES API routines that accept an event set ID
* Clean up formatting
* Remove H5Pset/get_vol_implicit_async
* Clean up warning
* Remove H5Pget_vol_async and replace with more generic H5Pget_vol_cap_flags
* Clean up warnings
* Add H5ESfree_err_info convenience routine
* Fix typo
* Correct matching for cached VOL plugins
* Add developer header file
* Update for C99 compatibility
* Add missing trace macro
* Stop clang-format from messing with the trace macros. Don't set up VOL wrappers for 'infrastructure' objects like requests and blobs
* Fix warning about formatting a directory
* Clean up formatting for H5E_BEGIN_TRY / H5E_END_TRY
* Reduce scope of H5ES__close
* Enable CMake checks for various types on MacOS
* Clean up properly when H5CX_retrieve_state() fails. Also clean up many compiler warnings.
* Committing clang-format changes
* Merge from develop
* Fix mis-placed assert
* Remove commented-out code
* Re-add macro for unsetenv on Windows (I think it accidentally was merged out)
* Strengthen sanity check from error report to assertion
* Committing clang-format changes
* Add units to the comments for a few fields
* Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it.
* Committing clang-format changes
* Remove H5ESget_time_estimate
* Committing clang-format changes
* Create developer header for datatype routines and move type conversion register/unregister routines there.
* Simplify internal H5VL_setup_name_args and H5VL_setup_idx_args routines
* Add H5VLlink_optional_op, allowing dynamicly registered optional operations for the link VOL subclass, also added H5VL_loc_params argument to the link 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Add H5VLobject_optional_op, allowing dynamicly registered optional operations for the object VOL subclass, also added H5VL_loc_params argument to the object 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Committing clang-format changes
* Revert "Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it."
This reverts commit 5ac92014da2682bdba62d7a2524b8d90e38f6b19.
* Committing clang-format changes
* Convert attribute 'get' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Update tracing macros
* Convert attribute 'specific' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert dataset 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to attribute 'get' and 'specific' operation parameters.
* Convert datatype 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to H5O_refresh_metadata arguments.
* Reduce warnings
* Reduce warnings
* Track change to datatype 'get' callback
* Fix bug with file pointer getting invalidated when object closed
* Reformat source
* Convert file and group VOL classes 'get' and 'specific' operations to use
struct-of-tagged-union pattern for VOL callback arguments, instead of using
varargs. Also small cleanup to the attribute get name operation. Also moved
'mount' and 'unmount' operations to be group specific operations, instead of
file specific, to better align with their behavior (mounted files are on
groups, so a group is what is operated on).
* Remove remainder of merge conflict marking
* Convert link VOL class 'create' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Remove some unused local variables
* Convert link VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor 'get name by idx' routines to return actual length of name with a parameter instead of the return value, and move some callback context structs for the link interface from the private header file into the source code module, to reduce their visibility scope.
* Update tracing macros
* Convert link VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor H5G_loc_exists, et al, to return 'exists' flag in a parameter and errors with the function return value, instead of overloading both into the return value. And, corrected logic error in test/links.c around non-existant objects in a file.
* Convert request VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert blob VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also removes the H5VL_BLOB_GETSIZE operation, as it's unused in the library and the blob ID size for a container is now returned with H5VL_FILE_GET_CONT_INFO.
* Add 'const' to several parameters that are only queried.
* Convert all VOL classes' 'optional' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Convert several 'get' routines to return the length of an array in a parameter instead of combining it into the return value. Move several routines to be in less public namespace. Correct direct_chunk test to verify that parameters aren't modified on error.
* Switch get/specific/optional VOL callback argument structures to be 'async-friendly'. Also other minor cleanups and bug-fixes.
* Add H5Pset_dataset_io_hyperslab_selection / H5S_PLIST feature, to allow skipping H5Dget_space + H5Sselect_hyperslab for async operation
* Add dynamic optional operations for request objects
* Update dynamic operation test for optional request operations
* Update a comment for an operation argument
* Run trace and format_source scripts
* Committing clang-format changes
* Committing clang-format changes
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-03 04:29:46 +08:00
|
|
|
FAIL_STACK_ERROR;
|
2018-03-22 00:44:24 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if (config & CONFIG_DIRECT_READ) {
|
2019-03-07 06:57:42 +08:00
|
|
|
/* Read the data directly */
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Dread_chunk(did, H5P_DEFAULT, offset, &filters, rdata) < 0)
|
Combo set of async and other changes (#161)
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* Apply patch for dynamically registering optional VOL operations
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Remove H5Dwait & H5Fwait (moved to the async connector). Added H5atclose
routine. Updated 'optional op' operations.
* Fix missed merge marker, and reformatted line
* Update API tracing infrastructure for H5atclose callback
* Clean up some warnings
* Normalize against develop branch
* Correct level of indirection
* Add doxygen info for H5is_library_terminating and regression tests for it and H5atclose
* Relocate prototype (and doxygen info) for H5Aclose
* Align w/changes on develop
* Move group package initialization code to H5Gint.c, and update tracing macros
* Change non-static function declarations to be static
* Correct GCC diagnostic macro
* Ensure that H5TSpublic.h header gets installed (#129)
* Finish moving API routines that invoke VOL framework to main source files.
* Fix position of H5Fmount and H5Funmount
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Add wrappers for dynamically registered optional operations
* Fix typo
* Update doxygen comment for H5atclose with additional detail.
* Add H5VL\*_vararg versions of H5VL routines that use va_list parameters
* Implement and test H5S_BLOCK
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Finish another iteration on public H5ES routines, along with running the code reformatter
* Another round of reformatting
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
* Remove H5Dwait and H5Fwait calls, which were incorrectly brought back in
* Tiny cleanup of H5Lcreate_hard_async
* Run source formatter
* Allow for canceled operation in wait_cb
* Attempt to fix switch on string value
* Re-run source formatter
* Add H5S_BLOCK testfile to CMake clean target
* Add H5Pset_vol_async API routine and 'get_cap_flags' VOL introspection callback
* Clean up warnings
* Add H5P(set\|get)_vol_implicit_async API routines to allow \/ disallow implicit asynchronous operations (default is disallowed)
* Run formatting script
* Remove H5VL_REQUEST_WAIT\*
* Warning cleanup
* Eliminate strdup()s on statically allocated strings
* Warning cleanup
* Split H5VLrestore_lib_state into H5VLstart_lib_state and H5VLrestore_lib_state, and rename H5VLreset_lib_state to H5VLfinish_lib_state.
* Duplicate strings when building err_info to return to applicatin
* Move connector author routines into seperate header files, all included in the new hdf5dev.h header
* Run bin/trace to add TRACE macros
* Allow H5ES_NONE as a valid, but no-op, parameter to all H5ES API routines that accept an event set ID
* Clean up formatting
* Remove H5Pset/get_vol_implicit_async
* Clean up warning
* Remove H5Pget_vol_async and replace with more generic H5Pget_vol_cap_flags
* Clean up warnings
* Add H5ESfree_err_info convenience routine
* Fix typo
* Correct matching for cached VOL plugins
* Add developer header file
* Update for C99 compatibility
* Add missing trace macro
* Stop clang-format from messing with the trace macros. Don't set up VOL wrappers for 'infrastructure' objects like requests and blobs
* Fix warning about formatting a directory
* Clean up formatting for H5E_BEGIN_TRY / H5E_END_TRY
* Reduce scope of H5ES__close
* Enable CMake checks for various types on MacOS
* Clean up properly when H5CX_retrieve_state() fails. Also clean up many compiler warnings.
* Committing clang-format changes
* Merge from develop
* Fix mis-placed assert
* Remove commented-out code
* Re-add macro for unsetenv on Windows (I think it accidentally was merged out)
* Strengthen sanity check from error report to assertion
* Committing clang-format changes
* Add units to the comments for a few fields
* Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it.
* Committing clang-format changes
* Remove H5ESget_time_estimate
* Committing clang-format changes
* Create developer header for datatype routines and move type conversion register/unregister routines there.
* Simplify internal H5VL_setup_name_args and H5VL_setup_idx_args routines
* Add H5VLlink_optional_op, allowing dynamicly registered optional operations for the link VOL subclass, also added H5VL_loc_params argument to the link 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Add H5VLobject_optional_op, allowing dynamicly registered optional operations for the object VOL subclass, also added H5VL_loc_params argument to the object 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Committing clang-format changes
* Revert "Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it."
This reverts commit 5ac92014da2682bdba62d7a2524b8d90e38f6b19.
* Committing clang-format changes
* Convert attribute 'get' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Update tracing macros
* Convert attribute 'specific' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert dataset 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to attribute 'get' and 'specific' operation parameters.
* Convert datatype 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to H5O_refresh_metadata arguments.
* Reduce warnings
* Reduce warnings
* Track change to datatype 'get' callback
* Fix bug with file pointer getting invalidated when object closed
* Reformat source
* Convert file and group VOL classes 'get' and 'specific' operations to use
struct-of-tagged-union pattern for VOL callback arguments, instead of using
varargs. Also small cleanup to the attribute get name operation. Also moved
'mount' and 'unmount' operations to be group specific operations, instead of
file specific, to better align with their behavior (mounted files are on
groups, so a group is what is operated on).
* Remove remainder of merge conflict marking
* Convert link VOL class 'create' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Remove some unused local variables
* Convert link VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor 'get name by idx' routines to return actual length of name with a parameter instead of the return value, and move some callback context structs for the link interface from the private header file into the source code module, to reduce their visibility scope.
* Update tracing macros
* Convert link VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor H5G_loc_exists, et al, to return 'exists' flag in a parameter and errors with the function return value, instead of overloading both into the return value. And, corrected logic error in test/links.c around non-existant objects in a file.
* Convert request VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert blob VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also removes the H5VL_BLOB_GETSIZE operation, as it's unused in the library and the blob ID size for a container is now returned with H5VL_FILE_GET_CONT_INFO.
* Add 'const' to several parameters that are only queried.
* Convert all VOL classes' 'optional' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Convert several 'get' routines to return the length of an array in a parameter instead of combining it into the return value. Move several routines to be in less public namespace. Correct direct_chunk test to verify that parameters aren't modified on error.
* Switch get/specific/optional VOL callback argument structures to be 'async-friendly'. Also other minor cleanups and bug-fixes.
* Add H5Pset_dataset_io_hyperslab_selection / H5S_PLIST feature, to allow skipping H5Dget_space + H5Sselect_hyperslab for async operation
* Add dynamic optional operations for request objects
* Update dynamic operation test for optional request operations
* Update a comment for an operation argument
* Run trace and format_source scripts
* Committing clang-format changes
* Committing clang-format changes
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-03 04:29:46 +08:00
|
|
|
FAIL_STACK_ERROR;
|
2019-03-07 06:57:42 +08:00
|
|
|
|
|
|
|
/* Verify returned filter mask */
|
2020-09-30 22:27:10 +08:00
|
|
|
if (filters != 0)
|
2022-05-04 23:49:01 +08:00
|
|
|
TEST_ERROR;
|
2019-03-07 06:57:42 +08:00
|
|
|
} /* end if */
|
|
|
|
else
|
|
|
|
/* Read the data */
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, rdata) < 0)
|
Combo set of async and other changes (#161)
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* Apply patch for dynamically registering optional VOL operations
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Remove H5Dwait & H5Fwait (moved to the async connector). Added H5atclose
routine. Updated 'optional op' operations.
* Fix missed merge marker, and reformatted line
* Update API tracing infrastructure for H5atclose callback
* Clean up some warnings
* Normalize against develop branch
* Correct level of indirection
* Add doxygen info for H5is_library_terminating and regression tests for it and H5atclose
* Relocate prototype (and doxygen info) for H5Aclose
* Align w/changes on develop
* Move group package initialization code to H5Gint.c, and update tracing macros
* Change non-static function declarations to be static
* Correct GCC diagnostic macro
* Ensure that H5TSpublic.h header gets installed (#129)
* Finish moving API routines that invoke VOL framework to main source files.
* Fix position of H5Fmount and H5Funmount
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Add wrappers for dynamically registered optional operations
* Fix typo
* Update doxygen comment for H5atclose with additional detail.
* Add H5VL\*_vararg versions of H5VL routines that use va_list parameters
* Implement and test H5S_BLOCK
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Finish another iteration on public H5ES routines, along with running the code reformatter
* Another round of reformatting
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
* Remove H5Dwait and H5Fwait calls, which were incorrectly brought back in
* Tiny cleanup of H5Lcreate_hard_async
* Run source formatter
* Allow for canceled operation in wait_cb
* Attempt to fix switch on string value
* Re-run source formatter
* Add H5S_BLOCK testfile to CMake clean target
* Add H5Pset_vol_async API routine and 'get_cap_flags' VOL introspection callback
* Clean up warnings
* Add H5P(set\|get)_vol_implicit_async API routines to allow \/ disallow implicit asynchronous operations (default is disallowed)
* Run formatting script
* Remove H5VL_REQUEST_WAIT\*
* Warning cleanup
* Eliminate strdup()s on statically allocated strings
* Warning cleanup
* Split H5VLrestore_lib_state into H5VLstart_lib_state and H5VLrestore_lib_state, and rename H5VLreset_lib_state to H5VLfinish_lib_state.
* Duplicate strings when building err_info to return to applicatin
* Move connector author routines into seperate header files, all included in the new hdf5dev.h header
* Run bin/trace to add TRACE macros
* Allow H5ES_NONE as a valid, but no-op, parameter to all H5ES API routines that accept an event set ID
* Clean up formatting
* Remove H5Pset/get_vol_implicit_async
* Clean up warning
* Remove H5Pget_vol_async and replace with more generic H5Pget_vol_cap_flags
* Clean up warnings
* Add H5ESfree_err_info convenience routine
* Fix typo
* Correct matching for cached VOL plugins
* Add developer header file
* Update for C99 compatibility
* Add missing trace macro
* Stop clang-format from messing with the trace macros. Don't set up VOL wrappers for 'infrastructure' objects like requests and blobs
* Fix warning about formatting a directory
* Clean up formatting for H5E_BEGIN_TRY / H5E_END_TRY
* Reduce scope of H5ES__close
* Enable CMake checks for various types on MacOS
* Clean up properly when H5CX_retrieve_state() fails. Also clean up many compiler warnings.
* Committing clang-format changes
* Merge from develop
* Fix mis-placed assert
* Remove commented-out code
* Re-add macro for unsetenv on Windows (I think it accidentally was merged out)
* Strengthen sanity check from error report to assertion
* Committing clang-format changes
* Add units to the comments for a few fields
* Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it.
* Committing clang-format changes
* Remove H5ESget_time_estimate
* Committing clang-format changes
* Create developer header for datatype routines and move type conversion register/unregister routines there.
* Simplify internal H5VL_setup_name_args and H5VL_setup_idx_args routines
* Add H5VLlink_optional_op, allowing dynamicly registered optional operations for the link VOL subclass, also added H5VL_loc_params argument to the link 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Add H5VLobject_optional_op, allowing dynamicly registered optional operations for the object VOL subclass, also added H5VL_loc_params argument to the object 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Committing clang-format changes
* Revert "Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it."
This reverts commit 5ac92014da2682bdba62d7a2524b8d90e38f6b19.
* Committing clang-format changes
* Convert attribute 'get' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Update tracing macros
* Convert attribute 'specific' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert dataset 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to attribute 'get' and 'specific' operation parameters.
* Convert datatype 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to H5O_refresh_metadata arguments.
* Reduce warnings
* Reduce warnings
* Track change to datatype 'get' callback
* Fix bug with file pointer getting invalidated when object closed
* Reformat source
* Convert file and group VOL classes 'get' and 'specific' operations to use
struct-of-tagged-union pattern for VOL callback arguments, instead of using
varargs. Also small cleanup to the attribute get name operation. Also moved
'mount' and 'unmount' operations to be group specific operations, instead of
file specific, to better align with their behavior (mounted files are on
groups, so a group is what is operated on).
* Remove remainder of merge conflict marking
* Convert link VOL class 'create' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Remove some unused local variables
* Convert link VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor 'get name by idx' routines to return actual length of name with a parameter instead of the return value, and move some callback context structs for the link interface from the private header file into the source code module, to reduce their visibility scope.
* Update tracing macros
* Convert link VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor H5G_loc_exists, et al, to return 'exists' flag in a parameter and errors with the function return value, instead of overloading both into the return value. And, corrected logic error in test/links.c around non-existant objects in a file.
* Convert request VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert blob VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also removes the H5VL_BLOB_GETSIZE operation, as it's unused in the library and the blob ID size for a container is now returned with H5VL_FILE_GET_CONT_INFO.
* Add 'const' to several parameters that are only queried.
* Convert all VOL classes' 'optional' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Convert several 'get' routines to return the length of an array in a parameter instead of combining it into the return value. Move several routines to be in less public namespace. Correct direct_chunk test to verify that parameters aren't modified on error.
* Switch get/specific/optional VOL callback argument structures to be 'async-friendly'. Also other minor cleanups and bug-fixes.
* Add H5Pset_dataset_io_hyperslab_selection / H5S_PLIST feature, to allow skipping H5Dget_space + H5Sselect_hyperslab for async operation
* Add dynamic optional operations for request objects
* Update dynamic operation test for optional request operations
* Update a comment for an operation argument
* Run trace and format_source scripts
* Committing clang-format changes
* Committing clang-format changes
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-03 04:29:46 +08:00
|
|
|
FAIL_STACK_ERROR;
|
2018-03-22 00:44:24 +08:00
|
|
|
|
|
|
|
/* Verify that the data read was correct. */
|
Combo set of async and other changes (#161)
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* Apply patch for dynamically registering optional VOL operations
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Remove H5Dwait & H5Fwait (moved to the async connector). Added H5atclose
routine. Updated 'optional op' operations.
* Fix missed merge marker, and reformatted line
* Update API tracing infrastructure for H5atclose callback
* Clean up some warnings
* Normalize against develop branch
* Correct level of indirection
* Add doxygen info for H5is_library_terminating and regression tests for it and H5atclose
* Relocate prototype (and doxygen info) for H5Aclose
* Align w/changes on develop
* Move group package initialization code to H5Gint.c, and update tracing macros
* Change non-static function declarations to be static
* Correct GCC diagnostic macro
* Ensure that H5TSpublic.h header gets installed (#129)
* Finish moving API routines that invoke VOL framework to main source files.
* Fix position of H5Fmount and H5Funmount
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Add wrappers for dynamically registered optional operations
* Fix typo
* Update doxygen comment for H5atclose with additional detail.
* Add H5VL\*_vararg versions of H5VL routines that use va_list parameters
* Implement and test H5S_BLOCK
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Finish another iteration on public H5ES routines, along with running the code reformatter
* Another round of reformatting
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
* Remove H5Dwait and H5Fwait calls, which were incorrectly brought back in
* Tiny cleanup of H5Lcreate_hard_async
* Run source formatter
* Allow for canceled operation in wait_cb
* Attempt to fix switch on string value
* Re-run source formatter
* Add H5S_BLOCK testfile to CMake clean target
* Add H5Pset_vol_async API routine and 'get_cap_flags' VOL introspection callback
* Clean up warnings
* Add H5P(set\|get)_vol_implicit_async API routines to allow \/ disallow implicit asynchronous operations (default is disallowed)
* Run formatting script
* Remove H5VL_REQUEST_WAIT\*
* Warning cleanup
* Eliminate strdup()s on statically allocated strings
* Warning cleanup
* Split H5VLrestore_lib_state into H5VLstart_lib_state and H5VLrestore_lib_state, and rename H5VLreset_lib_state to H5VLfinish_lib_state.
* Duplicate strings when building err_info to return to applicatin
* Move connector author routines into seperate header files, all included in the new hdf5dev.h header
* Run bin/trace to add TRACE macros
* Allow H5ES_NONE as a valid, but no-op, parameter to all H5ES API routines that accept an event set ID
* Clean up formatting
* Remove H5Pset/get_vol_implicit_async
* Clean up warning
* Remove H5Pget_vol_async and replace with more generic H5Pget_vol_cap_flags
* Clean up warnings
* Add H5ESfree_err_info convenience routine
* Fix typo
* Correct matching for cached VOL plugins
* Add developer header file
* Update for C99 compatibility
* Add missing trace macro
* Stop clang-format from messing with the trace macros. Don't set up VOL wrappers for 'infrastructure' objects like requests and blobs
* Fix warning about formatting a directory
* Clean up formatting for H5E_BEGIN_TRY / H5E_END_TRY
* Reduce scope of H5ES__close
* Enable CMake checks for various types on MacOS
* Clean up properly when H5CX_retrieve_state() fails. Also clean up many compiler warnings.
* Committing clang-format changes
* Merge from develop
* Fix mis-placed assert
* Remove commented-out code
* Re-add macro for unsetenv on Windows (I think it accidentally was merged out)
* Strengthen sanity check from error report to assertion
* Committing clang-format changes
* Add units to the comments for a few fields
* Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it.
* Committing clang-format changes
* Remove H5ESget_time_estimate
* Committing clang-format changes
* Create developer header for datatype routines and move type conversion register/unregister routines there.
* Simplify internal H5VL_setup_name_args and H5VL_setup_idx_args routines
* Add H5VLlink_optional_op, allowing dynamicly registered optional operations for the link VOL subclass, also added H5VL_loc_params argument to the link 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Add H5VLobject_optional_op, allowing dynamicly registered optional operations for the object VOL subclass, also added H5VL_loc_params argument to the object 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Committing clang-format changes
* Revert "Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it."
This reverts commit 5ac92014da2682bdba62d7a2524b8d90e38f6b19.
* Committing clang-format changes
* Convert attribute 'get' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Update tracing macros
* Convert attribute 'specific' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert dataset 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to attribute 'get' and 'specific' operation parameters.
* Convert datatype 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to H5O_refresh_metadata arguments.
* Reduce warnings
* Reduce warnings
* Track change to datatype 'get' callback
* Fix bug with file pointer getting invalidated when object closed
* Reformat source
* Convert file and group VOL classes 'get' and 'specific' operations to use
struct-of-tagged-union pattern for VOL callback arguments, instead of using
varargs. Also small cleanup to the attribute get name operation. Also moved
'mount' and 'unmount' operations to be group specific operations, instead of
file specific, to better align with their behavior (mounted files are on
groups, so a group is what is operated on).
* Remove remainder of merge conflict marking
* Convert link VOL class 'create' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Remove some unused local variables
* Convert link VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor 'get name by idx' routines to return actual length of name with a parameter instead of the return value, and move some callback context structs for the link interface from the private header file into the source code module, to reduce their visibility scope.
* Update tracing macros
* Convert link VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor H5G_loc_exists, et al, to return 'exists' flag in a parameter and errors with the function return value, instead of overloading both into the return value. And, corrected logic error in test/links.c around non-existant objects in a file.
* Convert request VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert blob VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also removes the H5VL_BLOB_GETSIZE operation, as it's unused in the library and the blob ID size for a container is now returned with H5VL_FILE_GET_CONT_INFO.
* Add 'const' to several parameters that are only queried.
* Convert all VOL classes' 'optional' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Convert several 'get' routines to return the length of an array in a parameter instead of combining it into the return value. Move several routines to be in less public namespace. Correct direct_chunk test to verify that parameters aren't modified on error.
* Switch get/specific/optional VOL callback argument structures to be 'async-friendly'. Also other minor cleanups and bug-fixes.
* Add H5Pset_dataset_io_hyperslab_selection / H5S_PLIST feature, to allow skipping H5Dget_space + H5Sselect_hyperslab for async operation
* Add dynamic optional operations for request objects
* Update dynamic operation test for optional request operations
* Update a comment for an operation argument
* Run trace and format_source scripts
* Committing clang-format changes
* Committing clang-format changes
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-03 04:29:46 +08:00
|
|
|
for (i = 0; i < DIM0; i++)
|
|
|
|
for (j = 0; j < DIM1; j++)
|
2020-09-30 22:27:10 +08:00
|
|
|
if (rdata[i][j] != wdata[i][j])
|
2022-05-04 23:49:01 +08:00
|
|
|
TEST_ERROR;
|
2018-03-22 00:44:24 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Close and release resources
|
|
|
|
*/
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Pclose(dcpl) < 0)
|
Combo set of async and other changes (#161)
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* Apply patch for dynamically registering optional VOL operations
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Remove H5Dwait & H5Fwait (moved to the async connector). Added H5atclose
routine. Updated 'optional op' operations.
* Fix missed merge marker, and reformatted line
* Update API tracing infrastructure for H5atclose callback
* Clean up some warnings
* Normalize against develop branch
* Correct level of indirection
* Add doxygen info for H5is_library_terminating and regression tests for it and H5atclose
* Relocate prototype (and doxygen info) for H5Aclose
* Align w/changes on develop
* Move group package initialization code to H5Gint.c, and update tracing macros
* Change non-static function declarations to be static
* Correct GCC diagnostic macro
* Ensure that H5TSpublic.h header gets installed (#129)
* Finish moving API routines that invoke VOL framework to main source files.
* Fix position of H5Fmount and H5Funmount
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Add wrappers for dynamically registered optional operations
* Fix typo
* Update doxygen comment for H5atclose with additional detail.
* Add H5VL\*_vararg versions of H5VL routines that use va_list parameters
* Implement and test H5S_BLOCK
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Finish another iteration on public H5ES routines, along with running the code reformatter
* Another round of reformatting
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
* Remove H5Dwait and H5Fwait calls, which were incorrectly brought back in
* Tiny cleanup of H5Lcreate_hard_async
* Run source formatter
* Allow for canceled operation in wait_cb
* Attempt to fix switch on string value
* Re-run source formatter
* Add H5S_BLOCK testfile to CMake clean target
* Add H5Pset_vol_async API routine and 'get_cap_flags' VOL introspection callback
* Clean up warnings
* Add H5P(set\|get)_vol_implicit_async API routines to allow \/ disallow implicit asynchronous operations (default is disallowed)
* Run formatting script
* Remove H5VL_REQUEST_WAIT\*
* Warning cleanup
* Eliminate strdup()s on statically allocated strings
* Warning cleanup
* Split H5VLrestore_lib_state into H5VLstart_lib_state and H5VLrestore_lib_state, and rename H5VLreset_lib_state to H5VLfinish_lib_state.
* Duplicate strings when building err_info to return to applicatin
* Move connector author routines into seperate header files, all included in the new hdf5dev.h header
* Run bin/trace to add TRACE macros
* Allow H5ES_NONE as a valid, but no-op, parameter to all H5ES API routines that accept an event set ID
* Clean up formatting
* Remove H5Pset/get_vol_implicit_async
* Clean up warning
* Remove H5Pget_vol_async and replace with more generic H5Pget_vol_cap_flags
* Clean up warnings
* Add H5ESfree_err_info convenience routine
* Fix typo
* Correct matching for cached VOL plugins
* Add developer header file
* Update for C99 compatibility
* Add missing trace macro
* Stop clang-format from messing with the trace macros. Don't set up VOL wrappers for 'infrastructure' objects like requests and blobs
* Fix warning about formatting a directory
* Clean up formatting for H5E_BEGIN_TRY / H5E_END_TRY
* Reduce scope of H5ES__close
* Enable CMake checks for various types on MacOS
* Clean up properly when H5CX_retrieve_state() fails. Also clean up many compiler warnings.
* Committing clang-format changes
* Merge from develop
* Fix mis-placed assert
* Remove commented-out code
* Re-add macro for unsetenv on Windows (I think it accidentally was merged out)
* Strengthen sanity check from error report to assertion
* Committing clang-format changes
* Add units to the comments for a few fields
* Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it.
* Committing clang-format changes
* Remove H5ESget_time_estimate
* Committing clang-format changes
* Create developer header for datatype routines and move type conversion register/unregister routines there.
* Simplify internal H5VL_setup_name_args and H5VL_setup_idx_args routines
* Add H5VLlink_optional_op, allowing dynamicly registered optional operations for the link VOL subclass, also added H5VL_loc_params argument to the link 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Add H5VLobject_optional_op, allowing dynamicly registered optional operations for the object VOL subclass, also added H5VL_loc_params argument to the object 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Committing clang-format changes
* Revert "Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it."
This reverts commit 5ac92014da2682bdba62d7a2524b8d90e38f6b19.
* Committing clang-format changes
* Convert attribute 'get' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Update tracing macros
* Convert attribute 'specific' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert dataset 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to attribute 'get' and 'specific' operation parameters.
* Convert datatype 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to H5O_refresh_metadata arguments.
* Reduce warnings
* Reduce warnings
* Track change to datatype 'get' callback
* Fix bug with file pointer getting invalidated when object closed
* Reformat source
* Convert file and group VOL classes 'get' and 'specific' operations to use
struct-of-tagged-union pattern for VOL callback arguments, instead of using
varargs. Also small cleanup to the attribute get name operation. Also moved
'mount' and 'unmount' operations to be group specific operations, instead of
file specific, to better align with their behavior (mounted files are on
groups, so a group is what is operated on).
* Remove remainder of merge conflict marking
* Convert link VOL class 'create' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Remove some unused local variables
* Convert link VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor 'get name by idx' routines to return actual length of name with a parameter instead of the return value, and move some callback context structs for the link interface from the private header file into the source code module, to reduce their visibility scope.
* Update tracing macros
* Convert link VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor H5G_loc_exists, et al, to return 'exists' flag in a parameter and errors with the function return value, instead of overloading both into the return value. And, corrected logic error in test/links.c around non-existant objects in a file.
* Convert request VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert blob VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also removes the H5VL_BLOB_GETSIZE operation, as it's unused in the library and the blob ID size for a container is now returned with H5VL_FILE_GET_CONT_INFO.
* Add 'const' to several parameters that are only queried.
* Convert all VOL classes' 'optional' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Convert several 'get' routines to return the length of an array in a parameter instead of combining it into the return value. Move several routines to be in less public namespace. Correct direct_chunk test to verify that parameters aren't modified on error.
* Switch get/specific/optional VOL callback argument structures to be 'async-friendly'. Also other minor cleanups and bug-fixes.
* Add H5Pset_dataset_io_hyperslab_selection / H5S_PLIST feature, to allow skipping H5Dget_space + H5Sselect_hyperslab for async operation
* Add dynamic optional operations for request objects
* Update dynamic operation test for optional request operations
* Update a comment for an operation argument
* Run trace and format_source scripts
* Committing clang-format changes
* Committing clang-format changes
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-03 04:29:46 +08:00
|
|
|
FAIL_STACK_ERROR;
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Dclose(did) < 0)
|
Combo set of async and other changes (#161)
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* Apply patch for dynamically registering optional VOL operations
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Remove H5Dwait & H5Fwait (moved to the async connector). Added H5atclose
routine. Updated 'optional op' operations.
* Fix missed merge marker, and reformatted line
* Update API tracing infrastructure for H5atclose callback
* Clean up some warnings
* Normalize against develop branch
* Correct level of indirection
* Add doxygen info for H5is_library_terminating and regression tests for it and H5atclose
* Relocate prototype (and doxygen info) for H5Aclose
* Align w/changes on develop
* Move group package initialization code to H5Gint.c, and update tracing macros
* Change non-static function declarations to be static
* Correct GCC diagnostic macro
* Ensure that H5TSpublic.h header gets installed (#129)
* Finish moving API routines that invoke VOL framework to main source files.
* Fix position of H5Fmount and H5Funmount
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Add wrappers for dynamically registered optional operations
* Fix typo
* Update doxygen comment for H5atclose with additional detail.
* Add H5VL\*_vararg versions of H5VL routines that use va_list parameters
* Implement and test H5S_BLOCK
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Finish another iteration on public H5ES routines, along with running the code reformatter
* Another round of reformatting
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
* Remove H5Dwait and H5Fwait calls, which were incorrectly brought back in
* Tiny cleanup of H5Lcreate_hard_async
* Run source formatter
* Allow for canceled operation in wait_cb
* Attempt to fix switch on string value
* Re-run source formatter
* Add H5S_BLOCK testfile to CMake clean target
* Add H5Pset_vol_async API routine and 'get_cap_flags' VOL introspection callback
* Clean up warnings
* Add H5P(set\|get)_vol_implicit_async API routines to allow \/ disallow implicit asynchronous operations (default is disallowed)
* Run formatting script
* Remove H5VL_REQUEST_WAIT\*
* Warning cleanup
* Eliminate strdup()s on statically allocated strings
* Warning cleanup
* Split H5VLrestore_lib_state into H5VLstart_lib_state and H5VLrestore_lib_state, and rename H5VLreset_lib_state to H5VLfinish_lib_state.
* Duplicate strings when building err_info to return to applicatin
* Move connector author routines into seperate header files, all included in the new hdf5dev.h header
* Run bin/trace to add TRACE macros
* Allow H5ES_NONE as a valid, but no-op, parameter to all H5ES API routines that accept an event set ID
* Clean up formatting
* Remove H5Pset/get_vol_implicit_async
* Clean up warning
* Remove H5Pget_vol_async and replace with more generic H5Pget_vol_cap_flags
* Clean up warnings
* Add H5ESfree_err_info convenience routine
* Fix typo
* Correct matching for cached VOL plugins
* Add developer header file
* Update for C99 compatibility
* Add missing trace macro
* Stop clang-format from messing with the trace macros. Don't set up VOL wrappers for 'infrastructure' objects like requests and blobs
* Fix warning about formatting a directory
* Clean up formatting for H5E_BEGIN_TRY / H5E_END_TRY
* Reduce scope of H5ES__close
* Enable CMake checks for various types on MacOS
* Clean up properly when H5CX_retrieve_state() fails. Also clean up many compiler warnings.
* Committing clang-format changes
* Merge from develop
* Fix mis-placed assert
* Remove commented-out code
* Re-add macro for unsetenv on Windows (I think it accidentally was merged out)
* Strengthen sanity check from error report to assertion
* Committing clang-format changes
* Add units to the comments for a few fields
* Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it.
* Committing clang-format changes
* Remove H5ESget_time_estimate
* Committing clang-format changes
* Create developer header for datatype routines and move type conversion register/unregister routines there.
* Simplify internal H5VL_setup_name_args and H5VL_setup_idx_args routines
* Add H5VLlink_optional_op, allowing dynamicly registered optional operations for the link VOL subclass, also added H5VL_loc_params argument to the link 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Add H5VLobject_optional_op, allowing dynamicly registered optional operations for the object VOL subclass, also added H5VL_loc_params argument to the object 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Committing clang-format changes
* Revert "Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it."
This reverts commit 5ac92014da2682bdba62d7a2524b8d90e38f6b19.
* Committing clang-format changes
* Convert attribute 'get' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Update tracing macros
* Convert attribute 'specific' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert dataset 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to attribute 'get' and 'specific' operation parameters.
* Convert datatype 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to H5O_refresh_metadata arguments.
* Reduce warnings
* Reduce warnings
* Track change to datatype 'get' callback
* Fix bug with file pointer getting invalidated when object closed
* Reformat source
* Convert file and group VOL classes 'get' and 'specific' operations to use
struct-of-tagged-union pattern for VOL callback arguments, instead of using
varargs. Also small cleanup to the attribute get name operation. Also moved
'mount' and 'unmount' operations to be group specific operations, instead of
file specific, to better align with their behavior (mounted files are on
groups, so a group is what is operated on).
* Remove remainder of merge conflict marking
* Convert link VOL class 'create' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Remove some unused local variables
* Convert link VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor 'get name by idx' routines to return actual length of name with a parameter instead of the return value, and move some callback context structs for the link interface from the private header file into the source code module, to reduce their visibility scope.
* Update tracing macros
* Convert link VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor H5G_loc_exists, et al, to return 'exists' flag in a parameter and errors with the function return value, instead of overloading both into the return value. And, corrected logic error in test/links.c around non-existant objects in a file.
* Convert request VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert blob VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also removes the H5VL_BLOB_GETSIZE operation, as it's unused in the library and the blob ID size for a container is now returned with H5VL_FILE_GET_CONT_INFO.
* Add 'const' to several parameters that are only queried.
* Convert all VOL classes' 'optional' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Convert several 'get' routines to return the length of an array in a parameter instead of combining it into the return value. Move several routines to be in less public namespace. Correct direct_chunk test to verify that parameters aren't modified on error.
* Switch get/specific/optional VOL callback argument structures to be 'async-friendly'. Also other minor cleanups and bug-fixes.
* Add H5Pset_dataset_io_hyperslab_selection / H5S_PLIST feature, to allow skipping H5Dget_space + H5Sselect_hyperslab for async operation
* Add dynamic optional operations for request objects
* Update dynamic operation test for optional request operations
* Update a comment for an operation argument
* Run trace and format_source scripts
* Committing clang-format changes
* Committing clang-format changes
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-03 04:29:46 +08:00
|
|
|
FAIL_STACK_ERROR;
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Fclose(fid) < 0)
|
Combo set of async and other changes (#161)
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* Apply patch for dynamically registering optional VOL operations
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Remove H5Dwait & H5Fwait (moved to the async connector). Added H5atclose
routine. Updated 'optional op' operations.
* Fix missed merge marker, and reformatted line
* Update API tracing infrastructure for H5atclose callback
* Clean up some warnings
* Normalize against develop branch
* Correct level of indirection
* Add doxygen info for H5is_library_terminating and regression tests for it and H5atclose
* Relocate prototype (and doxygen info) for H5Aclose
* Align w/changes on develop
* Move group package initialization code to H5Gint.c, and update tracing macros
* Change non-static function declarations to be static
* Correct GCC diagnostic macro
* Ensure that H5TSpublic.h header gets installed (#129)
* Finish moving API routines that invoke VOL framework to main source files.
* Fix position of H5Fmount and H5Funmount
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Add wrappers for dynamically registered optional operations
* Fix typo
* Update doxygen comment for H5atclose with additional detail.
* Add H5VL\*_vararg versions of H5VL routines that use va_list parameters
* Implement and test H5S_BLOCK
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Finish another iteration on public H5ES routines, along with running the code reformatter
* Another round of reformatting
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
* Remove H5Dwait and H5Fwait calls, which were incorrectly brought back in
* Tiny cleanup of H5Lcreate_hard_async
* Run source formatter
* Allow for canceled operation in wait_cb
* Attempt to fix switch on string value
* Re-run source formatter
* Add H5S_BLOCK testfile to CMake clean target
* Add H5Pset_vol_async API routine and 'get_cap_flags' VOL introspection callback
* Clean up warnings
* Add H5P(set\|get)_vol_implicit_async API routines to allow \/ disallow implicit asynchronous operations (default is disallowed)
* Run formatting script
* Remove H5VL_REQUEST_WAIT\*
* Warning cleanup
* Eliminate strdup()s on statically allocated strings
* Warning cleanup
* Split H5VLrestore_lib_state into H5VLstart_lib_state and H5VLrestore_lib_state, and rename H5VLreset_lib_state to H5VLfinish_lib_state.
* Duplicate strings when building err_info to return to applicatin
* Move connector author routines into seperate header files, all included in the new hdf5dev.h header
* Run bin/trace to add TRACE macros
* Allow H5ES_NONE as a valid, but no-op, parameter to all H5ES API routines that accept an event set ID
* Clean up formatting
* Remove H5Pset/get_vol_implicit_async
* Clean up warning
* Remove H5Pget_vol_async and replace with more generic H5Pget_vol_cap_flags
* Clean up warnings
* Add H5ESfree_err_info convenience routine
* Fix typo
* Correct matching for cached VOL plugins
* Add developer header file
* Update for C99 compatibility
* Add missing trace macro
* Stop clang-format from messing with the trace macros. Don't set up VOL wrappers for 'infrastructure' objects like requests and blobs
* Fix warning about formatting a directory
* Clean up formatting for H5E_BEGIN_TRY / H5E_END_TRY
* Reduce scope of H5ES__close
* Enable CMake checks for various types on MacOS
* Clean up properly when H5CX_retrieve_state() fails. Also clean up many compiler warnings.
* Committing clang-format changes
* Merge from develop
* Fix mis-placed assert
* Remove commented-out code
* Re-add macro for unsetenv on Windows (I think it accidentally was merged out)
* Strengthen sanity check from error report to assertion
* Committing clang-format changes
* Add units to the comments for a few fields
* Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it.
* Committing clang-format changes
* Remove H5ESget_time_estimate
* Committing clang-format changes
* Create developer header for datatype routines and move type conversion register/unregister routines there.
* Simplify internal H5VL_setup_name_args and H5VL_setup_idx_args routines
* Add H5VLlink_optional_op, allowing dynamicly registered optional operations for the link VOL subclass, also added H5VL_loc_params argument to the link 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Add H5VLobject_optional_op, allowing dynamicly registered optional operations for the object VOL subclass, also added H5VL_loc_params argument to the object 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Committing clang-format changes
* Revert "Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it."
This reverts commit 5ac92014da2682bdba62d7a2524b8d90e38f6b19.
* Committing clang-format changes
* Convert attribute 'get' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Update tracing macros
* Convert attribute 'specific' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert dataset 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to attribute 'get' and 'specific' operation parameters.
* Convert datatype 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to H5O_refresh_metadata arguments.
* Reduce warnings
* Reduce warnings
* Track change to datatype 'get' callback
* Fix bug with file pointer getting invalidated when object closed
* Reformat source
* Convert file and group VOL classes 'get' and 'specific' operations to use
struct-of-tagged-union pattern for VOL callback arguments, instead of using
varargs. Also small cleanup to the attribute get name operation. Also moved
'mount' and 'unmount' operations to be group specific operations, instead of
file specific, to better align with their behavior (mounted files are on
groups, so a group is what is operated on).
* Remove remainder of merge conflict marking
* Convert link VOL class 'create' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Remove some unused local variables
* Convert link VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor 'get name by idx' routines to return actual length of name with a parameter instead of the return value, and move some callback context structs for the link interface from the private header file into the source code module, to reduce their visibility scope.
* Update tracing macros
* Convert link VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor H5G_loc_exists, et al, to return 'exists' flag in a parameter and errors with the function return value, instead of overloading both into the return value. And, corrected logic error in test/links.c around non-existant objects in a file.
* Convert request VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert blob VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also removes the H5VL_BLOB_GETSIZE operation, as it's unused in the library and the blob ID size for a container is now returned with H5VL_FILE_GET_CONT_INFO.
* Add 'const' to several parameters that are only queried.
* Convert all VOL classes' 'optional' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Convert several 'get' routines to return the length of an array in a parameter instead of combining it into the return value. Move several routines to be in less public namespace. Correct direct_chunk test to verify that parameters aren't modified on error.
* Switch get/specific/optional VOL callback argument structures to be 'async-friendly'. Also other minor cleanups and bug-fixes.
* Add H5Pset_dataset_io_hyperslab_selection / H5S_PLIST feature, to allow skipping H5Dget_space + H5Sselect_hyperslab for async operation
* Add dynamic optional operations for request objects
* Update dynamic operation test for optional request operations
* Update a comment for an operation argument
* Run trace and format_source scripts
* Committing clang-format changes
* Committing clang-format changes
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-03 04:29:46 +08:00
|
|
|
FAIL_STACK_ERROR;
|
2018-03-22 00:44:24 +08:00
|
|
|
|
|
|
|
PASSED();
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
error:
|
2020-09-30 22:27:10 +08:00
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
2018-03-22 00:44:24 +08:00
|
|
|
H5Dclose(did);
|
|
|
|
H5Sclose(sid);
|
|
|
|
H5Pclose(dcpl);
|
|
|
|
H5Pclose(fapl);
|
|
|
|
H5Fclose(fid);
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
|
|
|
H5E_END_TRY;
|
2018-03-22 00:44:24 +08:00
|
|
|
|
|
|
|
H5_FAILED();
|
|
|
|
return 1;
|
|
|
|
} /* test_single_chunk_latest() */
|
|
|
|
|
2017-05-15 23:25:15 +08:00
|
|
|
/*-------------------------------------------------------------------------
|
2019-07-31 01:39:20 +08:00
|
|
|
* Function: Main function
|
2017-05-15 23:25:15 +08:00
|
|
|
*
|
2019-07-31 01:39:20 +08:00
|
|
|
* Purpose: Test direct chunk write function H5Dwrite_chunk and
|
2018-04-30 22:52:07 +08:00
|
|
|
* chunk direct read function H5Dread_chunk
|
2017-05-15 23:25:15 +08:00
|
|
|
*
|
2019-07-31 01:39:20 +08:00
|
|
|
* Return: Success: 0
|
|
|
|
* Failure: 1
|
2017-05-15 23:25:15 +08:00
|
|
|
*
|
2019-07-31 01:39:20 +08:00
|
|
|
* Programmer: Raymond Lu
|
2017-05-15 23:25:15 +08:00
|
|
|
* 30 November 2012
|
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
2020-09-30 22:27:10 +08:00
|
|
|
int
|
|
|
|
main(void)
|
2017-05-15 23:25:15 +08:00
|
|
|
{
|
2020-09-30 22:27:10 +08:00
|
|
|
hid_t file_id;
|
2019-03-07 06:57:42 +08:00
|
|
|
unsigned config;
|
2020-09-30 22:27:10 +08:00
|
|
|
int nerrors = 0;
|
2017-05-15 23:25:15 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Create a new file. If file exists its contents will be overwritten.
|
|
|
|
*/
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((file_id = H5Fcreate(FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT)) < 0)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
/* Test direct chunk write and direct chunk read */
|
2017-05-15 23:25:15 +08:00
|
|
|
#ifdef H5_HAVE_FILTER_DEFLATE
|
|
|
|
nerrors += test_direct_chunk_write(file_id);
|
|
|
|
#endif /* H5_HAVE_FILTER_DEFLATE */
|
2019-07-31 01:39:20 +08:00
|
|
|
nerrors += test_direct_chunk_overwrite_data(file_id);
|
2017-05-15 23:25:15 +08:00
|
|
|
nerrors += test_skip_compress_write1(file_id);
|
|
|
|
nerrors += test_skip_compress_write2(file_id);
|
|
|
|
nerrors += test_data_conv(file_id);
|
|
|
|
nerrors += test_invalid_parameters(file_id);
|
|
|
|
|
|
|
|
/* Test direct chunk read */
|
|
|
|
#ifdef H5_HAVE_FILTER_DEFLATE
|
|
|
|
nerrors += test_direct_chunk_read_no_cache(file_id);
|
|
|
|
nerrors += test_direct_chunk_read_cache(file_id, TRUE);
|
|
|
|
nerrors += test_direct_chunk_read_cache(file_id, FALSE);
|
|
|
|
#endif /* H5_HAVE_FILTER_DEFLATE */
|
|
|
|
nerrors += test_read_unfiltered_dset(file_id);
|
|
|
|
nerrors += test_read_unallocated_chunk(file_id);
|
|
|
|
|
2019-03-07 06:57:42 +08:00
|
|
|
/* Loop over test configurations */
|
2020-09-30 22:27:10 +08:00
|
|
|
for (config = 0; config < CONFIG_END; config++) {
|
2019-03-07 06:57:42 +08:00
|
|
|
hbool_t need_comma = FALSE;
|
|
|
|
|
|
|
|
/* Check for invalid combinations */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((config & CONFIG_REOPEN_FILE) && !(config & CONFIG_REOPEN_DSET))
|
2019-03-07 06:57:42 +08:00
|
|
|
continue;
|
|
|
|
|
|
|
|
/* Print configuration */
|
2019-08-16 05:46:00 +08:00
|
|
|
HDprintf("Configuration: ");
|
2020-09-30 22:27:10 +08:00
|
|
|
if (config == 0)
|
2019-08-16 05:46:00 +08:00
|
|
|
HDprintf("<empty>");
|
2020-09-30 22:27:10 +08:00
|
|
|
if (config & CONFIG_LATEST) {
|
|
|
|
if (need_comma)
|
2019-08-16 05:46:00 +08:00
|
|
|
HDprintf(", ");
|
|
|
|
HDprintf("latest format");
|
2019-03-07 06:57:42 +08:00
|
|
|
need_comma = TRUE;
|
|
|
|
} /* end if */
|
2020-09-30 22:27:10 +08:00
|
|
|
if (config & CONFIG_REOPEN_FILE) {
|
|
|
|
if (need_comma)
|
2019-08-16 05:46:00 +08:00
|
|
|
HDprintf(", ");
|
|
|
|
HDprintf("reopen file");
|
2019-03-07 06:57:42 +08:00
|
|
|
need_comma = TRUE;
|
|
|
|
} /* end if */
|
2020-09-30 22:27:10 +08:00
|
|
|
else if (config & CONFIG_REOPEN_DSET) {
|
|
|
|
if (need_comma)
|
2019-08-16 05:46:00 +08:00
|
|
|
HDprintf(", ");
|
|
|
|
HDprintf("reopen dataset");
|
2019-03-07 06:57:42 +08:00
|
|
|
need_comma = TRUE;
|
|
|
|
} /* end if */
|
2020-09-30 22:27:10 +08:00
|
|
|
if (config & CONFIG_DIRECT_WRITE) {
|
|
|
|
if (need_comma)
|
2019-08-16 05:46:00 +08:00
|
|
|
HDprintf(", ");
|
|
|
|
HDprintf("direct write");
|
2019-03-07 06:57:42 +08:00
|
|
|
need_comma = TRUE;
|
|
|
|
} /* end if */
|
2020-09-30 22:27:10 +08:00
|
|
|
if (config & CONFIG_DIRECT_READ) {
|
|
|
|
if (need_comma)
|
2019-08-16 05:46:00 +08:00
|
|
|
HDprintf(", ");
|
|
|
|
HDprintf("direct read");
|
2019-03-07 06:57:42 +08:00
|
|
|
need_comma = TRUE;
|
|
|
|
} /* end if */
|
2019-08-16 05:46:00 +08:00
|
|
|
HDprintf(":\n");
|
2020-10-24 08:13:05 +08:00
|
|
|
HDfflush(stdout);
|
2019-03-07 06:57:42 +08:00
|
|
|
|
|
|
|
nerrors += test_single_chunk(config);
|
|
|
|
} /* end for */
|
2018-03-22 00:44:24 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Fclose(file_id) < 0)
|
2017-05-15 23:25:15 +08:00
|
|
|
goto error;
|
|
|
|
|
|
|
|
/* check for errors */
|
|
|
|
if (nerrors)
|
|
|
|
goto error;
|
|
|
|
|
|
|
|
HDputs("All direct chunk read/write tests passed.");
|
|
|
|
return EXIT_SUCCESS;
|
|
|
|
|
|
|
|
error:
|
|
|
|
HDputs("*** TESTS FAILED ***");
|
|
|
|
return EXIT_FAILURE;
|
2012-11-08 01:11:22 +08:00
|
|
|
}
|