@@ -142,13 +142,13 @@ HamiltBSE<T>::HamiltBSE(const int& nspin,
142142
143143template <typename T>
144144void HamiltBSE<T>::cal_V_for_A(){
145- ModuleBase::TITLE (" HamiltBSE" , " cal_V_for_A" );
146- ModuleBase::timer::start (" HamiltBSE" , " cal_V_for_A" );
147- std::cout<<" in cal_V_for_A" <<std::endl;
148145 if (!this ->VA_local .empty ()) {
149146 std::cout<< " V for A has been calculated, skip." <<std::endl;
150147 return ;
151148 }
149+ ModuleBase::TITLE (" HamiltBSE" , " cal_V_for_A" );
150+ ModuleBase::timer::start (" HamiltBSE" , " cal_V_for_A" );
151+ std::cout<<" in cal_V_for_A" <<std::endl;
152152 BSE_Util::print_mem_estimate (" V matrix of A" , this ->pA .get_local_size (), sizeof (T));
153153 this ->VA_local .resize (this ->pA .get_local_size (), 0.0 );
154154 if (this ->ri_hartree_benchmark == " aims" || this ->ri_hartree_benchmark == " abacus" ) {
@@ -171,13 +171,13 @@ void HamiltBSE<T>::cal_V_for_A(){
171171
172172template <typename T>
173173void HamiltBSE<T>::cal_V_for_B(){
174- ModuleBase::TITLE (" HamiltBSE" , " cal_V_for_B" );
175- ModuleBase::timer::start (" HamiltBSE" , " cal_V_for_B" );
176- std::cout<<" in cal_V_for_B" <<std::endl;
177174 if (!this ->VB_local .empty ()) {
178175 std::cout<< " V for B has been calculated, skip." <<std::endl;
179176 return ;
180177 }
178+ ModuleBase::TITLE (" HamiltBSE" , " cal_V_for_B" );
179+ ModuleBase::timer::start (" HamiltBSE" , " cal_V_for_B" );
180+ std::cout<<" in cal_V_for_B" <<std::endl;
181181 BSE_Util::print_mem_estimate (" V matrix of B" , this ->pA .get_local_size (), sizeof (T));
182182 this ->VB_local .resize (this ->pA .get_local_size (), 0.0 );
183183 if (this ->ri_hartree_benchmark == " aims" || this ->ri_hartree_benchmark == " abacus" ) {
@@ -200,13 +200,13 @@ void HamiltBSE<T>::cal_V_for_B(){
200200
201201template <typename T>
202202void HamiltBSE<T>::cal_W_for_A(){
203- ModuleBase::TITLE (" HamiltBSE" , " cal_W_for_A" );
204- ModuleBase::timer::start (" HamiltBSE" , " cal_W_for_A" );
205- std::cout<<" in cal_W_for_A" <<std::endl;
206203 if (!this ->WA_local .empty ()) {
207204 std::cout<< " W for A has been calculated, skip." <<std::endl;
208205 return ;
209206 }
207+ ModuleBase::TITLE (" HamiltBSE" , " cal_W_for_A" );
208+ ModuleBase::timer::start (" HamiltBSE" , " cal_W_for_A" );
209+ std::cout<<" in cal_W_for_A" <<std::endl;
210210 BSE_Util::print_mem_estimate (" W matrix of A" , this ->pA .get_local_size (), sizeof (T));
211211 this ->WA_local .resize (this ->pA .get_local_size (), 0.0 );
212212 this ->mo_lri .cal_W_for_A (this ->WA_local , this ->pA );
@@ -219,13 +219,13 @@ void HamiltBSE<T>::cal_W_for_A(){
219219
220220template <typename T>
221221void HamiltBSE<T>::cal_W_for_B(){
222- ModuleBase::TITLE (" HamiltBSE" , " cal_W_for_B" );
223- ModuleBase::timer::start (" HamiltBSE" , " cal_W_for_B" );
224- std::cout<<" in cal_W_for_B" <<std::endl;
225222 if (!this ->WB_local .empty ()) {
226223 std::cout<< " W for B has been calculated, skip." <<std::endl;
227224 return ;
228225 }
226+ ModuleBase::TITLE (" HamiltBSE" , " cal_W_for_B" );
227+ ModuleBase::timer::start (" HamiltBSE" , " cal_W_for_B" );
228+ std::cout<<" in cal_W_for_B" <<std::endl;
229229 BSE_Util::print_mem_estimate (" W matrix of B" , this ->pA .get_local_size (), sizeof (T));
230230 this ->WB_local .resize (this ->pA .get_local_size (), 0.0 );
231231 this ->mo_lri .cal_W_for_B (this ->WB_local , this ->pA );
@@ -336,7 +336,7 @@ void HamiltBSE<T>::init_bse_matrix(const bool is_full, const int & st_index){
336336 }
337337 if (this ->out_bse_ab )
338338 {
339- this ->write_AB_matrix (" A_matrix_" +std::to_string (this ->my_rank )+" .dat" , 6 , this ->BSE_A_local .data (), this ->ndim , this ->ndim );
339+ this ->write_AB_matrix (this -> out_dir + " A_matrix_" +std::to_string (this ->my_rank )+" .dat" , 6 , this ->BSE_A_local .data (), this ->ndim , this ->ndim );
340340 }
341341
342342 if (is_full)
@@ -351,7 +351,7 @@ void HamiltBSE<T>::init_bse_matrix(const bool is_full, const int & st_index){
351351 }
352352 if (this ->out_bse_ab )
353353 {
354- this ->write_AB_matrix (" B_matrix_" +std::to_string (this ->my_rank )+" .dat" , 6 , this ->BSE_B_local .data (), this ->ndim , this ->ndim );
354+ this ->write_AB_matrix (this -> out_dir + " B_matrix_" +std::to_string (this ->my_rank )+" .dat" , 6 , this ->BSE_B_local .data (), this ->ndim , this ->ndim );
355355 }
356356 }
357357
0 commit comments