Skip to content

Commit

Permalink
added option for more frequent timing print out. v2.1.2 done.
Browse files Browse the repository at this point in the history
  • Loading branch information
stvdwtt committed Jul 31, 2019
1 parent 154896c commit 1bdb352
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

## Version information:

This version of the code, v2.1, contains some somewhat substantial changes from v2.0.2. It was released in August 2018. See [version_changes.md](version_changes.md) for details.
This version of the code, v2.1.2, contains some small changes from v2.1.1. It was released in July 2019. See [version_changes.md](version_changes.md) for details.

## What is PRISMS-PF?

Expand Down
3 changes: 3 additions & 0 deletions applications/allenCahn/parameters.in
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ set Output condition = EQUAL_SPACING
# and "LOG_SPACING", number per decade for "N_PER_DECADE", ignored for "LIST")
set Number of outputs = 5

# Whether to print timing information every time the code outputs
set Print timing information with output = true

# The number of time steps between updates being printed to the screen
set Skip print steps = 1000

Expand Down
1 change: 1 addition & 0 deletions include/userInputParameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ class userInputParameters
bool output_vtu_per_process;
std::string output_file_name;
std::vector<unsigned int> outputTimeStepList;
bool print_timing_with_output;

// Time step parameters
double dtValue;
Expand Down
3 changes: 1 addition & 2 deletions src/inputFileReader/inputFileReader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,6 @@ void inputFileReader::declare_parameters(dealii::ParameterHandler & parameter_ha

}



parameter_handler.declare_entry("Number of time steps","-1",dealii::Patterns::Integer(),"The time step size for the simulation.");
parameter_handler.declare_entry("Time step","-0.1",dealii::Patterns::Double(),"The time step size for the simulation.");
parameter_handler.declare_entry("Simulation end time","-0.1",dealii::Patterns::Double(),"The value of simulated time where the simulation ends.");
Expand Down Expand Up @@ -323,6 +321,7 @@ void inputFileReader::declare_parameters(dealii::ParameterHandler & parameter_ha
parameter_handler.declare_entry("List of time steps to output","0",dealii::Patterns::Anything(),"The list of time steps to output, used for the LIST type.");
parameter_handler.declare_entry("Number of outputs","10",dealii::Patterns::Integer(),"The number of outputs (or number of outputs per decade for the N_PER_DECADE type).");
parameter_handler.declare_entry("Skip print steps","1",dealii::Patterns::Integer(),"The number of time steps between updates to the screen.");
parameter_handler.declare_entry("Print timing information with output","false",dealii::Patterns::Bool(),"Whether to print the summary table of the wall time and wall time for indiviual subroutines every time the code outputs.");

// Declare entries for reading initial conditions from file
parameter_handler.declare_entry("Load initial conditions","void",dealii::Patterns::Anything(),"Whether to load the initial conditions for each variable from file.");
Expand Down
4 changes: 4 additions & 0 deletions src/matrixfree/solve.cc
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ void MatrixFreePDE<dim,degree>::solve(){
solutionSet[fieldIndex]->update_ghost_values();
}
outputResults();
if (userInputs.print_timing_with_output && currentIncrement < userInputs.totalIncrements){
computing_timer.print_summary();
}

currentOutput++;
}

Expand Down
2 changes: 2 additions & 0 deletions src/userInputParameters/userInputParameters.cc
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,8 @@ userInputParameters<dim>::userInputParameters(inputFileReader & input_file_reade
}
}

print_timing_with_output = parameter_handler.get_bool("Print timing information with output");

// Field variable definitions

// If all of the variables are ELLIPTIC, then totalIncrements should be 1 and finalTime should be 0
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.2(pre)
2.1.2
10 changes: 8 additions & 2 deletions version_changes.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
# Version 2.1.2(pre)
Minor update to 2.1.1, planned to be released in August 2019. The biggest change in this version is a change in how the user
# Version 2.1.2
Minor update to 2.1.1, released in July 2019. The biggest change in this version is a change in how the user
specifies the adaptivity criteria in the parameters file.

Added Functionality:
- Users now specify the adaptivity criteria on a variable-by-variable basis, similar to the nucleation parameters. This new format permits more flexibility in the adaptvity criteria. Gradient-based adaptivity criteria are now supported. (Issue #56)
- Users now have the option to have a timing summary printed out every time the code outputs, controlled via the parameters file. (Issue #132)

Bug Fixes:
- PRISMS-PF will no longer zero out fields if the domain size is smaller than approximately 1e-5. This was related to the calculation of the inverse of the mass matrix. A tolerance to prevent a divide by zero error needs to scale with the minimum element volume. (Issue #119)
- The code will now produce outputs/checkpoints if given a list, regardless of the number of outputs/checkpoints specified for the other frequency types. (Issue #123)

Other Changes:
- Fixed the derivation for the mechanics and eshelbyInclusion apps with respect to surface tractions. (Issue #130)
- Improved the error message for attempted access of a value/gradient/hessian that wasn't requested in variableAttributeLoader::loadVariableAttributes(). (Issue #136)

# Version 2.1.1
Minor update to 2.1, released in March 2019. The main purpose for the release was to trigger the creation of a
Expand Down

0 comments on commit 1bdb352

Please sign in to comment.