Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Optimization options

80 views
Skip to first unread message

Beliavsky

unread,
Apr 27, 2022, 10:12:20 AM4/27/22
to
Regarding compiler options to maximize speed I may tweet

The ifort -fast and gfortran -O3 -march=native options can be used to
increase speed. Gfortran -Ofast turns on -ffast-math and can give a
further 2x speedup in some cases, but it can also give incorrect
results and should be used with care. Use gfortran -Og to debug.

That is 274 characters. If there is something wrong, please let me know.

Steve Lionel

unread,
Apr 28, 2022, 9:01:56 AM4/28/22
to
> That is 274 characters. If there is something wrong, please let me know.By itself this is mostly OK, but for the ifort users I'll probably add a
comment that -fast also turns on -xHost, and is best used when compiling
and running on the same processor. Like the gfortran option, the things
turned on by -fast can also change results.

The suggestion of using -Og to debug differences caused by high
optimization isn't useful, in my opinion.

I'd also wonder if it's appropriate for these tweets to be about
individual compilers and not the language.

--
Steve Lionel
ISO/IEC JTC1/SC22/WG5 (Fortran) Convenor
Retired Intel Fortran developer/support
Email: firstname at firstnamelastname dot com
Twitter: @DoctorFortran
LinkedIn: https://www.linkedin.com/in/stevelionel
Blog: https://stevelionel.com/drfortran
WG5: https://wg5-fortran.org
0 new messages