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

Bug in interface of MAPL_BcastShared procedures? #3323

Open
bena-nasa opened this issue Jan 15, 2025 · 3 comments
Open

Bug in interface of MAPL_BcastShared procedures? #3323

bena-nasa opened this issue Jan 15, 2025 · 3 comments
Assignees
Labels
❓ Question Further information is requested

Comments

@bena-nasa
Copy link
Collaborator

I was looking at something in MAPL_CommsMod.F90 and noticed by chance that there are all these MAPL_BcastShared procedures that have this interface:

  subroutine MAPL_BcastShared_2DI4(VM, Data, N, Root, RootOnly, rc)
    type(ESMF_VM) :: VM
    integer, pointer,  intent(INOUT) :: Data(:,:)
    integer,           intent(IN   ) :: N
    integer, optional, intent(IN   ) :: Root
    logical,           intent(IN   ) :: RootOnly
    integer, optional, intent(  OUT) :: rc

Seems weird that the optional argument argument Root is before RootOnly, figured I would make an issue and ask our Fortran guru. Should we fix this?

@bena-nasa bena-nasa added the ❓ Question Further information is requested label Jan 15, 2025
@mathomp4
Copy link
Member

Ben showed me this and part of me thinks we should just remove the optional from Root. It's never looked at with a present() in the code so it seems non-optional!

@tclune
Copy link
Collaborator

tclune commented Jan 15, 2025

Agree with @mathomp4's suggestion. But am also wondering what "RootOnly" means in this context. I mean, it's a bcast!

@mathomp4
Copy link
Member

Agree with @mathomp4's suggestion. But am also wondering what "RootOnly" means in this context. I mean, it's a bcast!

I have no idea. It looks like this code (at least the 1d r4) predates Git. Maybe @atrayano remembers what this is for?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
❓ Question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants