pHDF5 collective I/O fails on test program

I managed to build pHDF5 on blueprint.ncsa.uiuc.edu (IBM AIX Power 6). I
compiled the hyperslab_by_chunk.f90 test program found at
http://www.hdfgroup.org/HDF5/Tutor/phypechk.html without error. When I run
it, however, I get the following output:

ATTENTION: 0031-408 4 tasks allocated by LoadLeveler, continuing...
ERROR: 0032-110 Attempt to free a predefined datatype (2) in MPI_Type_free,
task 0
ERROR: 0032-110 Attempt to free a predefined datatype (2) in MPI_Type_free,
task 1
ERROR: 0032-110 Attempt to free a predefined datatype (2) in MPI_Type_free,
task 2
ERROR: 0032-110 Attempt to free a predefined datatype (2) in MPI_Type_free,
task 3
HDF5: infinite loop closing library

D,S,T,D,S,F,D,G,S,T,F,AC,FD,P,FD,P,FD,P,E,E,SL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL
HDF5: infinite loop closing library

The line which causes the grief is:

    CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data, dimsfi, error, &
                    file_space_id = filespace, mem_space_id = memspace,
xfer_prp = plist_id)

If I replace that call with the one that is commented out in the program, it
runs without a problem. That line is:

CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data, dimsfi,error, &
                      file_space_id = filespace, mem_space_id = memspace)

Any ideas? I definitely want to take advantage of doing collective I/O if
possible.

Leigh

···

--
Leigh Orf
Associate Professor of Atmospheric Science
Department of Geology and Meteorology
Central Michigan University
Currently on sabbatical at the National Center for Atmospheric Research
in Boulder, CO
NCAR office phone: (303) 497-8200

Hi Leigh,

It looks like that collective write fails but independent succeeds. Which version did you build? We will try to reproduce it.

Thank you!

Elena

···

On Jan 16, 2011, at 3:47 PM, Leigh Orf wrote:

I managed to build pHDF5 on blueprint.ncsa.uiuc.edu (IBM AIX Power 6). I compiled the hyperslab_by_chunk.f90 test program found at http://www.hdfgroup.org/HDF5/Tutor/phypechk.html without error. When I run it, however, I get the following output:

ATTENTION: 0031-408 4 tasks allocated by LoadLeveler, continuing...
ERROR: 0032-110 Attempt to free a predefined datatype (2) in MPI_Type_free, task 0
ERROR: 0032-110 Attempt to free a predefined datatype (2) in MPI_Type_free, task 1
ERROR: 0032-110 Attempt to free a predefined datatype (2) in MPI_Type_free, task 2
ERROR: 0032-110 Attempt to free a predefined datatype (2) in MPI_Type_free, task 3
HDF5: infinite loop closing library
      D,S,T,D,S,F,D,G,S,T,F,AC,FD,P,FD,P,FD,P,E,E,SL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL
HDF5: infinite loop closing library

The line which causes the grief is:

    CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data, dimsfi, error, &
                    file_space_id = filespace, mem_space_id = memspace, xfer_prp = plist_id)

If I replace that call with the one that is commented out in the program, it runs without a problem. That line is:

CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data, dimsfi,error, &
                      file_space_id = filespace, mem_space_id = memspace)

Any ideas? I definitely want to take advantage of doing collective I/O if possible.

Leigh

--
Leigh Orf
Associate Professor of Atmospheric Science
Department of Geology and Meteorology
Central Michigan University
Currently on sabbatical at the National Center for Atmospheric Research in Boulder, CO
NCAR office phone: (303) 497-8200

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

Leigh,

I am writing to confirm that the bug you reported does exist in 1.8.5-patch1, but is fixed in 1.8.6 (coming soon).

Elena

···

On Jan 16, 2011, at 3:47 PM, Leigh Orf wrote:

I managed to build pHDF5 on blueprint.ncsa.uiuc.edu (IBM AIX Power 6). I compiled the hyperslab_by_chunk.f90 test program found at http://www.hdfgroup.org/HDF5/Tutor/phypechk.html without error. When I run it, however, I get the following output:

ATTENTION: 0031-408 4 tasks allocated by LoadLeveler, continuing...
ERROR: 0032-110 Attempt to free a predefined datatype (2) in MPI_Type_free, task 0
ERROR: 0032-110 Attempt to free a predefined datatype (2) in MPI_Type_free, task 1
ERROR: 0032-110 Attempt to free a predefined datatype (2) in MPI_Type_free, task 2
ERROR: 0032-110 Attempt to free a predefined datatype (2) in MPI_Type_free, task 3
HDF5: infinite loop closing library
      D,S,T,D,S,F,D,G,S,T,F,AC,FD,P,FD,P,FD,P,E,E,SL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL
HDF5: infinite loop closing library

The line which causes the grief is:

    CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data, dimsfi, error, &
                    file_space_id = filespace, mem_space_id = memspace, xfer_prp = plist_id)

If I replace that call with the one that is commented out in the program, it runs without a problem. That line is:

CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data, dimsfi,error, &
                      file_space_id = filespace, mem_space_id = memspace)

Any ideas? I definitely want to take advantage of doing collective I/O if possible.

Leigh

--
Leigh Orf
Associate Professor of Atmospheric Science
Department of Geology and Meteorology
Central Michigan University
Currently on sabbatical at the National Center for Atmospheric Research in Boulder, CO
NCAR office phone: (303) 497-8200

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

Hi Leigh,

It looks like that collective write fails but independent succeeds. Which version did you build? We will try to reproduce it.

Hi Elena:

Do you think this could be a regression of a bug I reported against
1.8.4 about a year ago? I sent a test case to the hdf5 help desk 2
December 2009 with the subject "bug in HDF5 type handling", though
that was in the read path. Sorry, I don't have a ticket id or
anything like that to help track it down.

==rob

···

On Sun, Jan 16, 2011 at 07:39:48PM -0600, Elena Pourmal wrote:

Thank you!

Elena

On Jan 16, 2011, at 3:47 PM, Leigh Orf wrote:

> I managed to build pHDF5 on blueprint.ncsa.uiuc.edu (IBM AIX Power 6). I compiled the hyperslab_by_chunk.f90 test program found at http://www.hdfgroup.org/HDF5/Tutor/phypechk.html without error. When I run it, however, I get the following output:
>
> ATTENTION: 0031-408 4 tasks allocated by LoadLeveler, continuing...
> ERROR: 0032-110 Attempt to free a predefined datatype (2) in MPI_Type_free, task 0
> ERROR: 0032-110 Attempt to free a predefined datatype (2) in MPI_Type_free, task 1
> ERROR: 0032-110 Attempt to free a predefined datatype (2) in MPI_Type_free, task 2
> ERROR: 0032-110 Attempt to free a predefined datatype (2) in MPI_Type_free, task 3
> HDF5: infinite loop closing library
> D,S,T,D,S,F,D,G,S,T,F,AC,FD,P,FD,P,FD,P,E,E,SL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL
> HDF5: infinite loop closing library
>
> The line which causes the grief is:
>
> CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data, dimsfi, error, &
> file_space_id = filespace, mem_space_id = memspace, xfer_prp = plist_id)
>
> If I replace that call with the one that is commented out in the program, it runs without a problem. That line is:
>
> CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data, dimsfi,error, &
> file_space_id = filespace, mem_space_id = memspace)
>
> Any ideas? I definitely want to take advantage of doing collective I/O if possible.
>
> Leigh
>
> --
> Leigh Orf
> Associate Professor of Atmospheric Science
> Department of Geology and Meteorology
> Central Michigan University
> Currently on sabbatical at the National Center for Atmospheric Research in Boulder, CO
> NCAR office phone: (303) 497-8200
>
> _______________________________________________
> 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

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

Elena,

That is good news, indeed this was with 1.8.5-patch1.

Is code written with using independent IO structured significantly different
than with collective IO? I would like to get moving with pHDF5 and as I am
currently not too familiar with it, want to make sure that I am not going to
have to do a rewrite after the collective code works. It does seem to all
occur behind the scenes with the h5dwrite command, so I presume I am safe.

Thanks,

Leigh

···

On Mon, Jan 17, 2011 at 4:59 PM, Elena Pourmal <epourmal@hdfgroup.org>wrote:

Leigh,

I am writing to confirm that the bug you reported does exist in
1.8.5-patch1, but is fixed in 1.8.6 (coming soon).

Elena
On Jan 16, 2011, at 3:47 PM, Leigh Orf wrote:

I managed to build pHDF5 on blueprint.ncsa.uiuc.edu (IBM AIX Power 6). I
compiled the hyperslab_by_chunk.f90 test program found at
http://www.hdfgroup.org/HDF5/Tutor/phypechk.html without error. When I run
it, however, I get the following output:

ATTENTION: 0031-408 4 tasks allocated by LoadLeveler, continuing...
ERROR: 0032-110 Attempt to free a predefined datatype (2) in
MPI_Type_free, task 0
ERROR: 0032-110 Attempt to free a predefined datatype (2) in
MPI_Type_free, task 1
ERROR: 0032-110 Attempt to free a predefined datatype (2) in
MPI_Type_free, task 2
ERROR: 0032-110 Attempt to free a predefined datatype (2) in
MPI_Type_free, task 3
HDF5: infinite loop closing library

D,S,T,D,S,F,D,G,S,T,F,AC,FD,P,FD,P,FD,P,E,E,SL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL
HDF5: infinite loop closing library

The line which causes the grief is:

    CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data, dimsfi, error, &
                    file_space_id = filespace, mem_space_id = memspace,
xfer_prp = plist_id)

If I replace that call with the one that is commented out in the program,
it runs without a problem. That line is:

CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data, dimsfi,error, &
                      file_space_id = filespace, mem_space_id = memspace)

Any ideas? I definitely want to take advantage of doing collective I/O if
possible.

Leigh

--
Leigh Orf
Associate Professor of Atmospheric Science
Department of Geology and Meteorology
Central Michigan University
Currently on sabbatical at the National Center for Atmospheric Research
in Boulder, CO
NCAR office phone: (303) 497-8200

_______________________________________________
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

--
Leigh Orf
Associate Professor of Atmospheric Science
Department of Geology and Meteorology
Central Michigan University
Currently on sabbatical at the National Center for Atmospheric Research
in Boulder, CO
NCAR office phone: (303) 497-8200

Hi Rob,

Hi Leigh,

It looks like that collective write fails but independent succeeds. Which version did you build? We will try to reproduce it.

Hi Elena:

Do you think this could be a regression of a bug I reported against
1.8.4 about a year ago?

Sounds very similar, yes.

I sent a test case to the hdf5 help desk 2
December 2009 with the subject "bug in HDF5 type handling", though
that was in the read path. Sorry, I don't have a ticket id or
anything like that to help track it down.

We do have your initial report and followed email exchange. The bug you reported was fixed around December 11 - 14, 2009. It definitely should be fixed 1.8.6, but I am not sure if it made into 1.8.5-patch1.
I hope to have more information about this bug later tomorrow, when we all back to the office.

Thanks a lot for bringing this to my attention!

Elena

···

On Jan 17, 2011, at 10:24 AM, Rob Latham wrote:

On Sun, Jan 16, 2011 at 07:39:48PM -0600, Elena Pourmal wrote:
==rob

Thank you!

Elena

On Jan 16, 2011, at 3:47 PM, Leigh Orf wrote:

I managed to build pHDF5 on blueprint.ncsa.uiuc.edu (IBM AIX Power 6). I compiled the hyperslab_by_chunk.f90 test program found at http://www.hdfgroup.org/HDF5/Tutor/phypechk.html without error. When I run it, however, I get the following output:

ATTENTION: 0031-408 4 tasks allocated by LoadLeveler, continuing...
ERROR: 0032-110 Attempt to free a predefined datatype (2) in MPI_Type_free, task 0
ERROR: 0032-110 Attempt to free a predefined datatype (2) in MPI_Type_free, task 1
ERROR: 0032-110 Attempt to free a predefined datatype (2) in MPI_Type_free, task 2
ERROR: 0032-110 Attempt to free a predefined datatype (2) in MPI_Type_free, task 3
HDF5: infinite loop closing library
     D,S,T,D,S,F,D,G,S,T,F,AC,FD,P,FD,P,FD,P,E,E,SL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL
HDF5: infinite loop closing library

The line which causes the grief is:

   CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data, dimsfi, error, &
                   file_space_id = filespace, mem_space_id = memspace, xfer_prp = plist_id)

If I replace that call with the one that is commented out in the program, it runs without a problem. That line is:

CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data, dimsfi,error, &
                     file_space_id = filespace, mem_space_id = memspace)

Any ideas? I definitely want to take advantage of doing collective I/O if possible.

Leigh

--
Leigh Orf
Associate Professor of Atmospheric Science
Department of Geology and Meteorology
Central Michigan University
Currently on sabbatical at the National Center for Atmospheric Research in Boulder, CO
NCAR office phone: (303) 497-8200

_______________________________________________
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

--
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 Leigh,

Yes, it is only a small difference in code between collective and
independent mode for the MPI-IO VFD. To enable collective I/O, you pass a
dataset transfer property list to H5Dwrite like this:

dxpl_id = H5Pcreate(H5P_DATASET_XFER);H5Pset_dxpl_mpio(dxpl_id,
H5FD_MPIO_COLLECTIVE);

H5Dwrite(dset_id, H5T_NATIVE_FLOAT, memspace, filespace, dxpl_id, somedata0);

One additional constraint with collective I/O, though, is that all MPI tasks
must call H5Dwrite. If not, your program will stall in a barrier. In
contrast, with independent I/O you can execute writes with no coordination
among MPI tasks.

If you do want only a subset of MPI tasks to write in collective mode, you
can pass an empty selection to H5Dwrite for the non-writing tasks.

Mark

···

On Tue, Jan 18, 2011 at 12:45 AM, Leigh Orf <leigh.orf@gmail.com> wrote:

Elena,

That is good news, indeed this was with 1.8.5-patch1.

Is code written with using independent IO structured significantly
different than with collective IO? I would like to get moving with pHDF5 and
as I am currently not too familiar with it, want to make sure that I am not
going to have to do a rewrite after the collective code works. It does seem
to all occur behind the scenes with the h5dwrite command, so I presume I am
safe.

Thanks,

Leigh

On Mon, Jan 17, 2011 at 4:59 PM, Elena Pourmal <epourmal@hdfgroup.org>wrote:

Leigh,

I am writing to confirm that the bug you reported does exist in
1.8.5-patch1, but is fixed in 1.8.6 (coming soon).

Elena
On Jan 16, 2011, at 3:47 PM, Leigh Orf wrote:

I managed to build pHDF5 on blueprint.ncsa.uiuc.edu (IBM AIX Power 6). I
compiled the hyperslab_by_chunk.f90 test program found at
http://www.hdfgroup.org/HDF5/Tutor/phypechk.html without error. When I
run it, however, I get the following output:

ATTENTION: 0031-408 4 tasks allocated by LoadLeveler, continuing...
ERROR: 0032-110 Attempt to free a predefined datatype (2) in
MPI_Type_free, task 0
ERROR: 0032-110 Attempt to free a predefined datatype (2) in
MPI_Type_free, task 1
ERROR: 0032-110 Attempt to free a predefined datatype (2) in
MPI_Type_free, task 2
ERROR: 0032-110 Attempt to free a predefined datatype (2) in
MPI_Type_free, task 3
HDF5: infinite loop closing library

D,S,T,D,S,F,D,G,S,T,F,AC,FD,P,FD,P,FD,P,E,E,SL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL
HDF5: infinite loop closing library

The line which causes the grief is:

    CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data, dimsfi, error, &
                    file_space_id = filespace, mem_space_id = memspace,
xfer_prp = plist_id)

If I replace that call with the one that is commented out in the program,
it runs without a problem. That line is:

CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data, dimsfi,error, &
                      file_space_id = filespace, mem_space_id = memspace)

Any ideas? I definitely want to take advantage of doing collective I/O if
possible.

Leigh

--
Leigh Orf
Associate Professor of Atmospheric Science
Department of Geology and Meteorology
Central Michigan University
Currently on sabbatical at the National Center for Atmospheric Research
in Boulder, CO
NCAR office phone: (303) 497-8200

_______________________________________________
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

--
Leigh Orf
Associate Professor of Atmospheric Science
Department of Geology and Meteorology
Central Michigan University
Currently on sabbatical at the National Center for Atmospheric Research
in Boulder, CO
NCAR office phone: (303) 497-8200

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

Hi Leigh,

Yes, it is only a small difference in code between collective and
independent mode for the MPI-IO VFD. To enable collective I/O, you pass a
dataset transfer property list to H5Dwrite like this:

dxpl_id = H5Pcreate(H5P_DATASET_XFER);H5Pset_dxpl_mpio(dxpl_id, H5FD_MPIO_COLLECTIVE);

H5Dwrite(dset_id, H5T_NATIVE_FLOAT, memspace, filespace, dxpl_id, somedata0);

One additional constraint with collective I/O, though, is that all MPI
tasks must call H5Dwrite. If not, your program will stall in a barrier. In
contrast, with independent I/O you can execute writes with no coordination
among MPI tasks.

If you do want only a subset of MPI tasks to write in collective mode, you
can pass an empty selection to H5Dwrite for the non-writing tasks.

Concerning your second comment: Let's say I wish to have each 32 core SMP
chip write 1 hdf5 file, and that each core on a SMP chip is an MPI
rank/process. I create a new MPI communicator which is all 32 ranks on each
SMP chip. Could I not just pass that communicator as the second argument to
h5pset_fapl_mpio and do collective communication for that communicator? I
don't think we want our really big simulations to create only one hdf5 file
per model dump, so hopefully pHDF5 does not require all collective
operations to be on MPI_COMM_WORLD.

Leigh

···

On Tue, Jan 18, 2011 at 5:15 AM, Mark Howison <mark.howison@gmail.com>wrote:

Mark

On Tue, Jan 18, 2011 at 12:45 AM, Leigh Orf <leigh.orf@gmail.com> wrote:

Elena,

That is good news, indeed this was with 1.8.5-patch1.

Is code written with using independent IO structured significantly
different than with collective IO? I would like to get moving with pHDF5 and
as I am currently not too familiar with it, want to make sure that I am not
going to have to do a rewrite after the collective code works. It does seem
to all occur behind the scenes with the h5dwrite command, so I presume I am
safe.

Thanks,

Leigh

On Mon, Jan 17, 2011 at 4:59 PM, Elena Pourmal <epourmal@hdfgroup.org>wrote:

Leigh,

I am writing to confirm that the bug you reported does exist in
1.8.5-patch1, but is fixed in 1.8.6 (coming soon).

Elena
On Jan 16, 2011, at 3:47 PM, Leigh Orf wrote:

I managed to build pHDF5 on blueprint.ncsa.uiuc.edu (IBM AIX Power 6). I
compiled the hyperslab_by_chunk.f90 test program found at
http://www.hdfgroup.org/HDF5/Tutor/phypechk.html without error. When I
run it, however, I get the following output:

ATTENTION: 0031-408 4 tasks allocated by LoadLeveler, continuing...
ERROR: 0032-110 Attempt to free a predefined datatype (2) in
MPI_Type_free, task 0
ERROR: 0032-110 Attempt to free a predefined datatype (2) in
MPI_Type_free, task 1
ERROR: 0032-110 Attempt to free a predefined datatype (2) in
MPI_Type_free, task 2
ERROR: 0032-110 Attempt to free a predefined datatype (2) in
MPI_Type_free, task 3
HDF5: infinite loop closing library

D,S,T,D,S,F,D,G,S,T,F,AC,FD,P,FD,P,FD,P,E,E,SL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL
HDF5: infinite loop closing library

The line which causes the grief is:

    CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data, dimsfi, error, &
                    file_space_id = filespace, mem_space_id = memspace,
xfer_prp = plist_id)

If I replace that call with the one that is commented out in the program,
it runs without a problem. That line is:

CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data, dimsfi,error, &
                      file_space_id = filespace, mem_space_id = memspace)

Any ideas? I definitely want to take advantage of doing collective I/O if
possible.

Leigh

--
Leigh Orf
Associate Professor of Atmospheric Science
Department of Geology and Meteorology
Central Michigan University
Currently on sabbatical at the National Center for Atmospheric Research
in Boulder, CO
NCAR office phone: (303) 497-8200

_______________________________________________
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

--
Leigh Orf
Associate Professor of Atmospheric Science
Department of Geology and Meteorology
Central Michigan University
Currently on sabbatical at the National Center for Atmospheric Research
in Boulder, CO
NCAR office phone: (303) 497-8200

_______________________________________________
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

--
Leigh Orf
Associate Professor of Atmospheric Science
Department of Geology and Meteorology
Central Michigan University
Currently on sabbatical at the National Center for Atmospheric Research
in Boulder, CO
NCAR office phone: (303) 497-8200

Mark,

Could you give me an example of a call to H5Dwrite (fortran90 api) where an
"empty selection" is passed? I don't know which argument you mean.

There are many cases (with metadata for instance) where I need only one
member of a group to write the metadata. I am finding that weird things are
happening with some of my code as I work with pHDF5 but I think it's because
I don't entirely understand what pHDF5 expects.

For instance, if I have a single integer that is common amongst all ranks in
a collective group writing to one file, do I just pick the root rank to do
the write and have all other ranks pass some dummy variable?

I can understand the paradigm where you are writing data that is different
on each rank and you need to specify dims and offsets etc. (the example
codes show this) but the "easier" case is throwing me.

Thanks,

Leigh

···

On Tue, Jan 18, 2011 at 5:15 AM, Mark Howison <mark.howison@gmail.com>wrote:

Hi Leigh,

Yes, it is only a small difference in code between collective and
independent mode for the MPI-IO VFD. To enable collective I/O, you pass a
dataset transfer property list to H5Dwrite like this:

dxpl_id = H5Pcreate(H5P_DATASET_XFER);H5Pset_dxpl_mpio(dxpl_id, H5FD_MPIO_COLLECTIVE);

H5Dwrite(dset_id, H5T_NATIVE_FLOAT, memspace, filespace, dxpl_id, somedata0);

One additional constraint with collective I/O, though, is that all MPI
tasks must call H5Dwrite. If not, your program will stall in a barrier. In
contrast, with independent I/O you can execute writes with no coordination
among MPI tasks.

If you do want only a subset of MPI tasks to write in collective mode, you
can pass an empty selection to H5Dwrite for the non-writing tasks.

Mark

On Tue, Jan 18, 2011 at 12:45 AM, Leigh Orf <leigh.orf@gmail.com> wrote:

Elena,

That is good news, indeed this was with 1.8.5-patch1.

Is code written with using independent IO structured significantly
different than with collective IO? I would like to get moving with pHDF5 and
as I am currently not too familiar with it, want to make sure that I am not
going to have to do a rewrite after the collective code works. It does seem
to all occur behind the scenes with the h5dwrite command, so I presume I am
safe.

Thanks,

Leigh

On Mon, Jan 17, 2011 at 4:59 PM, Elena Pourmal <epourmal@hdfgroup.org>wrote:

Leigh,

I am writing to confirm that the bug you reported does exist in
1.8.5-patch1, but is fixed in 1.8.6 (coming soon).

Elena
On Jan 16, 2011, at 3:47 PM, Leigh Orf wrote:

I managed to build pHDF5 on blueprint.ncsa.uiuc.edu (IBM AIX Power 6). I
compiled the hyperslab_by_chunk.f90 test program found at
http://www.hdfgroup.org/HDF5/Tutor/phypechk.html without error. When I
run it, however, I get the following output:

ATTENTION: 0031-408 4 tasks allocated by LoadLeveler, continuing...
ERROR: 0032-110 Attempt to free a predefined datatype (2) in
MPI_Type_free, task 0
ERROR: 0032-110 Attempt to free a predefined datatype (2) in
MPI_Type_free, task 1
ERROR: 0032-110 Attempt to free a predefined datatype (2) in
MPI_Type_free, task 2
ERROR: 0032-110 Attempt to free a predefined datatype (2) in
MPI_Type_free, task 3
HDF5: infinite loop closing library

D,S,T,D,S,F,D,G,S,T,F,AC,FD,P,FD,P,FD,P,E,E,SL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL
HDF5: infinite loop closing library

The line which causes the grief is:

    CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data, dimsfi, error, &
                    file_space_id = filespace, mem_space_id = memspace,
xfer_prp = plist_id)

If I replace that call with the one that is commented out in the program,
it runs without a problem. That line is:

CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data, dimsfi,error, &
                      file_space_id = filespace, mem_space_id = memspace)

Any ideas? I definitely want to take advantage of doing collective I/O if
possible.

Leigh

--
Leigh Orf
Associate Professor of Atmospheric Science
Department of Geology and Meteorology
Central Michigan University
Currently on sabbatical at the National Center for Atmospheric Research
in Boulder, CO
NCAR office phone: (303) 497-8200

_______________________________________________
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

--
Leigh Orf
Associate Professor of Atmospheric Science
Department of Geology and Meteorology
Central Michigan University
Currently on sabbatical at the National Center for Atmospheric Research
in Boulder, CO
NCAR office phone: (303) 497-8200

_______________________________________________
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

--
Leigh Orf
Associate Professor of Atmospheric Science
Department of Geology and Meteorology
Central Michigan University
Currently on sabbatical at the National Center for Atmospheric Research
in Boulder, CO
NCAR office phone: (303) 497-8200

HI Leigh,

Yes, using sub-communicators is another way to break up your writes. I meant
in the case where you want a subset of your (sub)communicator to write, you
can use empty selections. But the solution you are proposing with
subcommunicators is much better for your particular I/O pattern, and it will
not requires empty selections.

Mark

···

On Tue, Jan 18, 2011 at 12:27 PM, Leigh Orf <leigh.orf@gmail.com> wrote:

On Tue, Jan 18, 2011 at 5:15 AM, Mark Howison <mark.howison@gmail.com>wrote:

Hi Leigh,

Yes, it is only a small difference in code between collective and
independent mode for the MPI-IO VFD. To enable collective I/O, you pass a
dataset transfer property list to H5Dwrite like this:

dxpl_id = H5Pcreate(H5P_DATASET_XFER);H5Pset_dxpl_mpio(dxpl_id, H5FD_MPIO_COLLECTIVE);

H5Dwrite(dset_id, H5T_NATIVE_FLOAT, memspace, filespace, dxpl_id, somedata0);

One additional constraint with collective I/O, though, is that all MPI
tasks must call H5Dwrite. If not, your program will stall in a barrier. In
contrast, with independent I/O you can execute writes with no coordination
among MPI tasks.

If you do want only a subset of MPI tasks to write in collective mode, you
can pass an empty selection to H5Dwrite for the non-writing tasks.

Concerning your second comment: Let's say I wish to have each 32 core SMP
chip write 1 hdf5 file, and that each core on a SMP chip is an MPI
rank/process. I create a new MPI communicator which is all 32 ranks on each
SMP chip. Could I not just pass that communicator as the second argument to
h5pset_fapl_mpio and do collective communication for that communicator? I
don't think we want our really big simulations to create only one hdf5 file
per model dump, so hopefully pHDF5 does not require all collective
operations to be on MPI_COMM_WORLD.

Leigh

Mark

On Tue, Jan 18, 2011 at 12:45 AM, Leigh Orf <leigh.orf@gmail.com> wrote:

Elena,

That is good news, indeed this was with 1.8.5-patch1.

Is code written with using independent IO structured significantly
different than with collective IO? I would like to get moving with pHDF5 and
as I am currently not too familiar with it, want to make sure that I am not
going to have to do a rewrite after the collective code works. It does seem
to all occur behind the scenes with the h5dwrite command, so I presume I am
safe.

Thanks,

Leigh

On Mon, Jan 17, 2011 at 4:59 PM, Elena Pourmal <epourmal@hdfgroup.org>wrote:

Leigh,

I am writing to confirm that the bug you reported does exist in
1.8.5-patch1, but is fixed in 1.8.6 (coming soon).

Elena
On Jan 16, 2011, at 3:47 PM, Leigh Orf wrote:

I managed to build pHDF5 on blueprint.ncsa.uiuc.edu (IBM AIX Power 6).
I compiled the hyperslab_by_chunk.f90 test program found at
http://www.hdfgroup.org/HDF5/Tutor/phypechk.html without error. When I
run it, however, I get the following output:

ATTENTION: 0031-408 4 tasks allocated by LoadLeveler, continuing...
ERROR: 0032-110 Attempt to free a predefined datatype (2) in
MPI_Type_free, task 0
ERROR: 0032-110 Attempt to free a predefined datatype (2) in
MPI_Type_free, task 1
ERROR: 0032-110 Attempt to free a predefined datatype (2) in
MPI_Type_free, task 2
ERROR: 0032-110 Attempt to free a predefined datatype (2) in
MPI_Type_free, task 3
HDF5: infinite loop closing library

D,S,T,D,S,F,D,G,S,T,F,AC,FD,P,FD,P,FD,P,E,E,SL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL
HDF5: infinite loop closing library

The line which causes the grief is:

    CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data, dimsfi, error, &
                    file_space_id = filespace, mem_space_id = memspace,
xfer_prp = plist_id)

If I replace that call with the one that is commented out in the
program, it runs without a problem. That line is:

CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data, dimsfi,error, &
                      file_space_id = filespace, mem_space_id =
memspace)

Any ideas? I definitely want to take advantage of doing collective I/O
if possible.

Leigh

--
Leigh Orf
Associate Professor of Atmospheric Science
Department of Geology and Meteorology
Central Michigan University
Currently on sabbatical at the National Center for Atmospheric Research
in Boulder, CO
NCAR office phone: (303) 497-8200

_______________________________________________
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

--
Leigh Orf
Associate Professor of Atmospheric Science
Department of Geology and Meteorology
Central Michigan University
Currently on sabbatical at the National Center for Atmospheric Research
in Boulder, CO
NCAR office phone: (303) 497-8200

_______________________________________________
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

--
Leigh Orf
Associate Professor of Atmospheric Science
Department of Geology and Meteorology
Central Michigan University
Currently on sabbatical at the National Center for Atmospheric Research
in Boulder, CO
NCAR office phone: (303) 497-8200

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

A couple followup questions:

Should group creation and attribute calls be done on all members, or just
one member of a group?

For instance, if I have a group which contains integer metadata common to
all members of a group, do I do h5gcreate on all members or just one?

Same with attributes, if the attributes are all the same across the group,
should just one member write them?

I.e., can you get away with stuff like

if (my_rank.eq.0) then
[create a group, create an attribute, write to that group, write attribute
data]
else
[do nothing]

or will the ranks !=0 get confused?

On the same token, is there any harm is having all members write the same
data to a space? Say each mpi rank has an integer variable called time, and
that variable is the same on all ranks, if all ranks write that variable
collectively, will badness happen? Does pHDF5 silently handle these kinds of
situations? Or do I need to pass this "empty selection" on all but one rank?

I know these are pretty rudimentary questions. I have gone through the phdf5
tutorial but I don't see any code which addresses this kind of thing.

Leigh

···

On Wed, Jan 19, 2011 at 4:36 PM, Leigh Orf <leigh.orf@gmail.com> wrote:

Mark,

Could you give me an example of a call to H5Dwrite (fortran90 api) where an
"empty selection" is passed? I don't know which argument you mean.

There are many cases (with metadata for instance) where I need only one
member of a group to write the metadata. I am finding that weird things are
happening with some of my code as I work with pHDF5 but I think it's because
I don't entirely understand what pHDF5 expects.

For instance, if I have a single integer that is common amongst all ranks
in a collective group writing to one file, do I just pick the root rank to
do the write and have all other ranks pass some dummy variable?

I can understand the paradigm where you are writing data that is different
on each rank and you need to specify dims and offsets etc. (the example
codes show this) but the "easier" case is throwing me.

Thanks,

Leigh

On Tue, Jan 18, 2011 at 5:15 AM, Mark Howison <mark.howison@gmail.com>wrote:

Hi Leigh,

Yes, it is only a small difference in code between collective and
independent mode for the MPI-IO VFD. To enable collective I/O, you pass a
dataset transfer property list to H5Dwrite like this:

dxpl_id = H5Pcreate(H5P_DATASET_XFER);H5Pset_dxpl_mpio(dxpl_id, H5FD_MPIO_COLLECTIVE);

H5Dwrite(dset_id, H5T_NATIVE_FLOAT, memspace, filespace, dxpl_id, somedata0);

One additional constraint with collective I/O, though, is that all MPI
tasks must call H5Dwrite. If not, your program will stall in a barrier. In
contrast, with independent I/O you can execute writes with no coordination
among MPI tasks.

If you do want only a subset of MPI tasks to write in collective mode, you
can pass an empty selection to H5Dwrite for the non-writing tasks.

Mark

On Tue, Jan 18, 2011 at 12:45 AM, Leigh Orf <leigh.orf@gmail.com> wrote:

Elena,

That is good news, indeed this was with 1.8.5-patch1.

Is code written with using independent IO structured significantly
different than with collective IO? I would like to get moving with pHDF5 and
as I am currently not too familiar with it, want to make sure that I am not
going to have to do a rewrite after the collective code works. It does seem
to all occur behind the scenes with the h5dwrite command, so I presume I am
safe.

Thanks,

Leigh

On Mon, Jan 17, 2011 at 4:59 PM, Elena Pourmal <epourmal@hdfgroup.org>wrote:

Leigh,

I am writing to confirm that the bug you reported does exist in
1.8.5-patch1, but is fixed in 1.8.6 (coming soon).

Elena
On Jan 16, 2011, at 3:47 PM, Leigh Orf wrote:

I managed to build pHDF5 on blueprint.ncsa.uiuc.edu (IBM AIX Power 6).
I compiled the hyperslab_by_chunk.f90 test program found at
http://www.hdfgroup.org/HDF5/Tutor/phypechk.html without error. When I
run it, however, I get the following output:

ATTENTION: 0031-408 4 tasks allocated by LoadLeveler, continuing...
ERROR: 0032-110 Attempt to free a predefined datatype (2) in
MPI_Type_free, task 0
ERROR: 0032-110 Attempt to free a predefined datatype (2) in
MPI_Type_free, task 1
ERROR: 0032-110 Attempt to free a predefined datatype (2) in
MPI_Type_free, task 2
ERROR: 0032-110 Attempt to free a predefined datatype (2) in
MPI_Type_free, task 3
HDF5: infinite loop closing library

D,S,T,D,S,F,D,G,S,T,F,AC,FD,P,FD,P,FD,P,E,E,SL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL
HDF5: infinite loop closing library

The line which causes the grief is:

    CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data, dimsfi, error, &
                    file_space_id = filespace, mem_space_id = memspace,
xfer_prp = plist_id)

If I replace that call with the one that is commented out in the
program, it runs without a problem. That line is:

CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data, dimsfi,error, &
                      file_space_id = filespace, mem_space_id =
memspace)

Any ideas? I definitely want to take advantage of doing collective I/O
if possible.

Leigh

--
Leigh Orf
Associate Professor of Atmospheric Science
Department of Geology and Meteorology
Central Michigan University
Currently on sabbatical at the National Center for Atmospheric Research
in Boulder, CO
NCAR office phone: (303) 497-8200

_______________________________________________
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

--
Leigh Orf
Associate Professor of Atmospheric Science
Department of Geology and Meteorology
Central Michigan University
Currently on sabbatical at the National Center for Atmospheric Research
in Boulder, CO
NCAR office phone: (303) 497-8200

_______________________________________________
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

--
Leigh Orf
Associate Professor of Atmospheric Science
Department of Geology and Meteorology
Central Michigan University
Currently on sabbatical at the National Center for Atmospheric Research
in Boulder, CO
NCAR office phone: (303) 497-8200

--
Leigh Orf
Associate Professor of Atmospheric Science
Department of Geology and Meteorology
Central Michigan University
Currently on sabbatical at the National Center for Atmospheric Research
in Boulder, CO
NCAR office phone: (303) 497-8200

Hi Leigh,

I'm not familiar with the F90 API, but here is an example in C that only
writes from rank 0:

···

-----

if (rank == 0) {
   H5Sselect_all(diskspace);
} else {
   H5Sselect_none(diskspace);
}

H5Dwrite(dataset, TYPE, memspace, diskspace, dxpl, buffer);

-----

Notice that all tasks call H5Dwrite (as required for a collective write)
even though only rank 0 has actually selected a region to write to in the
disk space.

If you have a single integer, you probably want to write it as an attribute.
Almost all calls except H5Dwrite, including attribute and metadata
operations, are assumed to be collective, and expect the same values across
all tasks. There is a handy reference here to confirm this for individual
calls:

http://www.hdfgroup.org/HDF5/doc/RM/CollectiveCalls.html

So you don't have to manually tell HDF5 to only write an attribute from rank
0, for instance. I believe that all metadata is cached across all ranks, so
each rank will need the actual value anyway (otherwise it would have to be
broadcast from rank 0 if you only wrote from there).

The metadata is written to disk as it is evicted from the metadata cache. It
used to be that this was only done from rank 0, which has an identical copy
of the metadata cache as every other task. But we recently collaborated with
the HDF Group to modify this to round-robin writes across MPI tasks to
improve performance on parallel file systems that expect many-to-one file
access patterns (such as Lustre or GPFS). The eventual goal is to have a
paging mechanism that will aggregate metadata into large chunks that align
to file system boundaries, then write only from rank 0 or a subset of
writers (as in collective buffering algorithms found in MPI-IO
implementations). Quincey knows more about that and how it will be
implemented, but it will probably require MPI communication to maintain
cache coherency.

So anyway, the point is that you only have to worry about empty selections
for dataset writes.

Hope that helps,

Mark

On Wed, Jan 19, 2011 at 6:36 PM, Leigh Orf <leigh.orf@gmail.com> wrote:

Mark,

Could you give me an example of a call to H5Dwrite (fortran90 api) where an
"empty selection" is passed? I don't know which argument you mean.

There are many cases (with metadata for instance) where I need only one
member of a group to write the metadata. I am finding that weird things are
happening with some of my code as I work with pHDF5 but I think it's because
I don't entirely understand what pHDF5 expects.

For instance, if I have a single integer that is common amongst all ranks
in a collective group writing to one file, do I just pick the root rank to
do the write and have all other ranks pass some dummy variable?

I can understand the paradigm where you are writing data that is different
on each rank and you need to specify dims and offsets etc. (the example
codes show this) but the "easier" case is throwing me.

Thanks,

Leigh

On Tue, Jan 18, 2011 at 5:15 AM, Mark Howison <mark.howison@gmail.com>wrote:

Hi Leigh,

Yes, it is only a small difference in code between collective and
independent mode for the MPI-IO VFD. To enable collective I/O, you pass a
dataset transfer property list to H5Dwrite like this:

dxpl_id = H5Pcreate(H5P_DATASET_XFER);H5Pset_dxpl_mpio(dxpl_id, H5FD_MPIO_COLLECTIVE);

H5Dwrite(dset_id, H5T_NATIVE_FLOAT, memspace, filespace, dxpl_id, somedata0);

One additional constraint with collective I/O, though, is that all MPI
tasks must call H5Dwrite. If not, your program will stall in a barrier. In
contrast, with independent I/O you can execute writes with no coordination
among MPI tasks.

If you do want only a subset of MPI tasks to write in collective mode, you
can pass an empty selection to H5Dwrite for the non-writing tasks.

Mark

On Tue, Jan 18, 2011 at 12:45 AM, Leigh Orf <leigh.orf@gmail.com> wrote:

Elena,

That is good news, indeed this was with 1.8.5-patch1.

Is code written with using independent IO structured significantly
different than with collective IO? I would like to get moving with pHDF5 and
as I am currently not too familiar with it, want to make sure that I am not
going to have to do a rewrite after the collective code works. It does seem
to all occur behind the scenes with the h5dwrite command, so I presume I am
safe.

Thanks,

Leigh

On Mon, Jan 17, 2011 at 4:59 PM, Elena Pourmal <epourmal@hdfgroup.org>wrote:

Leigh,

I am writing to confirm that the bug you reported does exist in
1.8.5-patch1, but is fixed in 1.8.6 (coming soon).

Elena
On Jan 16, 2011, at 3:47 PM, Leigh Orf wrote:

I managed to build pHDF5 on blueprint.ncsa.uiuc.edu (IBM AIX Power 6).
I compiled the hyperslab_by_chunk.f90 test program found at
http://www.hdfgroup.org/HDF5/Tutor/phypechk.html without error. When I
run it, however, I get the following output:

ATTENTION: 0031-408 4 tasks allocated by LoadLeveler, continuing...
ERROR: 0032-110 Attempt to free a predefined datatype (2) in
MPI_Type_free, task 0
ERROR: 0032-110 Attempt to free a predefined datatype (2) in
MPI_Type_free, task 1
ERROR: 0032-110 Attempt to free a predefined datatype (2) in
MPI_Type_free, task 2
ERROR: 0032-110 Attempt to free a predefined datatype (2) in
MPI_Type_free, task 3
HDF5: infinite loop closing library

D,S,T,D,S,F,D,G,S,T,F,AC,FD,P,FD,P,FD,P,E,E,SL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL
HDF5: infinite loop closing library

The line which causes the grief is:

    CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data, dimsfi, error, &
                    file_space_id = filespace, mem_space_id = memspace,
xfer_prp = plist_id)

If I replace that call with the one that is commented out in the
program, it runs without a problem. That line is:

CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data, dimsfi,error, &
                      file_space_id = filespace, mem_space_id =
memspace)

Any ideas? I definitely want to take advantage of doing collective I/O
if possible.

Leigh

--
Leigh Orf
Associate Professor of Atmospheric Science
Department of Geology and Meteorology
Central Michigan University
Currently on sabbatical at the National Center for Atmospheric Research
in Boulder, CO
NCAR office phone: (303) 497-8200

_______________________________________________
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

--
Leigh Orf
Associate Professor of Atmospheric Science
Department of Geology and Meteorology
Central Michigan University
Currently on sabbatical at the National Center for Atmospheric Research
in Boulder, CO
NCAR office phone: (303) 497-8200

_______________________________________________
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

--
Leigh Orf
Associate Professor of Atmospheric Science
Department of Geology and Meteorology
Central Michigan University
Currently on sabbatical at the National Center for Atmospheric Research
in Boulder, CO
NCAR office phone: (303) 497-8200

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

Hi Leigh,
  As Mark says below, you currently need to perform all metadata modifications from all processes. That includes writing new data values to attributes, as well as other, more obvious operations like creating or deleting objects.

  Quincey

···

On Jan 19, 2011, at 7:27 PM, Mark Howison wrote:

Hi Leigh,

I'm not familiar with the F90 API, but here is an example in C that only writes from rank 0:

-----

if (rank == 0) {
   H5Sselect_all(diskspace);
} else {
   H5Sselect_none(diskspace);
}

H5Dwrite(dataset, TYPE, memspace, diskspace, dxpl, buffer);

-----

Notice that all tasks call H5Dwrite (as required for a collective write) even though only rank 0 has actually selected a region to write to in the disk space.

If you have a single integer, you probably want to write it as an attribute. Almost all calls except H5Dwrite, including attribute and metadata operations, are assumed to be collective, and expect the same values across all tasks. There is a handy reference here to confirm this for individual calls:

http://www.hdfgroup.org/HDF5/doc/RM/CollectiveCalls.html

So you don't have to manually tell HDF5 to only write an attribute from rank 0, for instance. I believe that all metadata is cached across all ranks, so each rank will need the actual value anyway (otherwise it would have to be broadcast from rank 0 if you only wrote from there).

The metadata is written to disk as it is evicted from the metadata cache. It used to be that this was only done from rank 0, which has an identical copy of the metadata cache as every other task. But we recently collaborated with the HDF Group to modify this to round-robin writes across MPI tasks to improve performance on parallel file systems that expect many-to-one file access patterns (such as Lustre or GPFS). The eventual goal is to have a paging mechanism that will aggregate metadata into large chunks that align to file system boundaries, then write only from rank 0 or a subset of writers (as in collective buffering algorithms found in MPI-IO implementations). Quincey knows more about that and how it will be implemented, but it will probably require MPI communication to maintain cache coherency.

So anyway, the point is that you only have to worry about empty selections for dataset writes.

Hope that helps,

Mark

On Wed, Jan 19, 2011 at 6:36 PM, Leigh Orf <leigh.orf@gmail.com> wrote:
Mark,

Could you give me an example of a call to H5Dwrite (fortran90 api) where an "empty selection" is passed? I don't know which argument you mean.

There are many cases (with metadata for instance) where I need only one member of a group to write the metadata. I am finding that weird things are happening with some of my code as I work with pHDF5 but I think it's because I don't entirely understand what pHDF5 expects.

For instance, if I have a single integer that is common amongst all ranks in a collective group writing to one file, do I just pick the root rank to do the write and have all other ranks pass some dummy variable?

I can understand the paradigm where you are writing data that is different on each rank and you need to specify dims and offsets etc. (the example codes show this) but the "easier" case is throwing me.

Thanks,

Leigh

On Tue, Jan 18, 2011 at 5:15 AM, Mark Howison <mark.howison@gmail.com> wrote:
Hi Leigh,

Yes, it is only a small difference in code between collective and independent mode for the MPI-IO VFD. To enable collective I/O, you pass a dataset transfer property list to H5Dwrite like this:
dxpl_id = H5Pcreate(H5P_DATASET_XFER);
H5Pset_dxpl_mpio(dxpl_id, H5FD_MPIO_COLLECTIVE);

H5Dwrite(dset_id, H5T_NATIVE_FLOAT, memspace, filespace, dxpl_id, somedata0);

One additional constraint with collective I/O, though, is that all MPI tasks must call H5Dwrite. If not, your program will stall in a barrier. In contrast, with independent I/O you can execute writes with no coordination among MPI tasks.

If you do want only a subset of MPI tasks to write in collective mode, you can pass an empty selection to H5Dwrite for the non-writing tasks.

Mark

On Tue, Jan 18, 2011 at 12:45 AM, Leigh Orf <leigh.orf@gmail.com> wrote:
Elena,

That is good news, indeed this was with 1.8.5-patch1.

Is code written with using independent IO structured significantly different than with collective IO? I would like to get moving with pHDF5 and as I am currently not too familiar with it, want to make sure that I am not going to have to do a rewrite after the collective code works. It does seem to all occur behind the scenes with the h5dwrite command, so I presume I am safe.

Thanks,

Leigh

On Mon, Jan 17, 2011 at 4:59 PM, Elena Pourmal <epourmal@hdfgroup.org> wrote:
Leigh,

I am writing to confirm that the bug you reported does exist in 1.8.5-patch1, but is fixed in 1.8.6 (coming soon).

Elena
On Jan 16, 2011, at 3:47 PM, Leigh Orf wrote:

I managed to build pHDF5 on blueprint.ncsa.uiuc.edu (IBM AIX Power 6). I compiled the hyperslab_by_chunk.f90 test program found at http://www.hdfgroup.org/HDF5/Tutor/phypechk.html without error. When I run it, however, I get the following output:

ATTENTION: 0031-408 4 tasks allocated by LoadLeveler, continuing...
ERROR: 0032-110 Attempt to free a predefined datatype (2) in MPI_Type_free, task 0
ERROR: 0032-110 Attempt to free a predefined datatype (2) in MPI_Type_free, task 1
ERROR: 0032-110 Attempt to free a predefined datatype (2) in MPI_Type_free, task 2
ERROR: 0032-110 Attempt to free a predefined datatype (2) in MPI_Type_free, task 3
HDF5: infinite loop closing library
      D,S,T,D,S,F,D,G,S,T,F,AC,FD,P,FD,P,FD,P,E,E,SL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL
HDF5: infinite loop closing library

The line which causes the grief is:

    CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data, dimsfi, error, &
                    file_space_id = filespace, mem_space_id = memspace, xfer_prp = plist_id)

If I replace that call with the one that is commented out in the program, it runs without a problem. That line is:

CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data, dimsfi,error, &
                      file_space_id = filespace, mem_space_id = memspace)

Any ideas? I definitely want to take advantage of doing collective I/O if possible.

Leigh

--
Leigh Orf
Associate Professor of Atmospheric Science
Department of Geology and Meteorology
Central Michigan University
Currently on sabbatical at the National Center for Atmospheric Research in Boulder, CO
NCAR office phone: (303) 497-8200

_______________________________________________
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

--
Leigh Orf
Associate Professor of Atmospheric Science
Department of Geology and Meteorology
Central Michigan University
Currently on sabbatical at the National Center for Atmospheric Research in Boulder, CO
NCAR office phone: (303) 497-8200

_______________________________________________
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

--
Leigh Orf
Associate Professor of Atmospheric Science
Department of Geology and Meteorology
Central Michigan University
Currently on sabbatical at the National Center for Atmospheric Research in Boulder, CO
NCAR office phone: (303) 497-8200

_______________________________________________
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

Still having problems... conceptual problems no dobut...

I am first doing a simple floating point value. Here is what I have tried:

      ! filespace first
      rank=1
      dims(1)=1
      count(1)=1
      offset(1) = 0

      call h5screate_simple_f(rank,dims,filespace_id,ierror)
      call
h5dcreate_f(file_id,trim(varname),H5T_NATIVE_REAL,filespace_id,dset_id,ierror)
      call h5sclose_f(filespace_id,ierror)

      !memoryspace:
      call h5screate_simple_f(rank,count,memspace_id,ierror)
      call h5dget_space_f(dset_id,filespace_id,ierror)
      if (iorank.eq.0) then
            call
h5sselect_hyperslab_f(filespace_id,H5S_SELECT_SET_F,offset,count,ierror)
      else
            call h5sselect_none_f(filespace_id,ierror)
      endif
      CALL h5pcreate_f(H5P_DATASET_XFER_F, plist_id, ierror)
      CALL h5pset_dxpl_mpio_f(plist_id, H5FD_MPIO_INDEPENDENT_F, ierror)
      CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, value, dims, ierror, &
                 file_space_id = filespace_id, mem_space_id = memspace_id,
xfer_prp = plist_id)

The problem is, I get the following error on all ranks except 0:

HDF5-DIAG: Error detected in HDF5 (1.8.5-patch1) MPI-process 1:
  #000: H5Dio.c line 266 in H5Dwrite(): can't write data
    major: Dataset
    minor: Write failed
  #001: H5Dio.c line 524 in H5D_write(): src and dest data spaces have
different sizes
    major: Invalid arguments to routine
    minor: Bad value

What am I missing?

I figure if I can get it to go for a single value arrays I can get this to
work for any sized data set. Any help appreciated.

Leigh

···

On Thu, Jan 20, 2011 at 7:46 AM, Quincey Koziol <koziol@hdfgroup.org> wrote:

Hi Leigh,
As Mark says below, you currently need to perform all metadata
modifications from all processes. That includes writing new data values to
attributes, as well as other, more obvious operations like creating or
deleting objects.

Quincey

On Jan 19, 2011, at 7:27 PM, Mark Howison wrote:

Hi Leigh,

I'm not familiar with the F90 API, but here is an example in C that only
writes from rank 0:

-----

if (rank == 0) {
   H5Sselect_all(diskspace);
} else {
   H5Sselect_none(diskspace);
}

H5Dwrite(dataset, TYPE, memspace, diskspace, dxpl, buffer);

-----

Notice that all tasks call H5Dwrite (as required for a collective write)
even though only rank 0 has actually selected a region to write to in the
disk space.

If you have a single integer, you probably want to write it as an
attribute. Almost all calls except H5Dwrite, including attribute and
metadata operations, are assumed to be collective, and expect the same
values across all tasks. There is a handy reference here to confirm this for
individual calls:

http://www.hdfgroup.org/HDF5/doc/RM/CollectiveCalls.html

So you don't have to manually tell HDF5 to only write an attribute from
rank 0, for instance. I believe that all metadata is cached across all
ranks, so each rank will need the actual value anyway (otherwise it would
have to be broadcast from rank 0 if you only wrote from there).

The metadata is written to disk as it is evicted from the metadata cache.
It used to be that this was only done from rank 0, which has an identical
copy of the metadata cache as every other task. But we recently collaborated
with the HDF Group to modify this to round-robin writes across MPI tasks to
improve performance on parallel file systems that expect many-to-one file
access patterns (such as Lustre or GPFS). The eventual goal is to have a
paging mechanism that will aggregate metadata into large chunks that align
to file system boundaries, then write only from rank 0 or a subset of
writers (as in collective buffering algorithms found in MPI-IO
implementations). Quincey knows more about that and how it will be
implemented, but it will probably require MPI communication to maintain
cache coherency.

So anyway, the point is that you only have to worry about empty selections
for dataset writes.

Hope that helps,

Mark

On Wed, Jan 19, 2011 at 6:36 PM, Leigh Orf <leigh.orf@gmail.com> wrote:

Mark,

Could you give me an example of a call to H5Dwrite (fortran90 api) where
an "empty selection" is passed? I don't know which argument you mean.

There are many cases (with metadata for instance) where I need only one
member of a group to write the metadata. I am finding that weird things are
happening with some of my code as I work with pHDF5 but I think it's because
I don't entirely understand what pHDF5 expects.

For instance, if I have a single integer that is common amongst all ranks
in a collective group writing to one file, do I just pick the root rank to
do the write and have all other ranks pass some dummy variable?

I can understand the paradigm where you are writing data that is different
on each rank and you need to specify dims and offsets etc. (the example
codes show this) but the "easier" case is throwing me.

Thanks,

Leigh

On Tue, Jan 18, 2011 at 5:15 AM, Mark Howison <mark.howison@gmail.com>wrote:

Hi Leigh,

Yes, it is only a small difference in code between collective and
independent mode for the MPI-IO VFD. To enable collective I/O, you pass a
dataset transfer property list to H5Dwrite like this:

dxpl_id = H5Pcreate(H5P_DATASET_XFER);H5Pset_dxpl_mpio(dxpl_id, H5FD_MPIO_COLLECTIVE);

H5Dwrite(dset_id, H5T_NATIVE_FLOAT, memspace, filespace, dxpl_id, somedata0);

One additional constraint with collective I/O, though, is that all MPI
tasks must call H5Dwrite. If not, your program will stall in a barrier. In
contrast, with independent I/O you can execute writes with no coordination
among MPI tasks.

If you do want only a subset of MPI tasks to write in collective mode,
you can pass an empty selection to H5Dwrite for the non-writing tasks.

Mark

On Tue, Jan 18, 2011 at 12:45 AM, Leigh Orf <leigh.orf@gmail.com> wrote:

Elena,

That is good news, indeed this was with 1.8.5-patch1.

Is code written with using independent IO structured significantly
different than with collective IO? I would like to get moving with pHDF5 and
as I am currently not too familiar with it, want to make sure that I am not
going to have to do a rewrite after the collective code works. It does seem
to all occur behind the scenes with the h5dwrite command, so I presume I am
safe.

Thanks,

Leigh

On Mon, Jan 17, 2011 at 4:59 PM, Elena Pourmal <epourmal@hdfgroup.org>wrote:

Leigh,

I am writing to confirm that the bug you reported does exist in
1.8.5-patch1, but is fixed in 1.8.6 (coming soon).

Elena
On Jan 16, 2011, at 3:47 PM, Leigh Orf wrote:

I managed to build pHDF5 on blueprint.ncsa.uiuc.edu (IBM AIX Power 6).
I compiled the hyperslab_by_chunk.f90 test program found at
http://www.hdfgroup.org/HDF5/Tutor/phypechk.html without error. When I
run it, however, I get the following output:

ATTENTION: 0031-408 4 tasks allocated by LoadLeveler, continuing...
ERROR: 0032-110 Attempt to free a predefined datatype (2) in
MPI_Type_free, task 0
ERROR: 0032-110 Attempt to free a predefined datatype (2) in
MPI_Type_free, task 1
ERROR: 0032-110 Attempt to free a predefined datatype (2) in
MPI_Type_free, task 2
ERROR: 0032-110 Attempt to free a predefined datatype (2) in
MPI_Type_free, task 3
HDF5: infinite loop closing library

D,S,T,D,S,F,D,G,S,T,F,AC,FD,P,FD,P,FD,P,E,E,SL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL
HDF5: infinite loop closing library

The line which causes the grief is:

    CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data, dimsfi, error, &
                    file_space_id = filespace, mem_space_id = memspace,
xfer_prp = plist_id)

If I replace that call with the one that is commented out in the
program, it runs without a problem. That line is:

CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data, dimsfi,error, &
                      file_space_id = filespace, mem_space_id =
memspace)

Any ideas? I definitely want to take advantage of doing collective I/O
if possible.

Leigh

--
Leigh Orf
Associate Professor of Atmospheric Science
Department of Geology and Meteorology
Central Michigan University
Currently on sabbatical at the National Center for Atmospheric Research
in Boulder, CO
NCAR office phone: (303) 497-8200

_______________________________________________
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

--
Leigh Orf
Associate Professor of Atmospheric Science
Department of Geology and Meteorology
Central Michigan University
Currently on sabbatical at the National Center for Atmospheric Research
in Boulder, CO
NCAR office phone: (303) 497-8200

_______________________________________________
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

--
Leigh Orf
Associate Professor of Atmospheric Science
Department of Geology and Meteorology
Central Michigan University
Currently on sabbatical at the National Center for Atmospheric Research
in Boulder, CO
NCAR office phone: (303) 497-8200

_______________________________________________
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

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

--
Leigh Orf
Associate Professor of Atmospheric Science
Department of Geology and Meteorology
Central Michigan University
Currently on sabbatical at the National Center for Atmospheric Research
in Boulder, CO
NCAR office phone: (303) 497-8200

Sorry for cluttering up the list with this stuff!

The following modifications worked:

      if (iorank.eq.0) then
            call
h5sselect_hyperslab_f(filespace_id,H5S_SELECT_SET_F,offset,count,ierror)
      else
            call h5sselect_none_f(filespace_id,ierror)
            call h5sselect_none_f(memspace_id,ierror)
      endif

And also choosing the right datatype with the h5dwrite command helps helps
(H5T_NATIVE_REAL).

I also set the mode to H5FD_MPIO_COLLECTIVE_F and things worked.

Now, onto multidimensional arrays....

Leigh

···

On Thu, Jan 20, 2011 at 9:28 AM, Leigh Orf <leigh.orf@gmail.com> wrote:

Still having problems... conceptual problems no dobut...

I am first doing a simple floating point value. Here is what I have tried:

      ! filespace first
      rank=1
      dims(1)=1
      count(1)=1
      offset(1) = 0

      call h5screate_simple_f(rank,dims,filespace_id,ierror)
      call
h5dcreate_f(file_id,trim(varname),H5T_NATIVE_REAL,filespace_id,dset_id,ierror)
      call h5sclose_f(filespace_id,ierror)

      !memoryspace:
      call h5screate_simple_f(rank,count,memspace_id,ierror)
      call h5dget_space_f(dset_id,filespace_id,ierror)
      if (iorank.eq.0) then
            call
h5sselect_hyperslab_f(filespace_id,H5S_SELECT_SET_F,offset,count,ierror)
      else
            call h5sselect_none_f(filespace_id,ierror)
      endif
      CALL h5pcreate_f(H5P_DATASET_XFER_F, plist_id, ierror)
      CALL h5pset_dxpl_mpio_f(plist_id, H5FD_MPIO_INDEPENDENT_F, ierror)
      CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, value, dims, ierror, &
                 file_space_id = filespace_id, mem_space_id = memspace_id,
xfer_prp = plist_id)

The problem is, I get the following error on all ranks except 0:

HDF5-DIAG: Error detected in HDF5 (1.8.5-patch1) MPI-process 1:
  #000: H5Dio.c line 266 in H5Dwrite(): can't write data
    major: Dataset
    minor: Write failed
  #001: H5Dio.c line 524 in H5D_write(): src and dest data spaces have
different sizes
    major: Invalid arguments to routine
    minor: Bad value

What am I missing?

I figure if I can get it to go for a single value arrays I can get this to
work for any sized data set. Any help appreciated.

Leigh

On Thu, Jan 20, 2011 at 7:46 AM, Quincey Koziol <koziol@hdfgroup.org>wrote:

Hi Leigh,
As Mark says below, you currently need to perform all metadata
modifications from all processes. That includes writing new data values to
attributes, as well as other, more obvious operations like creating or
deleting objects.

Quincey

On Jan 19, 2011, at 7:27 PM, Mark Howison wrote:

Hi Leigh,

I'm not familiar with the F90 API, but here is an example in C that only
writes from rank 0:

-----

if (rank == 0) {
   H5Sselect_all(diskspace);
} else {
   H5Sselect_none(diskspace);
}

H5Dwrite(dataset, TYPE, memspace, diskspace, dxpl, buffer);

-----

Notice that all tasks call H5Dwrite (as required for a collective write)
even though only rank 0 has actually selected a region to write to in the
disk space.

If you have a single integer, you probably want to write it as an
attribute. Almost all calls except H5Dwrite, including attribute and
metadata operations, are assumed to be collective, and expect the same
values across all tasks. There is a handy reference here to confirm this for
individual calls:

http://www.hdfgroup.org/HDF5/doc/RM/CollectiveCalls.html

So you don't have to manually tell HDF5 to only write an attribute from
rank 0, for instance. I believe that all metadata is cached across all
ranks, so each rank will need the actual value anyway (otherwise it would
have to be broadcast from rank 0 if you only wrote from there).

The metadata is written to disk as it is evicted from the metadata cache.
It used to be that this was only done from rank 0, which has an identical
copy of the metadata cache as every other task. But we recently collaborated
with the HDF Group to modify this to round-robin writes across MPI tasks to
improve performance on parallel file systems that expect many-to-one file
access patterns (such as Lustre or GPFS). The eventual goal is to have a
paging mechanism that will aggregate metadata into large chunks that align
to file system boundaries, then write only from rank 0 or a subset of
writers (as in collective buffering algorithms found in MPI-IO
implementations). Quincey knows more about that and how it will be
implemented, but it will probably require MPI communication to maintain
cache coherency.

So anyway, the point is that you only have to worry about empty selections
for dataset writes.

Hope that helps,

Mark

On Wed, Jan 19, 2011 at 6:36 PM, Leigh Orf <leigh.orf@gmail.com> wrote:

Mark,

Could you give me an example of a call to H5Dwrite (fortran90 api) where
an "empty selection" is passed? I don't know which argument you mean.

There are many cases (with metadata for instance) where I need only one
member of a group to write the metadata. I am finding that weird things are
happening with some of my code as I work with pHDF5 but I think it's because
I don't entirely understand what pHDF5 expects.

For instance, if I have a single integer that is common amongst all ranks
in a collective group writing to one file, do I just pick the root rank to
do the write and have all other ranks pass some dummy variable?

I can understand the paradigm where you are writing data that is
different on each rank and you need to specify dims and offsets etc. (the
example codes show this) but the "easier" case is throwing me.

Thanks,

Leigh

On Tue, Jan 18, 2011 at 5:15 AM, Mark Howison <mark.howison@gmail.com>wrote:

Hi Leigh,

Yes, it is only a small difference in code between collective and
independent mode for the MPI-IO VFD. To enable collective I/O, you pass a
dataset transfer property list to H5Dwrite like this:

dxpl_id = H5Pcreate(H5P_DATASET_XFER);H5Pset_dxpl_mpio(dxpl_id, H5FD_MPIO_COLLECTIVE);

H5Dwrite(dset_id, H5T_NATIVE_FLOAT, memspace, filespace, dxpl_id, somedata0);

One additional constraint with collective I/O, though, is that all MPI
tasks must call H5Dwrite. If not, your program will stall in a barrier. In
contrast, with independent I/O you can execute writes with no coordination
among MPI tasks.

If you do want only a subset of MPI tasks to write in collective mode,
you can pass an empty selection to H5Dwrite for the non-writing tasks.

Mark

On Tue, Jan 18, 2011 at 12:45 AM, Leigh Orf <leigh.orf@gmail.com>wrote:

Elena,

That is good news, indeed this was with 1.8.5-patch1.

Is code written with using independent IO structured significantly
different than with collective IO? I would like to get moving with pHDF5 and
as I am currently not too familiar with it, want to make sure that I am not
going to have to do a rewrite after the collective code works. It does seem
to all occur behind the scenes with the h5dwrite command, so I presume I am
safe.

Thanks,

Leigh

On Mon, Jan 17, 2011 at 4:59 PM, Elena Pourmal <epourmal@hdfgroup.org>wrote:

Leigh,

I am writing to confirm that the bug you reported does exist in
1.8.5-patch1, but is fixed in 1.8.6 (coming soon).

Elena
On Jan 16, 2011, at 3:47 PM, Leigh Orf wrote:

I managed to build pHDF5 on blueprint.ncsa.uiuc.edu (IBM AIX Power
6). I compiled the hyperslab_by_chunk.f90 test program found at
http://www.hdfgroup.org/HDF5/Tutor/phypechk.html without error. When
I run it, however, I get the following output:

ATTENTION: 0031-408 4 tasks allocated by LoadLeveler, continuing...
ERROR: 0032-110 Attempt to free a predefined datatype (2) in
MPI_Type_free, task 0
ERROR: 0032-110 Attempt to free a predefined datatype (2) in
MPI_Type_free, task 1
ERROR: 0032-110 Attempt to free a predefined datatype (2) in
MPI_Type_free, task 2
ERROR: 0032-110 Attempt to free a predefined datatype (2) in
MPI_Type_free, task 3
HDF5: infinite loop closing library

D,S,T,D,S,F,D,G,S,T,F,AC,FD,P,FD,P,FD,P,E,E,SL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL
HDF5: infinite loop closing library

The line which causes the grief is:

    CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data, dimsfi, error,
&
                    file_space_id = filespace, mem_space_id =
memspace, xfer_prp = plist_id)

If I replace that call with the one that is commented out in the
program, it runs without a problem. That line is:

CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data, dimsfi,error, &
                      file_space_id = filespace, mem_space_id =
memspace)

Any ideas? I definitely want to take advantage of doing collective I/O
if possible.

Leigh

--
Leigh Orf
Associate Professor of Atmospheric Science
Department of Geology and Meteorology
Central Michigan University
Currently on sabbatical at the National Center for Atmospheric
Research in Boulder, CO
NCAR office phone: (303) 497-8200

_______________________________________________
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

--
Leigh Orf
Associate Professor of Atmospheric Science
Department of Geology and Meteorology
Central Michigan University
Currently on sabbatical at the National Center for Atmospheric Research
in Boulder, CO
NCAR office phone: (303) 497-8200

_______________________________________________
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

--
Leigh Orf
Associate Professor of Atmospheric Science
Department of Geology and Meteorology
Central Michigan University
Currently on sabbatical at the National Center for Atmospheric Research
in Boulder, CO
NCAR office phone: (303) 497-8200

_______________________________________________
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

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

--
Leigh Orf
Associate Professor of Atmospheric Science
Department of Geology and Meteorology
Central Michigan University
Currently on sabbatical at the National Center for Atmospheric Research
in Boulder, CO
NCAR office phone: (303) 497-8200

--
Leigh Orf
Associate Professor of Atmospheric Science
Department of Geology and Meteorology
Central Michigan University
Currently on sabbatical at the National Center for Atmospheric Research
in Boulder, CO
NCAR office phone: (303) 497-8200

Hi Leigh,

I think that you've simply reversed the order of the memspace and filespace
parameters to H5Dwrite.

Mark

···

On Thu, Jan 20, 2011 at 11:28 AM, Leigh Orf <leigh.orf@gmail.com> wrote:

Still having problems... conceptual problems no dobut...

I am first doing a simple floating point value. Here is what I have tried:

      ! filespace first
      rank=1
      dims(1)=1
      count(1)=1
      offset(1) = 0

      call h5screate_simple_f(rank,dims,filespace_id,ierror)
      call
h5dcreate_f(file_id,trim(varname),H5T_NATIVE_REAL,filespace_id,dset_id,ierror)
      call h5sclose_f(filespace_id,ierror)

      !memoryspace:
      call h5screate_simple_f(rank,count,memspace_id,ierror)
      call h5dget_space_f(dset_id,filespace_id,ierror)
      if (iorank.eq.0) then
            call
h5sselect_hyperslab_f(filespace_id,H5S_SELECT_SET_F,offset,count,ierror)
      else
            call h5sselect_none_f(filespace_id,ierror)
      endif
      CALL h5pcreate_f(H5P_DATASET_XFER_F, plist_id, ierror)
      CALL h5pset_dxpl_mpio_f(plist_id, H5FD_MPIO_INDEPENDENT_F, ierror)
      CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, value, dims, ierror, &
                 file_space_id = filespace_id, mem_space_id = memspace_id,
xfer_prp = plist_id)

The problem is, I get the following error on all ranks except 0:

HDF5-DIAG: Error detected in HDF5 (1.8.5-patch1) MPI-process 1:
  #000: H5Dio.c line 266 in H5Dwrite(): can't write data
    major: Dataset
    minor: Write failed
  #001: H5Dio.c line 524 in H5D_write(): src and dest data spaces have
different sizes
    major: Invalid arguments to routine
    minor: Bad value

What am I missing?

I figure if I can get it to go for a single value arrays I can get this to
work for any sized data set. Any help appreciated.

Leigh

On Thu, Jan 20, 2011 at 7:46 AM, Quincey Koziol <koziol@hdfgroup.org>wrote:

Hi Leigh,
As Mark says below, you currently need to perform all metadata
modifications from all processes. That includes writing new data values to
attributes, as well as other, more obvious operations like creating or
deleting objects.

Quincey

On Jan 19, 2011, at 7:27 PM, Mark Howison wrote:

Hi Leigh,

I'm not familiar with the F90 API, but here is an example in C that only
writes from rank 0:

-----

if (rank == 0) {
   H5Sselect_all(diskspace);
} else {
   H5Sselect_none(diskspace);
}

H5Dwrite(dataset, TYPE, memspace, diskspace, dxpl, buffer);

-----

Notice that all tasks call H5Dwrite (as required for a collective write)
even though only rank 0 has actually selected a region to write to in the
disk space.

If you have a single integer, you probably want to write it as an
attribute. Almost all calls except H5Dwrite, including attribute and
metadata operations, are assumed to be collective, and expect the same
values across all tasks. There is a handy reference here to confirm this for
individual calls:

http://www.hdfgroup.org/HDF5/doc/RM/CollectiveCalls.html

So you don't have to manually tell HDF5 to only write an attribute from
rank 0, for instance. I believe that all metadata is cached across all
ranks, so each rank will need the actual value anyway (otherwise it would
have to be broadcast from rank 0 if you only wrote from there).

The metadata is written to disk as it is evicted from the metadata cache.
It used to be that this was only done from rank 0, which has an identical
copy of the metadata cache as every other task. But we recently collaborated
with the HDF Group to modify this to round-robin writes across MPI tasks to
improve performance on parallel file systems that expect many-to-one file
access patterns (such as Lustre or GPFS). The eventual goal is to have a
paging mechanism that will aggregate metadata into large chunks that align
to file system boundaries, then write only from rank 0 or a subset of
writers (as in collective buffering algorithms found in MPI-IO
implementations). Quincey knows more about that and how it will be
implemented, but it will probably require MPI communication to maintain
cache coherency.

So anyway, the point is that you only have to worry about empty selections
for dataset writes.

Hope that helps,

Mark

On Wed, Jan 19, 2011 at 6:36 PM, Leigh Orf <leigh.orf@gmail.com> wrote:

Mark,

Could you give me an example of a call to H5Dwrite (fortran90 api) where
an "empty selection" is passed? I don't know which argument you mean.

There are many cases (with metadata for instance) where I need only one
member of a group to write the metadata. I am finding that weird things are
happening with some of my code as I work with pHDF5 but I think it's because
I don't entirely understand what pHDF5 expects.

For instance, if I have a single integer that is common amongst all ranks
in a collective group writing to one file, do I just pick the root rank to
do the write and have all other ranks pass some dummy variable?

I can understand the paradigm where you are writing data that is
different on each rank and you need to specify dims and offsets etc. (the
example codes show this) but the "easier" case is throwing me.

Thanks,

Leigh

On Tue, Jan 18, 2011 at 5:15 AM, Mark Howison <mark.howison@gmail.com>wrote:

Hi Leigh,

Yes, it is only a small difference in code between collective and
independent mode for the MPI-IO VFD. To enable collective I/O, you pass a
dataset transfer property list to H5Dwrite like this:

dxpl_id = H5Pcreate(H5P_DATASET_XFER);H5Pset_dxpl_mpio(dxpl_id, H5FD_MPIO_COLLECTIVE);

H5Dwrite(dset_id, H5T_NATIVE_FLOAT, memspace, filespace, dxpl_id, somedata0);

One additional constraint with collective I/O, though, is that all MPI
tasks must call H5Dwrite. If not, your program will stall in a barrier. In
contrast, with independent I/O you can execute writes with no coordination
among MPI tasks.

If you do want only a subset of MPI tasks to write in collective mode,
you can pass an empty selection to H5Dwrite for the non-writing tasks.

Mark

On Tue, Jan 18, 2011 at 12:45 AM, Leigh Orf <leigh.orf@gmail.com>wrote:

Elena,

That is good news, indeed this was with 1.8.5-patch1.

Is code written with using independent IO structured significantly
different than with collective IO? I would like to get moving with pHDF5 and
as I am currently not too familiar with it, want to make sure that I am not
going to have to do a rewrite after the collective code works. It does seem
to all occur behind the scenes with the h5dwrite command, so I presume I am
safe.

Thanks,

Leigh

On Mon, Jan 17, 2011 at 4:59 PM, Elena Pourmal <epourmal@hdfgroup.org>wrote:

Leigh,

I am writing to confirm that the bug you reported does exist in
1.8.5-patch1, but is fixed in 1.8.6 (coming soon).

Elena
On Jan 16, 2011, at 3:47 PM, Leigh Orf wrote:

I managed to build pHDF5 on blueprint.ncsa.uiuc.edu (IBM AIX Power
6). I compiled the hyperslab_by_chunk.f90 test program found at
http://www.hdfgroup.org/HDF5/Tutor/phypechk.html without error. When
I run it, however, I get the following output:

ATTENTION: 0031-408 4 tasks allocated by LoadLeveler, continuing...
ERROR: 0032-110 Attempt to free a predefined datatype (2) in
MPI_Type_free, task 0
ERROR: 0032-110 Attempt to free a predefined datatype (2) in
MPI_Type_free, task 1
ERROR: 0032-110 Attempt to free a predefined datatype (2) in
MPI_Type_free, task 2
ERROR: 0032-110 Attempt to free a predefined datatype (2) in
MPI_Type_free, task 3
HDF5: infinite loop closing library

D,S,T,D,S,F,D,G,S,T,F,AC,FD,P,FD,P,FD,P,E,E,SL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL
HDF5: infinite loop closing library

The line which causes the grief is:

    CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data, dimsfi, error,
&
                    file_space_id = filespace, mem_space_id =
memspace, xfer_prp = plist_id)

If I replace that call with the one that is commented out in the
program, it runs without a problem. That line is:

CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data, dimsfi,error, &
                      file_space_id = filespace, mem_space_id =
memspace)

Any ideas? I definitely want to take advantage of doing collective I/O
if possible.

Leigh

--
Leigh Orf
Associate Professor of Atmospheric Science
Department of Geology and Meteorology
Central Michigan University
Currently on sabbatical at the National Center for Atmospheric
Research in Boulder, CO
NCAR office phone: (303) 497-8200

_______________________________________________
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

--
Leigh Orf
Associate Professor of Atmospheric Science
Department of Geology and Meteorology
Central Michigan University
Currently on sabbatical at the National Center for Atmospheric Research
in Boulder, CO
NCAR office phone: (303) 497-8200

_______________________________________________
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

--
Leigh Orf
Associate Professor of Atmospheric Science
Department of Geology and Meteorology
Central Michigan University
Currently on sabbatical at the National Center for Atmospheric Research
in Boulder, CO
NCAR office phone: (303) 497-8200

_______________________________________________
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

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

--
Leigh Orf
Associate Professor of Atmospheric Science
Department of Geology and Meteorology
Central Michigan University
Currently on sabbatical at the National Center for Atmospheric Research
in Boulder, CO
NCAR office phone: (303) 497-8200

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

That is interesting, I've used the code snippet I sent in the past, but I
think the difference is that I had already set the memspace with
H5Sselect_all on all tasks (on a write, it doesn't matter what the memspace
selection is if the filespace selection is already empty). And your
parameter order is fine -- I didn't realize that F90 had support for
optional parameter lists. Mark

···

On Thu, Jan 20, 2011 at 11:48 AM, Leigh Orf <leigh.orf@gmail.com> wrote:

Sorry for cluttering up the list with this stuff!

The following modifications worked:

      if (iorank.eq.0) then
            call
h5sselect_hyperslab_f(filespace_id,H5S_SELECT_SET_F,offset,count,ierror)
      else
            call h5sselect_none_f(filespace_id,ierror)
            call h5sselect_none_f(memspace_id,ierror)
      endif

And also choosing the right datatype with the h5dwrite command helps helps
(H5T_NATIVE_REAL).

I also set the mode to H5FD_MPIO_COLLECTIVE_F and things worked.

Now, onto multidimensional arrays....

Leigh

On Thu, Jan 20, 2011 at 9:28 AM, Leigh Orf <leigh.orf@gmail.com> wrote:

Still having problems... conceptual problems no dobut...

I am first doing a simple floating point value. Here is what I have tried:

      ! filespace first
      rank=1
      dims(1)=1
      count(1)=1
      offset(1) = 0

      call h5screate_simple_f(rank,dims,filespace_id,ierror)
      call
h5dcreate_f(file_id,trim(varname),H5T_NATIVE_REAL,filespace_id,dset_id,ierror)
      call h5sclose_f(filespace_id,ierror)

      !memoryspace:
      call h5screate_simple_f(rank,count,memspace_id,ierror)
      call h5dget_space_f(dset_id,filespace_id,ierror)
      if (iorank.eq.0) then
            call
h5sselect_hyperslab_f(filespace_id,H5S_SELECT_SET_F,offset,count,ierror)
      else
            call h5sselect_none_f(filespace_id,ierror)
      endif
      CALL h5pcreate_f(H5P_DATASET_XFER_F, plist_id, ierror)
      CALL h5pset_dxpl_mpio_f(plist_id, H5FD_MPIO_INDEPENDENT_F, ierror)
      CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, value, dims, ierror, &
                 file_space_id = filespace_id, mem_space_id = memspace_id,
xfer_prp = plist_id)

The problem is, I get the following error on all ranks except 0:

HDF5-DIAG: Error detected in HDF5 (1.8.5-patch1) MPI-process 1:
  #000: H5Dio.c line 266 in H5Dwrite(): can't write data
    major: Dataset
    minor: Write failed
  #001: H5Dio.c line 524 in H5D_write(): src and dest data spaces have
different sizes
    major: Invalid arguments to routine
    minor: Bad value

What am I missing?

I figure if I can get it to go for a single value arrays I can get this to
work for any sized data set. Any help appreciated.

Leigh

On Thu, Jan 20, 2011 at 7:46 AM, Quincey Koziol <koziol@hdfgroup.org>wrote:

Hi Leigh,
As Mark says below, you currently need to perform all metadata
modifications from all processes. That includes writing new data values to
attributes, as well as other, more obvious operations like creating or
deleting objects.

Quincey

On Jan 19, 2011, at 7:27 PM, Mark Howison wrote:

Hi Leigh,

I'm not familiar with the F90 API, but here is an example in C that only
writes from rank 0:

-----

if (rank == 0) {
   H5Sselect_all(diskspace);
} else {
   H5Sselect_none(diskspace);
}

H5Dwrite(dataset, TYPE, memspace, diskspace, dxpl, buffer);

-----

Notice that all tasks call H5Dwrite (as required for a collective write)
even though only rank 0 has actually selected a region to write to in the
disk space.

If you have a single integer, you probably want to write it as an
attribute. Almost all calls except H5Dwrite, including attribute and
metadata operations, are assumed to be collective, and expect the same
values across all tasks. There is a handy reference here to confirm this for
individual calls:

http://www.hdfgroup.org/HDF5/doc/RM/CollectiveCalls.html

So you don't have to manually tell HDF5 to only write an attribute from
rank 0, for instance. I believe that all metadata is cached across all
ranks, so each rank will need the actual value anyway (otherwise it would
have to be broadcast from rank 0 if you only wrote from there).

The metadata is written to disk as it is evicted from the metadata cache.
It used to be that this was only done from rank 0, which has an identical
copy of the metadata cache as every other task. But we recently collaborated
with the HDF Group to modify this to round-robin writes across MPI tasks to
improve performance on parallel file systems that expect many-to-one file
access patterns (such as Lustre or GPFS). The eventual goal is to have a
paging mechanism that will aggregate metadata into large chunks that align
to file system boundaries, then write only from rank 0 or a subset of
writers (as in collective buffering algorithms found in MPI-IO
implementations). Quincey knows more about that and how it will be
implemented, but it will probably require MPI communication to maintain
cache coherency.

So anyway, the point is that you only have to worry about empty
selections for dataset writes.

Hope that helps,

Mark

On Wed, Jan 19, 2011 at 6:36 PM, Leigh Orf <leigh.orf@gmail.com> wrote:

Mark,

Could you give me an example of a call to H5Dwrite (fortran90 api) where
an "empty selection" is passed? I don't know which argument you mean.

There are many cases (with metadata for instance) where I need only one
member of a group to write the metadata. I am finding that weird things are
happening with some of my code as I work with pHDF5 but I think it's because
I don't entirely understand what pHDF5 expects.

For instance, if I have a single integer that is common amongst all
ranks in a collective group writing to one file, do I just pick the root
rank to do the write and have all other ranks pass some dummy variable?

I can understand the paradigm where you are writing data that is
different on each rank and you need to specify dims and offsets etc. (the
example codes show this) but the "easier" case is throwing me.

Thanks,

Leigh

On Tue, Jan 18, 2011 at 5:15 AM, Mark Howison <mark.howison@gmail.com>wrote:

Hi Leigh,

Yes, it is only a small difference in code between collective and
independent mode for the MPI-IO VFD. To enable collective I/O, you pass a
dataset transfer property list to H5Dwrite like this:

dxpl_id = H5Pcreate(H5P_DATASET_XFER);H5Pset_dxpl_mpio(dxpl_id, H5FD_MPIO_COLLECTIVE);

H5Dwrite(dset_id, H5T_NATIVE_FLOAT, memspace, filespace, dxpl_id, somedata0);

One additional constraint with collective I/O, though, is that all MPI
tasks must call H5Dwrite. If not, your program will stall in a barrier. In
contrast, with independent I/O you can execute writes with no coordination
among MPI tasks.

If you do want only a subset of MPI tasks to write in collective mode,
you can pass an empty selection to H5Dwrite for the non-writing tasks.

Mark

On Tue, Jan 18, 2011 at 12:45 AM, Leigh Orf <leigh.orf@gmail.com>wrote:

Elena,

That is good news, indeed this was with 1.8.5-patch1.

Is code written with using independent IO structured significantly
different than with collective IO? I would like to get moving with pHDF5 and
as I am currently not too familiar with it, want to make sure that I am not
going to have to do a rewrite after the collective code works. It does seem
to all occur behind the scenes with the h5dwrite command, so I presume I am
safe.

Thanks,

Leigh

On Mon, Jan 17, 2011 at 4:59 PM, Elena Pourmal <epourmal@hdfgroup.org >>>>>> > wrote:

Leigh,

I am writing to confirm that the bug you reported does exist in
1.8.5-patch1, but is fixed in 1.8.6 (coming soon).

Elena
On Jan 16, 2011, at 3:47 PM, Leigh Orf wrote:

I managed to build pHDF5 on blueprint.ncsa.uiuc.edu (IBM AIX Power
6). I compiled the hyperslab_by_chunk.f90 test program found at
http://www.hdfgroup.org/HDF5/Tutor/phypechk.html without error. When
I run it, however, I get the following output:

ATTENTION: 0031-408 4 tasks allocated by LoadLeveler, continuing...
ERROR: 0032-110 Attempt to free a predefined datatype (2) in
MPI_Type_free, task 0
ERROR: 0032-110 Attempt to free a predefined datatype (2) in
MPI_Type_free, task 1
ERROR: 0032-110 Attempt to free a predefined datatype (2) in
MPI_Type_free, task 2
ERROR: 0032-110 Attempt to free a predefined datatype (2) in
MPI_Type_free, task 3
HDF5: infinite loop closing library

D,S,T,D,S,F,D,G,S,T,F,AC,FD,P,FD,P,FD,P,E,E,SL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL,FL
HDF5: infinite loop closing library

The line which causes the grief is:

    CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data, dimsfi, error,
&
                    file_space_id = filespace, mem_space_id =
memspace, xfer_prp = plist_id)

If I replace that call with the one that is commented out in the
program, it runs without a problem. That line is:

CALL h5dwrite_f(dset_id, H5T_NATIVE_INTEGER, data, dimsfi,error, &
                      file_space_id = filespace, mem_space_id =
memspace)

Any ideas? I definitely want to take advantage of doing collective
I/O if possible.

Leigh

--
Leigh Orf
Associate Professor of Atmospheric Science
Department of Geology and Meteorology
Central Michigan University
Currently on sabbatical at the National Center for Atmospheric
Research in Boulder, CO
NCAR office phone: (303) 497-8200

_______________________________________________
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

--
Leigh Orf
Associate Professor of Atmospheric Science
Department of Geology and Meteorology
Central Michigan University
Currently on sabbatical at the National Center for Atmospheric
Research in Boulder, CO
NCAR office phone: (303) 497-8200

_______________________________________________
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

--
Leigh Orf
Associate Professor of Atmospheric Science
Department of Geology and Meteorology
Central Michigan University
Currently on sabbatical at the National Center for Atmospheric Research
in Boulder, CO
NCAR office phone: (303) 497-8200

_______________________________________________
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

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

--
Leigh Orf
Associate Professor of Atmospheric Science
Department of Geology and Meteorology
Central Michigan University
Currently on sabbatical at the National Center for Atmospheric Research
in Boulder, CO
NCAR office phone: (303) 497-8200

--
Leigh Orf
Associate Professor of Atmospheric Science
Department of Geology and Meteorology
Central Michigan University
Currently on sabbatical at the National Center for Atmospheric Research
in Boulder, CO
NCAR office phone: (303) 497-8200

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

Hello,

I would like to make some tests of my software with HDF5 1.8.5 on
windows XP 64.

However, it seems windows XP 64 binairies for ifort 10.1 released on HDF
website are not compatible with ifort 11.1 and I have only ifort 11.1
(not VS 2008) so I can't compile HDF5 myself.

Please, is there anybody who has compiled HDF5 on windows XP 64 for
ifort 11.1 ?

If not, would it be possible to get a binary version of HDF5 1.9 to test
my software against it ?

Thanks a lot,

Cyril.