home | back

HPX Command Line Structure

In general you can use these command line options with any program compiled with the HPX runtime.

Command Line Option Arguments to Option Description of Option
-r no arguments Starts the AGAS service, required on at least one locality
-t number of threads Tells the runtime to spawn X operating system threads for this locality
-w no arguments Tells the runtime to run this instance in worker mode (for all localities not running the AGAS service)
-l number of localities The number of localities to wait for in this run
-a IP address and port of AGAS Specifies the IP address of the locality running the AGAS service, format is 192.168.1.1:7777
-x IP address and port of parcelport Specifies the IP address of this locality's parcelport. e.g localhost:7778

For a complete listing of command line options, run a program compiled with HPX with the -h option.
In general, if you only run with one locality the -t option will be the only one you use.
If I wanted to set up a (virtual) two locality run of fibonacci I would need to open up two terminals and type this:

# On the first terminal
$ ./fibonacci -r -t 1 -a localhost:7777 -x localhost:7778 -l 2
# On the second terminal
$ ./fibonacci -w -t 1 -a localhost:7777 -x localhost:7779

Now that you know how to run HPX from the commandline you can try some of the Application Development tutorials to get a feel for how to write programs using HPX.