namespace mom_write_cputime¶
Overview¶
A module to monitor the overall CPU time used by MOM6 and project when to stop the model. More…
namespace mom_write_cputime { // global functions subroutine, public write_cputime_start_clock(CS CS); subroutine, public mom_write_cputime_init( param_file param_file, directory directory, Input_start_time Input_start_time, CS CS ); subroutine, public write_cputime(day day, n n, nmax nmax, CS CS); } // namespace mom_write_cputime
Detailed Documentation¶
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.
Global Functions¶
subroutine, public write_cputime_start_clock(CS 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, public mom_write_cputime_init( param_file param_file, directory directory, Input_start_time Input_start_time, CS CS )
Initialize the MOM_write_cputime module.
Parameters:
param_file |
A structure to parse for run-time parameters |
directory |
The directory where the CPU time file goes. |
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. |
subroutine, public write_cputime(day day, n n, nmax nmax, CS 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.
Parameters:
day |
The current model time. |
n |
The time step number of the current execution. |
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. |