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¶
A control structure that regulates the writing of CPU time. |
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. |
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
mom_write_cputime/write_cputime_cs¶ A control structure that regulates the writing of CPU time.
- Type fields:
%initialized[logical] :: True if this control structure has been initialized.%maxcpu[real] :: 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[type(time_type)] :: The start time of the simulation. Start_time is set in MOM_initialization.F90.%startup_cputime[real] :: The CPU time used in the startup phase of the model [clock_cycles].%prev_cputime[real] :: The last measured CPU time [clock_cycles].%dn_dcpu_min[real] :: The minimum derivative of timestep with CPU time [steps clock_cycles-1].%cputime2[real] :: The accumulated CPU time [clock_cycles].%previous_calls[integer] :: The number of times write_CPUtime has been called.%prev_n[integer] :: The value of n from the last call.%filecpu_ascii[integer] :: The unit number of the CPU time file.%cpufile[character (len=200)] :: The name of the CPU time file.
Function/Subroutine Documentation¶
-
subroutine
mom_write_cputime/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.
- Call to:
clocks_per_secmax_ticks- Called from:
mom6
-
subroutine
mom_write_cputime/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.
- Call to:
clocks_per_secmax_ticks- Called from:
mom6
-
subroutine
mom_write_cputime/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.
- Called from:
-
subroutine
mom_write_cputime/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.
- Call to:
clocks_per_secmax_ticksmom_error_handler::mom_errormom_write_cputime_end- Called from:
mom6