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

Constant scalars: Don't flush double #1315

Merged
merged 1 commit into from
Oct 7, 2022

Conversation

franzpoeschel
Copy link
Contributor

@franzpoeschel franzpoeschel commented Oct 4, 2022

Bug introduced in #1264 (only in dev, no releases affected). Constant scalar components were flushed twice, creating paths created in duplicate:

Without this PR:

> bpls -a openPMD/simData_000200.bp/ -le '.*/particles/e/charge/.*'
  uint64_t  /data/200/particles/e/charge/charge/shape                        attr   = 65535994
  double    /data/200/particles/e/charge/charge/value                        attr   = -0.00014378
  int32_t   /data/200/particles/e/charge/macroWeighted                       attr   = 0
  uint64_t  /data/200/particles/e/charge/shape                               attr   = 65535994
  double    /data/200/particles/e/charge/timeOffset                          attr   = 0
  double    /data/200/particles/e/charge/unitDimension                       attr   = {0, 0, 1, 1, 0, 0, 0}
  double    /data/200/particles/e/charge/unitSI                              attr   = 1.11432e-15
  double    /data/200/particles/e/charge/value                               attr   = -0.00014378
  double    /data/200/particles/e/charge/weightingPower                      attr   = 1

With the PR:

> bpls -a openPMD/simData_000200.bp/ -le '.*/particles/e/charge/.*'
  int32_t   /data/200/particles/e/charge/macroWeighted                       attr   = 0
  uint64_t  /data/200/particles/e/charge/shape                               attr   = 65535994
  double    /data/200/particles/e/charge/timeOffset                          attr   = 0
  double    /data/200/particles/e/charge/unitDimension                       attr   = {0, 0, 1, 1, 0, 0, 0}
  double    /data/200/particles/e/charge/unitSI                              attr   = 1.11432e-15
  double    /data/200/particles/e/charge/value                               attr   = -0.00014378
  double    /data/200/particles/e/charge/weightingPower                      attr   = 1

Paths were created in duplicate
@ax3l ax3l merged commit 273466e into openPMD:dev Oct 7, 2022
eschnett added a commit to eschnett/openPMD-api that referenced this pull request Nov 11, 2022
* dev: (70 commits)
  Docs: Recommend Static Build for Superbuilds (openPMD#1325)
  Python 3.11 (openPMD#1323)
  pybind11: v2.10.1+ (openPMD#1322)
  Add Attribute::getOptional<T>() and use to add some more dynamic datatype conversions at read time (openPMD#1278)
  Mapping between ADIOS steps and openPMD iterations (openPMD#949)
  Deprecate shareRaw (openPMD#1229)
  Fix append mode double attributes (openPMD#1302)
  Constant scalars: Don't flush double (openPMD#1315)
  Remove caching cmake vars (openPMD#1313)
  [pre-commit.ci] pre-commit autoupdate (openPMD#1311)
  storeChunk: Add an overload for shared_ptr<T[]> (openPMD#1296)
  Fix `operationAsString` Export (openPMD#1309)
  ADIOS2: more fine-grained control for file endings (openPMD#1218)
  [pre-commit.ci] pre-commit autoupdate (openPMD#1307)
  Fix file existence check in parallel tests (openPMD#1303)
  ADIOS2: Flush to disk within a step (openPMD#1207)
  [pre-commit.ci] pre-commit autoupdate (openPMD#1304)
  [pre-commit.ci] pre-commit autoupdate (openPMD#1295)
  Update catch2 to v2.13.9 (openPMD#1299)
  [pre-commit.ci] pre-commit autoupdate (openPMD#1292)
  ...

# Conflicts:
#	.github/workflows/linux.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants