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

Encapsulate field IO, first step to multiple slice IO #300

Merged
merged 19 commits into from
Jan 8, 2021

Conversation

MaxThevenet
Copy link
Member

@MaxThevenet MaxThevenet commented Jan 8, 2021

This PR is a first step to enable multiple IO slices. It removes details about field diagnostics (2D XZ slice or full 3D XYZ array) and puts it in a separate class FieldDiagnostic. The main changes are:

  • a new class FieldDiagnostics was created, that contains the IO data + metadata
  • Fields::m_F is now a DUMMY multifab (data not allocated) only used for its metadata, while it used to be holding the IO.
  • Fields now has a new member FieldDiagnostic m_diags.
  • The slice type is extended from xz only to xz or yz.

input parameters hipace.output_slice and hipace.3d_on_host have been removed. The slice type is now given by

diagnostic.diag_type = xz # or yz or xyz

As before, only the central slice is available.

  • Small enough (< few 100s of lines), otherwise it should probably be split into smaller PRs
  • Tested (describe the tests in the PR description)
  • Runs on GPU (basic: the code compiles and run well with the new module)
  • Contains an automated test (checksum and/or comparison with theory)
  • Documented: all elements (classes and their members, functions, namespaces, etc.) are documented
  • Constified (All that can be const is const)
  • Code is clean (no unwanted comments, )
  • Style and code conventions are respected at the bottom of https://github.com/Hi-PACE/hipace
  • Proper label and GitHub project, if applicable

@MaxThevenet MaxThevenet added the component: diagnostics About any types of diagnostics label Jan 8, 2021
@MaxThevenet MaxThevenet changed the title [WIP] enable multiple IO slices Encapsulate field IO, first step to multiple slice IO Jan 8, 2021
Copy link
Member

@SeverinDiederichs SeverinDiederichs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! openPMD works fine, I tested it on GPU, single precision, with xyz, xz, and yz slices.

@MaxThevenet MaxThevenet merged commit 82dea8d into development Jan 8, 2021
@MaxThevenet MaxThevenet deleted the slices branch January 8, 2021 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: diagnostics About any types of diagnostics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants