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

WIP: Fix chunk size when compression is soft-disabled #905

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@
- [[PR 868]](https://github.com/parthenon-hpc-lab/parthenon/pull/868) Add block-local face, edge, and nodal fields and allow for packing

### Changed (changing behavior/API/variables/...)
- [[PR 897]](https://github.com/parthenon-hpc-lab/parthenon/pull/897) Deflate compression filter is not called any more if compression is soft disabled
- [[PR 899]](https://github.com/parthenon-hpc-lab/parthenon/pull/899) Deflate compression filter is not called any more if compression is soft disabled
- [[PR 896]](https://github.com/parthenon-hpc-lab/parthenon/pull/896) Update Kokkos integration to support installed version. Use `serial` (flat MPI) host parallelization by default (instead of OpenMP)
- [[PR 894]](https://github.com/parthenon-hpc-lab/parthenon/pull/894) Demand that sparse pool order sparse ids
- [[PR 888]](https://github.com/parthenon-hpc-lab/parthenon/pull/888) Bump Kokkos submodule to 4.0.1
- [[PR 885]](https://github.com/parthenon-hpc-lab/parthenon/pull/885) Expose PackDescriptor and use uids in SparsePacks

### Fixed (not changing behavior/API/variables/...)
- [[PR 905]](https://github.com/parthenon-hpc-lab/parthenon/pull/905) Fix chunk size when compression is soft-disabled
- [[PR 890]](https://github.com/parthenon-hpc-lab/parthenon/pull/890) Fix bugs in sparse communication and prolongation

### Infrastructure (changes irrelevant to downstream codes)
Expand Down
14 changes: 5 additions & 9 deletions src/outputs/parthenon_hdf5.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -444,10 +444,8 @@ void PHDF5Output::WriteOutputFileImpl(Mesh *pm, ParameterInput *pin, SimTime *tm
local_count[vinfo.tensor_rank + 3] = global_count[vinfo.tensor_rank + 3] = nx1;

#ifndef PARTHENON_DISABLE_HDF5_COMPRESSION
if (output_params.hdf5_compression_level > 0) {
for (int i = ndim - 3; i < ndim; i++) {
chunk_size[i] = local_count[i];
}
for (int i = ndim - 3; i < ndim; i++) {
chunk_size[i] = local_count[i];
}
#endif
} else if (vinfo.where == MetadataFlag(Metadata::None)) {
Expand All @@ -457,11 +455,9 @@ void PHDF5Output::WriteOutputFileImpl(Mesh *pm, ParameterInput *pin, SimTime *tm
}

#ifndef PARTHENON_DISABLE_HDF5_COMPRESSION
if (output_params.hdf5_compression_level > 0) {
int nchunk_indices = std::min<int>(vinfo.tensor_rank, 3);
for (int i = ndim - nchunk_indices; i < ndim; i++) {
chunk_size[i] = alldims[6 - nchunk_indices + i];
}
int nchunk_indices = std::min<int>(vinfo.tensor_rank, 3);
for (int i = ndim - nchunk_indices; i < ndim; i++) {
chunk_size[i] = alldims[6 - nchunk_indices + i];
}
#endif
} else {
Expand Down