diff options
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]; } |