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

Suppress deprecated warnings via pragma push/pop in the tests #6999

Merged

Conversation

dalg24
Copy link
Member

@dalg24 dalg24 commented May 8, 2024

Introduce KOKKOS_IMPL_DISABLE_DEPRECATED_WARNINGS_{PUSH,POP} macros to suppress diagnostics when appropriate and fix all the warnings I could see in our tests.

Just in case we need to rework the suppressions macros https://godbolt.org/z/Pjd7hYba9

@dalg24 dalg24 added Failure - Nightly Nightly Build Failure Deprecate Items to be deprecated labels May 8, 2024
@dalg24 dalg24 requested a review from ndellingwood May 8, 2024 23:12
and provide a fallback empty definition for the macros
@dalg24 dalg24 marked this pull request as ready for review May 9, 2024 10:45
@dalg24 dalg24 changed the title Suppress deprecated warnings in automated testing Suppress deprecated warnings via pragma push/pop in the tests May 9, 2024
Copy link
Contributor

@masterleinad masterleinad left a comment

Choose a reason for hiding this comment

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

Looks OK to me.

Copy link
Contributor

@nmm0 nmm0 left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@dalg24 dalg24 merged commit df018d9 into kokkos:develop May 13, 2024
29 checks passed
@dalg24 dalg24 deleted the suppress_deprecated_warnings_in_automated_testing branch May 13, 2024 20:59
dalg24 added a commit to dalg24/kokkos that referenced this pull request May 21, 2024
Fixup for kokkos#6999

Deprecation warnings are still showing in the OpenACC CI build
```
"/var/jenkins/workspace/Kokkos_PR-7017/core/unit_test/TestArrayOps.hpp", line 136: warning: class "Kokkos::Array<int, 18446744073709551615UL, Kokkos::Impl::KokkosArrayContiguous>" was declared deprecated [deprecated_entity]
    using A =
          ^
"/var/jenkins/workspace/Kokkos_PR-7017/core/src/Kokkos_Array.hpp", line 217: note: because of a "deprecated" attribute
  struct KOKKOS_DEPRECATED
         ^

Remark: individual warnings can be suppressed with "--diag_suppress <warning-name>"

"/var/jenkins/workspace/Kokkos_PR-7017/core/unit_test/TestArrayOps.hpp", line 197: warning: class "Kokkos::Array<int, 18446744073709551615UL, Kokkos::Impl::KokkosArrayContiguous>" was declared deprecated [deprecated_entity]
    using A =
          ^
"/var/jenkins/workspace/Kokkos_PR-7017/core/src/Kokkos_Array.hpp", line 217: note: because of a "deprecated" attribute
  struct KOKKOS_DEPRECATED
         ^

"/var/jenkins/workspace/Kokkos_PR-7017/core/unit_test/TestArrayOps.hpp", line 274: warning: class "Kokkos::Array<int, 18446744073709551615UL, Kokkos::Impl::KokkosArrayStrided>" was declared deprecated [deprecated_entity]
    using A = Kokkos::Array<int, KOKKOS_INVALID_INDEX, Kokkos::Array<>::strided>;
          ^
"/var/jenkins/workspace/Kokkos_PR-7017/core/src/Kokkos_Array.hpp", line 286: note: because of a "deprecated" attribute
  struct KOKKOS_DEPRECATED
         ^

"/var/jenkins/workspace/Kokkos_PR-7017/core/unit_test/TestArrayOps.hpp", line 338: warning: class "Kokkos::Array<int, 18446744073709551615UL, Kokkos::Impl::KokkosArrayStrided>" was declared deprecated [deprecated_entity]
    using A  = Kokkos::Array<int, KOKKOS_INVALID_INDEX, Kokkos::Array<>::strided>;
          ^
"/var/jenkins/workspace/Kokkos_PR-7017/core/src/Kokkos_Array.hpp", line 286: note: because of a "deprecated" attribute
  struct KOKKOS_DEPRECATED
         ^

```

The generic EDG warning disable did not work so we handle NVC++
separately and push a diag_suppress pragma.

In case anyone wants to try something else https://godbolt.org/z/nxWbPMT95
dalg24 added a commit to dalg24/kokkos that referenced this pull request May 21, 2024
Fixup for kokkos#6999

Deprecation warnings are still showing in the OpenACC CI build
```
"/var/jenkins/workspace/Kokkos_PR-7017/core/unit_test/TestArrayOps.hpp", line 136: warning: class "Kokkos::Array<int, 18446744073709551615UL, Kokkos::Impl::KokkosArrayContiguous>" was declared deprecated [deprecated_entity]
    using A =
          ^
"/var/jenkins/workspace/Kokkos_PR-7017/core/src/Kokkos_Array.hpp", line 217: note: because of a "deprecated" attribute
  struct KOKKOS_DEPRECATED
         ^

Remark: individual warnings can be suppressed with "--diag_suppress <warning-name>"

"/var/jenkins/workspace/Kokkos_PR-7017/core/unit_test/TestArrayOps.hpp", line 197: warning: class "Kokkos::Array<int, 18446744073709551615UL, Kokkos::Impl::KokkosArrayContiguous>" was declared deprecated [deprecated_entity]
    using A =
          ^
"/var/jenkins/workspace/Kokkos_PR-7017/core/src/Kokkos_Array.hpp", line 217: note: because of a "deprecated" attribute
  struct KOKKOS_DEPRECATED
         ^

"/var/jenkins/workspace/Kokkos_PR-7017/core/unit_test/TestArrayOps.hpp", line 274: warning: class "Kokkos::Array<int, 18446744073709551615UL, Kokkos::Impl::KokkosArrayStrided>" was declared deprecated [deprecated_entity]
    using A = Kokkos::Array<int, KOKKOS_INVALID_INDEX, Kokkos::Array<>::strided>;
          ^
"/var/jenkins/workspace/Kokkos_PR-7017/core/src/Kokkos_Array.hpp", line 286: note: because of a "deprecated" attribute
  struct KOKKOS_DEPRECATED
         ^

"/var/jenkins/workspace/Kokkos_PR-7017/core/unit_test/TestArrayOps.hpp", line 338: warning: class "Kokkos::Array<int, 18446744073709551615UL, Kokkos::Impl::KokkosArrayStrided>" was declared deprecated [deprecated_entity]
    using A  = Kokkos::Array<int, KOKKOS_INVALID_INDEX, Kokkos::Array<>::strided>;
          ^
"/var/jenkins/workspace/Kokkos_PR-7017/core/src/Kokkos_Array.hpp", line 286: note: because of a "deprecated" attribute
  struct KOKKOS_DEPRECATED
         ^

```

The generic EDG warning disable did not work so we handle NVC++
separately and use diagnostic pragmas.

In case anyone wants to try something else https://godbolt.org/z/nxWbPMT95
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecate Items to be deprecated Failure - Nightly Nightly Build Failure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants