Changes between Version 2 and Version 3 of Documentation/UserGuide/flags


Ignore:
Timestamp:
2018-12-11T08:27:59+01:00 (5 years ago)
Author:
mmcgrath
Comment:

Some additional help with XIOS and memory bugs

Legend:

Unmodified
Added
Removed
Modified
  • Documentation/UserGuide/flags

    v2 v3  
    11= Compilation flags = 
    22 
    3 Compilation flags let users change compiler's behaviour. For example, It can give you more information about an exception or it can apply more or less optimizations to the code. Be aware that each compiler has its own flags. 
     3Compilation flags let users change compiler's behaviour. For example, they can give you more information about an exception or it can apply more or less optimizations to the code. Be aware that each compiler has its own flags. 
    44 
    55== Intel == 
     
    2323 
    2424Note: if you modify this file you have to apply ins_make again. This way it spreads the changes to all Orchidee's folders. Then recompile from zero. 
     25 
     26Sometimes, when you get an error that you can't track down, I've found it helps to use the following flags (on obelix).  It wasn't trivial to get XIOS, IOIPSL, and ORCHIDEE to all compile with the same flags, and perhaps this is not the best way to do it, but it works.  I noticed this was necessary to catch a memory error one time: the error was in ORCHIDEE, but it was showing up as a crash in XIOS, until I compiled everything with full debug flags...then it pointed straight to the line number in ORCHIDEE that was writing out of bounds. 
     27 
     28For XIOS, 
     29 
     30{{{ 
     31cd ./modeles/XIOS 
     32vi ./arch/arch-ifort_LSCE.fcm 
     33%DEBUG_CFLAGS   -DBZ_DEBUG -g -fno-inline -ggdb --debug 
     34%DEBUG_FFLAGS   -g -ggdb -debug all -traceback 
     35  ./make_xios --arch ifort_LSCE --debug 
     36}}} 
     37 
     38For IOIPSL, the ``ins\_make -d'' command doesn't seem to have any effect.  I have to comment out the debug line in util/AA\_make.gdef 
     39 
     40{{{ 
     41  #-Q- lxiv8    F_O = -DCPP_PARA --i4 -r8 -fp-model precise -fpe0 -O0 -g -traceback -fp-stack-check 
     42        -ftrapuv -check bounds -check all -check noarg_temp_created -I$(MODDIR) -module $(MODDIR) 
     43}}} 
     44 
     45and then redo ins\_make. 
     46 
     47Can change l\_dbg = .TRUE. in errioipsl.f90 to get more information printed out about reading in .nc files. 
     48 
     49Can also make the following changes to iodef.xml to get more information printed out from XIOS. 
     50 
     51{{{ 
     52  <variable id="info_level"                type="int">100</variable> 
     53  <variable id="print_file" type="bool">true</variable> 
     54}}} 
     55 
     56Make sure to do a full gmake clean, and recompile, checking to see that the flags flashing by on the screen are the same as the ones above.