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

Small Bugfix: Fix an issue outputting >4GB single variables per rank #1146

Merged
merged 3 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,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 1146]](https://github.com/parthenon-hpc-lab/parthenon/pull/1146) Fix an issue outputting >4GB single variables per rank
- [[PR 1132]](https://github.com/parthenon-hpc-lab/parthenon/pull/1132) Fix regional dependencies for iterative task lists and make solvers work for arbirtrary MeshData partitioning
- [[PR 1139]](https://github.com/parthenon-hpc-lab/parthenon/pull/1139) only add --expt-relaxed-constexpr for COMPILE_LANGUAGE:CXX
- [[PR 1131]](https://github.com/parthenon-hpc-lab/parthenon/pull/1131) Make deallocation of fine and sparse fields work
Expand Down
8 changes: 4 additions & 4 deletions src/outputs/parthenon_hdf5.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ void PHDF5Output::WriteOutputFileImpl(Mesh *pm, ParameterInput *pin, SimTime *tm
// HDF5 structures
// Also writes companion xdmf file

const int max_blocks_global = pm->nbtotal;
const int num_blocks_local = static_cast<int>(pm->block_list.size());
const size_t max_blocks_global = pm->nbtotal;
const size_t num_blocks_local = pm->block_list.size();

const IndexDomain theDomain =
(output_params.include_ghost_zones ? IndexDomain::entire : IndexDomain::interior);
Expand Down Expand Up @@ -301,9 +301,9 @@ void PHDF5Output::WriteOutputFileImpl(Mesh *pm, ParameterInput *pin, SimTime *tm
std::vector<int> sparse_dealloc_count(num_blocks_local * num_sparse);

// allocate space for largest size variable
int varSize_max = 0;
size_t varSize_max = 0;
for (auto &vinfo : all_vars_info) {
const int varSize = vinfo.Size();
const size_t varSize = vinfo.Size();
varSize_max = std::max(varSize_max, varSize);
}

Expand Down
Loading