Skip to content

CDash integration

Matthias Diener edited this page Mar 12, 2020 · 39 revisions

Overview

CDash (https://cdash.org), from the same developers as CMake and CTest, is an alternative for our autobuild system (https://github.com/UIUC-PPL/autobuild). Some reasons for the switch are mentioned in issue #2571.

Our CDash dashboard is here: Charm++ CDash.

In contrast to autobuild, CDash works by pushing the results from regular (e.g. nightly) or occasional tests to the dashboard. These tests have to be started on the machine where they are intended to run, either manually or through cron.

CDash requires the CTest framework for submission of test results. We work around that by wrapping our existing test system in CTest, creating 3 CTest tests, tests/, examples/, and benchmarks/. These tests can be regenerated with the cdash/generate_ctest.py script.

Running a build

The cdash/run_autobuild.sh script is a frontend to run a single test (manually or via cron). It clones, builds, and tests Charm++, and submits the results to the CDash dashboard.

To choose a build configuration (build name, branch to test, machine layer etc.), please set the environment variables mentioned below.

Manual tests

To run a single, manual test, you can use the following commands:

# Download autobuild script
$ wget https://raw.githubusercontent.com/UIUC-PPL/charm/master/cdash/run_autobuild.sh
$ chmod a+x run_autobuild.sh

# Set build options (all are optional, defaults are shown below):
$ export AUTOBUILD_MACHINE_NAME="$(hostname)"
$ export AUTOBUILD_BUILD_NAME="netlrts-linux-x86_64"
$ export AUTOBUILD_BUILD_OPTS="-j8 -g --with-production --enable-error-checking"
$ export AUTOBUILD_BRANCH="master"
$ export AUTOBUILD_TEST_OPTS="++local"
$ export AUTOBUILD_BUILD_COMMAND="./build all-test $AUTOBUILD_BUILD_NAME $AUTOBUILD_BUILD_OPTS"

# Run build
$ ./run_autobuild.sh

Nightly tests

To run a nightly autobuild, the following crontab entry can be used (edit your crontab file with crontab -e):

LC_ALL=en_US.UTF-8
5 0 * * * AUTOBUILD_BUILD_NAME="netlrts-linux-x86_64 smp" srun -n 1 -c 8 ~/run_autobuild.sh > /dev/null 2>&1

This crontab entry runs a build at five minutes past midnight each day.

⚠️ Make sure to allocate a compute node in the crontab entry (e.g., srun in the above example)! ⚠️