Skip to content
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

iargc replacement in Fortran apps. #188

Merged
merged 1 commit into from
Nov 8, 2022
Merged

Conversation

ngs333
Copy link
Contributor

@ngs333 ngs333 commented Nov 7, 2022

This PR is for the replacement of the use of iargc in NCtools Fortran programs to allow for compiling with certain modern
compilers on ARM. Certain compiler do not (or no longer) support iargc, and even some compilers that currently support it now recommend the use of function command_argument_count() instead . E.g. the GNU Fortran manual states :
" This (iargc) intrinsic routine is provided for backwards compatibility with GNU Fortran 77. In new code, programmers should consider the use of the COMMAND_ARGUMENT_COUNT intrinsic defined by the Fortran 2003 standard."

The issue was discoverer compiling with recent NVidia compilers on Raspberry Pi. The changed was tested with NVidia, GNU, and Intel compilers on linux.

There is a related PR (#183) targeting changes that allow compiling on ARM Mac.

Also, note. This is a replacement of PR 187, which would have inadvertently added an extra commit.

@ngs333 ngs333 requested a review from ceblanton November 7, 2022 20:02
@ngs333 ngs333 added the bug label Nov 7, 2022
@ngs333 ngs333 linked an issue Nov 7, 2022 that may be closed by this pull request
@ngs333 ngs333 merged commit 378cad4 into NOAA-GFDL:master Nov 8, 2022
@ngs333 ngs333 self-assigned this Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

use of iargc function prevents compilation on some compilers.
2 participants