FleCSI User API Version: 2.3.0
 
Loading...
Searching...
No Matches
Runtime Model

Environmental information and tools for organizing applications. More...

Modules

 Control Model
 Types for defining, extending, and executing control-flow graphs.
 

Classes

struct  config
 Backend-specific options. More...
 
struct  config_base
 Specification of options for FleCSI. More...
 
struct  dependencies_config
 Specification for initializing underlying libraries. More...
 
struct  dependencies_guard
 RAII guard for initializing/finalizing FleCSI dependencies. More...
 
struct  getopt
 Command-line parser. More...
 
struct  program_option< ValueType >
 The program_option type is a wrapper that implements a useful subset of Boost's Program Options utility. More...
 
struct  runtime
 FleCSI runtime state. More...
 

Typedefs

using argv = std::vector< std::string >
 A command line.
 

Enumerations

enum  status : int {
}
 Exit status returned by initialization code. More...
 

Functions

Color color ()
 Return the color of the current execution instance.
 
Color colors ()
 Return the number of colors of the current task invocation.
 
void finalize ()
 Perform FleCSI runtime finalization.
 
int initialize (int argc, const char *const *argv, bool dependent=true)
 Perform FleCSI Runtime Model initialization (which see).
 
template<typename ValueType >
ValueType option_value (any const &v)
 Convert an option value into its underlying type.
 
Color process ()
 Return the current process id.
 
Color processes ()
 Return the number of processes.
 
std::string const & program ()
 Return the program name.
 
int start (const std::function< int()> &action)
 Perform FleCSI runtime start.
 
const std::map< std::string, std::string > & task_names ()
 Return the mapping of shortened FleCSI task signatures to their full function signatures.
 
Color threads ()
 Return the number of execution instances with which the runtime was invoked.
 
Color threads_per_process ()
 Return the number of threads per process.
 

Detailed Description

Environmental information and tools for organizing applications.

#include "flecsi/runtime.hh"

This header provides the features in the following additional deprecated header:

Typedef Documentation

◆ argv

using argv = std::vector<std::string>

A command line.

Enumeration Type Documentation

◆ status

enum status : int

Exit status returned by initialization code.

Deprecated:
Used only with initialize.
See also
flecsi::initialize
flecsi::run::control::check_status
Enumerator
help 

successful initialization

control_model 

user requested usage help

control_model_sorted 

print out control model graph in dot format

clean 

print out sorted control model graph in dot format

command_line_error 

any value greater than this implies an error

error parsing command line

Function Documentation

◆ initialize()

int initialize ( int  argc,
const char *const *  argv,
bool  dependent = true 
)

Perform FleCSI Runtime Model initialization (which see).

If dependent is true, this call will also initialize any runtime on which FleCSI depends.

The following options are interpreted in addition to any program_option objects:

  • --Xbackend=arg

    Provide a command-line option to the backend. May be used more than once.

  • --backend-args=args

    Provide command-line options to the backend. May be used more than once; word splitting is applied.

  • --flog-tags=tags

    Enable comma-separated output tags. all enables all and is the default; unscoped disables all. none disables normal Flog output entirely.

  • --flog-verbose[=level]

    Enable verbose output if level is omitted or positive; suppress decorations if it is negative. The default is 0.

  • --flog-process=p

    Select output from process p (default 0), or from all if −1.

  • --control-model

    Write program-control-model.dot with the control points and the actions for each.

  • --control-model-sorted

    Write program-control-model-sorted.dot containing linearized actions.

The Flog options are recognized only when that feature is enabled. The control model options require Graphviz support and take effect via control::check_status.

Parameters
argcnumber of command-line arguments to process
argvcommand-line arguments to process
dependentA boolean telling FleCSI whether or not to initialize runtimes on which it depends.
Returns
An integer indicating the initialization status. This may be interpreted as a flecsi::run::status enumeration, e.g., a value of 1 is equivalent to flecsi::run::status::help. Control model options take effect via control::check_status.
Deprecated:
Construct a runtime object; to parse command-line arguments, also use getopt.

◆ start()

int start ( const std::function< int()> &  action)

Perform FleCSI runtime start.

This causes the runtime to begin execution of the top-level action.

Parameters
actionThe top-level action, i.e., the entry point for FleCSI to begin execution.
Returns
An integer indicating the finalization status. This will be either 0 for successful completion or an error code from flecsi::run::status.
Deprecated:
Use runtime::control.

◆ finalize()

void finalize ( )

Perform FleCSI runtime finalization.

If FleCSI was initialized with the dependent flag set to true, FleCSI will also finalize any runtimes on which it depends.

Deprecated:
Destroy a runtime object.

◆ program()

std::string const & program ( )

Return the program name.

Available only with initialize.

Deprecated:
Check argv directly.

◆ option_value()

template<typename ValueType >
ValueType option_value ( any const &  v)

Convert an option value into its underlying type.

Template Parameters
ValueTypeThe option underlying value type.
Deprecated:
Accept the value directly in the validation function.

◆ process()

Color process ( )

Return the current process id.

◆ processes()

Color processes ( )

Return the number of processes.

◆ threads_per_process()

Color threads_per_process ( )

Return the number of threads per process.

◆ threads()

Color threads ( )

Return the number of execution instances with which the runtime was invoked.

In this context a thread is defined as an instance of execution, and does not imply any other properties. This interface can be used to determine the full subscription of the execution instances of the running process that invoked the FleCSI runtime.

◆ color()

Color color ( )

Return the color of the current execution instance.

This function is only valid if invoked from within a non MPI task. For MPI task, use process, which in that case equals to the color used from any topology.

◆ colors()

Color colors ( )

Return the number of colors of the current task invocation.

This function is only valid if invoked from within a non MPI task. For MPI task, use processes which in that case equals to the number of colors used from any topology.

◆ task_names()

const std::map< std::string, std::string > & task_names ( )

Return the mapping of shortened FleCSI task signatures to their full function signatures.

Shortened names may be used by FleCSI to register tasks in some backends and provide more user-friendly names for debugging purposes. This map is empty if no such shortening took place.