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: Correct PW KPAR/BNDPAR occupations and distributed output (deepmodeling#7845)
* Fix: Correct PW KPAR/BNDPAR occupations and distributed output
* Resolve CI/CD failure
* Add integration tests for BPCG and SDFT with bndpar and kpar
* Rename 01_PW/087 and 01_PW/089
* Avoid competing write of cube files under bndpar
* Rename test names in CASES_*.txt
* Fix get_pchg_pw and get_wf_pw under bndpar
* Resolver CI failure on 01_PW/211_PW_BPCG_KB_OCP_CHG
* Fix elecstate_tools.cpp according to Copilot auto review
* Fix Agent Governance check
* Reduce the ref file 01_PW/087_PW_get_pchg_kpar_bndpar/pchgi4s1.cube.ref
Copy file name to clipboardExpand all lines: docs/advanced/input_files/input-main.md
+13-4Lines changed: 13 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -673,13 +673,22 @@
673
673
### kpar
674
674
675
675
-**Type**: Integer
676
-
-**Description**: Divide all processors into kpar groups, and k points will be distributed among each group. The value taken should be less than or equal to the number of k points as well as the number of MPI processes.
676
+
-**Description**: Controls k-point parallelism. The value must be positive and should not exceed either the number of k-points or the number of MPI processes.
677
+
- For PW calculations, divide all MPI processes into persistent k-point pools. Each pool stores and processes a subset of the k-points.
678
+
- For LCAO calculations with lapack, genelpa, elpa, or scalapack_gvx, divide the diagonalization work into temporary k-point pools. After diagonalization, the eigenvalues and distributed wavefunctions are restored for all k-points before occupations, density matrices, and output are evaluated.
679
+
- Multi-process LCAO cusolver uses its own active-GPU distribution and does not use this value to define its k-point layout. Other LCAO eigensolvers do not use the temporary k-point-pool implementation.
677
680
-**Default**: 1
678
681
679
682
### bndpar
680
683
681
684
-**Type**: Integer
682
-
-**Description**: Divide all processors into bndpar groups for SDFT or the BPCG solver. bndpar must be positive, no greater than the number of MPI processes, and kpar * bndpar must divide the number of MPI processes exactly.
685
+
-**Availability**: *([`basis_type`](#basis_type)==pw and [`esolver_type`](#esolver_type)==sdft) or ([`basis_type`](#basis_type)==pw and [`esolver_type`](#esolver_type)==ksdft and [`ks_solver`](#ks_solver)==bpcg)*
686
+
-**Description**: Controls band-group parallelism for PW SDFT and PW KSDFT calculations using the BPCG eigensolver.
687
+
- Within each k-point pool, divide the MPI processes into bndpar band groups. Each group contains NPROC / (kpar * bndpar) processes when bndpar is greater than 1.
688
+
- With BPCG, distribute contiguous ranges of global Kohn-Sham bands among the band groups. nbands does not need to be divisible by bndpar, but bndpar cannot exceed a positive nbands. Groups with lower indices receive one additional band when necessary.
689
+
- In SDFT, distribute stochastic orbitals among the band groups. When the deterministic Kohn-Sham eigensolver is not BPCG, band group 0 calculates the deterministic orbitals and broadcasts them to the other groups.
690
+
- bndpar must be positive and no greater than the number of MPI processes. When bndpar is greater than 1, kpar * bndpar must divide the number of MPI processes exactly.
691
+
> Note: For PW calculations on GPU, if the input kpar * bndpar differs from the number of MPI processes, ABACUS automatically sets the effective kpar to NPROC / bndpar.
683
692
-**Default**: 1
684
693
685
694
### latname
@@ -4514,9 +4523,9 @@
4514
4523
### ocp_set
4515
4524
4516
4525
-**Type**: String
4517
-
-**Description**: Fixed occupation weights used when ocp is true. Values are assigned band by band for each k-point, following k-point order. In LCAO RT-TDDFT, the initial ground-state SCF uses its normally determined occupations, and this array is applied only during subsequent real-time propagation steps. The repetition syntax N*x expands to N copies of x.
4526
+
-**Description**: Fixed occupation weights used when ocp is true. Values are assigned in band order for each k-point, following k-point order. In LCAO RT-TDDFT, the initial ground-state SCF uses its normally determined occupations, and this array is applied only during subsequent real-time propagation steps. The repetition syntax N*x expands to N copies of x.
4518
4527
- Example: 1 10*1 0 1 expands to 13 values, with the 12th value equal to 0 and all other values equal to 1.
4519
-
- After expansion, the array length must equal nks * nbands.
4528
+
- After expansion, provide one block of nbands values for each k-point. If nspin is 2, provide all k-point blocks for spin up followed by all k-point blocks for spin down; otherwise, provide one block per k-point.
4520
4529
- The sum of all weights must equal nelec; otherwise the calculation terminates with an error.
Copy file name to clipboardExpand all lines: docs/parameters.yaml
+13-5Lines changed: 13 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -100,18 +100,26 @@ parameters:
100
100
category: System variables
101
101
type: Integer
102
102
description: |
103
-
Divide all processors into kpar groups, and k points will be distributed among each group. The value taken should be less than or equal to the number of k points as well as the number of MPI processes.
103
+
Controls k-point parallelism. The value must be positive and should not exceed either the number of k-points or the number of MPI processes.
104
+
* For PW calculations, divide all MPI processes into persistent k-point pools. Each pool stores and processes a subset of the k-points.
105
+
* For LCAO calculations with lapack, genelpa, elpa, or scalapack_gvx, divide the diagonalization work into temporary k-point pools. After diagonalization, the eigenvalues and distributed wavefunctions are restored for all k-points before occupations, density matrices, and output are evaluated.
106
+
* Multi-process LCAO cusolver uses its own active-GPU distribution and does not use this value to define its k-point layout. Other LCAO eigensolvers do not use the temporary k-point-pool implementation.
104
107
default_value: "1"
105
108
unit: ""
106
109
availability: ""
107
110
- name: bndpar
108
111
category: System variables
109
112
type: Integer
110
113
description: |
111
-
Divide all processors into bndpar groups for SDFT or the BPCG solver. bndpar must be positive, no greater than the number of MPI processes, and kpar * bndpar must divide the number of MPI processes exactly.
114
+
Controls band-group parallelism for PW SDFT and PW KSDFT calculations using the BPCG eigensolver.
115
+
* Within each k-point pool, divide the MPI processes into bndpar band groups. Each group contains NPROC / (kpar * bndpar) processes when bndpar is greater than 1.
116
+
* With BPCG, distribute contiguous ranges of global Kohn-Sham bands among the band groups. nbands does not need to be divisible by bndpar, but bndpar cannot exceed a positive nbands. Groups with lower indices receive one additional band when necessary.
117
+
* In SDFT, distribute stochastic orbitals among the band groups. When the deterministic Kohn-Sham eigensolver is not BPCG, band group 0 calculates the deterministic orbitals and broadcasts them to the other groups.
118
+
* bndpar must be positive and no greater than the number of MPI processes. When bndpar is greater than 1, kpar * bndpar must divide the number of MPI processes exactly.
119
+
[NOTE] For PW calculations on GPU, if the input kpar * bndpar differs from the number of MPI processes, ABACUS automatically sets the effective kpar to NPROC / bndpar.
112
120
default_value: "1"
113
121
unit: ""
114
-
availability: ""
122
+
availability: (basis_type==pw and esolver_type==sdft) or (basis_type==pw and esolver_type==ksdft and ks_solver==bpcg)
115
123
- name: latname
116
124
category: System variables
117
125
type: String
@@ -2744,9 +2752,9 @@ parameters:
2744
2752
category: "RT-TDDFT: Real-Time Time-Dependent Density Functional Theory"
2745
2753
type: String
2746
2754
description: |
2747
-
Fixed occupation weights used when ocp is true. Values are assigned band by band for each k-point, following k-point order. In LCAO RT-TDDFT, the initial ground-state SCF uses its normally determined occupations, and this array is applied only during subsequent real-time propagation steps. The repetition syntax N*x expands to N copies of x.
2755
+
Fixed occupation weights used when ocp is true. Values are assigned in band order for each k-point, following k-point order. In LCAO RT-TDDFT, the initial ground-state SCF uses its normally determined occupations, and this array is applied only during subsequent real-time propagation steps. The repetition syntax N*x expands to N copies of x.
2748
2756
* Example: 1 10*1 0 1 expands to 13 values, with the 12th value equal to 0 and all other values equal to 1.
2749
-
* After expansion, the array length must equal nks * nbands.
2757
+
* After expansion, provide one block of nbands values for each k-point. If nspin is 2, provide all k-point blocks for spin up followed by all k-point blocks for spin down; otherwise, provide one block per k-point.
2750
2758
* The sum of all weights must equal nelec; otherwise the calculation terminates with an error.
0 commit comments