I’ve got a program that’s been optimized for ifort, however I’d like to compile it using gfortran instead. Here are the flags provided:
FCFLAGS= -Vaxlib -CB -mcmodel=large -O -openmp -DOMP
I’ve had a look in the manual entries for both to try and find a corresponding options, but I haven’t been able to find anything (other than -openmp for -fopenmp, which I knew already).
Here it is, an option by option equivalence table:
Note that enabling bounds checking and large memory model would slow down code execution. Also note that
-Oalone enables different level of optimisations withifort(equivalent to-O2) and withgfortran(equivalent to-O1). Also note thatifortoptimises much more aggresively thangfortran. You might need to provide more options to fine tune the latter in order to reach performance on par with that ofifort.