Commit b51d06b3 authored by Stan Moore's avatar Stan Moore
Browse files

Change default binsize for Kokkos if running on GPUs

parent c3acb3e4
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@
#include "style_nstencil.h"
#include "style_npair.h"
#include "style_ntopo.h"
#include "comm.h"

using namespace LAMMPS_NS;

@@ -359,6 +360,14 @@ void NeighborKokkos::modify_mol_intra_grow_kokkos(){
  k_ex_mol_intra.modify<LMPHostType>();
}

/* ---------------------------------------------------------------------- */
void NeighborKokkos::set_binsize_kokkos() {
  if (!binsizeflag && lmp->kokkos->ngpu > 0) {
    binsize_user = cutneighmax;
    binsizeflag = 1;
  }
}

/* ---------------------------------------------------------------------- */

void NeighborKokkos::init_topology() {
+1 −0
Original line number Diff line number Diff line
@@ -87,6 +87,7 @@ class NeighborKokkos : public Neighbor {
  void modify_ex_group_grow_kokkos();
  void modify_mol_group_grow_kokkos();
  void modify_mol_intra_grow_kokkos();
  void set_binsize_kokkos();
};

}
+3 −0
Original line number Diff line number Diff line
@@ -471,6 +471,9 @@ void Neighbor::init()
    error->warning(FLERR,"Neighbor exclusions used with KSpace solver "
                   "may give inconsistent Coulombic energies");

  if (lmp->kokkos)
    set_binsize_kokkos();

  // ------------------------------------------------------------------
  // create pairwise lists
  // one-time call to init_styles() to scan style files and setup
+1 −0
Original line number Diff line number Diff line
@@ -233,6 +233,7 @@ class Neighbor : protected Pointers {
  virtual void init_ex_bit_kokkos() {}
  virtual void init_ex_mol_bit_kokkos() {}
  virtual void grow_ex_mol_intra_kokkos() {}
  virtual void set_binsize_kokkos() {}
};

namespace NeighConst {