Skip to content

Warning __host__ __device__ about the destructor of a Kokkos::View #793

Open
@tpadioleau

Description

@tpadioleau

When compiling the tests with Kokkos 4.5.1, cuda 12 and gcc 12 we get the following warnings

Building CXX object tests/CMakeFiles/ddc_tests.dir/storage_discrete_domain.cpp.o
/home/TP026749/ddc/vendor/kokkos/core/src/View/Kokkos_ViewLegacy.hpp(357): warning #20011-D: calling a __host__ function("Kokkos::Impl::ViewTracker< ::Kokkos::View< ::ddc::DiscreteElement< ::_NV_ANON_NAMESPACE::DDimX >  *,  ::Kokkos::CudaUVMSpace > > ::~ViewTracker()") from a __host__ __device__ function("Kokkos::View< ::ddc::DiscreteElement< ::_NV_ANON_NAMESPACE::DDimX >  *,  ::Kokkos::CudaUVMSpace > ::~View") is not allowed

Remark: The warnings can be suppressed with "-diag-suppress <warning-number>"

/home/TP026749/ddc/vendor/kokkos/core/src/View/Kokkos_ViewLegacy.hpp(357): warning #20011-D: calling a __host__ function("Kokkos::Impl::ViewTracker< ::Kokkos::View< ::ddc::DiscreteElement< ::_NV_ANON_NAMESPACE::DDimY >  *,  ::Kokkos::CudaUVMSpace > > ::~ViewTracker()") from a __host__ __device__ function("Kokkos::View< ::ddc::DiscreteElement< ::_NV_ANON_NAMESPACE::DDimY >  *,  ::Kokkos::CudaUVMSpace > ::~View") is not allowed

Note that we need Kokkos inline to get the warning. It does not seem to be reported if Kokkos is installed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions