From cf77d882eba745e0b205ea1e75dab604a65da8e2 Mon Sep 17 00:00:00 2001 From: stamoor Date: Thu, 28 Jan 2016 23:32:16 +0000 Subject: [PATCH] Adding error checks for Kokkos-incompatible features git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@14517 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/minimize.cpp | 3 +++ src/minimize.h | 4 ++++ src/pair.cpp | 3 +++ src/pair.h | 4 ++++ src/pair_hybrid.cpp | 3 +++ src/pair_hybrid.h | 4 ++++ 6 files changed, 21 insertions(+) diff --git a/src/minimize.cpp b/src/minimize.cpp index d8ac95926c..89d63f5e72 100644 --- a/src/minimize.cpp +++ b/src/minimize.cpp @@ -50,6 +50,9 @@ void Minimize::command(int narg, char **arg) if (update->laststep < 0) error->all(FLERR,"Too many iterations"); + if (lmp->kokkos) + error->all(FLERR,"Cannot yet use minimize with Kokkos"); + lmp->init(); update->minimize->setup(); diff --git a/src/minimize.h b/src/minimize.h index 4c44618948..42a2fcaf02 100644 --- a/src/minimize.h +++ b/src/minimize.h @@ -53,4 +53,8 @@ E: Too many iterations You must use a number of iterations that fit in a 32-bit integer for minimization. +E: Cannot yet use minimize with Kokkos + +This feature is not yet supported. + */ diff --git a/src/pair.cpp b/src/pair.cpp index ffeabde416..514d8f01ff 100644 --- a/src/pair.cpp +++ b/src/pair.cpp @@ -701,6 +701,9 @@ void Pair::compute_dummy(int eflag, int vflag) ---------------------------------------------------------------------- */ void Pair::add_tally_callback(Compute *ptr) { + if (lmp->kokkos) + error->all(FLERR,"Cannot yet use compute tally with Kokkos"); + int i,found=-1; for (i=0; i < num_tally_compute; ++i) { diff --git a/src/pair.h b/src/pair.h index 9927c04237..56c9e2167b 100644 --- a/src/pair.h +++ b/src/pair.h @@ -304,6 +304,10 @@ E: Pair style requires a KSpace style No kspace style is defined. +E: Cannot yet use compute tally with Kokkos + +This feature is not yet supported. + E: Pair style does not support pair_write The pair style does not have a single() function, so it can diff --git a/src/pair_hybrid.cpp b/src/pair_hybrid.cpp index a2aa82fe0e..f56ff79663 100644 --- a/src/pair_hybrid.cpp +++ b/src/pair_hybrid.cpp @@ -42,6 +42,9 @@ PairHybrid::PairHybrid(LAMMPS *lmp) : Pair(lmp) outerflag = 0; respaflag = 0; + + if (lmp->kokkos) + error->all(FLERR,"Cannot yet use pair hybrid with Kokkos"); } /* ---------------------------------------------------------------------- */ diff --git a/src/pair_hybrid.h b/src/pair_hybrid.h index 006c70664a..8686f77067 100644 --- a/src/pair_hybrid.h +++ b/src/pair_hybrid.h @@ -93,6 +93,10 @@ Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. +E: Cannot yet use pair hybrid with Kokkos + +This feature is not yet supported. + E: Pair style hybrid cannot have hybrid as an argument Self-explanatory.