<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hi Barry and Matt,</p>
    <p>It turns out to be my stupid error in testing hdf5 chunk size.
      Different chunk sizes have been passed which is not allowed. After
      setting the same chunk size, the code now works.</p>
    <p>Thanks,</p>
    <p>Danyang<br>
    </p>
    <div class="moz-cite-prefix">On 2019-09-03 1:58 a.m., Matthew
      Knepley wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAMYG4G=_cWo5-NDHfQyN8+Gr-a0DN0M5dBCc06Gq--mwZQQbKQ@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div dir="ltr">On Tue, Sep 3, 2019 at 1:57 AM Danyang Su via
          petsc-users <<a href="mailto:petsc-users@mcs.anl.gov"
            moz-do-not-send="true">petsc-users@mcs.anl.gov</a>>
          wrote:<br>
        </div>
        <div class="gmail_quote">
          <blockquote class="gmail_quote" style="margin:0px 0px 0px
            0.8ex;border-left:1px solid
            rgb(204,204,204);padding-left:1ex">Unfortunately, the master
            branch with hdf-1.10.5 returns similar error.<br>
          </blockquote>
          <div><br>
          </div>
          <div>It looks like its complaining about the group_id. Are you
            sure its correct?</div>
          <div><br>
          </div>
          <div>   Matt</div>
          <div> </div>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px
            0.8ex;border-left:1px solid
            rgb(204,204,204);padding-left:1ex">
            Danyang<br>
            <br>
            On 2019-09-02 5:31 p.m., Danyang Su wrote:<br>
            > Hi Barry,<br>
            ><br>
            > Yes, I have already included zlib and szlib during the
            configuration. <br>
            > I will try the dev version to see if it works.<br>
            ><br>
            > Thanks,<br>
            ><br>
            > Danyang<br>
            ><br>
            > On 2019-09-02 12:45 p.m., Smith, Barry F. wrote:<br>
            >>    You could try the master branch of PETSc that
            uses a much more <br>
            >> recent branch of hdf5<br>
            >><br>
            >>    When you did the --download-hdf5 did you also do
            --download-zlib <br>
            >> and --download-szlib (though I would hope hdf5
            would give you a very <br>
            >> useful error message that they need to be installed
            instead of the <br>
            >> vague error message they do provide.)<br>
            >><br>
            >>     Barry<br>
            >><br>
            >><br>
            >>> On Sep 2, 2019, at 2:24 PM, Danyang Su via
            petsc-users <br>
            >>> <<a href="mailto:petsc-users@mcs.anl.gov"
              target="_blank" moz-do-not-send="true">petsc-users@mcs.anl.gov</a>>
            wrote:<br>
            >>><br>
            >>> Dear All,<br>
            >>><br>
            >>> Not sure if this is the right place to ask hdf5
            question. I <br>
            >>> installed hdf5 through PETSc configuration
            --download-hdf5=yes. The <br>
            >>> code runs without problem except the function
            to create compressed <br>
            >>> data (red part shown below).<br>
            >>><br>
            >>>      !c create local memory space and hyperslab<br>
            >>>      call h5screate_simple_f(hdf5_ndim,
            hdf5_dsize, <br>
            >>> memspace,           &<br>
            >>>                              hdf5_ierr)<br>
            >>>      call h5sselect_hyperslab_f(memspace, <br>
            >>> H5S_SELECT_SET_F,             &<br>
            >>>                                 hdf5_offset,
            hdf5_count, <br>
            >>> hdf5_ierr,     &<br>
            >>>                                 hdf5_stride,
            hdf5_block)<br>
            >>><br>
            >>>      !c create the global file space and
            hyperslab<br>
            >>>      call
            h5screate_simple_f(hdf5_ndim,hdf5_gdsize,filespace, &<br>
            >>>                              hdf5_ierr)<br>
            >>>      call h5sselect_hyperslab_f(filespace, <br>
            >>> H5S_SELECT_SET_F,            &<br>
            >>>                                 hdf5_goffset,
            hdf5_count, <br>
            >>> hdf5_ierr,    &<br>
            >>>                                 hdf5_stride,
            hdf5_block)<br>
            >>><br>
            >>>      !c create a data chunking property<br>
            >>>      call h5pcreate_f(H5P_DATASET_CREATE_F,
            chunk_id, hdf5_ierr)<br>
            >>>      call h5pset_chunk_f(chunk_id, hdf5_ndim,
            hdf5_csize, hdf5_ierr)<br>
            >>><br>
            >>>      !c create compressed data, dataset must be
            chunked for compression<br>
            >>>      !c the following cause crash in hdf5
            library, check when new<br>
            >>>      !c hdf5 version is available<br>
            >>><br>
            >>>      ! Set ZLIB / DEFLATE Compression using
            compression level 6.<br>
            >>>      ! To use SZIP Compression comment out
            these lines.<br>
            >>>      !call h5pset_deflate_f(chunk_id, 6,
            hdf5_ierr)<br>
            >>><br>
            >>>      ! Uncomment these lines to set SZIP
            Compression<br>
            >>>      !szip_options_mask = H5_SZIP_NN_OM_F<br>
            >>>      !szip_pixels_per_block = 16<br>
            >>>      !call H5Pset_szip_f(chunk_id, <br>
            >>> szip_options_mask,                    &<br>
            >>>      !                   szip_pixels_per_block,
            hdf5_ierr)<br>
            >>><br>
            >>>      !c create the dataset id<br>
            >>>      call h5dcreate_f(group_id, dataname, <br>
            >>> H5T_NATIVE_INTEGER,           &<br>
            >>>                       filespace, dset_id, <br>
            >>> hdf5_ierr,                    &<br>
            >>>                       dcpl_id=chunk_id)<br>
            >>><br>
            >>>      !c create a data transfer property<br>
            >>>      call h5pcreate_f(H5P_DATASET_XFER_F,
            xlist_id, hdf5_ierr)<br>
            >>>      call h5pset_dxpl_mpio_f(xlist_id, <br>
            >>> H5FD_MPIO_COLLECTIVE_F,          &<br>
            >>>                              hdf5_ierr)<br>
            >>><br>
            >>>      !c write the dataset collectively<br>
            >>>      call h5dwrite_f(dset_id,
            H5T_NATIVE_INTEGER, dataset, <br>
            >>> hdf5_dsize,  &<br>
            >>>                      hdf5_ierr, <br>
            >>> file_space_id=filespace,                &<br>
            >>>                      mem_space_id=memspace,
            xfer_prp = xlist_id)<br>
            >>><br>
            >>>      call h5dclose_f(dset_id, hdf5_ierr)<br>
            >>><br>
            >>>      !c close resources<br>
            >>>      call h5sclose_f(filespace, hdf5_ierr)<br>
            >>>      call h5sclose_f(memspace, hdf5_ierr)<br>
            >>>      call h5pclose_f(chunk_id, hdf5_ierr)<br>
            >>>      call h5pclose_f(xlist_id, hdf5_ierr)<br>
            >>><br>
            >>><br>
            >>><br>
            >>> Both h5pset_deflate_f and H5Pset_szip_f crashes
            the code with error <br>
            >>> information as shown below. If I comment out
            h5pset_deflate_f and <br>
            >>> H5Pset_szip_f, then everything works fine.<br>
            >>><br>
            >>> HDF5-DIAG: Error detected in HDF5 (1.8.18)
            MPI-process 0:<br>
            >>>    #000: H5D.c line 194 in H5Dcreate2(): unable
            to create dataset<br>
            >>>      major: Dataset<br>
            >>>      minor: Unable to initialize object<br>
            >>>    #001: H5Dint.c line 455 in
            H5D__create_named(): unable to create <br>
            >>> and link to dataset<br>
            >>>      major: Dataset<br>
            >>>      minor: Unable to initialize object<br>
            >>>    #002: H5L.c line 1638 in H5L_link_object():
            unable to create new <br>
            >>> link to object<br>
            >>>      major: Links<br>
            >>>      minor: Unable to initialize object<br>
            >>>    #003: H5L.c line 1882 in H5L_create_real():
            can't insert link<br>
            >>>      major: Symbol table<br>
            >>>      minor: Unable to insert object<br>
            >>>    #004: H5Gtraverse.c line 861 in
            H5G_traverse(): internal path <br>
            >>> traversal failed<br>
            >>>      major: Symbol table<br>
            >>>      minor: Object not found<br>
            >>><br>
            >>> Does anyone encounter this kind of error
            before?<br>
            >>><br>
            >>> Kind regards,<br>
            >>><br>
            >>> Danyang<br>
            >>><br>
          </blockquote>
        </div>
        <br clear="all">
        <div><br>
        </div>
        -- <br>
        <div dir="ltr" class="gmail_signature">
          <div dir="ltr">
            <div>
              <div dir="ltr">
                <div>
                  <div dir="ltr">
                    <div>What most experimenters take for granted before
                      they begin their experiments is infinitely more
                      interesting than any results to which their
                      experiments lead.<br>
                      -- Norbert Wiener</div>
                    <div><br>
                    </div>
                    <div><a href="http://www.cse.buffalo.edu/~knepley/"
                        target="_blank" moz-do-not-send="true">https://www.cse.buffalo.edu/~knepley/</a><br>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
  </body>
</html>