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

Delete copy constructor and assignment operator for ParticleTile #3943

Merged
merged 3 commits into from
May 17, 2024

Conversation

atmyers
Copy link
Member

@atmyers atmyers commented May 15, 2024

This prevents common programming errors involving accidently copying particle tiles.

The proposed changes:

  • fix a bug or incorrect behavior in AMReX
  • add new capabilities to AMReX
  • changes answers in the test suite to more than roundoff level
  • are likely to significantly affect the results of downstream AMReX users
  • include documentation in the code and/or rst files, if appropriate

@WeiqunZhang
Copy link
Member

The Windows CI failure looks like a compiler bug.

@WeiqunZhang
Copy link
Member

More specifically it complains about std::pair<const Key, Value>(std::pair<const Key, Value&> cannot be done because Value is not copyable, where range based for loop is used to access std::map<Key, Value>. But the value_type of std::map should be std::pair<const Key, Value>. Why does that & in Value& come from?

We could put the new changes inside #ifndef _WIN32.

@atmyers atmyers marked this pull request as ready for review May 16, 2024 20:20
@atmyers
Copy link
Member Author

atmyers commented May 16, 2024

Note - the WarpX test failure was a problem in WarpX that was uncovered by this change. It's already been fixed in development but is not part of the release yet.

@atmyers atmyers merged commit 2113e4a into AMReX-Codes:development May 17, 2024
68 of 69 checks passed
WeiqunZhang added a commit that referenced this pull request May 20, 2024
This has better performance and the change is now necessary because of
#3943.
@@ -720,6 +720,16 @@ struct ParticleTile

ParticleTile () = default;

#ifndef _WIN32 // workaround windows compiler bug
Copy link
Member

Choose a reason for hiding this comment

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

@atmyers @WeiqunZhang This should probably read MSVC.

There are many compilers on Windows (LLVM/Clang, GCC aka MinGW, Intel, etc.) that should work file :)

Copy link
Member

Choose a reason for hiding this comment

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

Ok, I see that LLVM/Clang failed, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants