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

Fix ambiguous AddRealComp #5401

Closed

Conversation

dpgrote
Copy link
Member

@dpgrote dpgrote commented Oct 21, 2024

Add boolean argument so that the calls to AddRealComp and AddIntComp are not ambiguous. This is needed since in AMReX PR AMReX-Codes/amrex#4163 the AddRealComp was added to AMReX that takes a string as the first argument. This duplicates the routine in WarpX, giving a compile time error (with gcc on Mac OS) that "call to member function 'AddRealComp' is ambiguous". The second arguments are different (WarpX takes a boolean, AMReX an integer), so adding the explicit boolean to the calls in WarpX makes the calls unambiguous.

Is the long term plan to remove the code from WarpX and rely on the name components capability in AMReX?

@dpgrote dpgrote added the bug: affects latest release Bug also exists in latest release version label Oct 21, 2024
@EZoni
Copy link
Member

EZoni commented Oct 21, 2024

Hi @dpgrote, thanks!

Please check #5391 where we started some of this. The update was supposed to be merged last week, but it got delayed until today.

As for this question,

Is the long term plan to remove the code from WarpX and rely on the name components capability in AMReX?

yes, @atmyers confirmed that this is the plan.

Also, I think AMReX-Codes/amrex#4163 wasn't included in AMReX's 24.10 release, so this should not affect our 24.10 release either, if I'm not mistaken. I think this is why it came up only with last week's weekly update #5391.

@dpgrote
Copy link
Member Author

dpgrote commented Oct 21, 2024

Also, I think AMReX-Codes/amrex#4163 wasn't included in AMReX's 24.10 release, so this should not affect our 24.10 release either, if I'm not mistaken. I think this is why it came up only with last week's weekly update #5391.

I can confirm that using the specified version of AMReX with 24.10 does build correctly on MacOS.

@dpgrote
Copy link
Member Author

dpgrote commented Oct 21, 2024

This is closed since it duplicates the fix that is done in PR #5391.

@dpgrote dpgrote closed this Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: affects latest release Bug also exists in latest release version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants