This configuration provides a systematic way to test the broadest possible range of DYNAMICO features and check that they are not broken by new versions. ====================== Setup ========================== The 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 : ln -s DYNAMICO_trunk DYNAMICO Then run the script : > ./setup.sh -arch $ARCH -job $JOB where 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. For example : > ./setup.sh -arch X64_CURIE -job 8 The 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: > cat current_args ================= Manual testing ======================= You may manually execute the different steps of the testing procedure : * bash/build.sh builds XIOS and the DYNAMICOs * 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 * 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. =================== Automatic testing ================== The 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 . In order to setup this automatic testing, you should edit your crontab : > $CRONTAB -e where CRONTAB is usually 'crontab' but may have a different name on certain machines (ex : ccc_crontab on Curie). This will let you edit your crontab in vi. For example : SHELL=/bin/bash # run five minutes after midnight, every day 5 0 * * * $HOME/bin/daily.sh > $HOME/tmp/daily.out 2>&1 with $HOME/bin/daily.sh : #!/bin/bash source $HOME/.bash_profile cd $WORKDIR/testing_auto bash/daily.sh Be aware that crond launches scripts with a minimal environment. This is why in the above example the script sources $HOME/.bash_profile. ============================ Porting ===================== Porting 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 : * split_XX_YY() : defines the run.def parameters nsplit_i and nsplit_j . * submit_job_$ARCH() : submits a job file to the batch scheduler AND returns a job ID * job_$ARCH() : prints a job script to be submitted by the previous command * 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).