-
Notifications
You must be signed in to change notification settings - Fork 10
Update testing to C++20 and address warnings #390
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
Conversation
ee0ded2 to
a2ff3f8
Compare
a2ff3f8 to
2e58334
Compare
88b8df1 to
23ca911
Compare
Types of warnings: warning: bitwise operation between different enumeration types is deprecated [-Wdeprecated-enum-enum-conversion] warning: compound assignment with ‘volatile’-qualified left operand is deprecated [-Wvolatile] warning: comparison of floating-point type with enumeration type is deprecated [-Wdeprecated-enum-float-conversion] warning: arithmetic between different enumeration types is deprecated [-Wdeprecated-enum-enum-conversion]
| #define EKAT_PACK_WHERE_HPP | ||
|
|
||
| #include "ekat_where.hpp" | ||
| #include "ekat_pack.hpp" |
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 caused a build error in EAMxx. Is it not tested in EKAT?
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.
Ah, good catch. The unit test includes ekat_pack.hpp before ekat_pack_where.hpp, so the error gets masked (no pun intended).
| Kokkos::single(Kokkos::PerTeam(team_member), [&] () { | ||
| int volatile* const data = &test_data(wi); | ||
| *data += 1; | ||
| *data = *data + 1; |
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.
I'm curious: was the old version causing errors/warnings? If so, any idea why?
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.
A c++20 deprecation
warning: compound assignment with ‘volatile’-qualified left operand is
deprecated [-Wvolatile]
Update testing to C++20 and fix C++20 specific warnings (and an additional generic warning).
Motivation
Eventually we will want to update all of E3SM to use C++20, this is a first step.