From: Bruno Turcksin Date: Fri, 3 Feb 2023 15:03:54 +0000 (-0500) Subject: Add Kokkos::initalize and finalize to MPI_InitFinalize X-Git-Tag: v9.5.0-rc1~583^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ea34ebe1e25beb3917b12aea6813d7816e9f46c;p=dealii.git Add Kokkos::initalize and finalize to MPI_InitFinalize --- diff --git a/source/base/mpi.cc b/source/base/mpi.cc index e11ddbec3c..cd1d1ea8d1 100644 --- a/source/base/mpi.cc +++ b/source/base/mpi.cc @@ -30,6 +30,8 @@ #include +#include + #include #include #include @@ -773,6 +775,9 @@ namespace Utilities (void)ierr; #endif + // Initialize Kokkos + Kokkos::initialize(argc, argv); + // we are allowed to call MPI_Init ourselves and PETScInitialize will // detect this. This allows us to use MPI_Init_thread instead. #ifdef DEAL_II_WITH_PETSC @@ -987,6 +992,9 @@ namespace Utilities #endif + // Finalize Kokkos + Kokkos::finalize(); + // only MPI_Finalize if we are running with MPI. We also need to do this // when running PETSc, because we initialize MPI ourselves before // calling PetscInitialize