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 beaufix): 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,
      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. For a run on PC, cp TESTS/PC/script_all.sh in the run directory:
    cp TESTS/PC/script_all.sh .
  2. For a run on BEAUFIX, cp TESTS/BEAUFIX/script_all.sh in run directory:
    cp TESTS/BEAUFIX/script_all.sh .
  3. 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.

  4. 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.