Skip to content

Setting up nightly tests 2021 style

Erik B Knudsen edited this page Jan 5, 2021 · 5 revisions

Starting ingredients

  1. A check-out of the McCode tree (in these docs assumed to be in $HOME/McCode
  2. Scripts to check out + build installations for "master-branch" and "GPU-branch", examples from McStas:
  • build_loc_2.5_tree and build_loc_3.0_tree that install to $HOME/McStas/mcstas/'version'

Running tests

  • Use the mctest tool available in McCode/tools/Python/mctest/mctest.py (Use the version on the "GPU"-branch)
  • An example run for one "configuration" is seen below, for the "configuration" McStas_GPU_PGCC_TESLA_KISS found in McCode/tools/Python/mccodelib/mcstas-test/mccode_config_McStas_GPU_PGCC_TESLA_KISS.py
  • HOME/McCode/tools/Python/mctest/mctest.py --ncount=5e7 --configs --mccoderoot $HOME/McStas/mcstas --verbose --testdir $HOME/TESTS/${DATE} --config=McStas_GPU_PGCC_TESLA_KISS
  • Optionally filter by --instr=Test which will only run instruments matching Test in the filename
  • Configurations could contain e.g. master branch with MPI, ng-branch single-cpu, MPI, OpenACC and combinations

Presenting results

  • Use the mcviewtest tool available in McCode/tools/Python/mctest/mcviewtest.py (Use the version on the "GPU"-branch)
  • Example run, will generate a table like http://new-nightly.mccode.org/2021-01-04/2021-01-04_output.html, with "McStas-2.5" in the left-most column, "used as reference"
  • $HOME/McCode/tools/Python/mctest/mcviewtest.py --reflabel McStas-2.5_CPU_MPICC_5e7 TESTS/${DATE}

Generating graphics

  • Prerequisites are Matlab and iFit, iFit installed in $HOME/iFit
  • See e.g.McCode/test-utils/do_plots.sh that launches a number of Matlab sessions via an IBM LSF cluster system
  • For each "configuration", a set of graphics should be generated via the script McCode/generate_testplots/generate_testplots.m, an example run can be seen in McCode/test-batches/plots_cpu_MPI_KISS.scpt (content of both the "target" and "reference" column is generated for each such a call of generate_testplots
  • Finally, a set of browse.html files should be generated, matching each cell in the table, see McCode/test-utils/do_html.sh

To run for McXtrace

The procedure for setting up nightlies for McXtrace is somewhat more involved at present.

  • Build a 1.5 release tree (actually the python tools should be sufficient)
  • Copy in mctest.py as well as mccodelib/utils.py from either McStas or McXtrace 3.0 branch
  • Edit and copy in mccodelib/mccode_config.py - This contains some default hardwires for McStas 2.6.1 which is used by mctest.py. Edit to point to your 1.5 tree
  • Build the tree you want to test (e.g. 1.6).
  • Edit a mccode_config_LABEL.py file in the 1.5 tree to your liking, then run mctest.py from there pointing it to the LABELLed config. This now catches that environment.
Clone this wiki locally