Skip to content
Merged
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
4 changes: 2 additions & 2 deletions src/Component.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2501,7 +2501,7 @@ void Component::write_HDF5(HighFive::Group& group, bool masses, bool IDs)
auto dcplI = HighFive::DataSetCreateProps{};
auto dcplD = HighFive::DataSetCreateProps{};

if (H5compress or H5chunk) {
if ((H5compress or H5chunk) and nbodies > 0) {
int chunk = H5chunk;

// Clamp chunk to [1, nbodies]: use nbodies/8 as a downsize when
Expand Down Expand Up @@ -2642,7 +2642,7 @@ void Component::write_H5(H5::Group& group)

// This could be generalized by registering a user filter, like
// blosc. Right now, we're using the default (which is gzip)
if (H5compress or H5chunk) {
if ((H5compress or H5chunk) and h5_particles.size() > 0) {
// Set chunking
if (H5chunk) {
// Clamp chunk to [1, nbodies]: use nbodies/8 as a downsize when
Expand Down