-
Notifications
You must be signed in to change notification settings - Fork 28
openPMD Output #299
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
openPMD Output #299
Conversation
3186609
to
53c8f65
Compare
d017253
to
9820ba7
Compare
std::shared_ptr<amrex::ParticleReal> curr( | ||
new amrex::ParticleReal[numParticleOnTile], | ||
[](amrex::ParticleReal const *p) { delete[] p; } | ||
); | ||
for (auto i = 0; i < numParticleOnTile; i++) { | ||
curr.get()[i] = aos[i].pos(currDim); | ||
} | ||
std::string const positionComponent = positionComponents[currDim]; | ||
beam["position"][positionComponent].storeChunk(curr, {offset}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
d1aba37
to
f2140a7
Compare
/* | ||
// comment this in once IntSoA::nattribs is > 0 | ||
std::vector<std::string> int_soa_names(IntSoA::names_s.size); | ||
std::copy(IntSoA::names_s.begin(), IntSoA::names_s.end(), int_soa_names.begin()); | ||
for (auto int_idx=0; int_idx < RealSoA::nattribs; int_idx++) { | ||
auto const component_name = int_soa_names.at(int_idx); | ||
getComponentRecord(component_name).storeChunk( | ||
io::shareRaw(soa.GetIntData(int_idx)), {offset}, {numParticleOnTile64}); | ||
} | ||
*/ |
Check notice
Code scanning / CodeQL
Commented-out code
/* | ||
using SrcData = WarpXParticleContainer::ParticleTileType::ConstParticleTileDataType; | ||
tmp.copyParticles(*pc, | ||
[=] AMREX_GPU_HOST_DEVICE (const SrcData& src, int ip, const amrex::RandomEngine& engine) | ||
{ | ||
const SuperParticleType& p = src.getSuperParticle(ip); | ||
return random_filter(p, engine) * uniform_filter(p, engine) | ||
* parser_filter(p, engine) * geometry_filter(p, engine); | ||
}, true); | ||
*/ |
Check notice
Code scanning / CodeQL
Commented-out code
b7a17d8
to
6b59888
Compare
22d7fb3
to
6cc3f40
Compare
a8db1d6
to
904fada
Compare
d3a0eea
to
12b5640
Compare
3042e42
to
6a905e2
Compare
pp_element.queryAdd("backend", openpmd_backend); | ||
std::string openpmd_encoding {"g"}; | ||
pp_element.queryAdd("encoding", openpmd_encoding); | ||
m_lattice.emplace_back( diagnostics::BeamMonitor(element_name, openpmd_backend, openpmd_encoding) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have two questions about this element. First, is it useful to include an ascii option for backward-compatibility? (Some users are simply more comfortable with plain ascii text.) Second, should we include the option of specifying a filename for output?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think no and yes :-) No to the first part for heavy particle data, because it's not scalable and what counts for users is mainly an API to read the data in their scripting language of choice. Also lacks a ton of meta-data that we want to preserve.
We can document an easily usable export to ascii table nonetheless - but in post.
It's a one liner via .to_csv()
in Python:
https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.to_csv.html
Let's discuss tomorrow :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. I made some comments to follow-up on later.
d87fb39
to
f86e5bb
Compare
Default: ON
Keep reduced ASCII diags for now.
`dev` has the patch in: openPMD/openPMD-api#1407 for clang ASAB/UBSAN
f86e5bb
to
ddb2727
Compare
- New Binary Names - HDF5 dependency
ddb2727
to
1246aae
Compare
Implement a new diagnostics element that writes out openPMD data.
Close #98
Checklist
requirements.txt
and other script & deploy logic to request openPMD-apiPerformance Measurement
Measured on my laptop, 12th Gen Intel(R) Core(TM) i9-12900H processor & PM9A1 Samsung 2TB SSD drive.
Software: GCC 11.3.0, MPICH 4.0.3, ADIOS2 2.8.3.
Running all ImpactX tests.
Ran 90 test targets each (incl. analysis & plotting):
Follow-Up
openPMD-validator
on created files Fix openPMD Meta-Data #349getSeriesOptions
Series::close()
from 0.15.0+