HPX - High Performance ParalleX

PrevUpHomeNext

Function start

hpx::start — Main non-blocking entry point for launching the HPX runtime system.

Synopsis

// In header: <hpx/hpx_start.hpp>


bool start(int argc = 0, char ** argv = 0, 
           hpx::runtime_mode mode = hpx::runtime_mode_default);

Description

This is a simplified main, non-blocking entry point, which can be used to set up the runtime for an HPX application (the runtime system will be set up in console mode or worker mode depending on the command line settings). It will return immediatly after that. Use hpx::wait and hpx::stop to synchronize with the runtime system's execution.

[Note] Note

The created runtime system instance will be executed in console or worker mode depending on the command line arguments passed in argc/argv. If not command line arguments are passed, console mode is assumed.

If no command line arguments are passed the HPX runtime system will not support any of the default command line options as described in the section 'HPX Command Line Options'.

Parameters:

argc

[in] The number of command line arguments passed in argv. This is usually the unchanged value as passed by the operating system (to main()).

argv

[in] The command line arguments for this application, usually that is the value as passed by the operating system (to main()).

mode

[in] The mode the created runtime environment should be initialized in. There has to be exactly one locality in each HPX application which is executed in console mode (hpx::runtime_mode_console), all other localities have to be run in worker mode (hpx::runtime_mode_worker). Normally this is set up automatically, but sometimes it is necessary to explicitly specify the mode.

Returns:

The function returns true if command line processing succeeded and the runtime system was started successfully. It will return false otherwise.


PrevUpHomeNext