Compilers: Difference between revisions

From Tycho
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 2: Line 2:


However, using gfortran for development and testing can be a very good idea, especially if / when problems arise, and are difficult to locate.  Compiling the same code with different compilers gives a better chance to discover problems, or to exclude a compiler bug as the reason for a problem under investigation.  Gfortran's MPI wrapper is called mpif90 or mpifort (note the single i!).
However, using gfortran for development and testing can be a very good idea, especially if / when problems arise, and are difficult to locate.  Compiling the same code with different compilers gives a better chance to discover problems, or to exclude a compiler bug as the reason for a problem under investigation.  Gfortran's MPI wrapper is called mpif90 or mpifort (note the single i!).
‎<pre>
def quick_sort(arr):
less = []
pivot_list = []
more = []
if len(arr) <= 1:
return arr
else:
pass
‎</pre>

Latest revision as of 14:26, 15 November 2023

We recommend using the Intel ifort, icc, and icpc (fortran, C, C++) compilers for production, because of their superior speed optimization. Compiling for MPI is done with mpiifort, mpiicc, mpiicpc (note the double ii), which are wrapper scripts around the compilers that link in the correct MPI libraries.

However, using gfortran for development and testing can be a very good idea, especially if / when problems arise, and are difficult to locate. Compiling the same code with different compilers gives a better chance to discover problems, or to exclude a compiler bug as the reason for a problem under investigation. Gfortran's MPI wrapper is called mpif90 or mpifort (note the single i!).