HPC/Applications/lammps/Package GPU

From CNM Wiki
< HPC‎ | Applications‎ | lammps
Jump to navigation Jump to search

Package GPU

  • Provides multi-threaded versions of most pair styles, all dihedral styles and a few fixes in LAMMPS; for the full list:
    1. In your browser, open http://lammps.sandia.gov/doc/Section_commands.html#comm
    2. Search for the string /cuda.
  • Supports one physical GPU per LAMMPS MPI process (CPU core).
  • Multiple MPI processes (CPU cores) can share a single GPU, and in many cases it will be more efficient to run this way.

Usage

  1. Use the lmp_mpi-gpu binary instead of the MPI-only one.
  2. Use a GPU potential style. Do one of the following:
    • Append /gpu to the style name (e.g. pair_style lj/cut/gpu).
    • Use the command suffix gpu.
    • On the command line, use the -suffix gpu.
  3. Detail the GPU request. Do one of the following:
    • Near the beginning of your LAMMPS control script, use the command package gpu Ngpu . Since all Carbon GPU nodes have just one GPU per node, the Ngpu argument must be 1.
    • Add -package gpu 1 to the command line options. This is perhaps preferred because you do not need to alter your input file.
  4. In the job file or qsub command line, request a node having a GPU, using #PBS -l nodes=...:gpus=1 (referring to the number of GPUs per node).

Job file example

#PBS -l nodes=...:gpus=1
…
mpirun … lmp_mpi-gpu -sf gpu -pk gpu 1 -in infile