make compatible with Kokkos 3.7

This commit is contained in:
Axel Kohlmeyer
2023-11-23 14:25:05 -05:00
parent 4cf8045f81
commit 35103df86b
2 changed files with 5 additions and 4 deletions

View File

@ -68,8 +68,9 @@ KokkosLMP::KokkosLMP(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp)
int me = 0;
MPI_Comm_rank(world,&me);
if (me == 0) error->message(FLERR,"KOKKOS mode with Kokkos version {}.{}.{} is enabled",
KOKKOS_VERSION_MAJOR, KOKKOS_VERSION_MINOR, KOKKOS_VERSION_PATCH);
if (me == 0)
error->message(FLERR,"KOKKOS mode with Kokkos version {}.{}.{} is enabled",
KOKKOS_VERSION / 10000, (KOKKOS_VERSION % 10000) / 100, KOKKOS_VERSION % 100);
// process any command-line args that invoke Kokkos settings

View File

@ -1226,8 +1226,8 @@ std::string Info::get_accelerator_info(const std::string &package)
if (has_accelerator_feature("KOKKOS","precision","mixed")) mesg += " mixed";
if (has_accelerator_feature("KOKKOS","precision","double")) mesg += " double";
#if LMP_KOKKOS
mesg += "\nKokkos library version: " + std::to_string(KOKKOS_VERSION_MAJOR) + "."
+ std::to_string(KOKKOS_VERSION_MINOR) + "." + std::to_string(KOKKOS_VERSION_PATCH);
mesg += fmt::format("\nKokkos library version: {}.{}.{}", KOKKOS_VERSION / 10000,
(KOKKOS_VERSION % 10000) / 100, KOKKOS_VERSION % 100);
#endif
mesg += "\n";
}