diff options
author | 2020-01-09 15:45:49 -0800 | |
---|---|---|
committer | 2020-01-09 15:45:49 -0800 | |
commit | 8f23eb12d388e55dc7f1cc0b9fc426380fa1740c (patch) | |
tree | a46a0e235f266b9a349f10448f8c5eb9268d832a /Source/Diagnostics/WarpXOpenPMD.cpp | |
parent | e93fd4ee732826df82f6fd942b27b81daa7dbff4 (diff) | |
parent | 0b25b1b68f1b70e965295505d1503a3e57b6c2cc (diff) | |
download | WarpX-8f23eb12d388e55dc7f1cc0b9fc426380fa1740c.tar.gz WarpX-8f23eb12d388e55dc7f1cc0b9fc426380fa1740c.tar.zst WarpX-8f23eb12d388e55dc7f1cc0b9fc426380fa1740c.zip |
Merge remote-tracking branch 'ECPwarpx/dev' into fix_picmi_diagnostics
Diffstat (limited to 'Source/Diagnostics/WarpXOpenPMD.cpp')
-rw-r--r-- | Source/Diagnostics/WarpXOpenPMD.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/Diagnostics/WarpXOpenPMD.cpp b/Source/Diagnostics/WarpXOpenPMD.cpp index bb42fc463..05c2066de 100644 --- a/Source/Diagnostics/WarpXOpenPMD.cpp +++ b/Source/Diagnostics/WarpXOpenPMD.cpp @@ -165,14 +165,14 @@ WarpXOpenPMDPlot::SavePlotFile (const std::unique_ptr<WarpXParticleContainer>& p SetupPos(currSpecies, counter.GetTotalNumParticles()); SetupRealProperties(currSpecies, write_real_comp, real_comp_names, counter.GetTotalNumParticles()); + // forces the files created by all processors! this is the key to resolve RZ storage issue!! + m_Series->flush(); for (auto currentLevel = 0; currentLevel <= pc->finestLevel(); currentLevel++) { //long numParticles = counter.m_ParticleSizeAtRank[currentLevel] unsigned long long const numParticles = counter.m_ParticleSizeAtRank[currentLevel]; unsigned long long offset = counter.m_ParticleOffsetAtRank[currentLevel]; - //if return after this, all is fine (although nothing useful is written) - if (0 == numParticles) return; @@ -355,11 +355,9 @@ WarpXOpenPMDPlot::WriteOpenPMDFields( //const std::string& filename, const std::string& varname = varnames[icomp]; std::string field_name = varname; std::string comp_name = openPMD::MeshRecordComponent::SCALAR; - bool is_vector = false; for (const char* vector_field: {"E", "B", "j"}){ for (const char* comp: {"x", "y", "z"}){ if (varname[0] == *vector_field && varname[1] == *comp ){ - is_vector = true; field_name = varname[0] + varname.substr(2); // Strip component comp_name = varname[1]; } |