source: configs/testing/README @ 509

Last change on this file since 509 was 509, checked in by dubos, 7 years ago

testing : added README

File size: 3.3 KB
Line 
1This configuration provides a systematic way to test the broadest possible range of DYNAMICO features and check that they are not broken by new versions.
2
3====================== Setup ==========================
4
5The first think to do is to choose whether testing will apply to the trunk or devel branch of DYNAMICO (if you are unsure, use the trunk branch). For this, symlink either DYNAMICO_devel or DYNAMICO_trunk as DYNAMICO :
6
7ln -s DYNAMICO_trunk DYNAMICO
8 
9Then run the script :
10> ./setup.sh -arch $ARCH -job $JOB
11
12where ARCH has the same meaning as for the XIOS and DYNAMICO build scripts and JOB is a number of jobs for parallel make. A machine-specific script bash/$ARCH.sh should exist. Currently only X64_CURIE is supported.
13
14For example :
15> ./setup.sh -arch X64_CURIE -job 8
16
17The setup creates several build directories in order to build several versions of the DYNAMICO executable. Setup needs to be done only once. It also creates a file current_args used later by the other scripts. It contains the command line that you executed for setup:
18
19> cat current_args
20
21================= Manual testing =======================
22
23You may manually execute the different steps of the testing procedure :
24* bash/build.sh builds XIOS and the DYNAMICOs
25* bash/create_runs.sh creates the directory RUNS and fills sub-directories with appropriate *.def and *.xml configuration files, as well as shell scripts to be submitted to the batch scheduler
26* bash/submit.sh submits the jobs to the batch scheduler, and a final job that will produce figures (using Python matplotlib), a PDF report and send it by mail.
27
28=================== Automatic testing ==================
29
30The script bash/daily.sh is there to allow fully automatic testing through cron. It tests for a new version of XIOS/DYNAMICO and, as necessary, executes build.sh, create_runs.sh and submit.sh .
31
32In order to setup this automatic testing, you should edit your crontab :
33> $CRONTAB -e
34where CRONTAB is usually 'crontab' but may have a different name on certain machines (ex : ccc_crontab on Curie).
35This will let you edit your crontab in vi. For example :
36
37SHELL=/bin/bash
38# run five minutes after midnight, every day
395 0 * * *       $HOME/bin/daily.sh > $HOME/tmp/daily.out 2>&1
40
41with $HOME/bin/daily.sh :
42
43#!/bin/bash
44source $HOME/.bash_profile
45cd $WORKDIR/testing_auto
46bash/daily.sh
47
48Be aware that crond launches scripts with a minimal environment. This is why in the above example the script sources $HOME/.bash_profile.
49
50============================ Porting =====================
51
52Porting this configuration to a yet-unsupported machine requires that you write a script bash/$ARCH.sh for your desired ARCH. This script is sourced by the other, machine-independent scripts, and defines routines that provide the following commands :
53* split_XX_YY() : defines the run.def parameters nsplit_i and nsplit_j .
54* submit_job_$ARCH() : submits a job file to the batch scheduler AND returns a job ID
55* job_$ARCH() : prints a job script to be submitted by the previous command
56* job_post_$ARCH() : prints the final post-processing job. This command takes as an input argument the list of the job IDs of the various experiments. This list is used to provide the appropriate options to the batch scheduler so that the post-processing job runs only after completion of all other jobs (i.e. --dependency=... with slurm).
Note: See TracBrowser for help on using the repository browser.