-
Notifications
You must be signed in to change notification settings - Fork 0
Remove excessive auto-inserted use statements #1208
Remove excessive auto-inserted use statements #1208
Conversation
Here is an example of the reduction of "use" statements. Compiling with "GEN_F90=true", this is: before this PR
after this PR
This is because of the auto-generated code at the end of the interface file. All cores have this line:
|
This is a PR into framework, but I tested this commit in all four CORE/develop branches: ocean, sea ice, land ice
atmosphere
|
This PR looks fine to me. I'm generally in favor of having subroutines be "self-contained" insofar as they include all modules that they need. But, I think in the interest of fixing this for ACME as soon as possible, I have no objections. As I mentioned in the comments for PR #1209 I think we should merge that PR before this one so that we don't have a merge where the atmosphere cores don't build. |
@mgduda on your comments of order of commits: Do you mean that #1209 would need to be merged into |
This looks good to me too. I think these auto-generated routines are a special situation, so if we have to violate the preferred self-contained approach for subroutines, that is a reasonable concession. |
@mark-petersen Apologies for the slow reply. My concern is that if we merge this PR into |
This commit is needed after PR #1208, which removes use statements from the autogenerated code inserted using include "inc/namelist_defines.inc" at the bottom of mpas_init_atm_core_interface.F This reduces four use statements from nine each to one.
This commit removes four "use" statements that are auto-inserted into inc/namelist_defines.inc 86 times. This file is included in mpas_$CORE_core_interface.F. The ocean, sea ice, and land ice components have these four use statements at the top as well, which causes a compile bug for intel 17 in the ocean. Martyn Corden, an intel compile developer, recommended single use statements before "contains" to speed up compilation time. The atmosphere will need to add the use statements to the top of src/core_init_atmosphere/mpas_init_atm_core_interface.F
1873fab
to
1769c50
Compare
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.
This PR looks good to me. Both the init_atmosphere and atmosphere cores compile after merging to 'develop'.
This commit removes four "use" statements that are auto-inserted into
inc/namelist_defines.inc 86 times. This file is included in
mpas_$CORE_core_interface.F. The ocean, sea ice, and land ice
components have these four use statements at the top as well, which
causes a compile bug for intel 17 in the ocean. Martyn Corden, an intel
compiler developer, recommended single use statements before "contains"
to speed up compilation time.