Skip to content

Commit 787376c

Browse files
docs: Update example and docs for GPU-LCAO acceleration (#6961)
* docs: Update example and docs for GPU-LCAO acceleration * docs(cuda): clarify multi-cards setting
1 parent 6647d6a commit 787376c

4 files changed

Lines changed: 9 additions & 7 deletions

File tree

docs/advanced/acceleration/cuda.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ The ABACUS program will automatically determine whether the current ELPA support
3737

3838
In `INPUT` file we need to set the input parameter [device](../input_files/input-main.md#device) to `gpu`. If this parameter is not set, ABACUS will try to determine if there are available GPUs.
3939
- Set `ks_solver`: For the PW basis, CG, BPCG and Davidson methods are supported on GPU; set the input parameter [ks_solver](../input_files/input-main.md#ks_solver) to `cg`, `bpcg` or `dav`. For the LCAO basis, `cusolver`, `cusolvermp` and `elpa` is supported on GPU.
40-
- **multi-card**: ABACUS allows for multi-GPU acceleration. If you have multiple GPU cards, you can run ABACUS with several MPI processes, and each process will utilize one GPU card. For example, the command `mpirun -n 2 abacus` will by default launch two GPUs for computation. If you only have one card, this command will only start one GPU.
40+
- **single-card**: ABACUS allows for single-GPU acceleration. You can run ABACUS without any MPI process by command `abacus`, and `ks_solver cusolver` is recommended for the LCAO basis. *note: avoid using `mpirun -n 1 abacus`*.
41+
- **multi-cards**: ABACUS allows for multi-GPU acceleration. If you have multiple GPU cards, you can run ABACUS with several MPI processes, and each process will utilize one GPU card. For example, the command `mpirun -n 2 abacus` will by default launch two GPUs for computation. If you only have one card, this command will only start one GPU. *note: the number of MPI processes SHOULD be equal to the number of GPU cards, unless you are using MPS in your computer.*
4142

4243
## Examples
4344
We provides [examples](https://github.com/deepmodeling/abacus-develop/tree/develop/examples/gpu) of gpu calculations.

examples/36_gpu/si16_lcao/INPUT

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ INPUT_PARAMETERS
33
suffix autotest
44
calculation scf
55
device gpu
6-
gamma_only 1 # GPU acceleration currently only support gamma_only set to 1. ### Abacus will generate/overwrite a KPT file when gamma_only is set to 1.
76
ks_solver cusolver # if not set, the default ks_solver is cusolver,
8-
# you can also choose genelpa or scalapack_gvx.
7+
# you can also choose cusolvermp or elpa if compiled.
98

109
#nbands 8
1110
symmetry 1
@@ -26,7 +25,7 @@ smearing_sigma 0.002
2625

2726
#Parameters (5.Mixing)
2827
mixing_type broyden
29-
mixing_beta 0.3
28+
mixing_beta 0.4
3029

3130

3231
### [1] Energy cutoff determines the quality of numerical quadratures in your calculations.

examples/36_gpu/si16_lcao/KPT

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
K_POINTS
22
0
33
Gamma
4-
1 1 1 0 0 0
5-
###This file will be overwritten by Abacus because either kspacing is used or gamma_only is set to 1
4+
5 5 5 0 0 0
5+
### If you are running an energy calculation, please make sure your final energy is
6+
### converged with respect to the k-point settings, unless you set a loose k-point
7+
### mesh on purpose.

examples/36_gpu/si16_pw/INPUT

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ smearing_sigma 0.002
2121

2222
#Parameters (5.Mixing)
2323
mixing_type broyden
24-
mixing_beta 0.3
24+
mixing_beta 0.4
2525

2626

2727
### [1] Energy cutoff determines the quality of numerical quadratures in your calculations.

0 commit comments

Comments
 (0)