HPC/Applications/lammps/Package GPU: Difference between revisions
< HPC | Applications | lammps
Jump to navigation
Jump to search
mNo edit summary |
|||
(One intermediate revision by the same user not shown) | |||
Line 7: | Line 7: | ||
=== Usage === | === Usage === | ||
# Use the | # Use the <code>lmp_mpi'''-gpu'''</code> binary instead of the MPI-only one. | ||
# Do one of the following: | # 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 [http://lammps.sandia.gov/doc/suffix.html <code>suffix gpu</code>]. | ||
# | #* On the command line, use the [http://lammps.sandia.gov/doc/Section_start.html#command-line-options <code>-suffix gpu</code>]. | ||
# In the job file or qsub command line, [http://www.clusterresources.com/torquedocs21/2.1jobsubmission.shtml#resources request a GPU] <code>#PBS -l nodes=...:gpus=1</code> (referring to the number of GPUs per node). | # Detail the GPU request. Do one of the following: | ||
#* Near the beginning of your LAMMPS control script, use the command [http://lammps.sandia.gov/doc/package.html <code>package gpu ''Ngpu''</code>] . Since all Carbon GPU nodes have just one GPU per node, the ''Ngpu'' argument must be 1. | |||
#* Add [http://lammps.sandia.gov/doc/Section_start.html#command-line-options <code>-package gpu 1</code>] to the command line options. This is perhaps preferred because you do not need to alter your input file. | |||
# In the job file or qsub command line, [http://www.clusterresources.com/torquedocs21/2.1jobsubmission.shtml#resources request a node ''having'' a GPU], using <code>#PBS -l nodes=...:gpus=1</code> (referring to the number of GPUs per node). | |||
=== Job file example === | === Job file example === | ||
#PBS -l nodes=...''':gpus=1''' | #PBS -l nodes=...''':gpus=1''' | ||
… | … | ||
mpirun … lmp_mpi'''-gpu''' -in ''infile'' | mpirun … lmp_mpi'''-gpu''' '''-sf gpu -pk gpu 1''' -in ''infile'' |
Latest revision as of 18:33, March 23, 2018
Package GPU
- Provides multi-threaded versions of most pair styles, all dihedral styles and a few fixes in LAMMPS; for the full list:
- In your browser, open http://lammps.sandia.gov/doc/Section_commands.html#comm
- 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
- Use the
lmp_mpi-gpu
binary instead of the MPI-only one. - 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
.
- 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.
- Near the beginning of your LAMMPS control script, use the command
- 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