From 26dbd33e7f44f77eb9f96c71f3eabeda873ec9a0 Mon Sep 17 00:00:00 2001 From: Brian Kelley Date: Mon, 25 Nov 2024 13:12:44 -0700 Subject: [PATCH] Tpetra: Initialize KokkosKernels TPLs during init Signed-off-by: Brian Kelley --- packages/tpetra/core/src/Tpetra_Core.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/tpetra/core/src/Tpetra_Core.cpp b/packages/tpetra/core/src/Tpetra_Core.cpp index 51680bb8f75d..4dfd077a3796 100644 --- a/packages/tpetra/core/src/Tpetra_Core.cpp +++ b/packages/tpetra/core/src/Tpetra_Core.cpp @@ -19,6 +19,7 @@ #include "Tpetra_Details_checkLaunchBlocking.hpp" #include "Tpetra_Details_KokkosTeuchosTimerInjection.hpp" #include "Tpetra_Details_Behavior.hpp" +#include "KokkosKernels_EagerInitialize.hpp" namespace Tpetra { @@ -129,6 +130,9 @@ namespace Tpetra { (! kokkosIsInitialized, std::logic_error, "At the end of " "initKokkosIfNeeded, Kokkos is not initialized. " "Please report this bug to the Tpetra developers."); + // Now that the Kokkos backend(s) are initialized, + // initialize all KokkosKernels TPLs. + KokkosKernels::eager_initialize(); } #ifdef HAVE_TPETRACORE_MPI