Skip to content

Commit eee7c2b

Browse files
authored
Update integrate tests to reduce running time, change improper output style and files (#6179)
* reduce the time costs in SDFT examples * modify SDFT codes, put Onsager.txt, je-je.txt, and Chebcoef to OUT directory * reduce the LCAO radius for NO_KP_AFM example * update 204_NO_KP_FM example * update example 260_NO_DJ_PK_PU_S1 * change to 644 for files in PP_ORB * add Fe_gga_6au_100Ry_2s1p1d.orb orbitals to reduce the testing time * reduce testing time for 260_NO_DJ_PK_PU_AFM_URAMPING * 260_NO_DJ_PK_PU_S1 * delete useless outputs * update surface chemistry example * modify the code for comparing Onsager.txt * update mulliken in 204_NO_KP_AFM example * update result.ref in 186_PW_SKG_ALL * update two test results
1 parent 7a0cbe9 commit eee7c2b

File tree

48 files changed

+1883
-1255
lines changed

Some content is hidden

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

48 files changed

+1883
-1255
lines changed

source/module_hamilt_general/module_surchem/surchem.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,4 @@ void surchem::clear()
5555
surchem::~surchem()
5656
{
5757
this->clear();
58-
}
58+
}

source/module_hamilt_pw/hamilt_pwdft/elecond.cpp

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,10 @@ void EleCond<FPTYPE, Device>::calcondw(const int nt,
271271
}
272272
}
273273

274-
std::ofstream ofscond("je-je.txt");
274+
std::stringstream ss;
275+
ss << PARAM.globalv.global_out_dir << "je-je.txt";
276+
277+
std::ofstream ofscond(ss.str());
275278
ofscond << std::setw(8) << "#t(a.u.)" << std::setw(15) << "c11(t)" << std::setw(15) << "c12(t)" << std::setw(15)
276279
<< "c22(t)" << std::setw(15) << "decay" << std::endl;
277280
for (int it = 0; it < nt; ++it)
@@ -293,7 +296,11 @@ void EleCond<FPTYPE, Device>::calcondw(const int nt,
293296
cw22[iw] += -2 * ct22[it] * sin(-(iw + 0.5) * dw * it * dt) * winfunc[it] / (iw + 0.5) / dw * dt;
294297
}
295298
}
296-
ofscond.open("Onsager.txt");
299+
300+
std::stringstream sso;
301+
sso << PARAM.globalv.global_out_dir << "Onsager.txt";
302+
303+
ofscond.open(sso.str());
297304
ofscond << std::setw(8) << "## w(eV) " << std::setw(20) << "sigma(Sm^-1)" << std::setw(20) << "kappa(W(mK)^-1)"
298305
<< std::setw(20) << "L12/e(Am^-1)" << std::setw(20) << "L22/e^2(Wm^-1)" << std::endl;
299306
for (int iw = 0; iw < nw; ++iw)
@@ -323,4 +330,4 @@ template class EleCond<float, base_device::DEVICE_CPU>;
323330
#if ((defined __CUDA) || (defined __ROCM))
324331
template class EleCond<double, base_device::DEVICE_GPU>;
325332
template class EleCond<float, base_device::DEVICE_GPU>;
326-
#endif
333+
#endif

source/module_hamilt_pw/hamilt_stodft/sto_elecond.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,11 @@ void Sto_EleCond<FPTYPE, Device>::decide_nche(const FPTYPE dt,
122122
}
123123

124124
std::cout << "set N order of Chebyshev for KG as " << nche_new << std::endl;
125-
std::ofstream cheofs("Chebycoef");
125+
126+
std::stringstream ss;
127+
ss << PARAM.globalv.global_out_dir << "Chebycoef.txt";
128+
std::ofstream cheofs(ss.str());
129+
126130
for (int i = 1; i < nche_guess; ++i)
127131
{
128132
double error = std::abs(chet.coef_complex[i] / chet.coef_complex[0]);

source/module_hsolver/diago_elpa.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,7 @@ void DiagoElpa<double>::diag(hamilt::Hamilt<double>* phm_in,
135135
es.exit();
136136

137137
const int inc = 1;
138-
ModuleBase::GlobalFunc::OUT(GlobalV::ofs_running,
139-
"K-S equation was solved by genelpa2");
140138
BlasConnector::copy(PARAM.inp.nbands, eigen.data(), inc, eigenvalue_in, inc);
141-
ModuleBase::GlobalFunc::OUT(GlobalV::ofs_running,
142-
"eigenvalues were copied to ekb");
143139
#else
144140
ModuleBase::WARNING_QUIT("DiagoElpa",
145141
"DiagoElpa only can be used with macro __MPI");

tests/PP_ORB/C.LDA.UPF

100755100644
File mode changed.

tests/PP_ORB/C_SG15_PBE.orb

100755100644
File mode changed.

tests/PP_ORB/C_lda_8.0au_100Ry_2s2p1d.orb

100755100644
File mode changed.

tests/PP_ORB/Cs_gga_10au_100Ry_4s2p1d.orb

100755100644
File mode changed.

tests/PP_ORB/Fe_gga_6au_100Ry_2s1p1d.orb

Lines changed: 625 additions & 0 deletions
Large diffs are not rendered by default.

tests/PP_ORB/H.LDA.UPF

100755100644
File mode changed.

0 commit comments

Comments
 (0)