Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
40 Views

Optimization flags

Jump to solution

The fastest and simplest combination I found is -Ofast -static. And I also tried -mtune=haswell and Profile Guided Optimization, but it didn't improve the computation time.

Is there anything else I can do in terms of compilation options?

0 Kudos

Accepted Solutions
Highlighted
37 Views

Re: Optimization flags

Jump to solution

When the executable is to be run on the same system as the build is performed

   -xHost   (Linux/macOS)
   /QxHost (Windows)

Jim Dempsey

View solution in original post

0 Kudos
2 Replies
Highlighted
38 Views

Re: Optimization flags

Jump to solution

When the executable is to be run on the same system as the build is performed

   -xHost   (Linux/macOS)
   /QxHost (Windows)

Jim Dempsey

View solution in original post

0 Kudos
Highlighted
Black Belt
25 Views

Re: Optimization flags

Jump to solution

You can try -fast as a simple shortcut - this sets several options that usually (but not always) improve computation performance. Be aware that this implies -xHost which optimizes for the CPU you compiled on. If you'll be running the program elsewhere, don't use either of these.

Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran
0 Kudos