OpenMCWallTime

A post-processor which reports OpenMC walltime.

Description

This post-processor outputs various timing statistics from OpenMC, the particular timing statistic can be select with "time_type". Options are:

  • initialization_time: the time spent initializing the OpenMC simulation

  • total_simulation_time: the total time spent running the OpenMC simulation

  • transport_time: the total time spent in transport (sum of time spent in active and inactive batches)

  • inactive_batch_time: the total time spent running inactive batches

  • active_batch_time: the total time spent running active batches

  • fission_bank_time: the total time spent synchronizing the fission bank

  • tally_accumulation_time: the total time spent accumulating tally statistics across MPI ranks

  • finalization_time: the total time spent finalizing the OpenMC simulation

  • total_elapsed_time: the total time spent executing OpenMC

Either the cumulative simulation time (over all time steps / Picard iterations / adaptivity steps) or the per-step walltime may be selected by setting "accumulate_time".

Example Input Syntax

An example of using this post-processor for outputting timing statistics can be found below:

[Postprocessors<<<{"href": "../../syntax/Postprocessors/index.html"}>>>]
  # Return the time spent on the current timestep.
  [step_initialization_time]
    type = OpenMCWallTime<<<{"description": "A post-processor which reports OpenMC walltime.", "href": "OpenMCWallTime.html"}>>>
    accumulate_time<<<{"description": "Whether the simulation time should be accumulated over all simulation steps (selected by default) or not."}>>> = false
    time_type<<<{"description": "The time to report from OpenMC."}>>> = 'initialization_time'
  []
  [step_total_simulation_time]
    type = OpenMCWallTime<<<{"description": "A post-processor which reports OpenMC walltime.", "href": "OpenMCWallTime.html"}>>>
    accumulate_time<<<{"description": "Whether the simulation time should be accumulated over all simulation steps (selected by default) or not."}>>> = false
    time_type<<<{"description": "The time to report from OpenMC."}>>> = 'total_simulation_time'
  []
  [step_transport_time]
    type = OpenMCWallTime<<<{"description": "A post-processor which reports OpenMC walltime.", "href": "OpenMCWallTime.html"}>>>
    accumulate_time<<<{"description": "Whether the simulation time should be accumulated over all simulation steps (selected by default) or not."}>>> = false
    time_type<<<{"description": "The time to report from OpenMC."}>>> = 'transport_time'
  []
  [step_inactive_batch_time]
    type = OpenMCWallTime<<<{"description": "A post-processor which reports OpenMC walltime.", "href": "OpenMCWallTime.html"}>>>
    accumulate_time<<<{"description": "Whether the simulation time should be accumulated over all simulation steps (selected by default) or not."}>>> = false
    time_type<<<{"description": "The time to report from OpenMC."}>>> = 'inactive_batch_time'
  []
  [step_active_batch_time]
    type = OpenMCWallTime<<<{"description": "A post-processor which reports OpenMC walltime.", "href": "OpenMCWallTime.html"}>>>
    accumulate_time<<<{"description": "Whether the simulation time should be accumulated over all simulation steps (selected by default) or not."}>>> = false
    time_type<<<{"description": "The time to report from OpenMC."}>>> = 'active_batch_time'
  []
  [step_fission_bank_time]
    type = OpenMCWallTime<<<{"description": "A post-processor which reports OpenMC walltime.", "href": "OpenMCWallTime.html"}>>>
    accumulate_time<<<{"description": "Whether the simulation time should be accumulated over all simulation steps (selected by default) or not."}>>> = false
    time_type<<<{"description": "The time to report from OpenMC."}>>> = 'fission_bank_time'
  []
  [step_tally_accumulation_time]
    type = OpenMCWallTime<<<{"description": "A post-processor which reports OpenMC walltime.", "href": "OpenMCWallTime.html"}>>>
    accumulate_time<<<{"description": "Whether the simulation time should be accumulated over all simulation steps (selected by default) or not."}>>> = false
    time_type<<<{"description": "The time to report from OpenMC."}>>> = 'tally_accumulation_time'
  []
  [step_finalization_time]
    type = OpenMCWallTime<<<{"description": "A post-processor which reports OpenMC walltime.", "href": "OpenMCWallTime.html"}>>>
    accumulate_time<<<{"description": "Whether the simulation time should be accumulated over all simulation steps (selected by default) or not."}>>> = false
    time_type<<<{"description": "The time to report from OpenMC."}>>> = 'finalization_time'
  []
  [step_total_time_elapsed]
    type = OpenMCWallTime<<<{"description": "A post-processor which reports OpenMC walltime.", "href": "OpenMCWallTime.html"}>>>
    accumulate_time<<<{"description": "Whether the simulation time should be accumulated over all simulation steps (selected by default) or not."}>>> = false
    time_type<<<{"description": "The time to report from OpenMC."}>>> = 'total_elapsed_time'
  []

  # Return the accumulated time.
  [accum_initialization_time]
    type = OpenMCWallTime<<<{"description": "A post-processor which reports OpenMC walltime.", "href": "OpenMCWallTime.html"}>>>
    time_type<<<{"description": "The time to report from OpenMC."}>>> = 'initialization_time'
  []
  [accum_total_simulation_time]
    type = OpenMCWallTime<<<{"description": "A post-processor which reports OpenMC walltime.", "href": "OpenMCWallTime.html"}>>>
    time_type<<<{"description": "The time to report from OpenMC."}>>> = 'total_simulation_time'
  []
  [accum_transport_time]
    type = OpenMCWallTime<<<{"description": "A post-processor which reports OpenMC walltime.", "href": "OpenMCWallTime.html"}>>>
    time_type<<<{"description": "The time to report from OpenMC."}>>> = 'transport_time'
  []
  [accum_inactive_batch_time]
    type = OpenMCWallTime<<<{"description": "A post-processor which reports OpenMC walltime.", "href": "OpenMCWallTime.html"}>>>
    time_type<<<{"description": "The time to report from OpenMC."}>>> = 'inactive_batch_time'
  []
  [accum_active_batch_time]
    type = OpenMCWallTime<<<{"description": "A post-processor which reports OpenMC walltime.", "href": "OpenMCWallTime.html"}>>>
    time_type<<<{"description": "The time to report from OpenMC."}>>> = 'active_batch_time'
  []
  [accum_fission_bank_time]
    type = OpenMCWallTime<<<{"description": "A post-processor which reports OpenMC walltime.", "href": "OpenMCWallTime.html"}>>>
    time_type<<<{"description": "The time to report from OpenMC."}>>> = 'fission_bank_time'
  []
  [accum_tally_accumulation_time]
    type = OpenMCWallTime<<<{"description": "A post-processor which reports OpenMC walltime.", "href": "OpenMCWallTime.html"}>>>
    time_type<<<{"description": "The time to report from OpenMC."}>>> = 'tally_accumulation_time'
  []
  [accum_finalization_time]
    type = OpenMCWallTime<<<{"description": "A post-processor which reports OpenMC walltime.", "href": "OpenMCWallTime.html"}>>>
    time_type<<<{"description": "The time to report from OpenMC."}>>> = 'finalization_time'
  []
  [accum_total_time_elapsed]
    type = OpenMCWallTime<<<{"description": "A post-processor which reports OpenMC walltime.", "href": "OpenMCWallTime.html"}>>>
    time_type<<<{"description": "The time to report from OpenMC."}>>> = 'total_elapsed_time'
  []

  # This will be non-zero on the first step (due to loading cross sections), and zero on the second step.
  [step_initialization_time_gzero]
    type = ParsedPostprocessor<<<{"description": "Computes a parsed expression with post-processors", "href": "ParsedPostprocessor.html"}>>>
    expression<<<{"description": "function expression"}>>> = 'step_initialization_time > 0.0'
    pp_names<<<{"description": "Post-processors arguments"}>>> = 'step_initialization_time'
    execute_on<<<{"description": "The list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html."}>>> = 'TIMESTEP_END'
  []
  # This should be the sum of the inactive and active batch times
  [step_total_simulation_time_gzero]
    type = ParsedPostprocessor<<<{"description": "Computes a parsed expression with post-processors", "href": "ParsedPostprocessor.html"}>>>
    expression<<<{"description": "function expression"}>>> = 'step_total_simulation_time = (step_inactive_batch_time + step_active_batch_time)'
    pp_names<<<{"description": "Post-processors arguments"}>>> = 'step_total_simulation_time step_inactive_batch_time step_active_batch_time'
    execute_on<<<{"description": "The list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html."}>>> = 'TIMESTEP_END'
  []

  # This should be less than the total simulation time
  [step_transport_time_gzero]
    type = ParsedPostprocessor<<<{"description": "Computes a parsed expression with post-processors", "href": "ParsedPostprocessor.html"}>>>
    expression<<<{"description": "function expression"}>>> = 'step_transport_time < step_total_simulation_time'
    pp_names<<<{"description": "Post-processors arguments"}>>> = 'step_transport_time step_total_simulation_time'
    execute_on<<<{"description": "The list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html."}>>> = 'TIMESTEP_END'
  []
  # In the vast majority of cases, the inactive batch time will be smaller than the
  # active batch time. Indeterminism in testing (e.g. CPU thread scheduling) may violate this.
  [step_inactive_batch_time_gzero]
    type = ParsedPostprocessor<<<{"description": "Computes a parsed expression with post-processors", "href": "ParsedPostprocessor.html"}>>>
    expression<<<{"description": "function expression"}>>> = 'step_inactive_batch_time < step_active_batch_time'
    pp_names<<<{"description": "Post-processors arguments"}>>> = 'step_inactive_batch_time step_active_batch_time'
    execute_on<<<{"description": "The list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html."}>>> = 'TIMESTEP_END'
  []
  # The total elapsed time should be larger than the time spent running the simulation.
  [step_total_time_elapsed_gzero]
    type = ParsedPostprocessor<<<{"description": "Computes a parsed expression with post-processors", "href": "ParsedPostprocessor.html"}>>>
    expression<<<{"description": "function expression"}>>> = 'step_total_time_elapsed > step_total_simulation_time'
    pp_names<<<{"description": "Post-processors arguments"}>>> = 'step_total_time_elapsed step_total_simulation_time'
    execute_on<<<{"description": "The list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html."}>>> = 'TIMESTEP_END'
  []
  # We have no good way of checking these for correctness in a regression suite
  # due to testing indeterminism (CPU thread scheduling, workloads on testing hardware, etc.).
  # For these cases, we just check to make sure a non-zero value is reported.
  [step_fission_bank_time_gzero]
    type = ParsedPostprocessor<<<{"description": "Computes a parsed expression with post-processors", "href": "ParsedPostprocessor.html"}>>>
    expression<<<{"description": "function expression"}>>> = 'step_fission_bank_time > 0.0'
    pp_names<<<{"description": "Post-processors arguments"}>>> = 'step_fission_bank_time'
    execute_on<<<{"description": "The list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html."}>>> = 'TIMESTEP_END'
  []
  [step_tally_accumulation_time_gzero]
    type = ParsedPostprocessor<<<{"description": "Computes a parsed expression with post-processors", "href": "ParsedPostprocessor.html"}>>>
    expression<<<{"description": "function expression"}>>> = 'step_tally_accumulation_time > 0.0'
    pp_names<<<{"description": "Post-processors arguments"}>>> = 'step_tally_accumulation_time'
    execute_on<<<{"description": "The list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html."}>>> = 'TIMESTEP_END'
  []
  [step_finalization_time_gzero]
    type = ParsedPostprocessor<<<{"description": "Computes a parsed expression with post-processors", "href": "ParsedPostprocessor.html"}>>>
    expression<<<{"description": "function expression"}>>> = 'step_finalization_time > 0.0'
    pp_names<<<{"description": "Post-processors arguments"}>>> = 'step_finalization_time'
    execute_on<<<{"description": "The list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html."}>>> = 'TIMESTEP_END'
  []

  # We expect the accumulated initialization time to be greater than zero (due to the first step),
  # and so this post-processor will return 1 on both steps.
  [accum_initialization_time_gzero]
    type = ParsedPostprocessor<<<{"description": "Computes a parsed expression with post-processors", "href": "ParsedPostprocessor.html"}>>>
    expression<<<{"description": "function expression"}>>> = 'accum_initialization_time > 0.0'
    pp_names<<<{"description": "Post-processors arguments"}>>> = 'accum_initialization_time'
    execute_on<<<{"description": "The list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html."}>>> = 'TIMESTEP_END'
  []
  # We expect all remaining accumulated times to be greater than (all steps after the first)
  # or equal to (the first step) the step times. Therefore, these will be zero on the first step
  # and 1 on the second step.
  [accum_total_simulation_time_gzero]
    type = ParsedPostprocessor<<<{"description": "Computes a parsed expression with post-processors", "href": "ParsedPostprocessor.html"}>>>
    expression<<<{"description": "function expression"}>>> = 'accum_total_simulation_time > step_total_simulation_time'
    pp_names<<<{"description": "Post-processors arguments"}>>> = 'accum_total_simulation_time step_total_simulation_time'
    execute_on<<<{"description": "The list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html."}>>> = 'TIMESTEP_END'
  []
  [accum_transport_time_gzero]
    type = ParsedPostprocessor<<<{"description": "Computes a parsed expression with post-processors", "href": "ParsedPostprocessor.html"}>>>
    expression<<<{"description": "function expression"}>>> = 'accum_transport_time > step_transport_time'
    pp_names<<<{"description": "Post-processors arguments"}>>> = 'accum_transport_time step_transport_time'
    execute_on<<<{"description": "The list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html."}>>> = 'TIMESTEP_END'
  []
  [accum_inactive_batch_time_gzero]
    type = ParsedPostprocessor<<<{"description": "Computes a parsed expression with post-processors", "href": "ParsedPostprocessor.html"}>>>
    expression<<<{"description": "function expression"}>>> = 'accum_inactive_batch_time > step_inactive_batch_time'
    pp_names<<<{"description": "Post-processors arguments"}>>> = 'accum_inactive_batch_time step_inactive_batch_time'
    execute_on<<<{"description": "The list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html."}>>> = 'TIMESTEP_END'
  []
  [accum_active_batch_time_gzero]
    type = ParsedPostprocessor<<<{"description": "Computes a parsed expression with post-processors", "href": "ParsedPostprocessor.html"}>>>
    expression<<<{"description": "function expression"}>>> = 'accum_active_batch_time > step_active_batch_time'
    pp_names<<<{"description": "Post-processors arguments"}>>> = 'accum_active_batch_time step_active_batch_time'
    execute_on<<<{"description": "The list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html."}>>> = 'TIMESTEP_END'
  []
  [accum_fission_bank_time_gzero]
    type = ParsedPostprocessor<<<{"description": "Computes a parsed expression with post-processors", "href": "ParsedPostprocessor.html"}>>>
    expression<<<{"description": "function expression"}>>> = 'accum_fission_bank_time > step_fission_bank_time'
    pp_names<<<{"description": "Post-processors arguments"}>>> = 'accum_fission_bank_time step_fission_bank_time'
    execute_on<<<{"description": "The list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html."}>>> = 'TIMESTEP_END'
  []
  [accum_tally_accumulation_time_gzero]
    type = ParsedPostprocessor<<<{"description": "Computes a parsed expression with post-processors", "href": "ParsedPostprocessor.html"}>>>
    expression<<<{"description": "function expression"}>>> = 'accum_tally_accumulation_time > step_tally_accumulation_time'
    pp_names<<<{"description": "Post-processors arguments"}>>> = 'accum_tally_accumulation_time step_tally_accumulation_time'
    execute_on<<<{"description": "The list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html."}>>> = 'TIMESTEP_END'
  []
  [accum_finalization_time_gzero]
    type = ParsedPostprocessor<<<{"description": "Computes a parsed expression with post-processors", "href": "ParsedPostprocessor.html"}>>>
    expression<<<{"description": "function expression"}>>> = 'accum_finalization_time > step_finalization_time'
    pp_names<<<{"description": "Post-processors arguments"}>>> = 'accum_finalization_time step_finalization_time'
    execute_on<<<{"description": "The list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html."}>>> = 'TIMESTEP_END'
  []
  [accum_total_time_elapsed_gzero]
    type = ParsedPostprocessor<<<{"description": "Computes a parsed expression with post-processors", "href": "ParsedPostprocessor.html"}>>>
    expression<<<{"description": "function expression"}>>> = 'accum_total_time_elapsed > step_total_time_elapsed'
    pp_names<<<{"description": "Post-processors arguments"}>>> = 'accum_total_time_elapsed step_total_time_elapsed'
    execute_on<<<{"description": "The list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html."}>>> = 'TIMESTEP_END'
  []
[]
(test/tests/postprocessors/openmc_walltime/openmc.i)

Input Parameters

  • accumulate_timeTrueWhether the simulation time should be accumulated over all simulation steps (selected by default) or not.

    Default:True

    C++ Type:bool

    Controllable:No

    Description:Whether the simulation time should be accumulated over all simulation steps (selected by default) or not.

  • time_typetotal_elapsed_timeThe time to report from OpenMC.

    Default:total_elapsed_time

    C++ Type:MooseEnum

    Options:initialization_time, total_simulation_time, transport_time, inactive_batch_time, active_batch_time, fission_bank_time, tally_accumulation_time, finalization_time, total_elapsed_time

    Controllable:No

    Description:The time to report from OpenMC.

Optional Parameters

  • allow_duplicate_execution_on_initialFalseIn the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).

    Default:False

    C++ Type:bool

    Controllable:No

    Description:In the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).

  • execution_order_group0Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.

    Default:0

    C++ Type:int

    Controllable:No

    Description:Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.

  • force_postauxFalseForces the UserObject to be executed in POSTAUX

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Forces the UserObject to be executed in POSTAUX

  • force_preauxFalseForces the UserObject to be executed in PREAUX

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Forces the UserObject to be executed in PREAUX

  • force_preicFalseForces the UserObject to be executed in PREIC during initial setup

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Forces the UserObject to be executed in PREIC during initial setup

Execution Scheduling Parameters

  • control_tagsAdds user-defined labels for accessing object parameters via control logic.

    C++ Type:std::vector<std::string>

    Controllable:No

    Description:Adds user-defined labels for accessing object parameters via control logic.

  • enableTrueSet the enabled status of the MooseObject.

    Default:True

    C++ Type:bool

    Controllable:Yes

    Description:Set the enabled status of the MooseObject.

  • outputsVector of output names where you would like to restrict the output of variables(s) associated with this object

    C++ Type:std::vector<OutputName>

    Controllable:No

    Description:Vector of output names where you would like to restrict the output of variables(s) associated with this object

  • use_displaced_meshFalseWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.

    Default:False

    C++ Type:bool

    Controllable:No

    Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.

Advanced Parameters

  • prop_getter_suffixAn optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.

    C++ Type:MaterialPropertyName

    Unit:(no unit assumed)

    Controllable:No

    Description:An optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.

  • use_interpolated_stateFalseFor the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.

    Default:False

    C++ Type:bool

    Controllable:No

    Description:For the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.

Material Property Retrieval Parameters

Input Files