Skip to content

Conversation

@JStewart28
Copy link
Contributor

The CI errors have been fixed by editing the struct MySoA in core/src/unit_test/tstAoSoA.hpp:

template <int VLEN, int D1, int D2, int D3>
struct MySoA
{
    float m0[D1][D2][D3][VLEN];
    int m1[VLEN];
    double m2[D1][VLEN];
    double m3[D1][D2][VLEN];
    
    KOKKOS_INLINE_FUNCTION
    MySoA(){};
};

Adding the constructor fixes the Ubuntu/OpenSUSE warnings and adding KOKKOS_INLINE_FUNCTION fixes a "calling a host function on the device" error when building with HIP.

Copy link
Collaborator

@dalg24 dalg24 left a comment

Choose a reason for hiding this comment

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

What ROCm version were you using?

@JStewart28
Copy link
Contributor Author

@dalg24 what's the advantage of using KOKKOS_DEFAULTED_FUNCTION? I did not know about this macro.

@JStewart28
Copy link
Contributor Author

JStewart28 commented Oct 29, 2025

Looks like that broke the OpenSUSE CI test. I'll revert back.

@dalg24
Copy link
Collaborator

dalg24 commented Oct 29, 2025

@dalg24 what's the advantage of using KOKKOS_DEFAULTED_FUNCTION? I did not know about this macro.

In the past some toolchains would complain when host device annotations were missing on a defaulted default constructor or destructor, and other toolchains would raise errors if you had them. Kokkos picks a definition that works for the toolchain that is used.

@dalg24
Copy link
Collaborator

dalg24 commented Oct 29, 2025

Looks like that broke the OpenSUSE CI test. I'll revert back.

Defaulting the default constructor is better practice. We should rather look into these compiler warnings and figure out what is wrong with the class definition.

@JStewart28
Copy link
Contributor Author

It's a warning about an uninitialized value in Kokkos_ViewMapping.hpp: see here

@streeve streeve merged commit 69640b8 into ECP-copa:master Oct 29, 2025
34 checks passed
@streeve streeve deleted the fix-CI-failure branch October 29, 2025 16:59
@dalg24
Copy link
Collaborator

dalg24 commented Oct 29, 2025

It's a warning about an uninitialized value in Kokkos_ViewMapping.hpp: see here

Sure, and that uninitialized value is the MySoA struct after default-initialization.
t's not like the empty body solves that problem, what is does it makes MySoA non trivially constructible. This has implications in terms of view initialization performance. It is not critical but the right thing to do would be to think about what we want that type to do.
Also I haven't checked what version of Kokkos was used but I can tell you that more recent versions of Kokkos would not have yielded a warning.

@JBludau JBludau mentioned this pull request Nov 3, 2025
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