Thrill  0.1
Running Thrill programs on a cluster

Execution Model

Thrill programs are binary executables which run simultaneously on h hosts in a cluster with equal hardware configuration. Generally, they use all cores and RAM available on the host and communicate via a network protocol. If external disk memory is used, this should be on local disks.

The input and output is usually stored on a fault tolerance distributed file system like Ceph, Lustre, NFS, or HDFS. Currently Thrill only supports the standard (POSIX) file system (HDFS's proprietary interface may be added some day).

In general, the startup procedure has the goal to launch the same binary on all hosts. On startup, the Thrill binary will then connect to the other running instances via the network. Hence, the host, port and other connection parameters of the other instances must be passed.

We provide a set of run scripts in the source package, which automatically launch Thrill programs via SSH, on a set of AWS EC2 instances, and on clusters scheduled by slurm. MPI is also supported natively.

When started with no parameters, Thrill programs run locally and simulate a two host network with all cores available on the machine divided into the two virtual hosts. Communication is performed via local kernel sockets on Linux.

Thrill's configuration is passed via the standard Unix environment variables. This makes it easy to traverse hosts in a cluster. See Environment Configuration Variables for more configuration options.

Running via SSH

The bash script run/ssh/invoke.sh launches the same binary on a set of hosts via ssh. These should be setup with ssh keys for authentication.

For example, the following will launch the WordCount example on two hosts called jupiter and saturn. We assume Thrill is in directory ~/thrill.

$cd ~/thrill/build/examples/word_count/$ ~/thrill/run/ssh/invoke.sh -h "jupiter saturn" word_count_run --generate 1000 --output result-

This ssh invocation assumes a common distributed file system on all hosts including the launcher. This is a common setup in Linux clusters with an NFS server. In principle, the script access each machine via ssh and launches the word_count_run executable with the additional connection parameters. All arguments after word_count_run are passed on.

One can also launch Thrill programs on a "remote" cluster which does not contain the executable. This is done by simply adding the -c option. The script then copies the executable via ssh to the remote hosts and runs it from /tmp.

Running via MPI

The simplest method to run Thrill programs in a cluster is using MPI. If compiled with an MPI library like OpenMPI, the Thrill program will detect that it is running under MPI and use MPI calls to communicate. No configuration is needed.

The process of looking up the currently running EC2 instances, reading the public and private IPs, etc, is automated by the scripts in run/ec2/. The python scripts require the boto3 library, which is available via pip.
First run ~/thrill/run/ec2/make_env.py and check the output for running EC2 instances.
Then run ~/thrill/run/ec2/invoke.sh which runs ssh's invoke with all EC2 instances.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.155875563621521, "perplexity": 6376.355697223372}, "config": {"markdown_headings": false, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2018-09/segments/1518891812405.3/warc/CC-MAIN-20180219052241-20180219072241-00205.warc.gz"}