NPAR: Difference between revisions
No edit summary |
No edit summary |
||
| Line 40: | Line 40: | ||
[[Category:INCAR tag]][[Category:Performance]][[Category:Parallelization]] | [[Category:INCAR tag]][[Category:Performance]][[Category:Parallelization]] | ||
Revision as of 09:20, 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