Debugging CRCM5 : Différence entre versions

Un article de Informaticiens département des sciences de la Terre et l'atmosphère
Aller à: navigation, charcher
m
m
 
(6 révisions intermédiaires par le même utilisateur non affichées)
Ligne 1: Ligne 1:
1) The grid<br> If you have general problems right away in more than one point of your domain I would you a little test grid: Either global 24x12 points or, if you need to run LAM, use a grid 60x60 points.<br> I usually use these test grids:<br> <br> &nbsp;&nbsp;&nbsp; /home/winger/gem/v_3.3.3.1/Config/Test/24x12<br> &nbsp;&nbsp;&nbsp; /home/winger/gem/v_3.3.3.1/Config/Test/LAM_60x60<br> <br> <br> 2) Debugging mode?<br> Do you want to use a debugger?<br> If yes, I suggest you compile all routines you want to debug in debugging mode by adding "OPTIL=0 FCOMPF=-debug": <br> <br> &nbsp;&nbsp; <span style="font-weight: bold;">make routine.o&nbsp; OPTIL=0 &nbsp; FCOMPF=-debug </span>
+
1) The grid<br> If you have general problems right away in more than one point of your domain I would you a little test grid: Either global 24x12 points or, if you need to run LAM, use a grid 60x60 points.
  or, if you want to compile all your routines or modifyed a *.cdk
+
 
  &nbsp;&nbsp; <span style="font-weight: bold;">make objloc&nbsp; OPTIL=0
+
Make sure you are '''running on 1 core''' only:
      FCOMPF=-debug </span>
+
 
+
&nbsp;&nbsp;&nbsp;&nbsp; Ptopo_npex&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 1 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; , Ptopo_npey&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 1 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ,
+
 
Create the executables with  
+
&nbsp;&nbsp;&nbsp;&nbsp; BACKEND_OMP=1;
&nbsp;&nbsp; <span style="font-weight: bold;">make gemclimdm_nompi&nbsp; OPTIL=0
+
 
      DEBUG=-debug </span>
+
<br> I usually use these test grids:<br> <br> &nbsp;&nbsp;&nbsp; /home/winger/gem/v_3.3.3.1/Config/Test/24x12<br> &nbsp;&nbsp;&nbsp; /home/winger/gem/v_3.3.3.1/Config/Test/LAM_60x60<br> <br> <br> 2) Debugging mode?<br> Do you want to use a debugger?<br> If yes, I suggest you compile all routines you want to debug in debugging mode by adding "OPTIL=0 FCOMPF=-debug":  
&nbsp;&nbsp; <span style="font-weight: bold;">make gemclimntr_nompi&nbsp; OPTIL=0
+
 
      DEBUG=-debug </span>
+
&nbsp;&nbsp; <span style="font-weight: bold;">make routine.o&nbsp; OPTIL=0 &nbsp; FCOMPF=-debug </span>  
+
 
+
or, if you want to compile all your routines or modifyed a *.cdk  
3) Executing just the executable
+
 
Does your entry/model crash? If not, the easiest way is to start the simulation the normal way with:
+
&nbsp;&nbsp; <span style="font-weight: bold;">make objloc&nbsp; OPTIL=0 &nbsp; FCOMPF=-debug </span>  
+
 
&nbsp;&nbsp;&nbsp; '''Um_lance'''
+
<br> Create the executables with:
+
 
Then kill the entry/model job (the job you want to debug) once it started.  
+
&nbsp;&nbsp; <span style="font-weight: bold;">make gemclimdm_nompi&nbsp; OPTIL=0 &nbsp; DEBUG=-debug</span><br><span style="font-weight: bold;"> </span> &nbsp;&nbsp; <span style="font-weight: bold;">make gemclimntr_nompi&nbsp; OPTIL=0 &nbsp; DEBUG=-debug </span>  
+
 
Go into the execution directory:
+
<br> 3) Executing just the executable Does your entry/model crash? If not, the easiest way is to start the simulation the normal way with:  
+
 
&nbsp;&nbsp;&nbsp; '''cd '''<span class="moz-txt-slash" style="font-weight: bold;"><span class="moz-txt-tag">/</span>home/${USER}/MODEL_EXEC_RUN/${TRUE_HOST}<span class="moz-txt-tag">/</span></span><span style="font-weight: bold;">${UM_EXEC_exp}
+
&nbsp;&nbsp;&nbsp; '''Um_lance'''  
    </span>
+
 
+
Then kill the entry/model job (the job you want to debug) once it started.  
+
 
3a) If you want to debug the entry execute:
+
Go into the execution directory:  
+
 
&nbsp;&nbsp;&nbsp; <span style="font-weight: bold;">.
+
&nbsp;&nbsp;&nbsp; '''cd '''<span style="font-weight: bold;" class="moz-txt-slash"><span class="moz-txt-tag">/</span>home/${USER}/MODEL_EXEC_RUN/${TRUE_HOST}<span class="moz-txt-tag">/</span></span><span style="font-weight: bold;">${UM_EXEC_exp}</span>  
      RUNENT_upload/configexp.cfg </span>
+
 
+
<br> 3a) If you want to debug the entry execute:  
Go in the entry working directory:
+
 
+
&nbsp;&nbsp;&nbsp; <span style="font-weight: bold;">.
'''&nbsp;&nbsp;&nbsp; cd ''''''RUNENT/work'''
+
RUNENT_upload/configexp.cfg </span>  
&nbsp;&nbsp;&nbsp;
+
 
Execute the executable:
+
Go in the entry working directory:  
+
 
'''&nbsp;&nbsp;&nbsp; ''''''../bin/ATM_NTR.Abs'''
+
'''&nbsp;&nbsp;&nbsp; cd RUNENT/work'''  
+
 
Or, if you want to use the debugger pgdbg:
+
Execute the executable:  
+
 
'''&nbsp;&nbsp;&nbsp; ''''''pgdbg -dbx ''''''../bin/ATM_NTR.Abs&nbsp; &amp;'''
+
'''&nbsp;&nbsp;&nbsp; ../bin/ATM_NTR.Abs'''  
+
 
+
Or, if you want to use the debugger pgdbg:  
3b) If you want to debug the model execute:
+
 
+
'''&nbsp;&nbsp;&nbsp; pgdbg -dbx ../bin/ATM_NTR.Abs&nbsp; &amp;'''  
&nbsp;&nbsp;&nbsp; <span style="font-weight: bold;">.
+
 
       RUNMOD_upload/configexp.cfg </span>
+
<br> 3b) If you want to debug the model execute:  
+
 
Go in the entry working directory:
+
&nbsp;&nbsp;&nbsp; <span style="font-weight: bold;">.&nbsp;       RUNMOD_upload/configexp.cfg </span>  
+
 
'''&nbsp;&nbsp;&nbsp; cd ''''''RUNMOD/work'''
+
Go in the entry working directory:  
&nbsp;&nbsp;&nbsp;  
+
 
Execute the executable:
+
'''&nbsp;&nbsp;&nbsp; cd RUNMOD/work''' &nbsp;&nbsp;&nbsp;  
+
 
'''&nbsp;&nbsp;&nbsp; ''''''../bin/ATM_MOD.Abs'''
+
Execute the executable:  
+
 
Or, if you want to use the debugger pgdbg:
+
'''&nbsp;&nbsp;&nbsp; ../bin/ATM_MOD.Abs'''  
+
 
'''&nbsp;&nbsp;&nbsp; ''''''pgdbg -dbx ''''''../bin/ATM_MOD.Abs&nbsp; &amp;'''
+
Or, if you want to use the debugger pgdbg:  
 +
 
 +
'''&nbsp;&nbsp;&nbsp; pgdbg -dbx ../bin/ATM_MOD.Abs&nbsp; &amp;'''

Version actuelle datée du 19 de mars 2015 à 15:10

1) The grid
If you have general problems right away in more than one point of your domain I would you a little test grid: Either global 24x12 points or, if you need to run LAM, use a grid 60x60 points.

Make sure you are running on 1 core only:

     Ptopo_npex      = 1          , Ptopo_npey      = 1          ,

     BACKEND_OMP=1;


I usually use these test grids:

    /home/winger/gem/v_3.3.3.1/Config/Test/24x12
    /home/winger/gem/v_3.3.3.1/Config/Test/LAM_60x60


2) Debugging mode?
Do you want to use a debugger?
If yes, I suggest you compile all routines you want to debug in debugging mode by adding "OPTIL=0 FCOMPF=-debug":

   make routine.o  OPTIL=0   FCOMPF=-debug

or, if you want to compile all your routines or modifyed a *.cdk

   make objloc  OPTIL=0   FCOMPF=-debug


Create the executables with:

   make gemclimdm_nompi  OPTIL=0   DEBUG=-debug
   make gemclimntr_nompi  OPTIL=0   DEBUG=-debug


3) Executing just the executable Does your entry/model crash? If not, the easiest way is to start the simulation the normal way with:

    Um_lance

Then kill the entry/model job (the job you want to debug) once it started.

Go into the execution directory:

    cd /home/${USER}/MODEL_EXEC_RUN/${TRUE_HOST}/${UM_EXEC_exp}


3a) If you want to debug the entry execute:

    . RUNENT_upload/configexp.cfg

Go in the entry working directory:

    cd RUNENT/work

Execute the executable:

    ../bin/ATM_NTR.Abs

Or, if you want to use the debugger pgdbg:

    pgdbg -dbx ../bin/ATM_NTR.Abs  &


3b) If you want to debug the model execute:

    .  RUNMOD_upload/configexp.cfg

Go in the entry working directory:

    cd RUNMOD/work    

Execute the executable:

    ../bin/ATM_MOD.Abs

Or, if you want to use the debugger pgdbg:

    pgdbg -dbx ../bin/ATM_MOD.Abs  &