FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
FEAT::Runtime Class Reference

FEAT Runtime management class. More...

#include <runtime.hpp>

Classes

class  ScopeGuard
 Runtime scope guard class. More...
 
class  SyncGuard
 Runtime sync guard class. More...
 

Static Public Member Functions

static void abort (bool dump_call_stack=true)
 FEAT abortion. More...
 
static int finalize ()
 FEAT finalization. More...
 
static void * get_cudss_handle ()
 Returns the unique cuDSS third-party library handle. More...
 
static void initialize (int &argc, char **&argv)
 FEAT initialization. More...
 

Static Private Attributes

static bool _finalized = false
 signals, if finalize was called More...
 
static bool _initialized = false
 signals, if initialize was called More...
 

Detailed Description

FEAT Runtime management class.

Author
Peter Zajac, Dirk Ribbrock

Definition at line 24 of file runtime.hpp.

Member Function Documentation

◆ abort()

void Runtime::abort ( bool  dump_call_stack = true)
static

FEAT abortion.

This function terminates this process and, in a MPI-based run, also all other processes belonging to this group.

Parameters
[in]dump_call_stackSpecifies whether to dump the call-stack to stderr prior to process termination.
Note that a call-stack dump may not be available on all platforms.

Definition at line 413 of file runtime.cpp.

References FEAT::Windows::dump_call_stack_to_stderr().

Referenced by FEAT::abortion(), FEAT::assertion(), finalize(), and initialize().

◆ finalize()

int Runtime::finalize ( )
static

FEAT finalization.

This function finalizes the FEAT library.

Attention
This function should be the last function called in an application's main function.
Note
Internally this functions calls the MemoryPool::finalize function. To get proper warnings one memory that is still in use and not freed correctly one has to make sure, that any FEAT Container has been destructed when calling the finalize method. This is usually achieved by keeping the C++ main function slim and kicking off all the fancy application stuff in a separate function/method. Thus (at most) every FEAT related stuff is destructed when this separate function/method ends.
Returns
An exit code (EXIT_SUCCESS) that can be returned by the main function.

Definition at line 445 of file runtime.cpp.

References _finalized, _initialized, abort(), FEAT_MARKER_CLOSE, FEAT::Dist::finalize(), and FEAT::MemoryPool::finalize().

Referenced by FEAT::Runtime::ScopeGuard::~ScopeGuard().

◆ get_cudss_handle()

void * Runtime::get_cudss_handle ( )
static

Returns the unique cuDSS third-party library handle.

Definition at line 488 of file runtime.cpp.

◆ initialize()

void Runtime::initialize ( int &  argc,
char **&  argv 
)
static

FEAT initialization.

This function performs the basic initialization of the FEAT library.

Attention
This function should be the first functional called in an application's main function.
Parameters
[in]argc,argvThe argument parameters of the calling main function.
Platform dependend code branching:
On Windows, these two function calls MUST come before anything else, otherwise one the following calls may cause the automated regression test system to halt with an error prompt awaiting user interaction.

Definition at line 51 of file runtime.cpp.

References _finalized, _initialized, abort(), FEAT::Windows::disable_error_prompts(), FEAT_MARKER_INIT, FEAT::Windows::get_current_process_id(), FEAT::MemoryPool::initialize(), FEAT::Dist::initialize(), FEAT::Windows::install_seh_filter(), FEAT::Dist::Comm::rank(), FEAT::version_major, FEAT::version_minor, FEAT::version_patch, and FEAT::Dist::Comm::world().

Referenced by FEAT::Runtime::ScopeGuard::ScopeGuard().

Member Data Documentation

◆ _finalized

bool Runtime::_finalized = false
staticprivate

signals, if finalize was called

Definition at line 31 of file runtime.hpp.

Referenced by finalize(), and initialize().

◆ _initialized

bool Runtime::_initialized = false
staticprivate

signals, if initialize was called

Definition at line 28 of file runtime.hpp.

Referenced by finalize(), and initialize().


The documentation for this class was generated from the following files: