Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions source/module_hsolver/diagh.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,6 @@
#include "mpi.h"
#endif

// template <typename T>
// struct const_nums
// {
// const_nums();
// T zero;
// T one;
// T neg_one;
// };

namespace hsolver
{

Expand Down
3 changes: 1 addition & 2 deletions source/module_hsolver/diago_bpcg.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#ifndef DIAGO_BPCG_H_
#define DIAGO_BPCG_H_

#include "diagh.h"
#include "module_base/complexmatrix.h"
#include "module_hamilt_general/hamilt.h"
#include "module_hamilt_pw/hamilt_pwdft/structure_factor.h"

#include "module_base/module_device/types.h"
Expand Down
2 changes: 2 additions & 0 deletions source/module_hsolver/diago_cg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
#include <module_base/memory.h>
#include <module_base/parallel_reduce.h>
#include <module_base/timer.h>
#include <module_base/tool_title.h> // ModuleBase::TITLE
#include <module_base/global_function.h> // ModuleBase::GlobalFunc::NOTE
#include <module_hsolver/diago_cg.h>

using namespace hsolver;
Expand Down
1 change: 0 additions & 1 deletion source/module_hsolver/diago_cg.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include <functional>

#include <module_base/macros.h>
#include <module_hsolver/diagh.h>
#include <module_hsolver/kernels/math_kernel_op.h>

#include <ATen/core/tensor.h>
Expand Down
3 changes: 2 additions & 1 deletion source/module_hsolver/diago_cusolver.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#ifndef DIAGOCUSOLVER_H
#define DIAGOCUSOLVER_H

#include "diagh.h"
#include "module_base/macros.h" // GetRealType
#include "module_hamilt_general/hamilt.h"
#include "module_basis/module_ao/parallel_orbitals.h"
#include "module_hsolver/kernels/cuda/diag_cusolver.cuh"
// #include "module_hsolver/kernels/cuda/dngvd_op.cu"
Expand Down
2 changes: 1 addition & 1 deletion source/module_hsolver/diago_cusolvermp.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define DIAGO_CUSOLVERMPH

#ifdef __CUSOLVERMP
#include "diagh.h"
#include "module_hamilt_general/hamilt.h"
#include "module_base/macros.h"
#include "module_basis/module_ao/parallel_orbitals.h"
#include "module_hsolver/kernels/cuda/diag_cusolvermp.cuh"
Expand Down
6 changes: 5 additions & 1 deletion source/module_hsolver/diago_dav_subspace.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
#ifndef DIAGO_NEW_DAV_H
#define DIAGO_NEW_DAV_H

#include "diagh.h"
#include "module_base/macros.h" // GetRealType
#include "module_base/module_device/device.h" // base_device
#include "module_base/module_device/memory_op.h"// base_device::memory"

#include "module_hsolver/diag_comm_info.h"
#include "module_hsolver/diag_const_nums.h"

#include <vector>
#include <functional>

namespace hsolver
Expand Down
3 changes: 2 additions & 1 deletion source/module_hsolver/diago_david.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "diago_david.h"

#include "module_base/timer.h"
#include "module_base/timer.h" // ModuleBase::timer::tick
#include "module_base/tool_title.h" // ModuleBase::TITLE
#include "module_base/module_device/device.h"

#include "module_hsolver/kernels/dngvd_op.h"
Expand Down
10 changes: 8 additions & 2 deletions source/module_hsolver/diago_david.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
#ifndef DIAGODAVID_H
#define DIAGODAVID_H

#include "diagh.h"
#include "module_base/macros.h" // GetRealType
#include "module_base/module_device/device.h" // base_device
#include "module_base/module_device/memory_op.h"// base_device::memory

#include "module_hsolver/diag_comm_info.h"

#include <vector>
#include <functional>

namespace hsolver
{

Expand Down Expand Up @@ -199,7 +205,7 @@ class DiagoDavid
using syncmem_h2d_op = base_device::memory::synchronize_memory_op<T, Device, base_device::DEVICE_CPU>;
using syncmem_d2h_op = base_device::memory::synchronize_memory_op<T, base_device::DEVICE_CPU, Device>;

using hpsi_info = typename hamilt::Operator<T, Device>::hpsi_info;
// using hpsi_info = typename hamilt::Operator<T, Device>::hpsi_info; // Dependence of hpsi removed

const T *one = nullptr, *zero = nullptr, *neg_one = nullptr;
const T one_ = static_cast<T>(1.0), zero_ = static_cast<T>(0.0), neg_one_ = static_cast<T>(-1.0);
Expand Down
3 changes: 2 additions & 1 deletion source/module_hsolver/diago_elpa.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#ifndef DIAGOELPA_H
#define DIAGOELPA_H

#include "diagh.h"
#include "module_base/macros.h" // GetRealType
#include "module_hamilt_general/hamilt.h"
#include "module_basis/module_ao/parallel_orbitals.h"

namespace hsolver
Expand Down
3 changes: 2 additions & 1 deletion source/module_hsolver/diago_elpa_native.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#ifndef DIAGOELPANATIVE_H
#define DIAGOELPANATIVE_H

#include "diagh.h"
#include "module_base/macros.h" // GetRealType
#include "module_hamilt_general/hamilt.h"
#include "module_basis/module_ao/parallel_orbitals.h"

namespace hsolver
Expand Down
4 changes: 2 additions & 2 deletions source/module_hsolver/diago_lapack.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
#ifndef DIAGOLAPACK_H
#define DIAGOLAPACK_H

#include "diagh.h"
#include "module_base/complexmatrix.h"
#include "module_base/macros.h" // GetRealType
#include "module_hamilt_general/hamilt.h"
#include "module_base/matrix.h"
#include "module_basis/module_ao/parallel_orbitals.h"

Expand Down
3 changes: 2 additions & 1 deletion source/module_hsolver/diago_pexsi.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

#include <vector>
#include <memory>
#include "diagh.h"
#include "module_base/macros.h" // GetRealType
#include "module_hamilt_general/hamilt.h"
#include "module_base/global_variable.h"
#include "module_basis/module_ao/parallel_orbitals.h"
#include "module_pexsi/pexsi_solver.h"
Expand Down
4 changes: 3 additions & 1 deletion source/module_hsolver/diago_scalapack.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
#include <utility>
#include <vector>

#include "diagh.h"
#include "module_base/macros.h" // GetRealType
#include "module_hamilt_general/hamilt.h"
#include "module_psi/psi.h"
#include "module_base/complexmatrix.h"
#include "module_base/matrix.h"
#include "module_basis/module_ao/parallel_orbitals.h"
Expand Down
1 change: 0 additions & 1 deletion source/module_hsolver/hsolver.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#ifndef HSOLVER_H
#define HSOLVER_H

#include "diagh.h"
#include "module_base/macros.h"
#include "module_elecstate/elecstate.h"
#include "module_hamilt_general/hamilt.h"
Expand Down
1 change: 0 additions & 1 deletion source/module_hsolver/hsolver_lcaopw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include "module_hamilt_pw/hamilt_pwdft/global.h"
#include "module_hamilt_pw/hamilt_pwdft/hamilt_pw.h"
#include "module_hamilt_pw/hamilt_pwdft/wavefunc.h"
#include "module_hsolver/diagh.h"
#include "module_hsolver/diago_iter_assist.h"
#include "module_parameter/parameter.h"

Expand Down
1 change: 0 additions & 1 deletion source/module_hsolver/test/diago_lapack_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ class DiagoLapackPrepare
std::vector<T> h;
std::vector<T> s;
HamiltTEST<T> hmtest;
// hsolver::DiagH<T>* dh = nullptr;
psi::Psi<T> psi;
std::vector<double> e_solver;
std::vector<double> e_lapack;
Expand Down
1 change: 0 additions & 1 deletion source/module_hsolver/test/diago_lcao_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ class DiagoPrepare
std::vector<T> s;
std::vector<T> h_local;
std::vector<T> s_local;
// hsolver::DiagH<T>* dh = 0;
psi::Psi<T> psi;
std::vector<double> e_solver;
std::vector<double> e_lapack;
Expand Down
Loading