-
Notifications
You must be signed in to change notification settings - Fork 20
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
The parser generates lines that are not standard compliant (too long) #12
Comments
How urgently do you need that fixed? I tried to get around that problem when I first wrote it and there was no straightforward solution. |
It's fairly urgent, to be honest - the generated files have to be manually edited every time that part of ORAC is recompiled, which takes a lot of time. |
I have hacked a fix by using an external python script, which I can make available to others if needed. I will not commit it, though, as it's not a proper solution (I still have to manually edit the parser-generated code). |
Is this because you are using pgf90? I can't imagine that there is not a compiler option you can use to extend the line length to unlimited. |
Unfortunately pgfortran has a hard limit on the line length. It can be expanded (to 232 characters I think) with a compiler option but the limit cannot be removed all together. |
I feel responsible as read_ctrl.f_pri.inc is for the printing support that I added and the lines are going out to 320. Essentially all that is needed is a wrapper for fprintf() that wraps lines to a specified width. Adam, is this not the right solution? I will volunteer to do this unless Adam feels especially bored. |
Oh, is that all that's wrong? I thought this was related to warnings about excessively long variable names, which would have been complicated. If it's just line length, go ahead and add a wrapper! I'm the opposite of bored atm. |
OK, will go ahead and do. |
Thanks both, that'd be great. |
Interestingly, the latest version of the PGI compilers (18.10, release last Friday) now support line lengths up to 1000 characters. That means that the problem in this bugreport is 'solved', or at least no longer a problem, compilation is successful out-of-the-box on the 18.10 build. If you still want to fix this problem then feel free, otherwise just close. |
I presume that no-one is bothered about this? |
Greg's fix doesn't sound too complicated but I'm not that fussed. |
If it's easy then let's do it, will save problems if anyone is using a legacy compiler. |
The parser for the pre-processor has a habit of generating lines that are substantially longer than the fortran standard allows. This should be corrected.
For example:
GF90-S-0285-Source line too long (/media/eum/MAIN/ORAC/orac/obj/read_ctrl.f_pri.inc: 30)
PGF90-S-0023-Syntax error - unbalanced parentheses (/media/eum/MAIN/ORAC/orac/obj/read_ctrl.f_pri.inc: 30)
PGF90-S-0285-Source line too long (/media/eum/MAIN/ORAC/orac/obj/read_ctrl.f_pri.inc: 34)
PGF90-S-0023-Syntax error - unbalanced parentheses (/media/eum/MAIN/ORAC/orac/obj/read_ctrl.f_pri.inc: 34)
PGF90-S-0285-Source line too long (/media/eum/MAIN/ORAC/orac/obj/read_ctrl.f_pri.inc: 38)
PGF90-S-0023-Syntax error - unbalanced parentheses (/media/eum/MAIN/ORAC/orac/obj/read_ctrl.f_pri.inc: 38)
PGF90-S-0285-Source line too long (/media/eum/MAIN/ORAC/orac/obj/read_ctrl.f_pri.inc: 42)
PGF90-S-0023-Syntax error - unbalanced parentheses (/media/eum/MAIN/ORAC/orac/obj/read_ctrl.f_pri.inc: 42)
PGF90-S-0285-Source line too long (/media/eum/MAIN/ORAC/orac/obj/read_ctrl.f_pri.inc: 44)
PGF90-S-0023-Syntax error - unbalanced parentheses (/media/eum/MAIN/ORAC/orac/obj/read_ctrl.f_pri.inc: 44)
PGF90-S-0285-Source line too long (/media/eum/MAIN/ORAC/orac/obj/read_ctrl.f_pri.inc: 50)
PGF90-S-0023-Syntax error - unbalanced parentheses (/media/eum/MAIN/ORAC/orac/obj/read_ctrl.f_pri.inc: 50)
PGF90-S-0285-Source line too long (/media/eum/MAIN/ORAC/orac/obj/read_ctrl.f_pri.inc: 54)
PGF90-S-0023-Syntax error - unbalanced parentheses (/media/eum/MAIN/ORAC/orac/obj/read_ctrl.f_pri.inc: 54)
PGF90-S-0285-Source line too long (/media/eum/MAIN/ORAC/orac/obj/read_ctrl.f_pri.inc: 58)
PGF90-S-0023-Syntax error - unbalanced parentheses (/media/eum/MAIN/ORAC/orac/obj/read_ctrl.f_pri.inc: 58)
PGF90-S-0285-Source line too long (/media/eum/MAIN/ORAC/orac/obj/read_ctrl.f_pri.inc: 62)
PGF90-S-0023-Syntax error - unbalanced parentheses (/media/eum/MAIN/ORAC/orac/obj/read_ctrl.f_pri.inc: 62)
PGF90-S-0285-Source line too long (/media/eum/MAIN/ORAC/orac/obj/read_ctrl.f_pri.inc: 130)
PGF90-S-0023-Syntax error - unbalanced parentheses (/media/eum/MAIN/ORAC/orac/obj/read_ctrl.f_pri.inc: 130)
0 inform, 0 warnings, 20 severes, 0 fatal for print_ctrl
../common/Makefile_struct_parser:69: recipe for target '/media/eum/MAIN/ORAC/orac/obj/read_ctrl.f.o' failed
make[1]: *** [/media/eum/MAIN/ORAC/orac/obj/read_ctrl.f.o] Error 2
make[1]: Leaving directory '/media/eum/MAIN/ORAC/orac/src'
Makefile:2: recipe for target 'all' failed
make: *** [all] Error 2
The text was updated successfully, but these errors were encountered: