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

Remove shared global vars npes, pe, root_pe #183

Merged
merged 1 commit into from
Dec 5, 2022

Conversation

underwoo
Copy link
Member

The files mpp.c and mpp_domain.c shared three variables. This sharing is removed. Both files now have static global variables.

Cleaned up a few error messages in make_hgrid.c and remap_land.c

Added .vscode mac configuration.

fixes #182

The files mpp.c and mpp_domain.c shared three variables.  This sharing
is removed.  Both files now have `static` global variables.

Cleaned up a few error messages in make_hgrid.c and remap_land.c

Added .vscode mac configuration.
@underwoo underwoo added the bug label Oct 16, 2022
@underwoo underwoo requested a review from ngs333 October 16, 2022 15:52
ngs333
ngs333 previously approved these changes Oct 17, 2022
@ngs333
Copy link
Contributor

ngs333 commented Oct 17, 2022

@underwoo , @ceblanton
CI Test07 has a failure. I'll investigate before merging.

@ngs333 ngs333 self-requested a review October 29, 2022 02:53
@ngs333 ngs333 dismissed their stale review October 29, 2022 02:54

re-reviewing.

@ngs333 ngs333 removed their request for review October 29, 2022 02:54
Copy link
Contributor

@ngs333 ngs333 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@underwoo
It looks like runoff_regrid was crashing because pe, npes, and root_pe
values in mpp_domain.c were wrong. This can be fixed for this program if
modify runoff_regrid.c to initialize them by
calling function mpp_domain_init() (after line 180):

mpp_init(NULL,NULL);
 mpp_domain_init();

But other programs have to be investigated in case they may have similar issues
even if we haven't seen their manifestation yet.

@ngs333
Copy link
Contributor

ngs333 commented Oct 29, 2022

@underwoo
It looks like there are other files that call mpp_init() but not mpp_domain_init(). I am not sure they all all use mpp_domain. The files are: transfer_to_mosaic.c, river_regrid.c, make_solo_mosaic.c, make_regional_mosaic.c, make_quick_mosaic.c, make_land_domain.c, make_remap_file.c, and check_mask.c.

@ngs333
Copy link
Contributor

ngs333 commented Nov 28, 2022

The work in this PR is being merge though PR #192

@ngs333 ngs333 merged commit 82fac7f into NOAA-GFDL:master Dec 5, 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.

clang cannot access global library variables declaration for npes, pe, root_pe
2 participants