8#ifndef ABLASTR_SIGNAL_HANDLING_H_
9#define ABLASTR_SIGNAL_HANDLING_H_
11#include <AMReX_Config.H>
13#if defined(AMREX_USE_MPI)
76#if defined(AMREX_USE_MPI)
static bool m_any_signal_action_active
Is any signal handling action configured in signal_conf_requests ?
Definition SignalHandling.H:71
static void WaitSignals()
Complete the asynchronous broadcast of signal flags.
Definition SignalHandling.cpp:184
static std::atomic< bool > signal_received_flags[NUM_SIGNALS]
On process 0, whether a given signal has been received since the last check.
Definition SignalHandling.H:74
static int parseSignalNameToNumber(const std::string &str)
Take a string and convert it to a corresponding signal number if possible.
Definition SignalHandling.cpp:32
static void CheckSignals()
Check and clear signal flags and asynchronously broadcast them from process 0.
Definition SignalHandling.cpp:144
static bool signal_actions_requested[SIGNAL_REQUESTS_SIZE]
Definition SignalHandling.H:86
static void SignalSetFlag(int signal_number)
Signal handler to set flags on process 0 (other processes ignore configured signals)
Definition SignalHandling.cpp:206
signal_action_requested_labels
Labels for indexed positions in signal_actions_requests.
Definition SignalHandling.H:41
@ SIGNAL_REQUESTS_BREAK
Cleanly stop execution, as if the simulation reached its configured end.
Definition SignalHandling.H:43
@ SIGNAL_REQUESTS_SIZE
Definition SignalHandling.H:46
@ SIGNAL_REQUESTS_CHECKPOINT
Produce a checkpoint.
Definition SignalHandling.H:45
static void InitSignalHandling()
Set up signal handlers based on input configuration provided in signal_conf_requests_*
Definition SignalHandling.cpp:114
static constexpr int NUM_SIGNALS
The range of signal values to accept.
Definition SignalHandling.H:38
static MPI_Request signal_mpi_ibcast_request
MPI requests for the asynchronous broadcasts of the signal-requested actions.
Definition SignalHandling.H:78
static bool TestAndResetActionRequestFlag(int action_to_test)
Check whether a given action has been requested, and reset the associated flag.
Definition SignalHandling.cpp:198
static bool signal_conf_requests[SIGNAL_REQUESTS_SIZE][NUM_SIGNALS]
Whether configuration requests the code take a particular action on a particular signal.
Definition SignalHandling.H:50
Definition Communication.cpp:26