Commit 65085e81 authored by sjplimp's avatar sjplimp
Browse files

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@13377 f3b2605a-c512-4ea7-a41b-209d697bcdaa
parent deb4e7e7
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -57,17 +57,17 @@ KokkosLMP::KokkosLMP(LAMMPS *lmp, int narg, char **arg) : Pointers(lmp)
      iarg += 2;

      char *str;
      if (str = getenv("SLURM_LOCALID")) {
      if ((str = getenv("SLURM_LOCALID"))) {
        int local_rank = atoi(str);
        device = local_rank % ngpu;
        if (device >= skip_gpu) device++;
      }
      if (str = getenv("MV2_COMM_WORLD_LOCAL_RANK")) {
      if ((str = getenv("MV2_COMM_WORLD_LOCAL_RANK"))) {
        int local_rank = atoi(str);
        device = local_rank % ngpu;
        if (device >= skip_gpu) device++;
      }
      if (str = getenv("OMPI_COMM_WORLD_LOCAL_RANK")) {
      if ((str = getenv("OMPI_COMM_WORLD_LOCAL_RANK"))) {
        int local_rank = atoi(str);
        device = local_rank % ngpu;
        if (device >= skip_gpu) device++;
+1 −1
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@
#define MAX_TYPES_STACKPARAMS 12
#define NeighClusterSize 8

#ifndef __CUDACC__
#if !defined(__CUDACC__) && !defined(__VECTOR_TYPES_H__)
  struct double2 {
    double x, y;
  };
+4 −4
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ class AtomNeighbors
  KOKKOS_INLINE_FUNCTION
  AtomNeighbors(int* const & firstneigh, const int & _num_neighs, 
                const int & stride):
  _firstneigh(firstneigh), _stride(stride), num_neighs(_num_neighs) {};
  num_neighs(_num_neighs), _firstneigh(firstneigh), _stride(stride) {};
  KOKKOS_INLINE_FUNCTION
  int& operator()(const int &i) const {
    return _firstneigh[i*_stride];
@@ -45,12 +45,12 @@ class AtomNeighborsConst
{
 public:
  const int* const _firstneigh;
  const int numneigh;
  const int num_neighs;

  KOKKOS_INLINE_FUNCTION
  AtomNeighborsConst(int* const & firstneigh, const int & _numneigh, 
  AtomNeighborsConst(int* const & firstneigh, const int & _num_neighs, 
                     const int & stride):
  _firstneigh(firstneigh), _stride(stride), numneigh(_numneigh) {};
  _firstneigh(firstneigh), num_neighs(_num_neighs), _stride(stride) {};
  KOKKOS_INLINE_FUNCTION
  const int& operator()(const int &i) const {
    return _firstneigh[i*_stride];
+1 −1
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ enum{NSQ,BIN,MULTI}; // also in neigh_list.cpp
/* ---------------------------------------------------------------------- */

NeighborKokkos::NeighborKokkos(LAMMPS *lmp) : Neighbor(lmp), 
  neighbond_device(lmp),neighbond_host(lmp)
  neighbond_host(lmp),neighbond_device(lmp)
{
  atoms_per_bin = 16;

+1 −1
Original line number Diff line number Diff line
@@ -48,11 +48,11 @@
#include "comm.h"
#include "neighbor.h"
#include "force.h"
#include "fft3d_wrap_cuda.h" // has to come before pair.h to avoid clash with kokkos
#include "pair.h"
#include "bond.h"
#include "angle.h"
#include "domain.h"
#include "fft3d_wrap_cuda.h"
#include "remap_wrap.h"
#include "memory.h"
#include "error.h"