Unverified Commit 2f29bd29 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer Committed by GitHub
Browse files

Merge pull request #1430 from ndtrung81/gpu-neigh-hybrid

Enable neighbor build on the device for pair hybrid substyles
parents daa53e30 dc8b43a9
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -2202,10 +2202,6 @@ Self-explanatory. :dd

This is a current restriction in LAMMPS. :dd

{Cannot use pair hybrid with GPU neighbor list builds} :dt

Neighbor list builds must be done on the CPU for this pair style. :dd

{Cannot use pair tail corrections with 2d simulations} :dt

The correction factors are only currently defined for 3d systems. :dd
@@ -5523,10 +5519,6 @@ Self-explanatory. :dd
For this pair style, you cannot run part of the force calculation on
the host.  See the package command. :dd

{GPU split param must be positive for hybrid pair styles} :dt

See the package gpu command. :dd

{GPUs are requested but Kokkos has not been compiled for CUDA} :dt

Re-compile Kokkos with CUDA support to use GPUs. :dd
+1 −1
Original line number Diff line number Diff line
@@ -104,7 +104,7 @@ code (with a performance penalty due to having data transfers between
host and GPU). :ulb,l

The GPU package requires neighbor lists to be built on the CPU when using
exclusion lists, hybrid pair styles, or a triclinic simulation box. :l
exclusion lists, or a triclinic simulation box. :l

The GPU package can be compiled for CUDA or OpenCL and thus supports
both, Nvidia and AMD GPUs well. On Nvidia hardware, using CUDA is typically
+4 −6
Original line number Diff line number Diff line
@@ -176,12 +176,10 @@ computation will be built. If {neigh} is {yes}, which is the default,
neighbor list building is performed on the GPU.  If {neigh} is {no},
neighbor list building is performed on the CPU.  GPU neighbor list
building currently cannot be used with a triclinic box.  GPU neighbor
list calculation currently cannot be used with
"hybrid"_pair_hybrid.html pair styles.  GPU neighbor lists are not
compatible with commands that are not GPU-enabled.  When a non-GPU
enabled command requires a neighbor list, it will also be built on the
CPU.  In these cases, it will typically be more efficient to only use
CPU neighbor list builds.
lists are not compatible with commands that are not GPU-enabled.  When
a non-GPU enabled command requires a neighbor list, it will also be
built on the CPU.  In these cases, it will typically be more efficient
to only use CPU neighbor list builds.

The {newton} keyword sets the Newton flags for pairwise (not bonded)
interactions to {off} or {on}, the same as the "newton"_newton.html
+6 −3
Original line number Diff line number Diff line
@@ -64,9 +64,12 @@ int BaseAtomicT::init_atomic(const int nlocal, const int nall,
  } else
    _nbor_data=&(nbor->dev_nbor);

  int success=device->init(*ans,false,false,nlocal,host_nlocal,nall,nbor,
                           maxspecial,_gpu_host,max_nbors,cell_size,false,
                           _threads_per_atom);
  int success=device->init(*ans,false,false,nlocal,nall,maxspecial);
  if (success!=0)
    return success;

  success = device->init_nbor(nbor,nlocal,host_nlocal,nall,maxspecial,_gpu_host,
                  max_nbors,cell_size,false,_threads_per_atom);
  if (success!=0)
    return success;

+6 −3
Original line number Diff line number Diff line
@@ -65,9 +65,12 @@ int BaseChargeT::init_atomic(const int nlocal, const int nall,
  } else
    _nbor_data=&(nbor->dev_nbor);

  int success=device->init(*ans,true,false,nlocal,host_nlocal,nall,nbor,
                           maxspecial,_gpu_host,max_nbors,cell_size,false,
                           _threads_per_atom);
  int success=device->init(*ans,true,false,nlocal,nall,maxspecial);
  if (success!=0)
    return success;

  success = device->init_nbor(nbor,nlocal,host_nlocal,nall,maxspecial,_gpu_host,
                  max_nbors,cell_size,false,_threads_per_atom);
  if (success!=0)
    return success;

Loading