WRF icon indicating copy to clipboard operation
WRF copied to clipboard

Build errors with the latest gfortran

Open iii-i opened this issue 4 years ago • 4 comments

Hi!

I'm trying to build WRF with gfortran 10.0.1 20200226 (git commit ce25177f505). It looks as if it does not allow passing COMPLEX arrays as REAL ones anymore, since I'm getting a lot of error messages like the following:

zmfm1b.f90:70:38:

   68 |       call zmf2kb ( lot, ido, l1, na, c, jump, inc, ch, 1, lot, wa(iw) )
      |                                      2
   69 |     else if ( nbr == 2 ) then
   70 |       call zmf2kb ( lot, ido, l1, na, ch, 1, lot, c, jump, inc, wa(iw) )
      |                                      1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/COMPLEX(8)).

iii-i avatar Feb 26 '20 11:02 iii-i

I will check on the status of FFTPACK, which is from where we took this code. If that has not been updated, we may be stuck with GNU 9 for a while.

davegill avatar Feb 26 '20 14:02 davegill

The GCC 10 documentation mentions the following:

Mismatches between actual and dummy argument lists in a single file are now rejected with an error. Use the new option -fallow-argument-mismatch to turn these errors into warnings; this option is implied with -std=legacy. -Wargument-mismatch has been removed.

Does adding the -fallow-argument-mismatch flag allow WRF to compile?

mgduda avatar Feb 26 '20 17:02 mgduda

@mgduda that helped, thanks!

I will leave the issue open for you to decide whether you'd like to improve gfortran 10 compatibility, or whether -fallow-argument-mismatch/-std=legacy is good enough.

iii-i avatar Feb 27 '20 15:02 iii-i

Duplicate of #1250

syalavarthi avatar Jul 31 '20 18:07 syalavarthi