Skip to content

Commit 5669f69

Browse files
committed
after merging into abacus-v3.8.0, the first compilation passed, but the program has not been run yet
1 parent abc17af commit 5669f69

File tree

5 files changed

+23
-15
lines changed

5 files changed

+23
-15
lines changed

source/module_esolver/esolver_ks.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ void ESolver_KS<T, Device>::runner(const int istep, UnitCell& ucell)
638638

639639
std::cout << "\n\n\n******\nget the initial values of wfc and occ_numbers successfully\n******\n\n\n" << std::endl;
640640

641-
break;
641+
// break;
642642
}
643643
}
644644

source/module_esolver/esolver_ks_lcao.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,9 @@ void ESolver_KS_LCAO<TK, TR>::before_all_runners(const Input_para& inp, UnitCell
260260
this->pelec->fixed_weights(PARAM.inp.ocp_kb, GlobalV::NBANDS, GlobalV::nelec);
261261
}
262262

263+
264+
std::cout << "\n\n\n******\n" << 1.0 << "\n******\n\n\n" << std::endl;
265+
263266
// add by jghan for rdmft calculation
264267
// if( PARAM.inp.ab_initio_type == "rdmft" )
265268
if( 1 )
@@ -273,6 +276,8 @@ void ESolver_KS_LCAO<TK, TR>::before_all_runners(const Input_para& inp, UnitCell
273276
// rdmft_solver.update_ion(ucell, LM, *(this->pw_rho), GlobalC::ppcell.vloc, this->sf.strucFac, this->LOC);
274277
}
275278

279+
std::cout << "\n\n\n******\n" << 1.1 << "\n******\n\n\n" << std::endl;
280+
276281
// 15) if kpar is not divisible by nks, print a warning
277282
if (GlobalV::KPAR_LCAO > 1)
278283
{

source/module_hamilt_general/module_xc/xc_functional.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ std::vector<int> XC_Functional::func_id(1);
1818
int XC_Functional::func_type = 0;
1919
bool XC_Functional::use_libxc = true;
2020
double XC_Functional::hybrid_alpha = 0.25;
21-
std::map<int, double> scaling_factor_xc = { {XC_GGA_X_ITYH, 1.0} }; // added by jghan, 2024-10-10
21+
std::map<int, double> XC_Functional::scaling_factor_xc = { {XC_GGA_X_ITYH, 1.0} }; // added by jghan, 2024-10-10
2222

2323
void XC_Functional::set_hybrid_alpha(const double alpha_in)
2424
{

source/module_rdmft/rdmft.cpp

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ void RDMFT<TK, TR>::init(Gint_Gamma& GG_in, Gint_k& GK_in, Parallel_Orbitals& Pa
9898
// else nk_total = kv->nks;
9999

100100
nk_total = ModuleSymmetry::Symmetry::symm_flag == -1 ? kv->nkstot_full: kv->nks;
101+
nbands_total = PARAM.inp.nbands;
101102
nspin = PARAM.inp.nspin;
102103

103104
// XC_func_rdmft = "power"; // just for test
@@ -108,26 +109,24 @@ void RDMFT<TK, TR>::init(Gint_Gamma& GG_in, Gint_k& GK_in, Parallel_Orbitals& Pa
108109
// std::cout << "\n\n\n******\nXC-functional in GlobalC::atom: " << GlobalC::ucell.atoms[0].ncpp.xc_func << "\n******\n\n\n" << std::endl;
109110
// if( XC_func_rdmft == "default" ) XC_func_rdmft = "default";
110111

111-
// create desc[] and something about MPI to Eij(nbands*nbands)
112-
std::ofstream ofs_running;
113-
std::ofstream ofs_warning;
112+
std::cout << "\n\n\n******\nnbands_total: " << nbands_total << "\nnb2d: " <<
113+
PARAM.inp.nb2d << "\nblacs_ctxt: " << ParaV->blacs_ctxt << "\n******\n\n\n" << std::endl;
114+
115+
// // create desc[] and something about MPI to Eij(nbands*nbands)
116+
// std::ofstream ofs_running;
117+
// std::ofstream ofs_warning;
114118
// para_Eij.set_block_size(GlobalV::NB2D);
115119
// para_Eij.set_proc_dim(GlobalV::DSIZE);
116120
// para_Eij.comm_2D = ParaV->comm_2D;
117121
// para_Eij.blacs_ctxt = ParaV->blacs_ctxt;
118122
// para_Eij.set_local2global( GlobalV::NBANDS, GlobalV::NBANDS, ofs_running, ofs_warning );
119123
// para_Eij.set_desc( GlobalV::NBANDS, GlobalV::NBANDS, para_Eij.get_row_size(), false );
120-
para_Eij.set(nbands_total, nbands_total, PARAM.inp.nb2d, ParaV->blacs_ctxt);
124+
para_Eij.set(nbands_total, nbands_total, ParaV->nb, ParaV->blacs_ctxt); // maybe in default, PARAM.inp.nb2d = 0, can't be used
125+
// para_Eij.init(nbands_total, nbands_total, PARAM.inp.nb2d, MPI_COMM_WORLD);
121126

122127
// // learn from "module_hamilt_lcao/hamilt_lcaodft/LCAO_init_basis.cpp"
123-
// int try_nb = para_Eij.init(GlobalV::NBANDS, GlobalV::NBANDS, PARAM.inp.nb2d, DIAG_WORLD); // DIAG_WORLD is wrong
124-
// try_nb += para_Eij.set_nloc_wfc_Eij(GlobalV::NBANDS, ofs_running, ofs_warning);
125-
// if (try_nb != 0)
126-
// {
127-
// para_Eij.set(GlobalV::NBANDS, GlobalV::NBANDS, 1, para_Eij.blacs_ctxt);
128-
// try_nb = para_Eij.set_nloc_wfc_Eij(GlobalV::NBANDS, GlobalV::ofs_running, GlobalV::ofs_warning);
129-
// }
130-
// para_Eij.set_desc_wfc_Eij(GlobalV::NBANDS, GlobalV::NBANDS, para_Eij.nrow);
128+
129+
std::cout << "\n\n\n******\n" << 0.001 << "\n******\n\n\n" << std::endl;
131130

132131

133132
//
@@ -196,6 +195,8 @@ void RDMFT<TK, TR>::init(Gint_Gamma& GG_in, Gint_k& GK_in, Parallel_Orbitals& Pa
196195
HR_dft_XC->set_zero();
197196
// HR_local->set_zero();
198197

198+
std::cout << "\n\n\n******\n" << 0.1 << "\n******\n\n\n" << std::endl;
199+
199200
if( GlobalC::exx_info.info_global.cal_exx )
200201
{
201202
if (GlobalC::exx_info.info_ri.real_number)
@@ -219,6 +220,8 @@ void RDMFT<TK, TR>::init(Gint_Gamma& GG_in, Gint_k& GK_in, Parallel_Orbitals& Pa
219220
HR_dft_XC->fix_gamma();
220221
}
221222

223+
std::cout << "\n\n\n******\n" << 0.2 << "\n******\n\n\n" << std::endl;
224+
222225
}
223226

224227

source/module_rdmft/rdmft.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ class RDMFT
105105
/****** these parameters are passed in from outside, don't need delete ******/
106106

107107
int nk_total = 0;
108+
int nbands_total;
108109
int nspin = 1;
109-
int nbands_total = PARAM.inp.nbands;
110110
std::string XC_func_rdmft;
111111
double alpha_power = 0.656; // 0.656 for soilds, 0.525 for dissociation of H2, 0.55~0.58 for HEG
112112

0 commit comments

Comments
 (0)