It is good to see some discussion about gFortran.
I have been using mingw-w64\x86_64-x.x.x-posix-seh for the last 12 months and have had good experience testing both vector and OMP instructions. My preferred compilation option has been:
set options=-O3 -mavx -ffast-math -funroll-loops --param max-unroll-times=2 -fopenmp
There are a few alternatives for -march=, which I have not shown to have any significant effect for my testing, including:
set options=-O3 -march=haswell -mavx2 -mno-fma -ffast-math -funroll-loops --param max-unroll-times=2 -fopenmp
This showed little difference, which shows that a preferred option can vary for different types of calculations.
I am using Win 7 on i5 and i7 processors.
The problem I have had is finding a reliable version of gFortran for windows. Gordon Sande suggested, "I do not want to compile all of GCC to get gfortran". The problem I have found is finding a reliable version.
I had been using
http://sourceforge.net/projects/mingw-w64/?source=typ_redirect, which others have noted, but was surprised by the recent release version 5.1.0, which included a problem with opening existing files. There was little support provided for this reported problem and also concerning comments from
http://sourceforge.net/p/mingw. I am pleased to report that the latest version 5.2.0 appears to have overcome this problem.
My experience has highlighted the question about unknown support and reliability of the variety of gFortran alternatives and especially those for Win_64. There have been other discussions on this forum of upgrading from F77 to F95 and issues of validating code changes to the standard required by (I presume) government contracts, but the issue of compiler validation is a big issue, which I am trying to understand.
I had been using two gFortran sources and testing multiple versions, although both version 5.1.0 had the same bug which I thought should have been picked up in alpha testing.
When I last looked, Lahey LGF - Lassen had not yet progressed to Ver 5.1. I am wondering if that purchase alternative would give some added confidence in bug reduction.
At present, for quality testing, I am still using two old 32-bit F95 compilers, but this approach is limited in the new problems it can test.
I should emphasise, that the development I have done with gFortran has been successful and I am impressed in the ability to test different vector and OpenMP alternatives.
However, the end result is if we use gFortran (or any Fortran compiler) we need to be aware of the quality control of both the compiler we choose and the resulting solutions we develop.
I see a similar problem with established commercial compilers, such as ifort, which have been continually changing with the staged addition of F2003 and F2008 capabilities.
At present, I am uncertain how to manage this problem and would welcome other views.