Skip to content

Commit 686ff72

Browse files
Merge branch 'develop' into dm_construct
2 parents a8c1164 + 0f0c838 commit 686ff72

File tree

12 files changed

+21
-45
lines changed

12 files changed

+21
-45
lines changed

.github/workflows/coverage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515
uses: actions/checkout@v4
1616
- name: Install Requirements for Coverage Testing
1717
run: |
18-
apt update && apt install -y lcov
18+
apt update && apt install -y lcov gpg
1919
- name: Building
2020
run: |
21-
cmake -B build -DBUILD_TESTING=ON -DENABLE_DEEPKS=ON -DENABLE_LIBXC=ON -DENABLE_LIBRI=ON -DENABLE_PAW=ON -DENABLE_GOOGLEBENCH=ON -DENABLE_RAPIDJSON=ON
21+
cmake -B build -DENABLE_COVERAGE=ON -DBUILD_TESTING=ON -DENABLE_DEEPKS=ON -DENABLE_LIBXC=ON -DENABLE_LIBRI=ON -DENABLE_PAW=ON -DENABLE_GOOGLEBENCH=ON -DENABLE_RAPIDJSON=ON
2222
cmake --build build -j`nproc`
2323
cmake --install build
2424
- name: Testing

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
--from-ref ${{ github.event.pull_request.base.sha }}
4040
--to-ref ${{ github.event.pull_request.head.sha }}
4141
continue-on-error: true
42-
- uses: pre-commit-ci/lite-action@v1.0.3
42+
- uses: pre-commit-ci/lite-action@v1.1.0
4343

4444
- name: Build
4545
run: |

source/module_hsolver/diago_bpcg.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ namespace hsolver {
2424
* @tparam Device The device used for calculations (e.g., cpu or gpu).
2525
*/
2626
template <typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
27-
class DiagoBPCG : public DiagH<T, Device>
27+
class DiagoBPCG
2828
{
2929
private:
3030
// Note GetTypeReal<T>::type will
@@ -56,15 +56,15 @@ class DiagoBPCG : public DiagH<T, Device>
5656
void init_iter(const psi::Psi<T, Device> &psi_in);
5757

5858
/**
59-
* @brief Diagonalize the Hamiltonian using the CG method.
59+
* @brief Diagonalize the Hamiltonian using the BPCG method.
6060
*
61-
* This function is an override function for the CG method. It is called by the HsolverPW::solve() function.
61+
* This function is called by the HsolverPW::solve() function.
6262
*
6363
* @param phm_in A pointer to the hamilt::Hamilt object representing the Hamiltonian operator.
6464
* @param psi The input wavefunction psi matrix with [dim: n_basis x n_band, column major].
6565
* @param eigenvalue_in Pointer to the eigen array with [dim: n_band, column major].
6666
*/
67-
void diag(hamilt::Hamilt<T, Device> *phm_in, psi::Psi<T, Device> &psi, Real *eigenvalue_in) override;
67+
void diag(hamilt::Hamilt<T, Device> *phm_in, psi::Psi<T, Device> &psi, Real *eigenvalue_in);
6868

6969

7070
private:

source/module_hsolver/diago_cg.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
namespace hsolver {
1414

1515
template <typename T, typename Device = base_device::DEVICE_CPU>
16-
class DiagoCG final : public DiagH<T, Device>
16+
class DiagoCG final
1717
{
1818
// private: accessibility within class is private by default
1919
// Note GetTypeReal<T>::type will
@@ -36,11 +36,11 @@ class DiagoCG final : public DiagH<T, Device>
3636
const int& pw_diag_nmax,
3737
const int& nproc_in_pool);
3838

39-
~DiagoCG() override;
39+
~DiagoCG();
4040

4141
// virtual void init(){};
4242
// refactor hpsi_info
43-
// this is the override function diag() for CG method
43+
// this is the diag() function for CG method
4444
void diag(const Func& hpsi_func, const Func& spsi_func, ct::Tensor& psi, ct::Tensor& eigen, const ct::Tensor& prec = {});
4545

4646
private:

source/module_hsolver/diago_dav_subspace.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace hsolver
1111
{
1212

1313
template <typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
14-
class Diago_DavSubspace : public DiagH<T, Device>
14+
class Diago_DavSubspace
1515
{
1616
private:
1717
// Note GetTypeReal<T>::type will
@@ -29,7 +29,7 @@ class Diago_DavSubspace : public DiagH<T, Device>
2929
const bool& need_subspace_in,
3030
const diag_comm_info& diag_comm_in);
3131

32-
virtual ~Diago_DavSubspace() override;
32+
~Diago_DavSubspace();
3333

3434
// See diago_david.h for information on the HPsiFunc function type
3535
using HPsiFunc = std::function<void(T*, T*, const int, const int)>;

source/module_hsolver/diago_david.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace hsolver
88
{
99

1010
template <typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
11-
class DiagoDavid : public DiagH<T, Device>
11+
class DiagoDavid
1212
{
1313
private:
1414
// Note GetTypeReal<T>::type will
@@ -25,7 +25,7 @@ class DiagoDavid : public DiagH<T, Device>
2525
const bool use_paw_in,
2626
const diag_comm_info& diag_comm_in);
2727

28-
virtual ~DiagoDavid() override;
28+
~DiagoDavid();
2929

3030

3131
// declare type of matrix-blockvector functions.

source/module_hsolver/hsolver_pw.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ void HSolverPW<T, Device>::solve(hamilt::Hamilt<T, Device>* pHamilt,
228228
const std::initializer_list<std::string> _methods = {"cg", "dav", "dav_subspace", "bpcg"};
229229
if (std::find(std::begin(_methods), std::end(_methods), this->method) == std::end(_methods))
230230
{
231-
ModuleBase::WARNING_QUIT("HSolverPW::solve", "This method of DiagH is not supported!");
231+
ModuleBase::WARNING_QUIT("HSolverPW::solve", "This type of eigensolver is not supported!");
232232
}
233233

234234
// prepare for the precondition of diagonalization

source/module_hsolver/test/test_hsolver.cpp

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -83,28 +83,4 @@ class TestHSolver : public ::testing::Test
8383

8484
// double test_diagethr_d = hs_d.set_diagethr(0.0, 0, 0, 0.0);
8585
// EXPECT_EQ(test_diagethr_d, 0.0);
86-
// }
87-
namespace hsolver
88-
{
89-
template <typename T, typename Device = base_device::DEVICE_CPU>
90-
class DiagH_mock : public DiagH<T, Device>
91-
{
92-
private:
93-
using Real = typename GetTypeReal<T>::type;
94-
95-
public:
96-
DiagH_mock()
97-
{
98-
}
99-
~DiagH_mock()
100-
{
101-
}
102-
103-
void diag(hamilt::Hamilt<T, Device>* phm_in, psi::Psi<T, Device>& psi, Real* eigenvalue_in)
104-
{
105-
return;
106-
}
107-
};
108-
template class DiagH_mock<std::complex<float>>;
109-
template class DiagH_mock<std::complex<double>>;
110-
}
86+
// }

toolchain/build_abacus_gnu.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ BUILD_DIR=build_abacus_gnu
2222
rm -rf $BUILD_DIR
2323

2424
PREFIX=$ABACUS_DIR
25-
LAPACK=$INSTALL_DIR/openblas-0.3.27/lib
25+
LAPACK=$INSTALL_DIR/openblas-0.3.28/lib
2626
SCALAPACK=$INSTALL_DIR/scalapack-2.2.1/lib
27-
ELPA=$INSTALL_DIR/elpa-2024.03.001/cpu
27+
ELPA=$INSTALL_DIR/elpa-2024.05.001/cpu
2828
FFTW3=$INSTALL_DIR/fftw-3.3.10
2929
CEREAL=$INSTALL_DIR/cereal-1.3.2/include/cereal
3030
LIBXC=$INSTALL_DIR/libxc-6.2.2

toolchain/build_abacus_intel-mpich.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ BUILD_DIR=build_abacus_intel-mpich
2323
rm -rf $BUILD_DIR
2424

2525
PREFIX=$ABACUS_DIR
26-
ELPA=$INSTALL_DIR/elpa-2024.03.001/cpu
26+
ELPA=$INSTALL_DIR/elpa-2024.05.001/cpu
2727
CEREAL=$INSTALL_DIR/cereal-1.3.2/include/cereal
2828
LIBXC=$INSTALL_DIR/libxc-6.2.2
2929
RAPIDJSON=$INSTALL_DIR/rapidjson-1.1.0/

0 commit comments

Comments
 (0)