5. To install and run the base of test cases
INSTALLATION OF THE TEST DATABASE :
- The STRATO tests base is now included in the GIT repository, in the directory STRATO/TESTS/
- Choose two surfex versions ("old" and "new") to test
- Choose a run directory, for example /home/faroux/run_base_test
In this run directory, you need to link:- $SRC_SURFEX/MY_RUN/ECOCLIMAP/*.bin
- executables for the old version of the SURFEX code to be compared: pgd_old.exe, prep_old.exe, soda_old.exe, offline_old.exe
- executables for the new version of the SURFEX code to be compared: pgd_new.exe, prep_new.exe, soda_new.exe, offline_new.exe
- In the run directory, copy the directory TESTS/ from the surfex GIT repository.
- open and modify:
- 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) - 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.
- TESTS/PC/script_all.sh (on a standard PC) or TESTS/BEAUFIX/script_all.sh (on belenos): 3 first lines:
- physiographic big files are not delivered with the test base. So you need to:
- 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. - 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.
- download:
RUNNING THE TESTS :
- 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.
- For a run on PC, cp TESTS/PC/script_all.sh in the run directory:
cp TESTS/PC/script_all.sh . - For a run on BELENOS, cp TESTS/BEAUFIX/script_all.sh in run directory:
cp TESTS/BEAUFIX/script_all.sh . - 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.
- 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.