Opened 10 years ago

Closed 5 years ago

#149 closed enhancement (fixed)

Documention for How to change to compiling with debug options

Reported by: jgipsl Owned by: mmcgrath
Priority: minor Milestone: ORCHIDEE 3.0
Component: Documentation Version:
Keywords: Cc:

Description

To be done in section How to on the wiki.
Make sure that the following information is represented on the wiki (text coming from previous version of coding guidelines)

Don't stick to one compiler, no compiler will catch all your bugs. 
Always use multiple compilers to check, including all the error flags. 
For example, first compile locally with 
"gfortran -c -cpp -O0 -pg -g -Wall -ffpe-trap=invalid,zero -fbacktrace 
-fcheck=all -fbounds-check -pedantic". 

Then compile on asterix (if you’re at LSCE) with 
"ifort -c -cpp -g -O0 -debug -fpe0 -ftrapuv –traceback -check
arg_temp_created,bounds,format,output_conversion,pointers,stack,uninit". 

If you have an account, go on curie too, since they have the NAG compiler 
there which is good with error checking. 

Finally, running the code through valgrind will catch every single piece of 
memory that you use without initializing it (apart from some extreme cases), 
more thoroughly than a compiler. 
"valgrind -v --track-origins=yes ../../../bin/orchidee_ol". 
This is very slow, but a nice check.

Change History (10)

comment:1 Changed 7 years ago by jgipsl

Another test to see who receives information on tickets after the migration of the mailing listes...

comment:2 Changed 7 years ago by jgipsl

Another test to see who receives information on tickets after the migration of the mailing listes...

comment:3 Changed 7 years ago by jgipsl

Again, Another test to see who receives information on tickets after the migration of the mailing listes...

comment:4 Changed 7 years ago by jgipsl

Again test to see who receives information on tickets after the migration of the mailing listes...

comment:5 Changed 7 years ago by jgipsl

New test to see who receives information on tickets after the migration of the mailing listes...

comment:6 Changed 7 years ago by jgipsl

test privé

comment:7 Changed 7 years ago by jgipsl

test liste+prive

comment:8 Changed 7 years ago by jgipsl

  • Milestone set to ORCHIDEE 3.0

comment:9 Changed 5 years ago by mmcgrath

  • Owner changed from jgipsl to mmcgrath
  • Status changed from new to accepted

Idea from Josefine: Ca serait bien de faire un page how to, pas forcement avec les mems infos mais pour activer le compilation avec des options de debug. Il faudrait mettre comment activer les options de debugage predefini (en mettant -debug au lieu de -prod) dans le makefile principale.

Also, rewrite the page Documentation/UserGuide/flag

comment:10 Changed 5 years ago by mmcgrath

  • Resolution set to fixed
  • Status changed from accepted to closed

Revision 7 of the Documentation/UserGuide/flag page contains changes in response to this ticket.

Note: See TracTickets for help on using tickets.