Skip to content

Commit

Permalink
Merge pull request #1095 from parthenon-hpc-lab/jmm/include-guards
Browse files Browse the repository at this point in the history
add missing include guard for hdf5 restart
  • Loading branch information
Yurlungur authored Jun 5, 2024
2 parents 8b5973e + 65d31dd commit ebd3e69
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
- [[PR 1004]](https://github.com/parthenon-hpc-lab/parthenon/pull/1004) Allow parameter modification from an input file for restarts

### Fixed (not changing behavior/API/variables/...)
- [[PR 1095]](https://github.com/parthenon-hpc-lab/parthenon/pull/1095) Add missing include guards in hdf5 restart
- [[PR 1093]](https://github.com/parthenon-hpc-lab/parthenon/pull/1093) Fix forest size for symmetry dimensions
- [[PR 1089]](https://github.com/parthenon-hpc-lab/parthenon/pull/1089) Fix loading restart files without derefinement counter
- [[PR 1079]](https://github.com/parthenon-hpc-lab/parthenon/pull/1079) Address XDMF/Visit Issues
Expand Down
4 changes: 4 additions & 0 deletions src/outputs/restart_hdf5.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ RestartReaderHDF5::SparseInfo RestartReaderHDF5::GetSparseInfo() const {
}

RestartReaderHDF5::MeshInfo RestartReaderHDF5::GetMeshInfo() const {
#ifndef ENABLE_HDF5
PARTHENON_FAIL("Restart functionality is not available because HDF5 is disabled");
#else
RestartReaderHDF5::MeshInfo mesh_info;
mesh_info.nbnew = GetAttr<int>("Info", "NBNew");
mesh_info.nbdel = GetAttr<int>("Info", "NBDel");
Expand Down Expand Up @@ -149,6 +152,7 @@ RestartReaderHDF5::MeshInfo RestartReaderHDF5::GetMeshInfo() const {
mesh_info.derefinement_count = std::vector<int>(mesh_info.nbtotal, 0);
}
return mesh_info;
#endif
}

SimTime RestartReaderHDF5::GetTimeInfo() const {
Expand Down

0 comments on commit ebd3e69

Please sign in to comment.