diff options
author | M. Scot Breitenfeld <brtnfld@hdfgroup.org> | 2019-06-25 17:39:35 (GMT) |
---|---|---|
committer | M. Scot Breitenfeld <brtnfld@hdfgroup.org> | 2019-06-25 17:39:35 (GMT) |
commit | 35c9af8371c4da7f5327c76ddab097b442128f59 (patch) | |
tree | d51be51c385a9b463388ba154efc3fa37cad49e8 /src/H5Dselect.c | |
parent | c752332bfd0e9c3090f3a0c02d0253cd45c2e2ce (diff) | |
parent | 1d8f7bf297100ec11204442708a7f670a89f3f02 (diff) | |
download | hdf5-35c9af8371c4da7f5327c76ddab097b442128f59.zip hdf5-35c9af8371c4da7f5327c76ddab097b442128f59.tar.gz hdf5-35c9af8371c4da7f5327c76ddab097b442128f59.tar.bz2 |
Merge branch 'develop' into parallel_vds_developinactive/parallel_vds_develop
Diffstat (limited to 'src/H5Dselect.c')
-rw-r--r-- | src/H5Dselect.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/H5Dselect.c b/src/H5Dselect.c index 0ec3423..a843d93 100644 --- a/src/H5Dselect.c +++ b/src/H5Dselect.c @@ -175,12 +175,12 @@ H5D__select_io(const H5D_io_info_t *io_info, size_t elmt_size, HGOTO_ERROR(H5E_DATASET, H5E_CANTALLOC, FAIL, "can't allocate file iterator") /* Initialize file iterator */ - if(H5S_select_iter_init(file_iter, file_space, elmt_size) < 0) + if(H5S_select_iter_init(file_iter, file_space, elmt_size, H5S_SEL_ITER_GET_SEQ_LIST_SORTED) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator") file_iter_init = 1; /* File selection iteration info has been initialized */ /* Initialize memory iterator */ - if(H5S_select_iter_init(mem_iter, mem_space, elmt_size) < 0) + if(H5S_select_iter_init(mem_iter, mem_space, elmt_size, 0) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize selection iterator") mem_iter_init = 1; /* Memory selection iteration info has been initialized */ @@ -193,7 +193,7 @@ H5D__select_io(const H5D_io_info_t *io_info, size_t elmt_size, /* Check if more file sequences are needed */ if(curr_file_seq >= file_nseq) { /* Get sequences for file selection */ - if(H5S_SELECT_GET_SEQ_LIST(file_space, H5S_GET_SEQ_LIST_SORTED, file_iter, vec_size, nelmts, &file_nseq, &file_nelem, file_off, file_len) < 0) + if(H5S_SELECT_ITER_GET_SEQ_LIST(file_iter, vec_size, nelmts, &file_nseq, &file_nelem, file_off, file_len) < 0) HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed") /* Start at the beginning of the sequences again */ @@ -203,7 +203,7 @@ H5D__select_io(const H5D_io_info_t *io_info, size_t elmt_size, /* Check if more memory sequences are needed */ if(curr_mem_seq >= mem_nseq) { /* Get sequences for memory selection */ - if(H5S_SELECT_GET_SEQ_LIST(mem_space, 0, mem_iter, vec_size, nelmts, &mem_nseq, &mem_nelem, mem_off, mem_len) < 0) + if(H5S_SELECT_ITER_GET_SEQ_LIST(mem_iter, vec_size, nelmts, &mem_nseq, &mem_nelem, mem_off, mem_len) < 0) HGOTO_ERROR(H5E_INTERNAL, H5E_UNSUPPORTED, FAIL, "sequence length generation failed") /* Start at the beginning of the sequences again */ @@ -227,6 +227,8 @@ H5D__select_io(const H5D_io_info_t *io_info, size_t elmt_size, /* Decrement number of elements left to process */ HDassert(((size_t)tmp_file_len % elmt_size) == 0); + if(elmt_size == 0) + HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "Resulted in division by zero") nelmts -= ((size_t)tmp_file_len / elmt_size); } /* end while */ } /* end else */ |