Commit 49b07a23 authored by Stan Moore's avatar Stan Moore
Browse files

Keep original chunksize value set by user in case atom count changes

parent 4ed1b4c3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -122,7 +122,7 @@ protected:
  t_dbvec dbvec;
  SNAKokkos<DeviceType> snaKK;

  int inum,max_neighs,chunk_offset;
  int inum,max_neighs,chunk_size,chunk_offset;

  int eflag,vflag;

+1 −1
Original line number Diff line number Diff line
@@ -198,7 +198,7 @@ void PairSNAPKokkos<DeviceType>::compute(int eflag_in, int vflag_in)
    d_ninside = Kokkos::View<int*, DeviceType>("PairSNAPKokkos:ninside",inum);
  }

  chunk_size = MIN(chunk_size,inum);
  chunk_size = MIN(chunksize,inum); // "chunksize" variable is set by user
  chunk_offset = 0;

  snaKK.grow_rij(chunk_size,max_neighs);
+2 −2
Original line number Diff line number Diff line
@@ -635,7 +635,7 @@ void PairSNAP::read_files(char *coefffilename, char *paramfilename)
  switchflag = 1;
  bzeroflag = 1;
  quadraticflag = 0;
  chunk_size = 2000;
  chunksize = 2000;

  // open SNAP parameter file on proc 0

@@ -700,7 +700,7 @@ void PairSNAP::read_files(char *coefffilename, char *paramfilename)
    else if (strcmp(keywd,"quadraticflag") == 0)
      quadraticflag = atoi(keyval);
    else if (strcmp(keywd,"chunksize") == 0)
      chunk_size = atoi(keyval);
      chunksize = atoi(keyval);
    else
      error->all(FLERR,"Incorrect SNAP parameter file");
  }
+1 −1
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ protected:
  double** bispectrum;          // bispectrum components for all atoms in list
  int *map;                     // mapping from atom types to elements
  int twojmax, switchflag, bzeroflag;
  int chunk_size;
  int chunksize;
  double rfac0, rmin0, wj1, wj2;
  int rcutfacflag, twojmaxflag; // flags for required parameters
  int beta_max;                 // length of beta