fortran compiler option help
Tobias Burnus
burnus@net-b.de
Sat Nov 13 22:02:00 GMT 2010
Micah Sklut wrote:
> Using the intel compiler, I am using the following options
For the gfortran options, check the gfortran *and* the gcc manpage as
the gfortran man page does not repeat all of the general gcc options.
Cf. http://gcc.gnu.org/onlinedocs/ (there: "GCC <version> Manual" and
"GCC <version> GNU Fortran Manual").
> -c (prevents linking)
That's -c (compile only)
> -module (module directory)
That's -J, though older gfortran version accepted additionally (or only) -M
> -o (specifies name for output file)
That's also -o
> -C (check for certain conditions at run time).
That's -fcheck=all (or other options); with older gfortran's try
-fcheck-bounds and some others.
> This is the full command that I am using with my compile script:
> ifort -xT -ipo -c -module mod_dir -parallel
For -xT use -march=native (or a suitable -march= option). For -ipo try
"-flto" on GCC 4.5 or 4.6. For -parallel, you can try
-ftree-parallelize-loops=n
Additionally, you probably want to use -O2 or -O3 (= optimization level;
default of ifort is -O2; the default of GCC/gfortran is -O0) - and maybe
-funroll-loops or -ffast-math. (Check the manual thus you know what the
option means.)
Tobias
More information about the Fortran
mailing list