-
Notifications
You must be signed in to change notification settings - Fork 67
Clean up interfaces #736
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
Open
suvarchal
wants to merge
47
commits into
main
Choose a base branch
from
clean_up_interfaces
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Clean up interfaces #736
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…le-interfaces and update references
…and update references
…emove needless module-interfaces and update references
…update references
…update references
…nd update references
…ule-interfaces, and update references
…roper results and intents, remove legacy module-interfaces, and update references
… needless module-interfaces, and update references
This reverts commit 1ab73c5. for some reason tests fail will address this later
This reverts commit f7da71a. remove testing for blowup functionality, add later
…e and update references" This reverts commit db1ab78. undo modularization of gen_modules_partitioning.F90 to be done laterwq
…, remove needless module-interfaces, and update references" This reverts commit ad56252.
Collaborator
|
…n definition in oce_mesh.F90 although notsure if out is really needed
Collaborator
Author
|
thanks to #774 coupled builds also work and averted a missing import in gen_coupled.F90. |
suvarchal
commented
Sep 17, 2025
Collaborator
Author
suvarchal
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
checked once again
…rom main cmakelists
Clean up meshpart
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR cleans up needless module interfaces for subroutines/procedures outside of module scope. we have files named as modules (or wanna be modules) but have multiple modules as interfaces for dangling subroutines. For instance, see
fesom2/src/oce_dyn.F90
Lines 12 to 200 in 2d82154
fesom2/src/oce_dyn.F90
Lines 1 to 200 in 70ee9ba
fesom2/src/oce_ale.F90
Lines 1 to 20 in 70ee9ba
I guess this happened from early on migration from f77 and early f90 compilers would generate any implicit interface for dangling subroutines (that are outside module, program blocks) but as that practice slowly started getting discouraged because it is source of bugs compilers started to complain of need to have explicit interface for each dangling subroutine and we in time-rush wrote one for each subroutine when and where that compilation error came.
the benefits are cleaner code on multiple fronts like allows explicitly mentioning what procedures we are going to use, less boiler plate imports like use mod_mesh, mod_partit that are needed almost in every subroutine now gets just done at the top of module and shared. And for all above reasons it also allows agentic coding/RAG is much easier to figure out what procedure and their data dependency this way.
this PR reduces total compiled modules of fesom from 177 to 127, there are still a few contrived hard parts, it is a bit slow process as most of these changes are better done manually and need some care, but once done i believe our code can use super agentic powers :).