Does Parellel HDF5 support derived data write?

Hi all,

    I want to write the data to a datasets from different memory address in parellel HDF5,
    For example:
        buf1[4] = {1,2,3,4}, buf2[3] = {5, 6, 7}, buf3[2]=[8,9}.
   I want to write these datas(memory address not continous) to a dataset like this:
       {1,2,3,4,5,6,7,8,9}
   I want to write these data by only one H5Dwrite calls, not through 3 H5Dwrite calls.

Thanks in advance.
tony

Hi Tony,

···

On Sep 2, 2009, at 8:01 AM, tony wrote:

Hi all,

    I want to write the data to a datasets from different memory address in parellel HDF5,
    For example:
        buf1[4] = {1,2,3,4}, buf2[3] = {5, 6, 7}, buf3[2]=[8,9}.
   I want to write these datas(memory address not continous) to a dataset like this:
       {1,2,3,4,5,6,7,8,9}
   I want to write these data by only one H5Dwrite calls, not through 3 H5Dwrite calls.

  If you are careful, you could get this to work, but you'll have to determine which buffer has the lowest address in memory which buffer has the highest address in memory and define a dataspace that spans that whole range. Then select the elements within that "spanning buffer" that you'd like to perform I/O to a single dataset on.

  Quincey

Hi Quincey. In Pnetcdf, we have a way (the "flexible mode" API) to
describe user memory with an MPI datatype. In tony's situation, we
could describe those regions with an HINDEXED type. Is there such a
mechanism in HDF5?

(I'm only asking in case I missed the feature, not requesting you add a
new feature! :> )

==rob

···

On Wed, Sep 02, 2009 at 09:12:19AM -0500, Quincey Koziol wrote:

  If you are careful, you could get this to work, but you'll have to
determine which buffer has the lowest address in memory which buffer has
the highest address in memory and define a dataspace that spans that
whole range. Then select the elements within that "spanning buffer" that
you'd like to perform I/O to a single dataset on.

--
Rob Latham
Mathematics and Computer Science Division
Argonne National Lab, IL USA

Hi Rob,

  If you are careful, you could get this to work, but you'll have to
determine which buffer has the lowest address in memory which buffer has
the highest address in memory and define a dataspace that spans that
whole range. Then select the elements within that "spanning buffer" that
you'd like to perform I/O to a single dataset on.

Hi Quincey. In Pnetcdf, we have a way (the "flexible mode" API) to
describe user memory with an MPI datatype. In tony's situation, we
could describe those regions with an HINDEXED type. Is there such a
mechanism in HDF5?

  There isn't an explicit feature like that in HDF5, but what I described would probably be equivalent, with a little bit more work from the application developer.

(I'm only asking in case I missed the feature, not requesting you add a
new feature! :> )

  :-)

    Quincey

···

On Sep 2, 2009, at 10:07 AM, Rob Latham wrote:

On Wed, Sep 02, 2009 at 09:12:19AM -0500, Quincey Koziol wrote:

==rob

--
Rob Latham
Mathematics and Computer Science Division
Argonne National Lab, IL USA

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@hdfgroup.org
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

Hi Quincey,

    Thanks for your answer.
    I understand what you said. But it seemed to be not a good ideas.
    I was reading the HDF5 user guide. I feel that use H5Tcreate, H5Tinsert to create a new compound datatype may solve this problems. May be I was wrong and I still don't know how to use HOFFSET in the situation.
    Or you have any other suggestions about this questions. I do want to write mass of data to a dataset in parellel HDF5 and I do not want to allocate a continous large memory to store the data.

Tony
Thanks.

···

------------------------------------------------------------------------------

From: "Quincey Koziol"
To: hdf-forum@hdfgroup.org
Date: 2009-09-02 22:12:19
Subject:
Hi Tony,

On Sep 2, 2009, at 8:01 AM, tony wrote:

Hi all,

    I want to write the data to a datasets from different memory
address in parellel HDF5,
    For example:
        buf1[4] = {1,2,3,4}, buf2[3] = {5, 6, 7}, buf3[2]=[8,9}.
   I want to write these datas(memory address not continous) to a
dataset like this:
       {1,2,3,4,5,6,7,8,9}
   I want to write these data by only one H5Dwrite calls, not
through 3 H5Dwrite calls.

  If you are careful, you could get this to work, but you'll have to
determine which buffer has the lowest address in memory which buffer
has the highest address in memory and define a dataspace that spans
that whole range. Then select the elements within that "spanning
buffer" that you'd like to perform I/O to a single dataset on.

  Quincey

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@hdfgroup.org
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

Hi Tony,

Hi Quincey,

    Thanks for your answer.
    I understand what you said. But it seemed to be not a good ideas.
    I was reading the HDF5 user guide. I feel that use H5Tcreate, H5Tinsert to create a new compound datatype may solve this problems. May be I was wrong and I still don't know how to use HOFFSET in the situation.

  HOFFSET is designed to describe the offset of fields in structs, which won't work correctly in this situation. (Unless you are planning on doing something I don't expect! :slight_smile:

    Or you have any other suggestions about this questions. I do want to write mass of data to a dataset in parellel HDF5 and I do not want to allocate a continous large memory to store the data.

  The memory doesn't have t _actually_ be contiguously allocated, your application can just describe it to HDF5 as if it were. As long as you don't set up your selection to read from (or write to!) the "gaps" between your buffers, there shouldn't be any problem.

  Quincey

···

On Sep 2, 2009, at 10:13 AM, tony wrote:

Tony
Thanks.

------------------------------------------------------------------------------

From: "Quincey Koziol"
To: hdf-forum@hdfgroup.org
Date: 2009-09-02 22:12:19
Subject:

Hi Tony, On Sep 2, 2009, at 8:01 AM, tony wrote: > Hi all, > > I want to write the data to a datasets from different memory > address in parellel HDF5, > For example: > buf1[4] = {1,2,3,4}, buf2[3] = {5, 6, 7}, buf3[2]=[8,9}. > I want to write these datas(memory address not continous) to a > dataset like this: > {1,2,3,4,5,6,7,8,9} > I want to write these data by only one H5Dwrite calls, not > through 3 H5Dwrite calls. If you are careful, you could get this to work, but you'll have to determine which buffer has the lowest address in memory which buffer has the highest address in memory and define a dataspace that spans that whole range. Then select the elements within that "spanning buffer" that you'd like to perform I/O to a single dataset on. Quincey _______________________________________________ Hdf-forum is for HDF software users discussion. Hdf-forum@hdfgroup.org http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@hdfgroup.org
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org