Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Early Query: availableChunks & HDF5 #961

Closed
ax3l opened this issue Apr 8, 2021 · 1 comment · Fixed by #1035
Closed

Early Query: availableChunks & HDF5 #961

ax3l opened this issue Apr 8, 2021 · 1 comment · Fixed by #1035
Assignees

Comments

@ax3l
Copy link
Member

ax3l commented Apr 8, 2021

Describe the bug
It seems that querying availableChunks early in a HDF5 file during read causes an issue with opening logic.

To Reproduce

#include <openPMD/openPMD.hpp>

#include <iostream>


using std::cout;
using namespace openPMD;

int main()
{
    Series s = Series(
        "../samples/git-sample/data%T.h5",
        Access::READ_ONLY
    );

    auto electrons = s.iterations[400].particles["electrons"];

    for( auto & r : electrons )
    {
        cout << r.first << ": ";
        for( auto & r_c : r.second )
        {
            cout << r_c.first << "\n";
            if( !r_c.second.constant() )
                auto chunks = r_c.second.availableChunks();
        }
    }

    return 0;
}
charge: 
        Scalar
mass: 
      Scalar
momentum: x
terminate called after throwing an instance of 'std::runtime_error'
  what():  [HDF5] File ID not found with file name
Aborted (core dumped)

auto fid = m_fileNamesWithID.find( fname->second );
VERIFY( fid != m_fileNamesWithID.end(),
"[HDF5] File ID not found with file name" );

The value of fname->second is ../samples/git-sample/data00000400.h5.
The elements in m_fileNamesWithID.size() are 0.

Expected behavior
This works with ADIOS2, so I think it's a backend bug for HDF5.

Software Environment

  • version of openPMD-api: latest dev
  • installed openPMD-api via: source
  • operating system: Ubuntu 20.04
  • machine: local
  • name and version of Python implementation: N/A
  • version of HDF5: 1.10.7
  • version of ADIOS1: 1.13.1
  • version of ADIOS2: 2.7.1
  • name and version of MPI: serial run, but build with OpenMPI

Additional context
Add any other context about the problem here.

@ax3l ax3l changed the title availableChunks & HDF5 Early Query: availableChunks & HDF5 Apr 8, 2021
@ax3l
Copy link
Member Author

ax3l commented Jul 8, 2021

Proposed fix in #1035

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants