NPAR: Difference between revisions
No edit summary |
|||
| Line 1: | Line 1: | ||
{{TAGDEF|NPAR|[integer]| | {{TAGDEF|NPAR|[integer]|available ranks}} | ||
Description: {{TAG|NPAR}} determines the number of bands that are treated in parallel. | Description: {{TAG|NPAR}} determines the number of bands that are treated in parallel. This is a legacy tag; use {{TAG|NCORE}} instead. | ||
---- | ---- | ||
{{ | {{NB|warning|{{TAG|NCORE}} is the recommended tag for controlling band-level parallelization and has been available since VASP.5.2.13. It is more intuitive and directly expresses the size of each band group. Only use {{TAG|NPAR}} if you have a specific reason to prefer it. If both {{TAG|NPAR}} and {{TAG|NCORE}} are specified in the {{FILE|INCAR}} file, {{TAG|NPAR}} takes precedence.}} | ||
== Relationship to NCORE == | |||
VASP distributes the available MPI ranks into band groups that each work on one band, parallelizing the [[Energy_cutoff_and_FFT_meshes#FFT_mesh|FFTs]] for that band. For the common case that {{TAG|IMAGES|1}} and no other algorithm-dependent parallelization (e.g., {{TAG|NOMEGAPAR}}) is active:: | |||
:<math>\text{available ranks} = \frac{\text{total MPI ranks}}{\text{KPAR}}</math> | |||
{{TAG|NPAR}} sets the number of band groups; {{TAG|NCORE}} sets the size of each band group. They are strict inverses: | |||
:<math>\text{NPAR} \times \text{NCORE} = \text{available ranks}</math> | |||
The default ({{TAG|NPAR}} = available ranks) is equivalent to {{TAG|NCORE|1}}: each band is handled by a single rank. | |||
{{TAG| | {{NB|warning|Setting {{TAG|NPAR|1}} means all available ranks collaborate on a single band (plane-wave coefficient distribution only). No band parallelization occurs. This is almost always very slow and should be avoided.}} | ||
{{NB|tip|See the [[optimizing the parallelization]] page for a step-by-step guide to finding the best parallelization setup for your system, and {{TAG|NCORE}} for information on how to parallelize over [[Energy_cutoff_and_FFT_meshes#FFT_mesh|FFTs]] in particular.}} | |||
== Related tags and articles == | |||
{{TAG|NCORE}}, | |||
{{TAG|KPAR}}, | |||
{{TAG|LPLANE}}, | |||
{{TAG|LSCALU}}, | |||
{{TAG|NSIM}}, | |||
{{TAG|LSCALAPACK}}, | |||
{{TAG|LSCAAWARE}}, | |||
[[GPU ports of VASP]], | |||
[[Combining MPI and OpenMP]], | |||
[[Optimizing the parallelization]], | |||
[[:Category:Parallelization]], | |||
[[Energy cutoff and FFT meshes]] | |||
{{sc|NPAR|HowTo|Workflows that use this tag}} | |||
---- | |||
[[Category:INCAR tag]][[Category:Performance]][[Category:Parallelization]] | |||
: | |||
== Related tags and articles == | == Related tags and articles == | ||
{{TAG|NCORE}}, | {{TAG|NCORE}}, | ||
{{TAG|KPAR}}, | |||
{{TAG|LPLANE}}, | {{TAG|LPLANE}}, | ||
{{TAG|LSCALU}}, | {{TAG|LSCALU}}, | ||
{{TAG|NSIM}}, | {{TAG|NSIM}}, | ||
[[Optimizing the parallelization]], | |||
[[:Category:Parallelization]] | |||
{{sc|NPAR|Examples|Examples that use this tag}} | {{sc|NPAR|Examples|Examples that use this tag}} | ||
---- | ---- | ||
[[Category:INCAR tag]][[Category: | [[Category:INCAR tag]][[Category:Parallelization]] | ||
Revision as of 09:19, 18 March 2026
NPAR = [integer]
Default: NPAR = available ranks
Description: NPAR determines the number of bands that are treated in parallel. This is a legacy tag; use NCORE instead.
| Warning: NCORE is the recommended tag for controlling band-level parallelization and has been available since VASP.5.2.13. It is more intuitive and directly expresses the size of each band group. Only use NPAR if you have a specific reason to prefer it. If both NPAR and NCORE are specified in the INCAR file, NPAR takes precedence. |
Relationship to NCORE
VASP distributes the available MPI ranks into band groups that each work on one band, parallelizing the FFTs for that band. For the common case that IMAGES = 1 and no other algorithm-dependent parallelization (e.g., NOMEGAPAR) is active::
- [math]\displaystyle{ \text{available ranks} = \frac{\text{total MPI ranks}}{\text{KPAR}} }[/math]
NPAR sets the number of band groups; NCORE sets the size of each band group. They are strict inverses:
- [math]\displaystyle{ \text{NPAR} \times \text{NCORE} = \text{available ranks} }[/math]
The default (NPAR = available ranks) is equivalent to NCORE = 1: each band is handled by a single rank.
Warning: Setting NPAR = 1 means all available ranks collaborate on a single band (plane-wave coefficient distribution only). No band parallelization occurs. This is almost always very slow and should be avoided.
|
| Tip: See the optimizing the parallelization page for a step-by-step guide to finding the best parallelization setup for your system, and NCORE for information on how to parallelize over FFTs in particular. |
Related tags and articles
NCORE, KPAR, LPLANE, LSCALU, NSIM, LSCALAPACK, LSCAAWARE, GPU ports of VASP, Combining MPI and OpenMP, Optimizing the parallelization, Category:Parallelization, Energy cutoff and FFT meshes
Related tags and articles
NCORE, KPAR, LPLANE, LSCALU, NSIM, Optimizing the parallelization, Category:Parallelization