Difference between revisions of "General computing resources"

From NEClusterWiki
Jump to navigation Jump to search
Line 26: Line 26:
  
 
<pre>-Wall -Wextra -Wconversion -pedantic -ffpe-trap=zero,overflow,underflow,invalid  
 
<pre>-Wall -Wextra -Wconversion -pedantic -ffpe-trap=zero,overflow,underflow,invalid  
-ffree-line-length-none -finit-local-zero -fbounds-check -fcheck-array-temporaries</pre>
+
-ffree-line-length-none -finit-local-zero -fbounds-check -fcheck-array-temporaries -ftrapv</pre>
  
 
Use man gcc to find details about each.
 
Use man gcc to find details about each.
  
 
I often remove "underflow" from the list, since it just makes small floating point numbers to zero, but it is useful to know.
 
I often remove "underflow" from the list, since it just makes small floating point numbers to zero, but it is useful to know.

Revision as of 22:38, 26 September 2013

C++

Fortran

Python

Other

gcc/g++/gfortran compiler flags

Here are some useful flags to use when developing a code, or trying to find why code crashes:

-Wall -Wextra -Wconversion -pedantic -ffpe-trap=zero,overflow,underflow,invalid 
-ffree-line-length-none -finit-local-zero -fbounds-check -fcheck-array-temporaries -ftrapv

Use man gcc to find details about each.

I often remove "underflow" from the list, since it just makes small floating point numbers to zero, but it is useful to know.