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

Teuchos: obsolete Kokkos include? #13639

Open
ikalash opened this issue Nov 30, 2024 · 8 comments
Open

Teuchos: obsolete Kokkos include? #13639

ikalash opened this issue Nov 30, 2024 · 8 comments
Labels
client: Albany Issue impacting the Albany project pkg: Teuchos Issues primarily dealing with the Teuchos Package type: bug The primary issue is a bug in Trilinos code or tests

Comments

@ikalash
Copy link
Contributor

ikalash commented Nov 30, 2024

It looks like Teuchos_ScalarTraits.hpp may be including an obsolete Kokkos header, Kokkos_Complex.hpp:

/nightlyAlbanyTests/Results/Trilinos/build/install/include/Teuchos_ScalarTraits.hpp:27:10: fatal error: Kokkos_Complex.hpp: No such file or directory

This is causing some failures in our Albany nightlies: https://sems-cdash-son.sandia.gov/cdash/viewBuildError.php?buildid=313841

@trilinos/teuchos
@trilinos/kokkos

@ikalash ikalash added type: bug The primary issue is a bug in Trilinos code or tests client: Albany Issue impacting the Albany project pkg: Teuchos Issues primarily dealing with the Teuchos Package labels Nov 30, 2024
@cgcgcg
Copy link
Contributor

cgcgcg commented Dec 2, 2024

I built Trilinos with complex enabled. I can confirm that the installation does not have Kokkos_Complex.hpp, but the header is present in the source tree. EDIT Actually, the header is also present in the installation, in the subfolder include/kokkos.

@bartlettroscoe
Copy link
Member

CC: @ndellingwood, @masterleinad

Actually, the header is also present in the installation, in the subfolder include/kokkos.

Sounds like the #include in Teuchos_ScalarTraits.hpp needs to be updated to be:

#include "kokkos/Kokkos_Complex.hpp"

But how would that work from the source tree for Kokkos and Teuchos?

@dalg24
Copy link
Contributor

dalg24 commented Dec 2, 2024

No that's a build and/or install issue. It is intended to work as #include <Kokkos_Complex.hpp> if you link against the Kokkos::kokkos* target.

*or Kokkos::all_libs for that matter

@masterleinad
Copy link
Contributor

There are a bunch of uses in Trilinos:

$ git grep -n 'Kokkos_Complex.hpp'
packages/kokkos-kernels/batched/KokkosBatched_Util.hpp:50:#include "Kokkos_Complex.hpp"
packages/kokkos-kernels/batched/dense/impl/KokkosBatched_Vector_SIMD_Arith.hpp:21:#include "Kokkos_Complex.hpp"
packages/kokkos-kernels/batched/dense/impl/KokkosBatched_Vector_SIMD_Logical.hpp:21:#include "Kokkos_Complex.hpp"
packages/kokkos-kernels/batched/dense/impl/KokkosBatched_Vector_SIMD_Math.hpp:21:#include "Kokkos_Complex.hpp"
packages/kokkos-kernels/batched/dense/impl/KokkosBatched_Vector_SIMD_Misc.hpp:21:#include "Kokkos_Complex.hpp"
packages/kokkos-kernels/batched/dense/impl/KokkosBatched_Vector_SIMD_Relation.hpp:21:#include "Kokkos_Complex.hpp"
packages/kokkos-kernels/batched/dense/src/KokkosBatched_Vector_SIMD.hpp:21:#include <Kokkos_Complex.hpp>
packages/kokkos-kernels/common/src/Kokkos_ArithTraits.hpp:26:#include <Kokkos_Complex.hpp>
packages/kokkos-kernels/common/unit_test/Test_Common_Sorting.hpp:29:#include <Kokkos_Complex.hpp>
packages/kokkos-kernels/sparse/unit_test/Test_Sparse_SortCrs.hpp:32:#include <Kokkos_Complex.hpp>
packages/kokkos/CHANGELOG.md:1262:- Get rid of SYCL workaround in Kokkos_Complex.hpp [\#3884](https://github.com/kokkos/kokkos/pull/3884)
packages/kokkos/algorithms/src/Kokkos_Random.hpp:25:#include <Kokkos_Complex.hpp>
packages/kokkos/core/src/Kokkos_Core.hpp:69:#include <Kokkos_Complex.hpp>
packages/kokkos/core/src/Kokkos_MathematicalSpecialFunctions.hpp:31:#include <Kokkos_Complex.hpp>
packages/kokkos/core/unit_test/TestComplex.hpp:20:// The suppression needs to happen before Kokkos_Complex.hpp is included to be
packages/stokhos/test/UnitTest/Stokhos_SacadoMPVectorUnitTest.cpp:19:#include "Kokkos_Complex.hpp"
packages/teuchos/core/src/Teuchos_ScalarTraits.hpp:27:#include "Kokkos_Complex.hpp"
packages/tpetra/core/src/Tpetra_BlockView.hpp:23:#include "Kokkos_Complex.hpp"
packages/tpetra/core/src/Tpetra_ConfigDefs.hpp:227:#include <Kokkos_Complex.hpp>
packages/tpetra/core/src/Tpetra_Details_Blas.hpp:23:#include "Kokkos_Complex.hpp"
packages/tpetra/core/src/Tpetra_Details_MpiTypeTraits.hpp:40:#include "Kokkos_Complex.hpp"
packages/tpetra/tsqr/src/Tsqr_NodeTsqrFactory.hpp:23:#  include "Kokkos_Complex.hpp"

@dalg24
Copy link
Contributor

dalg24 commented Dec 2, 2024

I expected that our Trilinos nightlies against Kokkos develop included some sort of smoke tests that involved an install of Trilinos...

@dalg24
Copy link
Contributor

dalg24 commented Dec 2, 2024

Does the Trilinos CI not test against an install?!

@crtrott
Copy link
Member

crtrott commented Dec 2, 2024

It does not.

@crtrott
Copy link
Member

crtrott commented Dec 2, 2024

@bartlettroscoe no it shouldn't be included that way. If you build against an external Kokkos you will need to include it as just "Kokkos_Complex.hpp".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client: Albany Issue impacting the Albany project pkg: Teuchos Issues primarily dealing with the Teuchos Package type: bug The primary issue is a bug in Trilinos code or tests
Projects
None yet
Development

No branches or pull requests

6 participants