Molcas Forum

Support and discussions for Molcas and OpenMolcas users and developers

You are not logged in.

Announcement

Welcome to the Molcas forum.

Please note: The forum's URL has changed. The new URL is: https://molcasforum.univie.ac.at. Please update your bookmarks!

You can choose an avatar and change the default style by going to "Profile" → "Personality" or "Display".

#1 2020-02-23 12:47:30

andrewshyichuk
Member
Registered: 2020-02-13
Posts: 62

Compiler flags with ccmake

Dear Users,

I am poking around my OpenMolcas installation and trying to make it run faster.
For linear algebra, I use OpenBLAS.

CMAKE_Fortran_FLAGS_RELEASE are just -O2.
CMAKE_Fortran_FLAGS_GARBLE are -O2 -g -Wall -finit-real=snan -finit-integer=730432726 -fno-unsafe-math-optimizations -frounding-math -fsignaling-nans -fcheck=all,no-bounds

What is the purpose of the Garble compilation type?
Why O2 and not O3?
Will I get much gain with -march=native or -march=znver1 (for Ryzen)?

Any other tips?

Thanks.
Andrew

Offline

#2 2020-02-23 15:57:16

Ignacio
Administrator
From: Uppsala
Registered: 2015-11-03
Posts: 1,012

Re: Compiler flags with ccmake

andrewshyichuk wrote:

What is the purpose of the Garble compilation type?

It's mostly for debugging. It tries to initialize all variables and memory to some garbage value, so that the use of unitialized memory can be detected. It also performs other runtime checks and it's slower, don't use it for calculations.

Why O2 and not O3?

Historically, there have been cases where O3 produces wrong or unreliable results (compiler overoptimization). O2 has been considered "safe" optimization and O3 "fast (but possibly wrong)" optimization.

Will I get much gain with -march=native or -march=znver1 (for Ryzen)?

I don't know, probably not. But that's easy to try.

Offline

Board footer

Powered by FluxBB 1.5.11

Last refresh: Today 18:14:26