Skip to content

Commit 6793a34

Browse files
mohanchenabacus_fixer
andauthored
move source_base/memory.h to source_base/memory_recorder.h (#7348)
* move memory.h to record_memory.h * fix * fix * refactor: rename record_memory to memory_recorder This commit renames the memory recording module from record_memory to memory_recorder. **File Renames:** - source/source_base/record_memory.h → memory_recorder.h - source/source_base/record_memory.cpp → memory_recorder.cpp **Header File Updates (35 files):** Updated all #include references from "source_base/record_memory.h" to "source_base/memory_recorder.h" in: - source_pw: sto_wf.cpp, sto_elecond.cpp, vnl_pw.cpp, structure_factor.cpp - source_lcao: biggrid_info.cpp, gint_info.cpp, dftu.cpp, hcontainer.cpp, dspin_lcao.cpp, hamilt_lcao.cpp, FORCE_gamma.cpp, FORCE_k.cpp, edm.cpp, klist_1.cpp - source_hsolver: hsolver_lcao.cpp, parallel_k2d.cpp, diago_cg.cpp - source_io: cal_test.cpp, write_wfc_nao.cpp - source_estate: density_matrix.cpp, density_matrix_io.cpp, potential_new.cpp, charge.cpp - source_esolver: esolver_sdft_pw.cpp, esolver_of_tool.cpp - source_basis: pw_basis_k.cpp, two_center_bundle.cpp, ORB_gaunt_table.cpp - source_base: memory_recorder.cpp, memory_test.cpp, sph_bessel_recursive-d2.cpp, memory_op.cpp, memory_op.cu - source_psi: psi_prepare.cpp - source_main: driver.cpp **CMakeLists.txt Updates (11 files):** Updated all source file references from record_memory.cpp to memory_recorder.cpp in: - source_relax/test/CMakeLists.txt - source_pw/module_pwdft/test/CMakeLists.txt - source_md/test/CMakeLists.txt - source_io/test/CMakeLists.txt - source_hamilt/module_xc/test/CMakeLists.txt - source_cell/test/CMakeLists.txt - source_basis/module_pw/kernels/test/CMakeLists.txt - source_basis/module_pw/test/CMakeLists.txt - source_basis/module_ao/test/CMakeLists.txt - source_base/test/CMakeLists.txt - source_base/test_parallel/CMakeLists.txt - source_base/CMakeLists.txt **Makefile Updates (1 file):** - source_lcao/module_deepks/test/Makefile.Objects: Updated record_memory.o to memory_recorder.o This change improves the naming consistency and clarity of the memory recording module. --------- Co-authored-by: abacus_fixer <mohanchen@pku.eud.cn>
1 parent 24bba35 commit 6793a34

69 files changed

Lines changed: 73 additions & 98 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

source/source_base/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ add_library(
3636
mathzone_add1.cpp
3737
matrix.cpp
3838
matrix3.cpp
39-
memory.cpp
39+
memory_recorder.cpp
4040
mymath.cpp
4141
opt_CG.cpp
4242
opt_DCsrch.cpp
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
//==========================================================
2-
// AUTHOR : mohan
3-
// DATE : 2008-11-18
4-
//==========================================================
51
#include <cassert>
6-
#include "memory.h"
2+
#include "memory_recorder.h"
73
#include "global_variable.h"
84
#include "source_base/parallel_reduce.h"
95

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef MEMORY_H
2-
#define MEMORY_H
1+
#ifndef RECORD_MEMORY_H
2+
#define RECORD_MEMORY_H
33

44
#include <fstream>
55
#include <string>

source/source_base/module_device/cuda/memory_op.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include "source_base/module_device/memory_op.h"
2-
#include "source_base/memory.h"
2+
#include "source_base/memory_recorder.h"
33

44
#include <base/macros/macros.h>
55
#include <cuda_runtime.h>

source/source_base/module_device/memory_op.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include "memory_op.h"
22

3-
#include "source_base/memory.h"
3+
#include "source_base/memory_recorder.h"
44
#include "source_base/tool_threading.h"
55
#ifdef __DSP
66
#include "source_base/kernels/dsp/dsp_connector.h"

source/source_base/module_mixing/broyden_mixing.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#include "broyden_mixing.h"
22

33
#include "source_base/module_external/lapack_connector.h"
4-
#include "source_base/memory.h"
54
#include "source_base/module_container/base/third_party/blas.h"
65
#include "source_base/timer.h"
76
#include "source_base/tool_title.h"

source/source_base/module_mixing/plain_mixing.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#include "plain_mixing.h"
22

3-
#include "source_base/memory.h"
43
#include "source_base/timer.h"
54
#include "source_base/tool_title.h"
65
namespace Base_Mixing

source/source_base/module_mixing/pulay_mixing.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#include "pulay_mixing.h"
22

33
#include "source_base/module_external/lapack_connector.h"
4-
#include "source_base/memory.h"
54
#include "source_base/timer.h"
65
#include "source_base/tool_title.h"
76
namespace Base_Mixing

source/source_base/sph_bessel_recursive-d2.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
#include "sph_bessel_recursive.h"
77
#include "constants.h"
8-
#include "source_base/memory.h"
8+
#include "source_base/memory_recorder.h"
99

1010
#include<cmath>
1111
#include<stdexcept>

source/source_base/test/CMakeLists.txt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,21 @@ AddTest(
1818
AddTest(
1919
TARGET MODULE_BASE_tool_quit
2020
LIBS parameter
21-
SOURCES tool_quit_test.cpp ../tool_quit.cpp ../global_variable.cpp ../global_file.cpp ../global_function.cpp ../memory.cpp ../timer.cpp
21+
SOURCES tool_quit_test.cpp ../tool_quit.cpp ../global_variable.cpp ../global_file.cpp ../global_function.cpp ../memory_recorder.cpp ../timer.cpp
2222
)
2323
AddTest(
2424
TARGET MODULE_BASE_tool_check
2525
LIBS parameter
26-
SOURCES tool_check_test.cpp ../tool_check.cpp ../tool_quit.cpp ../global_variable.cpp ../global_file.cpp ../global_function.cpp ../memory.cpp ../timer.cpp
26+
SOURCES tool_check_test.cpp ../tool_check.cpp ../tool_quit.cpp ../global_variable.cpp ../global_file.cpp ../global_function.cpp ../memory_recorder.cpp ../timer.cpp
2727
)
2828
AddTest(
2929
TARGET MODULE_BASE_memory
30-
SOURCES memory_test.cpp ../memory.cpp ../parallel_reduce.cpp
30+
SOURCES memory_test.cpp ../memory_recorder.cpp ../parallel_reduce.cpp
3131
)
3232
ADDTest(
3333
TARGET MODULE_BASE_global_function
3434
LIBS parameter ${math_libs}
35-
SOURCES global_function_test.cpp ../global_function.cpp ../tool_quit.cpp ../global_variable.cpp ../global_file.cpp ../memory.cpp ../timer.cpp
35+
SOURCES global_function_test.cpp ../global_function.cpp ../tool_quit.cpp ../global_variable.cpp ../global_file.cpp ../memory_recorder.cpp ../timer.cpp
3636
)
3737
AddTest(
3838
TARGET MODULE_BASE_vector3
@@ -62,7 +62,7 @@ AddTest(
6262
AddTest(
6363
TARGET MODULE_BASE_complexarray
6464
LIBS parameter
65-
SOURCES complexarray_test.cpp ../complexarray.cpp ../tool_quit.cpp ../global_variable.cpp ../global_file.cpp ../global_function.cpp ../memory.cpp ../timer.cpp
65+
SOURCES complexarray_test.cpp ../complexarray.cpp ../tool_quit.cpp ../global_variable.cpp ../global_file.cpp ../global_function.cpp ../memory_recorder.cpp ../timer.cpp
6666
)
6767
AddTest(
6868
TARGET MODULE_BASE_complexmatrix
@@ -77,7 +77,7 @@ AddTest(
7777
AddTest(
7878
TARGET MODULE_BASE_sph_bessel_recursive
7979
LIBS parameter
80-
SOURCES sph_bessel_recursive_test.cpp ../sph_bessel_recursive-d1.cpp ../sph_bessel_recursive-d2.cpp ../memory.cpp ../global_variable.cpp
80+
SOURCES sph_bessel_recursive_test.cpp ../sph_bessel_recursive-d1.cpp ../sph_bessel_recursive-d2.cpp ../memory_recorder.cpp ../global_variable.cpp
8181
)
8282
AddTest(
8383
TARGET MODULE_BASE_ylmreal
@@ -157,19 +157,19 @@ AddTest(
157157
AddTest(
158158
TARGET MODULE_BASE_ylm
159159
LIBS parameter
160-
SOURCES ylm_test.cpp ../ylm.cpp ../timer.cpp ../tool_quit.cpp ../global_variable.cpp ../global_file.cpp ../global_function.cpp ../memory.cpp
160+
SOURCES ylm_test.cpp ../ylm.cpp ../timer.cpp ../tool_quit.cpp ../global_variable.cpp ../global_file.cpp ../global_function.cpp ../memory_recorder.cpp
161161
)
162162

163163
AddTest(
164164
TARGET MODULE_BASE_global_file
165165
LIBS parameter
166-
SOURCES global_file_test.cpp ../global_file.cpp ../global_function.cpp ../tool_quit.cpp ../global_variable.cpp ../memory.cpp ../timer.cpp
166+
SOURCES global_file_test.cpp ../global_file.cpp ../global_function.cpp ../tool_quit.cpp ../global_variable.cpp ../memory_recorder.cpp ../timer.cpp
167167
)
168168

169169
AddTest(
170170
TARGET MODULE_BASE_tool_title
171171
LIBS parameter
172-
SOURCES tool_title_test.cpp ../tool_title.cpp ../global_variable.cpp ../global_function.cpp ../timer.cpp ../tool_quit.cpp ../global_file.cpp ../memory.cpp
172+
SOURCES tool_title_test.cpp ../tool_title.cpp ../global_variable.cpp ../global_function.cpp ../timer.cpp ../tool_quit.cpp ../global_file.cpp ../memory_recorder.cpp
173173
)
174174

175175
AddTest(

0 commit comments

Comments
 (0)