diff --git a/src/accelerator_kokkos.h b/src/accelerator_kokkos.h index 37d86a89e3..36a376bff8 100644 --- a/src/accelerator_kokkos.h +++ b/src/accelerator_kokkos.h @@ -61,11 +61,6 @@ class KokkosLMP { int neigh_count(int) { return 0; } }; -void kokkos_lmp_finalize() -{ - KokkosLMP::finalize(); -} - class AtomKokkos : public Atom { public: tagint **k_special; diff --git a/src/main.cpp b/src/main.cpp index 606f31274d..543833498b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -32,9 +32,19 @@ #include #endif +#if defined(LMP_KOKKOS) namespace LAMMPS_NS { extern void kokkos_lmp_finalize(); } +#else +#include "accelerator_kokkos.h" +namespace LAMMPS_NS { +void kokkos_lmp_finalize() +{ + KokkosLMP::finalize(); +} +} +#endif using namespace LAMMPS_NS;