MOM_write_cputime module reference
A module to monitor the overall CPU time used by MOM6 and project when to stop the model
Data Types
The number of ticks per second, used by the system clock |
Functions/Subroutines
Evaluate the CPU time returned by SYSTEM_CLOCK at the start of a run |
|
Initialize the MOM_write_cputime module. |
|
Close the MOM_write_cputime module. |
|
This subroutine assesses how much CPU time the model has taken and determines how long the model should be run before it saves a restart file and stops itself. Optionally this may also be used to trigger this module's end routine. |
Detailed Description
By Robert Hallberg, May 2006.
This file contains the subroutine (write_cputime) that writes the summed CPU time across all processors to an output file. In addition, write_cputime estimates how many more time steps can be taken before 95% of the available CPU time is used, so that the model can be checkpointed at that time.
Type Documentation
- type, public :: write_cputime_CS
The number of ticks per second, used by the system clock
A control structure that regulates the writing of CPU time
- Parameters
initialized
True if this control structure has been initialized.
maxcpu
The maximum amount of CPU time per processor for which MOM should run before saving a restart file and quitting with a return value that indicates that further execution is required to complete the simulation [wall-clock seconds].
Start_time
The start time of the simulation. Start_time is set in MOM_initialization.F90
startup_cputime
The CPU time used in the startup phase of the model [clock_cycles].
prev_cputime
The last measured CPU time [clock_cycles].
dn_dcpu_min
The minimum derivative of timestep with CPU time [steps clock_cycles-1].
cputime2
The accumulated CPU time [clock_cycles].
previous_calls
The number of times write_CPUtime has been called.
prev_n
The value of n from the last call.
fileCPU_ascii
The unit number of the CPU time file.
CPUfile
The name of the CPU time file.
Functions/Subroutine Documentation
- subroutine write_cputime_start_clock(CS)
Evaluate the CPU time returned by SYSTEM_CLOCK at the start of a run
- Parameters
CS
The control structure set up by a previous call to MOM_write_cputime_init.
- subroutine MOM_write_cputime_init(param_file, directory, Input_start_time, CS)
Initialize the MOM_write_cputime module.
- Parameters
param_file [in]
A structure to parse for run-time parameters
directory [in]
The directory where the CPU time file goes.
Input_start_time [in]
The start model time of the simulation.
CS
A pointer that may be set to point to the control structure for this module.
Callees call graph
- subroutine MOM_write_cputime_end(CS)
Close the MOM_write_cputime module.
- Parameters
CS
The control structure set up by a previous call to MOM_write_cputime_init.
Callees call graph
Callers call graph
- subroutine write_cputime(day, n, CS, nmax, call_end)
This subroutine assesses how much CPU time the model has taken and determines how long the model should be run before it saves a restart file and stops itself. Optionally this may also be used to trigger this module's end routine.
- Parameters
day [inout]
The current model time.
n [in]
The time step number of the current execution.
CS
The control structure set up by a previous call to MOM_write_cputime_init.
nmax [inout]
The number of iterations after which to stop so that the simulation will not run out of CPU time.
call_end [in]
If true, also call MOM_write_cputime_end.
Callees call graph
Text view
mom_write_cputime::write_cputime → mom_coms_infra::interface::sum_across_pes
mom_write_cputime::write_cputime → mom_error_handler::mom_error
mom_write_cputime::write_cputime → mom_error_infra::is_root_pe
mom_write_cputime::write_cputime → mom_io_infra::open_ascii_file
mom_write_cputime::write_cputime → mom_write_cputime::mom_write_cputime_end
External calls
- time_manager_mod
get_time (time_manager_mod::get_time)