trilinos / Trilinos

Primary repository for the Trilinos Project
https://trilinos.org/
Other
1.21k stars 567 forks source link

Teuchos: Missing Includes for GCC13 #11674

Open hartsw opened 1 year ago

hartsw commented 1 year ago

Bug Report

Missing include in teuchos and kokkos @bartlettroscoe

Description

The Fedora 38 beta release came out today, which includes GCC 13 (also prerelease). To get my systems ready to move to this version I've started to test against it. Trilinos fails to compile due to missing includes.

I generally use spack to build Trilinos, but I checked out the tag 13-4-0 to build (13-4-1 also exhibits the problem).

Steps to Reproduce

  1. SHA1: 13-4-0
  2. Configure script: cmake -DTrilinos_ENABLE_ALL_PACKAGES=YES -DTPL_ENABLE_Netcdf=OFF -DBUILD_SHARED_LIBS=YES ..
  3. Configure log: [attach here]
  4. Build log: [attach here]
  5. Input deck: N/A

Missing includes are for std::uint32_t and others, remedied by including <cstdint> in a couple files.

Git Diff:

diff --git a/packages/kokkos/core/src/impl/Kokkos_MemoryPool.cpp b/packages/kokkos/core/src/impl/Kokkos_MemoryPool.cpp
index 889d821bb1c..3ddc1d3515e 100644
--- a/packages/kokkos/core/src/impl/Kokkos_MemoryPool.cpp
+++ b/packages/kokkos/core/src/impl/Kokkos_MemoryPool.cpp
@@ -46,6 +46,7 @@

 #include <ostream>
 #include <sstream>
+#include <cstdint>

 //----------------------------------------------------------------------------
 //----------------------------------------------------------------------------
diff --git a/packages/teuchos/core/src/Teuchos_BigUIntDecl.hpp b/packages/teuchos/core/src/Teuchos_BigUIntDecl.hpp
index e82e8be9e9a..b41b0d035af 100644
--- a/packages/teuchos/core/src/Teuchos_BigUIntDecl.hpp
+++ b/packages/teuchos/core/src/Teuchos_BigUIntDecl.hpp
@@ -43,6 +43,7 @@
 #define TEUCHOS_BIG_UINT_DECL_HPP

 #include <iosfwd>
+#include <cstdint>

 /*! \file Teuchos_BigUIntDecl.hpp
     \brief Arbitrary-precision unsigned integer declaration.
bartlettroscoe commented 1 year ago

CC: @sebrowne

@hartsw, can you please post a PR that makes this work for you? As Trilinos has no automated builds with GCC 13, we can't reproduce this failure. See the policy Support for Different Compilers/MPIs.

hartsw commented 1 year ago

@bartlettroscoe Yea sure, as just a missing include it's pretty simple. I'll throw it up.

hartsw commented 1 year ago

Moving to master seems to reduce the number of missing includes by one, but also introduces other build errors. I'll try to solve and open a PR.

bartlettroscoe commented 1 year ago

Moving to master seems to reduce the number of missing includes by one, but also introduces other build errors. I'll try to solve and open a PR.

@hartsw, please make sure you create your topic branch off of develop instead of master. That will reduce the likelihood of merge conflicts. See Submitting a Trilinos Pull Request and Create and checkout a branch to make changes on.

KineticTheory commented 8 months ago

FYI - I just ran into this issue for a spack build of trilinos@13.4.0 %gcc@13.2.0. I can't move to a newer version of trilinos at this time. I'll try to use a local patch as a work around.