-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support gfortran 10+ #118
Comments
An example build Error without those flags set:
Boggling what I am up for doing with this :) |
You may have seen this already, but the argument mismatch change is discussed in the GCC porting guide. |
Thanks @sgdecker , but for the example error, do you know what code fix would correct the problem? I couldn't figure it out |
Here's my analysis. The 1 and 2 are pointing at the thrid and fourth arguments, so it is a little unclear, but I think both have an issue. Around line 706, the subroutine CALL GARRW ( 'G', npts, fi, fj, s, d, ier ) Later, the same subroutine is called as follows (line 788): CALL GARRW ( 'N', 1, x01, yyy, spd, dir, iret ) At line 121, we have the declaration: REAL fi ( 100 ), fj ( 100 ) Neither The fix would then depend on how SUBROUTINE GARRW ( sys, np, x, y, spd, dir, iret )
CHARACTER*(*) sys
REAL x (*), y (*), spd (*), dir (*) so the third and fourth arguments are indeed supposed to be arrays (of arbitrary size). Thus, the code in gdplot.f is following the typical nonstandard convention of passing a scalar variable when it would be more correct to pass an array of size one. For this case, since
corresponding to the very end of the porting guide. This is completely untested, but I think that would eliminate the error and be equivalent to what the non-standard code intends to do. |
Thanks @sgdecker, this worked: diff --git a/gempak/source/programs/gd/gdplot/gdplot.f b/gempak/source/programs/gd/gdplot/gdplot.f
index e1a34745..5f9833e3 100644
--- a/gempak/source/programs/gd/gdplot/gdplot.f
+++ b/gempak/source/programs/gd/gdplot/gdplot.f
@@ -785,8 +785,9 @@ C
+ ier)
offset = FLOAT ( lenaro + 1 )
x01 = x01 + offset * rwc
- CALL GARRW ( 'N', 1, x01, yyy,
- + spd, dir, iret )
+ CALL GARRW ( 'N', 1, [x01],
+ + [yyy],
+ + [spd], [dir], iret )
END IF
END IF
END IF Gonna ask upstream about this. |
Here are my current thoughts on this situation.
|
Whilst compiling GEMPAK on rhel9, I found this necessary:
I need to research this some more before adding it as the default here.
The text was updated successfully, but these errors were encountered: