diff --git a/doc/Section_commands.html b/doc/Section_commands.html index 5f996268de..039367f5ce 100644 --- a/doc/Section_commands.html +++ b/doc/Section_commands.html @@ -311,19 +311,20 @@ default LAMMPS build. These dependencies are listed as Restrictions in the command's documentation.
These are fix styles contributed by users, which can be used if diff --git a/doc/Section_commands.txt b/doc/Section_commands.txt index 1c58401303..a8bcd7a79b 100644 --- a/doc/Section_commands.txt +++ b/doc/Section_commands.txt @@ -307,6 +307,7 @@ included when LAMMPS was built. Not all packages are included in a default LAMMPS build. These dependencies are listed as Restrictions in the command's documentation. +"accelerator"_accelerator.html, "angle_coeff"_angle_coeff.html, "angle_style"_angle_style.html, "atom_modify"_atom_modify.html, @@ -414,6 +415,7 @@ of each style or click on the style itself for a full description: "evaporate"_fix_evaporate.html, "external"_fix_external.html, "freeze"_fix_freeze.html, +"gpu"_fix_gpu.html, "gravity"_fix_gravity.html, "heat"_fix_heat.html, "indent"_fix_indent.html, diff --git a/doc/Section_start.html b/doc/Section_start.html index e1c61510d2..999bb8b732 100644 --- a/doc/Section_start.html +++ b/doc/Section_start.html @@ -787,7 +787,8 @@ more processors or setup a smaller problem. which may be used in any order. Either the full word or the one-letter abbreviation can be used:
-Here are the details on the options:
+-accelerator style ++
Use accelerated variants of various styles if they exist. The style +can be opt or gpu or cuda. The variant styles are part of +optional packages that LAMMPS can be built with, as described above in +Section 2.3. The "opt" style corrsponds to the OPT package, +the "gpu" style to the GPU package, and the "cuda" style to the +USER-CUDA package. For example, all of the packages provide a +pair_style lj/cut variant, with styles lj/cut/opt or +lj/cut/gpu or lj/cut/cuda. These styles can be specified explicitly +in your input script, e.g. pair_style lj/cut/gpu. But if the +-accelerator switch is used, you do not need to modify your input +script. The accelerator suffix (opt,gpu,cuda) is automatically +appended when the style is created. The suffix is applied to atom, +pair, fix, compute, and integrate styles. If an accelerated version +does not exist, the standard version is created. See the +accelerator command for info on how to turn off +this option. +
-echo style
Set the style of command echoing. The style can be none or screen diff --git a/doc/Section_start.txt b/doc/Section_start.txt index fdb03c0b1c..57bb2a8975 100644 --- a/doc/Section_start.txt +++ b/doc/Section_start.txt @@ -777,6 +777,7 @@ At run time, LAMMPS recognizes several optional command-line switches which may be used in any order. Either the full word or the one-letter abbreviation can be used: +-accelerator or -a -echo or -e -partition or -p -in or -i @@ -790,6 +791,25 @@ mpirun -np 16 lmp_ibm -var f tmp.out -log my.log -screen none < in.alloy :pre Here are the details on the options: +-accelerator style :pre + +Use accelerated variants of various styles if they exist. The style +can be {opt} or {gpu} or {cuda}. The variant styles are part of +optional packages that LAMMPS can be built with, as described above in +"Section 2.3"_#2_3. The "opt" style corrsponds to the OPT package, +the "gpu" style to the GPU package, and the "cuda" style to the +USER-CUDA package. For example, all of the packages provide a +"pair_style lj/cut"_pair_lj.html variant, with styles lj/cut/opt or +lj/cut/gpu or lj/cut/cuda. These styles can be specified explicitly +in your input script, e.g. pair_style lj/cut/gpu. But if the +-accelerator switch is used, you do not need to modify your input +script. The accelerator suffix (opt,gpu,cuda) is automatically +appended when the style is created. The suffix is applied to atom, +pair, fix, compute, and integrate styles. If an accelerated version +does not exist, the standard version is created. See the +"accelerator"_accelerator.html command for info on how to turn off +this option. + -echo style :pre Set the style of command echoing. The style can be {none} or {screen} diff --git a/doc/fix_gpu.html b/doc/fix_gpu.html index f71a8e8a4a..3560baf21f 100644 --- a/doc/fix_gpu.html +++ b/doc/fix_gpu.html @@ -45,39 +45,38 @@ specified for a run or an error will be generated. The fix will not have an effect on any LAMMPS computations that do not use GPU acceleration, so there should not be any problems with specifying this fix first in input scripts.
-mode specifies where neighbor list calculations will be performed. -If mode is force, neighbor list calculation is performed on the -CPU. If mode is force/neigh, neighbor list calculation is -performed on the GPU. GPU neighbor list calculation currently cannot be -used with a triclinic box. GPU neighbor list calculation currently -cannot be used with hybrid pair styles. -GPU neighbor lists are not compatible with styles that are not GPU-enabled. -When a non-GPU enabled style requires a neighbor list, it will also be -built using CPU routines. In these cases, it will typically be more efficient -to only use CPU neighbor list builds. +
The mode setting specifies where neighbor list calculations will be +performed. If mode is force, neighbor list calculation is performed +on the CPU. If mode is force/neigh, neighbor list calculation is +performed on the GPU. GPU neighbor list calculation currently cannot +be used with a triclinic box. GPU neighbor list calculation currently +cannot be used with hybrid pair styles. GPU +neighbor lists are not compatible with styles that are not +GPU-enabled. When a non-GPU enabled style requires a neighbor list, +it will also be built using CPU routines. In these cases, it will +typically be more efficient to only use CPU neighbor list builds.
-first and last specify the GPUs that will be used for simulation. -On each node, the GPU IDs in the inclusive range from first to last will -be used. +
The first and last settings specify the GPUs that will be used for +simulation. On each node, the GPU IDs in the inclusive range from +first to last will be used.
-split can be used for load balancing force calculation work between -CPU and GPU cores in GPU-enabled pair styles. If 0<split<1.0, -a fixed fraction of particles is offloaded to the GPU while force calculation -for the other particles occurs simulataneously on the CPU. If split<0, -the optimal fraction (based on CPU and GPU timings) is calculated -every 25 timesteps. If split=1.0, all force calculations for -GPU accelerated pair styles are performed -on the GPU. In this case, hybrid, -bond, angle, -dihedral, improper, -and long-range calculations can be performed on the CPU -while the GPU is performing force calculations for the GPU-enabled pair -style. +
The split setting can be used for load balancing force calculation +work between CPU and GPU cores in GPU-enabled pair styles. If +0<split<1.0, a fixed fraction of particles is offloaded to the GPU +while force calculation for the other particles occurs simulataneously +on the CPU. If split<0, the optimal fraction (based on CPU and GPU +timings) is calculated every 25 timesteps. If split=1.0, all force +calculations for GPU accelerated pair styles are performed on the +GPU. In this case, hybrid, bond, +angle, dihedral, +improper, and long-range +calculations can be performed on the CPU while the GPU is performing +force calculations for the GPU-enabled pair style.
-In order to use GPU acceleration, a GPU enabled style must be -selected in the input script in addition to this fix. Currently, -this is limited to a few pair styles and -the PPPM kspace style. +
In order to use GPU acceleration, a GPU enabled style must be selected +in the input script in addition to this fix. Currently, this is +limited to a few pair styles and the PPPM kspace +style.
More details about these settings and various possible hardware configuration are in this section of the @@ -85,6 +84,10 @@ manual.
Restart, fix_modify, output, run start/stop, minimize info:
+This fix is part of the "gpu" package. It is only enabled if LAMMPS +was built with that package. See the Making +LAMMPS section for more info. +
No information about this fix is written to binary restart files. None of the fix_modify options are relevant to this fix. @@ -98,7 +101,8 @@ the run command. mode should not be used with a triclinic box or hybrid pair styles.
-split must be positive when using hybrid pair styles. +
The split setting must be positive when using +hybrid pair styles.
Currently, group-ID must be all.
diff --git a/doc/fix_gpu.txt b/doc/fix_gpu.txt index df8fbadb8f..e4cd41f1de 100644 --- a/doc/fix_gpu.txt +++ b/doc/fix_gpu.txt @@ -36,39 +36,38 @@ specified for a run or an error will be generated. The fix will not have an effect on any LAMMPS computations that do not use GPU acceleration, so there should not be any problems with specifying this fix first in input scripts. -{mode} specifies where neighbor list calculations will be performed. -If {mode} is force, neighbor list calculation is performed on the -CPU. If {mode} is force/neigh, neighbor list calculation is -performed on the GPU. GPU neighbor list calculation 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 styles that are not GPU-enabled. -When a non-GPU enabled style requires a neighbor list, it will also be -built using CPU routines. In these cases, it will typically be more efficient -to only use CPU neighbor list builds. +The {mode} setting specifies where neighbor list calculations will be +performed. If {mode} is force, neighbor list calculation is performed +on the CPU. If {mode} is force/neigh, neighbor list calculation is +performed on the GPU. GPU neighbor list calculation 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 styles that are not +GPU-enabled. When a non-GPU enabled style requires a neighbor list, +it will also be built using CPU routines. In these cases, it will +typically be more efficient to only use CPU neighbor list builds. -{first} and {last} specify the GPUs that will be used for simulation. -On each node, the GPU IDs in the inclusive range from {first} to {last} will -be used. +The {first} and {last} settings specify the GPUs that will be used for +simulation. On each node, the GPU IDs in the inclusive range from +{first} to {last} will be used. -{split} can be used for load balancing force calculation work between -CPU and GPU cores in GPU-enabled pair styles. If 0<{split}<1.0, -a fixed fraction of particles is offloaded to the GPU while force calculation -for the other particles occurs simulataneously on the CPU. If {split}<0, -the optimal fraction (based on CPU and GPU timings) is calculated -every 25 timesteps. If {split}=1.0, all force calculations for -GPU accelerated pair styles are performed -on the GPU. In this case, "hybrid"_pair_hybrid.html, -"bond"_bond_style.html, "angle"_angle_style.html, -"dihedral"_dihedral_style.html, "improper"_improper_style.html, -and "long-range"_kspace_style.html calculations can be performed on the CPU -while the GPU is performing force calculations for the GPU-enabled pair -style. +The {split} setting can be used for load balancing force calculation +work between CPU and GPU cores in GPU-enabled pair styles. If +0<{split}<1.0, a fixed fraction of particles is offloaded to the GPU +while force calculation for the other particles occurs simulataneously +on the CPU. If {split}<0, the optimal fraction (based on CPU and GPU +timings) is calculated every 25 timesteps. If {split}=1.0, all force +calculations for GPU accelerated pair styles are performed on the +GPU. In this case, "hybrid"_pair_hybrid.html, "bond"_bond_style.html, +"angle"_angle_style.html, "dihedral"_dihedral_style.html, +"improper"_improper_style.html, and "long-range"_kspace_style.html +calculations can be performed on the CPU while the GPU is performing +force calculations for the GPU-enabled pair style. -In order to use GPU acceleration, a GPU enabled style must be -selected in the input script in addition to this fix. Currently, -this is limited to a few "pair styles"_pair_style.html and -the PPPM "kspace style"_kspace_style.html. +In order to use GPU acceleration, a GPU enabled style must be selected +in the input script in addition to this fix. Currently, this is +limited to a few "pair styles"_pair_style.html and the PPPM "kspace +style"_kspace_style.html. More details about these settings and various possible hardware configuration are in "this section"_Section_start.html#2_8 of the @@ -76,6 +75,10 @@ manual. [Restart, fix_modify, output, run start/stop, minimize info:] +This fix is part of the "gpu" package. It is only enabled if LAMMPS +was built with that package. See the "Making +LAMMPS"_Section_start.html#2_3 section for more info. + No information about this fix is written to "binary restart files"_restart.html. None of the "fix_modify"_fix_modify.html options are relevant to this fix. @@ -89,7 +92,8 @@ The fix must be the first fix specified for a given run. The force/neigh {mode} should not be used with a triclinic box or "hybrid"_pair_hybrid.html pair styles. -{split} must be positive when using "hybrid"_pair_hybrid.html pair styles. +The {split} setting must be positive when using +"hybrid"_pair_hybrid.html pair styles. Currently, group-ID must be all.