openfast
openfast copied to clipboard
Errors with GCC 4.9.4
Looks as though OpenFAST has stopped building with GCC 4.9.4:
154 ...modules/nwtc-library/src/NWTC_IO.f90:25.7:
155
156 USE IEEE_ARITHMETIC
157 1
>> 158 Fatal Error: Can't open module file 'ieee_arithmetic.mod' for reading at (1): No such file or directory
>> 159 make[2]: *** [modules/nwtc-library/CMakeFiles/nwtclibs.dir/src/NWTC_IO.f90.o] Error 1
Indeed, IEEE_ARITHMETIC
was added to GNU in version 5: https://gcc.gnu.org/wiki/Fortran2003Status.
@bjonkman Is there a workaround for your new subroutines in NWTC IO (CheckRealVar
)?
Or is it time to expect everyone to be using GCC >= 5?
@andrew-platt Not yet.
@andrew-platt GCC >= 7 while we're at it? Ubuntu 16.04 comes with GCC 5 and its end of life is 2021, so requiring at least version 5 sounds reasonable to me. @jrood-nrel what's your take with respect to integration with the ExaWind codes?
We are uninterested in Ubuntu. I've never seen it on a production machine. GCC 8.2 will be the system compiler in Redhat/CentOS soon, which will be nice, but almost every machine I use is CentOS with a system compiler of 4.8.5. We had to let 4.8.5 go a long time ago because it was too difficult to maintain, but I'm not at the point of giving up on GCC 4.9 just yet. If 4.9.4 becomes too difficult to maintain as well, we can have that discussion.
@andrew-platt: I guess the work-around is to not check that the values are real and finite (e.g., put a preprocessor directive around those calls to IEEE_IS_NAN
and IEEE_IS_FINITE
or remove the CheckRealVar
routines).
You could potentially call the Is_NaN
routine in the Sys*.f90 files instead of using IEEE_IS_NAN
, but that would also require adding another interface for the various types of reals, and I'm not sure there is another version of IEEE_IS_FINITE
that would be available for older compilers.
I have got a similar error using gcc12
(when building a different port). May not be a GCC version problem or at least not necessarily such.