Skip to content

Commit 16bb546

Browse files
Merge branch 'develop' into prbranch
2 parents fc7a7a3 + 890fe37 commit 16bb546

File tree

109 files changed

+4551
-2968
lines changed

Some content is hidden

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

109 files changed

+4551
-2968
lines changed

.github/workflows/coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
env:
2626
OMP_NUM_THREADS: 1
2727
run: |
28-
cmake --build build --target test ARGS="-V --timeout 21600"
28+
cmake --build build --target test ARGS="-V --timeout 21600" || exit 0
2929
- name: Upload Coverage to Codecov
3030
uses: codecov/codecov-action@v4
3131
if: ${{ ! cancelled() }}

docs/advanced/input_files/input-main.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1176,7 +1176,7 @@ Note: In new angle mixing, you should set `mixing_beta_mag >> mixing_beta`. The
11761176

11771177
- **Type**: Integer
11781178
- **Description**: Print out energy for each band for every printe step
1179-
- **Default**: 100
1179+
- **Default**: `scf_nmax`
11801180

11811181
### scf_nmax
11821182

source/Makefile.Objects

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ VPATH=./src_global:\
2727
./module_base/module_mixing:\
2828
./module_md:\
2929
./module_basis/module_pw:\
30+
./module_basis/module_pw/module_fft:\
3031
./module_esolver:\
3132
./module_hsolver:\
3233
./module_hsolver/kernels:\
@@ -168,7 +169,6 @@ OBJS_BASE=abfs-vector3_order.o\
168169
memory_op.o\
169170
device.o\
170171

171-
172172
OBJS_CELL=atom_pseudo.o\
173173
atom_spec.o\
174174
pseudo.o\
@@ -245,10 +245,8 @@ OBJS_ESOLVER=esolver.o\
245245
esolver_of.o\
246246
esolver_of_tool.o\
247247
esolver_of_interface.o\
248-
pw_fun.o\
249248
pw_init_after_vc.o\
250249
pw_init_globalc.o\
251-
pw_nscf.o\
252250
pw_others.o\
253251

254252
OBJS_ESOLVER_LCAO=esolver_ks_lcao.o\
@@ -259,7 +257,6 @@ OBJS_ESOLVER_LCAO=esolver_ks_lcao.o\
259257
set_matrix_grid.o\
260258
lcao_before_scf.o\
261259
lcao_gets.o\
262-
lcao_nscf.o\
263260
lcao_others.o\
264261
lcao_init_after_vc.o\
265262
lcao_fun.o\
@@ -414,6 +411,9 @@ OBJS_PSI_INITIALIZER=psi_initializer.o\
414411
psi_initializer_nao_random.o\
415412

416413
OBJS_PW=fft.o\
414+
fft_bundle.o\
415+
fft_base.o\
416+
fft_cpu.o\
417417
pw_basis.o\
418418
pw_basis_k.o\
419419
pw_basis_sup.o\
@@ -630,6 +630,11 @@ OBJS_SRCPW=H_Ewald_pw.o\
630630
charge_mpi.o\
631631
charge_extra.o\
632632
charge_mixing.o\
633+
charge_mixing_dmr.o\
634+
charge_mixing_residual.o\
635+
charge_mixing_preconditioner.o\
636+
charge_mixing_rho.o\
637+
charge_mixing_uspp.o\
633638
fp_energy.o\
634639
forces.o\
635640
forces_us.o\

source/driver_run.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,14 @@ void Driver::driver_run() {
6262
{
6363
Run_MD::md_line(GlobalC::ucell, p_esolver, PARAM);
6464
}
65-
else if (cal_type == "scf" || cal_type == "relax" || cal_type == "cell-relax")
65+
else if (cal_type == "scf" || cal_type == "relax" || cal_type == "cell-relax" || cal_type == "nscf")
6666
{
6767
Relax_Driver rl_driver;
6868
rl_driver.relax_driver(p_esolver);
6969
}
7070
else
7171
{
7272
//! supported "other" functions:
73-
//! nscf(PW,LCAO),
7473
//! get_pchg(LCAO),
7574
//! test_memory(PW,LCAO),
7675
//! test_neighbour(LCAO),

source/module_base/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ list (APPEND LIBM_SRC
66
libm/sincos.cpp
77
)
88
endif()
9-
109
add_library(
1110
base
1211
OBJECT

source/module_base/blas_connector.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,17 @@ float BlasConnector::dot( const int n, const float *X, const int incX, const flo
6969
{
7070
if (device_type == base_device::AbacusDevice_t::CpuDevice) {
7171
return sdot_(&n, X, &incX, Y, &incY);
72+
}
7273
return sdot_(&n, X, &incX, Y, &incY);
7374
}
74-
}
7575

7676
double BlasConnector::dot( const int n, const double *X, const int incX, const double *Y, const int incY, base_device::AbacusDevice_t device_type)
7777
{
7878
if (device_type == base_device::AbacusDevice_t::CpuDevice) {
7979
return ddot_(&n, X, &incX, Y, &incY);
80+
}
8081
return ddot_(&n, X, &incX, Y, &incY);
8182
}
82-
}
8383

8484
// C = a * A.? * B.? + b * C
8585
void BlasConnector::gemm(const char transa, const char transb, const int m, const int n, const int k,
@@ -196,39 +196,39 @@ float BlasConnector::nrm2( const int n, const float *X, const int incX, base_dev
196196
{
197197
if (device_type == base_device::AbacusDevice_t::CpuDevice) {
198198
return snrm2_( &n, X, &incX );
199+
}
199200
return snrm2_( &n, X, &incX );
200201
}
201-
}
202202

203203

204204
double BlasConnector::nrm2( const int n, const double *X, const int incX, base_device::AbacusDevice_t device_type )
205205
{
206206
if (device_type == base_device::AbacusDevice_t::CpuDevice) {
207207
return dnrm2_( &n, X, &incX );
208+
}
208209
return dnrm2_( &n, X, &incX );
209210
}
210-
}
211211

212212

213213
double BlasConnector::nrm2( const int n, const std::complex<double> *X, const int incX, base_device::AbacusDevice_t device_type )
214214
{
215215
if (device_type == base_device::AbacusDevice_t::CpuDevice) {
216216
return dznrm2_( &n, X, &incX );
217+
}
217218
return dznrm2_( &n, X, &incX );
218219
}
219-
}
220220

221221
// copies a into b
222222
void BlasConnector::copy(const long n, const double *a, const int incx, double *b, const int incy, base_device::AbacusDevice_t device_type)
223223
{
224224
if (device_type == base_device::AbacusDevice_t::CpuDevice) {
225225
dcopy_(&n, a, &incx, b, &incy);
226-
}
226+
}
227227
}
228228

229229
void BlasConnector::copy(const long n, const std::complex<double> *a, const int incx, std::complex<double> *b, const int incy, base_device::AbacusDevice_t device_type)
230230
{
231231
if (device_type == base_device::AbacusDevice_t::CpuDevice) {
232232
zcopy_(&n, a, &incx, b, &incy);
233-
}
233+
}
234234
}

source/module_base/lapack_connector.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ extern "C"
6161

6262

6363
void dsygvx_(const int* itype, const char* jobz, const char* range, const char* uplo,
64-
const int* n, double* A, const int* lda, double* B, const int* ldb,
65-
const double* vl, const double* vu, const int* il, const int* iu,
66-
const double* abstol, const int* m, double* w, double* Z, const int* ldz,
67-
double* work, int* lwork, int*iwork, int* ifail, int* info);
64+
const int* n, double* A, const int* lda, double* B, const int* ldb,
65+
const double* vl, const double* vu, const int* il, const int* iu,
66+
const double* abstol, const int* m, double* w, double* Z, const int* ldz,
67+
double* work, const int* lwork, int* iwork, int* ifail, int* info);
6868

6969
void chegvx_(const int* itype,const char* jobz,const char* range,const char* uplo,
7070
const int* n,std::complex<float> *a,const int* lda,std::complex<float> *b,

source/module_base/lapack_wrapper.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#ifndef LAPACK_HPP
22
#define LAPACK_HPP
3-
3+
#include <iostream>
44
extern "C"
55
{
66
// =================================================================================
@@ -49,10 +49,10 @@ extern "C"
4949
// =================================================================================
5050
// gvx
5151
void dsygvx_(const int* itype, const char* jobz, const char* range, const char* uplo,
52-
const int* n, double* A, const int* lda, double* B, const int* ldb,
53-
const double* vl, const double* vu, const int* il, const int* iu,
54-
const double* abstol, const int* m, double* w, double* Z, const int* ldz,
55-
double* work, int* lwork, int*iwork, int* ifail, int* info);
52+
const int* n, double* A, const int* lda, double* B, const int* ldb,
53+
const double* vl, const double* vu, const int* il, const int* iu,
54+
const double* abstol, const int* m, double* w, double* Z, const int* ldz,
55+
double* work, const int* lwork, int* iwork, int* ifail, int* info);
5656

5757
void chegvx_(const int* itype,const char* jobz,const char* range,const char* uplo,
5858
const int* n,std::complex<float> *a,const int* lda,std::complex<float> *b,
@@ -424,8 +424,8 @@ class LapackWrapper
424424
int* ifail,
425425
int& info)
426426
{
427-
// dsygvx_(&itype, &jobz, &range, &uplo, &n, a, &lda, b, &ldb, &vl,
428-
// &vu, &il,&iu, &abstol, &m, w, z, &ldz, work, &lwork, rwork, iwork, ifail, &info);
427+
dsygvx_(&itype, &jobz, &range, &uplo, &n, a, &lda, b, &ldb, &vl,
428+
&vu, &il, &iu, &abstol, &m, w, z, &ldz, work, &lwork, iwork, ifail, &info);
429429
}
430430

431431
// wrap function of fortran lapack routine xhegvx ( pointer version ).

0 commit comments

Comments
 (0)