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 | |
| 172 | If 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 | |
| 174 | MJM, May 02, 2013 |
| 175 | |