Changes between Version 22 and Version 23 of HowTo/FortranStandards


Ignore:
Timestamp:
2013-05-02T10:57:03+02:00 (11 years ago)
Author:
mmcgrath
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • HowTo/FortranStandards

    v22 v23  
    102102}}} 
    103103 
    104 > MJM: I disagree with writing it at the end of short loops (less than five or ten lines), since the indentation should make that clear. 
    105 >> JR: I've updated to suggest ten lines or more 
    106104 
    107105[[BR]]  
     
    164162[[BR]]  
    165163 
    166 (3) '''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, I first compile locally with " gfortran -c -cpp -O0 -pg -g -Wall -ffpe-trap=invalid,zero -fbacktrace -fcheck=all -fbounds-check -pedantic".  Then I compile on asterix with "ifort -c -cpp -g -O0 -debug -fpe0 -ftrapuv -traceback".  I'm hoping to do it on Curie soon, too, since they have the NAG compiler there which is good with error checking. 
     164(3) '''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, I first compile locally with " gfortran -c -cpp -O0 -pg -g -Wall -ffpe-trap=invalid,zero -fbacktrace -fcheck=all -fbounds-check -pedantic".  Then I compile on asterix with "ifort -c -cpp -g -O0 -debug -fpe0 -ftrapuv -traceback".  I'm hoping to do it on Curie soon, 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 initilizing 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.  There are some errors in the NetCDF calling routines that I haven't tracked down, but all the DOFOCO code has been cleaned. 
     165 
     166 
     167[[BR]]  
     168 
     169 
     170= Signatories = 
     171 
     172If you think that the policies outlined are good, feel free to leave your initials and the date.  This is dangerous because it indicates that you are willing to receive critiquing emails from other devs if some of your code isn't up to the policies above.  Not only receive them, but you will also refrain from from sending snarky emails in response! 
     173 
     174MJM, May 02, 2013 
     175