-
Notifications
You must be signed in to change notification settings - Fork 237
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
F90 module list generation #646
Conversation
sample file: line 14 produces a WARNING from f90mkdepend sample f90mkdepend output Checked on: |
Thanks @IvanaEscobar @jahn if you have a minute, could you take a look at the problem and solution here, want to make sure you are on board. Thanks |
Thanks, Ivana, for pointing these out. We generally try not to have carriage returns in source files, so the first error doesn't occur. For compiled modules, the convention in MITgcm is that a module
If the module is precompiled, dependency resolution is not an issue and the warning can be ignored. |
Line 14 of the sample file doesn't have a carriage return included. So it is unclear when a carriage return is introduced. Maybe an artifact of using The sample f90 package contains the module specified in a source file written in the style you pointed out. Specifically as I don't change the inner workings of If it's easier for me to demo the bug for you, I can illustrate the compilation warnings via Zoom? |
I cloned your repository and removed all carriage returns from the files and f90mkdepend works fine. I used |
I was able to reproduce no warnings with your fix to the package. Vim wasn't displaying carriage returns for FORTRAN type files. So the bug is fixed by clearing return carriages from the source files. |
@jahn I was wondering what happens if you do not have write permissions to fix a file using This happens in our Linux cluster with the netcdf header file. There are instances in that header file where they use multi-line comments that happened to produce lines that start with the word use
with the current f90mkdepend, this comment will trigger a warning. Overall, it's harmless but was curious on potential solutions |
@IvanaEscobar See if changing lines 17-19 of f90mkdepend as the following would get rid of the warning
|
What changes does this PR introduce?
Bug in
f90mkdepend
tool.What is the current behaviour?
modreflist
keeps a carriage return character if modules are loaded with a line break. This affects any code that hasUSE <modulename>
type integrationExample module loading scenario for
blabla_do_something.F90
:f90mkdepend
produces the following warning to error output:and
f90mkdepend.log
(in vim) produces:This creates missing dependencies for
blabla_do_something.f90
, which leads to compilation errors.What is the new behaviour
Updated
f90mkdepend
tool accounts for carriage returns when creatingmodreflist
. Now^M
is removed from module nameblablaphysics
Does this PR introduce a breaking change?
Not that I know of
Other information:
Tested using a package in development written in F90, with the current mitgcm code checkpoint, and on the verification problem
tutorial_global_oce_latlon
Suggested addition to
tag-index