From 1bdb352268f44ef2316d786010f4ef92ab322185 Mon Sep 17 00:00:00 2001 From: Stephen DeWitt Date: Wed, 31 Jul 2019 13:47:58 -0400 Subject: [PATCH] added option for more frequent timing print out. v2.1.2 done. --- README.md | 2 +- applications/allenCahn/parameters.in | 3 +++ include/userInputParameters.h | 1 + src/inputFileReader/inputFileReader.cc | 3 +-- src/matrixfree/solve.cc | 4 ++++ src/userInputParameters/userInputParameters.cc | 2 ++ version | 2 +- version_changes.md | 10 ++++++++-- 8 files changed, 21 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 4d2b908bf..df9040a28 100644 --- a/README.md +++ b/README.md @@ -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? diff --git a/applications/allenCahn/parameters.in b/applications/allenCahn/parameters.in index 06c07377b..9b1971d09 100644 --- a/applications/allenCahn/parameters.in +++ b/applications/allenCahn/parameters.in @@ -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 diff --git a/include/userInputParameters.h b/include/userInputParameters.h index 1f89a5c88..49ec1e04e 100644 --- a/include/userInputParameters.h +++ b/include/userInputParameters.h @@ -79,6 +79,7 @@ class userInputParameters bool output_vtu_per_process; std::string output_file_name; std::vector outputTimeStepList; + bool print_timing_with_output; // Time step parameters double dtValue; diff --git a/src/inputFileReader/inputFileReader.cc b/src/inputFileReader/inputFileReader.cc index caad312d6..5cd9a2a50 100644 --- a/src/inputFileReader/inputFileReader.cc +++ b/src/inputFileReader/inputFileReader.cc @@ -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."); @@ -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."); diff --git a/src/matrixfree/solve.cc b/src/matrixfree/solve.cc index 152cee40d..52eb67419 100644 --- a/src/matrixfree/solve.cc +++ b/src/matrixfree/solve.cc @@ -86,6 +86,10 @@ void MatrixFreePDE::solve(){ solutionSet[fieldIndex]->update_ghost_values(); } outputResults(); + if (userInputs.print_timing_with_output && currentIncrement < userInputs.totalIncrements){ + computing_timer.print_summary(); + } + currentOutput++; } diff --git a/src/userInputParameters/userInputParameters.cc b/src/userInputParameters/userInputParameters.cc index 392d2e016..23d6e8c1d 100644 --- a/src/userInputParameters/userInputParameters.cc +++ b/src/userInputParameters/userInputParameters.cc @@ -224,6 +224,8 @@ userInputParameters::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 diff --git a/version b/version index 48157ed4c..eca07e4c1 100644 --- a/version +++ b/version @@ -1 +1 @@ -2.1.2(pre) +2.1.2 diff --git a/version_changes.md b/version_changes.md index 7c1b2985d..7e089d60e 100644 --- a/version_changes.md +++ b/version_changes.md @@ -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