Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

Building WRF with optimization schemes ( ie. -O3)

  • Thread starter Deleted member 3607
  • Start date
D

Deleted member 3607

Guest
My question today is about optimization schemes for the fortran compilers.

What exactly does -O3 for CFLAGS do to WRF and does it help improve it?
 
The "-O3" option increases optimization by 3x. I *believe* this allows the code to build and run faster, without printing non-vital information. The WRF model builds with optimization by default, and if users are having trouble building specific routines or if they need to debug a simulation, we recommend turning optimization off, or decreasing it. Unfortunately I'm not a software engineer and don't have the background to provide a better answer specific to the WRF model, but there are several resources online about compiler optimization.
 
The "-O3" option increases optimization by 3x. I *believe* this allows the code to build and run faster, without printing non-vital information. The WRF model builds with optimization by default, and if users are having trouble building specific routines or if they need to debug a simulation, we recommend turning optimization off, or decreasing it. Unfortunately I'm not a software engineer and don't have the background to provide a better answer specific to the WRF model, but there are several resources online about compiler optimization.
Thank you
 
Hello,
I have also tried -Ofast with gcc10 or higher. It speeds up the simulation, but I don't know the impact on numerical precision. But the simulation runs. I have seen that the binary compiled with gcc >= 10 has a speed closer to the binary compiled with Intel.
 
Top