MOM6
|
A module to monitor the overall CPU time used by MOM6 and project when to stop the model.
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.
Data Types | |
type | write_cputime_cs |
A control structure that regulates the writing of CPU time. More... | |
Functions/Subroutines | |
subroutine, public | write_cputime_start_clock (CS) |
Evaluate the CPU time returned by SYSTEM_CLOCK at the start of a run. More... | |
subroutine, public | mom_write_cputime_init (param_file, directory, Input_start_time, CS) |
Initialize the MOM_write_cputime module. More... | |
subroutine, public | write_cputime (day, n, nmax, CS) |
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. More... | |
Variables | |
integer | clocks_per_sec = 1000 |
The number of clock cycles per second, used by the system clock. More... | |
integer | max_ticks = 1000 |
The number of ticks per second, used by the system clock. More... | |
subroutine, public mom_write_cputime::mom_write_cputime_init | ( | type(param_file_type), intent(in) | param_file, |
character(len=*), intent(in) | directory, | ||
type(time_type), intent(in) | Input_start_time, | ||
type(write_cputime_cs), pointer | CS | ||
) |
Initialize the MOM_write_cputime module.
[in] | param_file | A structure to parse for run-time parameters |
[in] | directory | The directory where the CPU time file goes. |
[in] | input_start_time | The start model time of the simulation. |
cs | A pointer that may be set to point to the control structure for this module. |
Definition at line 55 of file MOM_write_cputime.F90.
References clocks_per_sec, and max_ticks.
Referenced by mom_main().
subroutine, public mom_write_cputime::write_cputime | ( | type(time_type), intent(inout) | day, |
integer, intent(in) | n, | ||
integer, intent(inout) | nmax, | ||
type(write_cputime_cs), pointer | CS | ||
) |
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.
[in,out] | day | The current model time. |
[in] | n | The time step number of the current execution. |
[in,out] | nmax | The number of iterations after which to stop so that the simulation will not run out of CPU time. |
cs | The control structure set up by a previous call to MOM_write_cputime_init. |
Definition at line 100 of file MOM_write_cputime.F90.
References clocks_per_sec, mom_error_handler::is_root_pe(), max_ticks, and mom_error_handler::mom_error().
Referenced by mom_main().
subroutine, public mom_write_cputime::write_cputime_start_clock | ( | type(write_cputime_cs), pointer | CS | ) |
Evaluate the CPU time returned by SYSTEM_CLOCK at the start of a run.
cs | The control structure set up by a previous call to MOM_write_cputime_init. |
Definition at line 44 of file MOM_write_cputime.F90.
References clocks_per_sec, and max_ticks.
Referenced by mom_main().
|
private |
The number of clock cycles per second, used by the system clock.
Definition at line 18 of file MOM_write_cputime.F90.
Referenced by mom_write_cputime_init(), write_cputime(), and write_cputime_start_clock().
|
private |
The number of ticks per second, used by the system clock.
Definition at line 19 of file MOM_write_cputime.F90.
Referenced by mom_write_cputime_init(), write_cputime(), and write_cputime_start_clock().