You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix#4182.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Documentation**
- Updated `lammps-command.md` to clarify GPU usage and unit handling in
LAMMPS.
- Enhanced `howtoset_num_nodes.md` with new sections on MPI and
multiprocessing for TensorFlow and PyTorch, improving clarity and
usability.
- Added guidance on GPU resource allocation for parallel processes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Copy file name to clipboardExpand all lines: doc/troubleshooting/howtoset_num_nodes.md
+19-2Lines changed: 19 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,11 +4,26 @@ DeePMD-kit has three levels of parallelism.
4
4
To get the best performance, one should control the number of threads used by DeePMD-kit.
5
5
One should make sure the product of the parallel numbers is less than or equal to the number of cores available.
6
6
7
-
## MPI (optional)
7
+
## MPI or multiprocessing (optional)
8
8
9
9
Parallelism for MPI is optional and used for multiple nodes, multiple GPU cards, or sometimes multiple CPU cores.
10
10
11
-
To enable MPI support for training, one should [install horovod](../install/install-from-source.md#install-horovod-and-mpi4py) in advance. Note that the parallelism mode is data parallelism, so it is not expected to see the training time per batch decreases.
11
+
::::{tab-set}
12
+
13
+
:::{tab-item} TensorFlow {{ tensorflow_icon }}
14
+
15
+
To enable MPI support for training in the TensorFlow interface, one should [install horovod](../install/install-from-source.md#install-horovod-and-mpi4py) in advance.
16
+
17
+
:::
18
+
:::{tab-item} PyTorch {{ pytorch_icon }}
19
+
20
+
Multiprocessing support for training in the PyTorch backend is implemented with [torchrun](https://pytorch.org/docs/stable/elastic/run.html).
21
+
22
+
:::
23
+
::::
24
+
25
+
Note that the parallelism mode is data parallelism, so it is not expected to see the training time per batch decreases.
26
+
See [Parallel training](../train/parallel-training.md) for details.
12
27
13
28
MPI support for inference is not directly supported by DeePMD-kit, but indirectly supported by the third-party software. For example, [LAMMPS enables running simulations in parallel](https://docs.lammps.org/Developer_parallel.html) using the MPI parallel communication standard with distributed data. That software has to build against MPI.
14
29
@@ -22,6 +37,8 @@ Note that `mpirun` here should be the same as the MPI used to build software. Fo
22
37
23
38
Sometimes, `$num_nodes` and the nodes information can be directly given by the HPC scheduler system, if the MPI used here is the same as the MPI used to build the scheduler system. Otherwise, one have to manually assign these information.
24
39
40
+
Each process can use at most one GPU card.
41
+
25
42
## Parallelism between independent operators
26
43
27
44
For CPU devices, TensorFlow and PyTorch use multiple streams to run independent operators (OP).
0 commit comments