Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/Makefile.summit
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ SRC = async_test_serial.c async_test_serial2.c \
async_test_parallel4.c async_test_parallel5.c \
async_test_serial_event_set.c async_test_serial_error_stack.c \
async_test_serial_event_set_error_stack.c async_test_serial_mdset.c \
async_test_parallel_merge.c
async_test_parallel_merge.c async_test_compression.c
#async_test_no_fclose.c
OBJ = $(SRC:.c=.o)
EXE = $(SRC:.c=.exe)
Expand Down
17 changes: 10 additions & 7 deletions test/async_test_compression.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
#define DIM0 10
#define DIM1 10

int main() {
hid_t fid, dspace, dset, dcpl, es_id;
int
main()
{
hid_t fid, dspace, dset, dcpl, es_id;
hsize_t dims[2];
int ret, data[DIM0][DIM1];
int ret = 0, data[DIM0][DIM1];
herr_t status;
hbool_t op_failed;
size_t num_in_progress;
size_t num_in_progress;

for (int i = 0; i < DIM0; i++)
for (int j = 0; j < DIM1; j++)
Expand All @@ -27,13 +29,14 @@ int main() {

dims[0] = DIM0;
dims[1] = DIM1;
dspace = H5Screate_simple(2, dims, NULL);
dspace = H5Screate_simple(2, dims, NULL);

dcpl = H5Pcreate(H5P_DATASET_CREATE);
H5Pset_chunk(dcpl, 2, dims);
H5Pset_deflate(dcpl, 9);

dset = H5Dcreate_async(fid, "compress_dset", H5T_NATIVE_INT, dspace, H5P_DEFAULT, dcpl, H5P_DEFAULT, es_id);
dset =
H5Dcreate_async(fid, "compress_dset", H5T_NATIVE_INT, dspace, H5P_DEFAULT, dcpl, H5P_DEFAULT, es_id);
if (dset < 0) {
fprintf(stderr, "Error with dset create\n");
ret = -1;
Expand All @@ -54,7 +57,7 @@ int main() {

printf("Wait for async\n");
fflush(stdout);

status = H5ESwait(es_id, H5ES_WAIT_FOREVER, &num_in_progress, &op_failed);
if (status < 0) {
fprintf(stderr, "Error with H5ESwait\n");
Expand Down