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

n_files input #361

Merged
merged 5 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Docs/sphinx/manual/LMeXControls.rst
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ IO parameters
amr.restart = chk00100 # [OPT, DEF=""] Checkpoint from which to restart the simulation
amr.initDataPlt = plt01000 # [OPT, DEF=""] Provide a plotfile from which to extract initial data
amr.regrid_on_restart = 1 # [OPT, DEF="0"] Trigger a regrid after the data from checkpoint are loaded

amr.n_files = 64 # [OPT, DEF="min(256,NProcs)"] Number of files to write per level

Refinement controls
-------------------

Expand Down Expand Up @@ -476,6 +477,7 @@ fine-covered regions are masked. The following provide examples for each diagnos
peleLM.xnormP.int = 5 # Frequency (as step #) for performing the diagnostic
peleLM.xnormP.interpolation = Linear # [OPT, DEF=Linear] Interpolation type : Linear or Quadratic
peleLM.xnormP.field_names = x_velocity mag_vort density # List of variables outputted to the 2D pltfile
peleLM.xnormP.n_files = 2 # [OPT, DEF="min(256,NProcs)"] Number of files to write per level

peleLM.condT.type = DiagConditional # Diagnostic type
peleLM.condT.file = condTest # Output file prefix
Expand Down
1 change: 1 addition & 0 deletions Source/PeleLMeX.H
Original file line number Diff line number Diff line change
Expand Up @@ -1790,6 +1790,7 @@ public:
amrex::Real m_max_wall_time = -1.0;
int m_nstep = -1;
int m_max_step = -1;
int m_nfiles = 1;

int m_regrid_int = -1;
int m_regrid_on_restart = 0;
Expand Down
4 changes: 4 additions & 0 deletions Source/PeleLMeX_Plot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ PeleLM::WritePlotFile()
amrex::Print() << "\n Writing plotfile: " << plotfilename << "\n";
}

VisMF::SetNOutFiles(m_nfiles);

//----------------------------------------------------------------
// Average down the state
averageDownState(AmrNewTime);
Expand Down Expand Up @@ -522,6 +524,8 @@ PeleLM::WriteCheckPointFile()
amrex::Print() << "\n Writing checkpoint file: " << checkpointname << "\n";
}

VisMF::SetNOutFiles(m_nfiles);

amrex::PreBuildDirectorHierarchy(
checkpointname, level_prefix, finest_level + 1, true);

Expand Down
2 changes: 2 additions & 0 deletions Source/PeleLMeX_Setup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,8 @@ PeleLM::readParameters()
ppa.query("dt_change_max", m_dtChangeMax);
ppa.query("max_dt", m_max_dt);
ppa.query("min_dt", m_min_dt);
m_nfiles = std::max(1, std::min(ParallelDescriptor::NProcs(), 256));
ppa.query("n_files", m_nfiles);

if (max_level > 0 || (m_doLoadBalance != 0)) {
ppa.query("regrid_int", m_regrid_int);
Expand Down
Loading