PISM, A Parallel Ice Sheet Model  stable v2.1-1-g6902d5502 committed by Ed Bueler on 2023-12-20 08:38:27 -0800

◆ process_signals()

int pism::IceModel::process_signals ( )
protectedvirtual

Catch signals -USR1, -USR2 and -TERM.

Signal SIGTERM makes PISM end, saving state under original -o name (or default name). We also add an indication to the history attribute of the output NetCDF file.

Signal SIGUSR1 makes PISM save state under a filename based on the the name of the executable (e.g. pismr or pismv) and the current model year. In addition the time series (-ts_file, etc.) is flushed out There is no indication of these actions in the history attribute of the output (-o) NetCDF file because there is no effect on it, but there is an indication at stdout.

Signal SIGUSR2 makes PISM flush time-series, without saving model state.

Definition at line 47 of file utilities.cc.

References flush_timeseries(), INCLUDE_MODEL_STATE, m_config, m_ctx, m_grid, m_log, m_output_vars, m_time, pism::io::PISM_READWRITE_MOVE, pism_signal, prepend_history(), pism::printf(), pism::replace_character(), save_variables(), and pism::string_to_backend().

Referenced by run().