Commit fa35f83
Migrate exx_info (#6896)
* Refactor: Encapsulate timer functionality in timer_wrapper.h
* Refactor timer code and clean_esolver function
1. Remove #ifdef __MPI from timer code, encapsulate in timer_wrapper.h
2. Move ESolver clean logic to after_all_runners method
3. Replace clean_esolver calls with direct delete p_esolver
4. Remove #ifdef __MPI from delete p_esolver
5. Add Cblacs_exit(1) in after_all_runners for LCAO calculations
* Refactor: Move heterogeneous parallel code to source_base/module_device
* Refactor heterogeneous parallel code and migrate exx_info to module_xc
1. Refactor global.h:
- Removed heterogeneous parallel code (CUDA/ROCm error checking macros)
- Added include for source_base/module_device/device_check.h
- Removed GlobalC::exx_info declaration
2. Migrate exx_info:
- Added GlobalC::exx_info declaration to exx_info.h
- Created exx_info.cpp with GlobalC::exx_info definition
- Removed exx_info definition from global.cpp
- Removed duplicate exx_info definition from exx_helper.cpp
3. Update build system:
- Added exx_info.cpp to xc_ library in CMakeLists.txt
- Added exx_info.o to OBJS_XC in Makefile.Objects
- Fixed formatting in Makefile.Objects
4. Ensure compatibility:
- Verify pure PW compilation works with exx_info.cpp
- Verify GPU compilation works with refactored code
This refactoring improves code modularity by separating heterogeneous parallel functionality from global variables and moving EXX-related global variables to their own module.
---------
Co-authored-by: abacus_fixer <mohanchen@pku.eud.cn>1 parent 0c8b6dc commit fa35f83
7 files changed
Lines changed: 19 additions & 16 deletions
File tree
- source
- source_hamilt/module_xc
- source_pw/module_pwdft
- module_exx_helper
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
510 | 510 | | |
511 | 511 | | |
512 | 512 | | |
| 513 | + | |
513 | 514 | | |
514 | 515 | | |
515 | 516 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
98 | 106 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | 7 | | |
11 | 8 | | |
12 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | 21 | | |
28 | 22 | | |
29 | 23 | | |
| |||
Lines changed: 0 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
0 commit comments