# Select mulptiple hyperslabs in some order

**URL:** <https://forum.hdfgroup.org/t/select-mulptiple-hyperslabs-in-some-order/9706>\
**Category:** HDF5 Library\
**Created:** [April 29, 2022, 6:15pm UTC](https://forum.hdfgroup.org/t/select-mulptiple-hyperslabs-in-some-order/9706 "2022-04-29T18:15:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kerim.khemraev](https://forum.hdfgroup.org/letter_avatar_proxy/v4/letter/k/b9bd4f/32.png) [@kerim.khemraev](https://forum.hdfgroup.org/u/kerim.khemraev)\
**Post date:** [April 29, 2022, 6:15pm UTC](https://forum.hdfgroup.org/t/select-mulptiple-hyperslabs-in-some-order/9706/1 "2022-04-29T18:15:41Z")

</div>

Hi,

Lets suppose I have a 2D dataset.  
I want to prepare a selection for rows `{1, 7, 4}` and write data at once.

For that I use the function [H5Sselect\_hyperslab](https://portal.hdfgroup.org/display/HDF5/H5S_SELECT_HYPERSLAB) with `H5S_seloper_t = H5S_SELECT_OR`.

But after writing in such selection I find that the data was written in sorted order i.e. rows `{1, 4, 7}`.

Is there a way to select rows in arbitrary order?

---

<div class="post-metadata">

**Author:** ![gheber](https://forum.hdfgroup.org/user_avatar/forum.hdfgroup.org/gheber/32/1919_2.png) [@gheber](https://forum.hdfgroup.org/u/gheber)\
**Post date:** [May 3, 2022, 6:54pm UTC](https://forum.hdfgroup.org/t/select-mulptiple-hyperslabs-in-some-order/9706/2 "2022-05-03T18:54:31Z")

</div>

Nope, the selections in source and destination are iterated in C or Fortran grid-point order. Everything else could be very inefficient, and you’ll have to do any permutations on your own. G.

---

<div class="post-metadata">

**Author:** ![kerim.khemraev](https://forum.hdfgroup.org/letter_avatar_proxy/v4/letter/k/b9bd4f/32.png) [@kerim.khemraev](https://forum.hdfgroup.org/u/kerim.khemraev)\
**Post date:** [May 3, 2022, 7:44pm UTC](https://forum.hdfgroup.org/t/select-mulptiple-hyperslabs-in-some-order/9706/3 "2022-05-03T19:44:02Z")

</div>

Thank you for information!
