Please, I would like to ask for your recommendations on the best compiling options for optimizing code speed performance. I use the last version of GFortran.
Tipically, I use -Ofast, but I don’t know if this is enough. The website of GFortran states that adding
-fcoarray = simple, -lcaf_single improves speed. I’ve tested it, but the result was the opposite, it was slower.
Yes, what @kargl said is correct. I develop in Debug mode with the options -Wall -Wextra -Wimplicit-interface -fPIC -g -fcheck=all -fbacktrace. Then in Release mode with the options I suggested above, I always test that the numerical results are acceptable in terms of accuracy against the Debug mode results.
I’ve never used this -ftree-vectorize (which I found on the gcc man page), which seems interesting (but I am not sure what “tree” means here so need to read man pages more…)