How to test reproducibility of the code ?
(results independent of the number of MPI tasks)
The method consists of running simultaneously the same run with 2 different numbers of MPI tasks. The 2 runs exchange information to check that fields are equal.
- For a RUN :
- In EXSEG1.nam, in NAM_CONF put LCHECK=.T.
- Create a directory dir_clone_1proc on your run directory and copy run_mesonh_xyz_MPPDB
- Copy mppdb.nam.ihm on your run directory and modify MPPDB_HOST by the name of your machine
- Copy EXSEG1.nam to EXSEG1.nam.ihm
- You can then launch run_mesonh_xyz_MPPDB and differences between the 2 runs will be printed.
- For another step than the RUN, instead of using LCHECK, you have to add check points in the source code by introducing USE MODE_MPPDB and calls to MPPDB_CHECK2D or MPPDB_CHECK3D :
- For instance in ver_thermo.f90 :
- CALL MPPDB_CHECK2D(PZSMT_LS,"ver_thermo:PZSMT_LS",PRECISION)
- CALL MPPDB_CHECK3D(PZMASS_MX,"ver_thermo:PZMASS_MX",PRECISION)
- then recompile your modified code, and then execute the steps 2 to 4 as previously after adapting to PREP_REAL_CASE or DIAG or ...