Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
913 views
in Technique[技术] by (71.8m points)

fortran - Which compiler options to use with gfortran?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

For developing and debugging: -Og -g -Wall -pedantic -fcheck=all

For maximum performance once you have a functioning program, benchmark and test, but as a starting point look in the manual what -O2, -O3, -Ofast, -ffast-math, -funroll-loops, -march=native do. Be particularly careful wrt -Ofast and -ffast-math.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...