1#ifndef included_AMP_AMPManager
2#define included_AMP_AMPManager
4#include "AMP/utils/AMP_MPI.h"
86 std::function<void( StackTrace::abort_error & )>
error_handler =
nullptr;
162 static std::tuple<int, const char *const *>
get_args();
Class AMPManagerProperties is a class that contains the various startup options for AMP.
std::set< int > catch_signals
The set of unhandled signals to set (will be initialized to a default set)
bool initialize_device
Initialize CUDA/HIP device (default is true)
bool print_times
Print the time required to initialize or shutdown each package. Default is false.
int default_Kokkos_threads
bool print_startup
Print version information upon startup (default is false)
int print_memory
Print memory statistics (default is only if leaks detected)
AMPManagerProperties()
Empty constructor. This creates the default startup parameters.
bool catch_exit
Catch early exit.
std::function< void(StackTrace::abort_error &)> error_handler
Set a user-provided function for handling all errors.
int profile_MPI_level
The default level for the MPI timers. Default is 2.
bool bind_process_to_accelerator
Associate each accelerator with a single MPI rank (default is true)
bool catch_HDF5
Set error handlers for HDF5 routines.
bool catch_PETSc
Set error handlers for PETSc routines.
int default_OpenMP_threads
bool catch_SAMRAI
Set error handlers for SAMRAI routines.
bool catch_MPI
Set error handlers for MPI routines.
Class AMPManager is a utility for managing startup and shutdown for AMP applications and for changing...
static void setMPIErrorHandler()
Initialize the mpi error handler.
static std::array< int, 3 > revision()
AMP version number.
static void decrementResource(const std::string &resource)
Decrement a resource counter.
static double start_PETSc()
static void restart()
Restart as much of AMP as possible restoring it to a like new state.
static void setCommWorld(const AMP::AMP_MPI &)
Set the global comm.
static void terminate_AMP(std::string message)
Static function to terminate AMP.
static void setHandlers()
Set the default signal/terminate handlers (called on startup)
static double start_SAMRAI()
static void set_PETSc_error_handler()
static bool isInitialized()
Function to check if AMP has been initialized.
static std::vector< std::function< void()> > d_atShutdown
static const AMP::AMP_MPI & getCommWorld()
Get the global comm.
static AMPManagerProperties getAMPManagerProperties()
Function to return the AMPManagerProperties that was used to initialize AMP.
static void clear_PETSc_error_handler()
static double bindDevices()
static void restart_SAMRAI()
static void clearMPIErrorHandler()
Destroy the mpi error handler.
static double start_HYPRE()
static void incrementResource(const std::string &resource)
Increment a resource counter.
static double start_OpenMP()
static void clearHandlers()
Clearthe default signal/terminate handlers (called on shutdown)
static double stop_SAMRAI()
static bool isFinalized()
Function to check if AMP has been finalized.
static void registerShutdown(std::function< void()>)
Register a function to perform cleanup at AMP::AMPManager::shutdown.
static const char *const * d_argv
static void startup(int &argc, char *argv[], const AMPManagerProperties &properties=AMPManagerProperties())
static double stop_HYPRE()
static std::string info()
Return detailed revision information.
static double stop_PETSc()
static std::tuple< int, const char *const * > get_args()
static AMPManagerProperties d_properties
static double initDevices()
Provides C++ wrapper around MPI routines.