5. To install and run the base of test cases



INSTALLATION OF THE TEST DATABASE :

  1. The STRATO tests base is now included in the GIT repository, in the directory STRATO/TESTS/
  2. Choose two surfex versions ("old" and "new") to test
  3. Choose a run directory, for example /home/faroux/run_base_test
    In this run directory, you need to link:
    1. $SRC_SURFEX/MY_RUN/ECOCLIMAP/*.bin
    2. executables for the old version of the SURFEX code to be compared: pgd_old.exe, prep_old.exe, soda_old.exe, offline_old.exe
    3. executables for the new version of the SURFEX code to be compared: pgd_new.exe, prep_new.exe, soda_new.exe, offline_new.exe
    4. In the run directory, copy the directory TESTS/ from the surfex GIT repository.
  4. open and modify:
    1. TESTS/PC/script_all.sh (on a standard PC) or TESTS/BEAUFIX/script_all.sh (on belenos): 3 first lines:
      dir_run="/home/faroux/run_base_test" (type your own rundir name)
      exec_new="_new" (type your own extension for new executables)
      exec_old="_old" (type your own extension for old executables)
    2. TESTS/PYTHON/compR.cfg:
      verN="name of your new version, for output files"
      verO="name of your old version, for output files"
      basedir="/home/faroux/run_base_test/" (type your own rundir name)

      CAUTION: there must be a "/" at the end of basedir.

  5. physiographic big files are not delivered with the test base. So you need to:
    1. download:
      gtopo30.dir & gtopo30.hdr, topo_index.dir & topo_index.hdr here,
      clay_fao.dir & clay_fao.hdr, sand_fao.dir & sand_fao.hdr, soc_top.dir & soc_top.hdr, soc_sub.dir & soc_sub.hdr here,
      clay_0-5cm_mean_int.tgz, sand_0-5cm_mean_int.tgz, clay_5-15cm_mean_int.tgz, sand_5-15cm_mean_int.tgz, clay_15-30cm_mean_int.tgz, sand_15-30cm_mean_int.tgz, clay_30-60cm_mean_int.tgz, sand_30-60cm_mean_int.tgz, clay_60-100cm_mean_int.tgz, sand_60-100cm_mean_int.tgz, clay_100-200cm_mean_int.tgz, sand_100-200cm_mean_int.tgz here,
      ECOCLIMAP_I_GLOBAL.dir & ECOCLIMAP_I_GLOBAL.hdr, ECOCLIMAP_II_EUROP.dir & ECOCLIMAP_II_EUROP.hdr (take latest versions and rename them), perm_glo_10km.dir & perm_glo_10km.hdr here,
      GlobalLakeDepth.dir & GlobalLakeDepth.hdr, GlobalLakeStatus.dir & GlobalLakeStatus.hdr, LAKE_LTA_NEW.nc here,
      etopo2.nc here.
    2. unzip all these files and put them in directory TESTS/PGD/FILES, except for LAKE_LTA_NEW.nc that you put in TESTS/PREP/FILES.


RUNNING THE TESTS :

  1. Python scripts have been recently adapted to Python3. If your default python version is not Python3, please change "python" by "python3" in TESTS/PC/python.exe
    On BELENOS, the default python is now Python3. But if in your bashrc or bash_profile you load python, please verify that you load python3 version.
     
  2. For a run on PC, cp TESTS/PC/script_all.sh in the run directory:
    cp TESTS/PC/script_all.sh .
  3. For a run on BELENOS, cp TESTS/BEAUFIX/script_all.sh in run directory:
    cp TESTS/BEAUFIX/script_all.sh .
  4. run it:
    ./script_all.sh

    NB : you can also type:

    nohup ./script_all.sh &

    so that you can close you session and the output is written in a nohup.out file instead of screen.

  5. If you want to run the base of tests of a PC that has less than 4 processors, you can unactivate the parallel tests in a simple way:
  • go into directory TESTS and do:
    • cp -f script_exec.sh script_exec_parall.sh
    • cp -f script_exec.sh script_exec_omp_pgd.sh
    • cp -f script_exec_restart.sh script_exec_restart_parall.sh
    • cp -f script_exec.sh script_exec_pgd_parall.sh
    • cp -f script_exec.sh script_exec_all_parall.sh
  • => scripts that run with MPI and OPEN-MP are replaced by generic scripts and no parallelization happens.