Version 1 (modified by 4 years ago) (diff) | ,
---|
Debug Mode
Run several tests in debug mode is a necessary step before committing your updates on the master branch.
COMPILE
To compile the GCM or 1-D model, enter this command line:
./makelmdz_fcm -arch your_arch -parallel mpi -d 64x48x32 -p mars gcm_or_testphys1d -j 8 -debug
You can add or remove debug flag manually in the file trunk/LMDZ.COMMON/arch.fcm at the line %DEBUG_FFLAGS. Make sure you are using correct flags regarding your compiler, and the debug mode performs no optimization (e.g: -O0 with mpif90).
Methodology: 1 + 1 = 2
This methodology is very useful when:
- the simulation crashes with no obvious reason
- crash is not replicable at different duration simulations (e.g: 1 simulation of 60 days = OK, 3*20 days = crashed!)
The procedure of the methodology is quite simple, modify the file called 'run_month1'
- 1 run: 1 day and 1 day
num_now = 1 num_end = 2 .... case $true_num in 1) sed/9999/1/ .... 2) sed/9999/1/ ....
At the end of the runs, you have done 2 days (tips: mv startfi2.nc startfi2_1j.nc)
- 1 run: 2 days (mv startfi1.nc startfi1_2j.nc)
num_now = 1 num_end = 1 .... case $true_num in 1) sed/9999/2/ ....
At the end of the runs, you have done 2 days in a single row (tips: mv startfi1.nc startfi1_2j.nc)
Then, do the difference between startfi1_2j.nc and startfi2_1j.nc. The command ncdiff is very useful to deal with netcdf file (from nco package):
ncdiff startfi1_2j.nc startfi2_1j.nc diff_startfi.nc
Then, look at which variable is not equals to zero.
ncdump diff_startfi.nc > diff_startfi.txt
Vi diff_stratfi.txt
Tips
You can do this check quickly by using the GCM variable 'ndynstep' in run.def file, this variable means the number of dynamical steps you want to perform during the simulation. Be sure to set this variable equals to iphysiq to perform at least one physical call. For example, with iphysiq = 10, you can do : 10 + 10 = 20 dynamical steps, corresponding to 1 call to physiq_mod + 1 call to physiq_mod = 2 calls to physiq_mod.
Methodology: 1 = 1
Same as 1 + 1 = 2, except you perform runs with 1 day with 1 CPU, and 1 day with 24 CPUs! Very useful when you have memory issues.