Skip to content

Commit b9cfd1e

Browse files
Fix: add EXX erfc parameter handling for pw basis type (#7166)
* fix: add runtime check for cudaHostRegister in EXX PW Add runtime check (PARAM.inp.device == "gpu") before calling cudaHostRegister and cudaHostUnregister to avoid failures when CUDA is enabled but running on CPU device (e.g., on clusters with both CPU and GPU nodes but only compiling once). * Update source/source_pw/module_pwdft/op_pw_exx_pot.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update source/source_pw/module_pwdft/op_pw_exx_pot.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix: add erfc param handling for pw basis in EXX --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent c4bfd17 commit b9cfd1e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

source/source_io/module_parameter/input_conv.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,16 @@ void Input_Conv::Convert()
413413
{"singularity_correction", PARAM.inp.exx_singularity_correction} }};
414414
}
415415
}
416+
else if(PARAM.inp.basis_type == "pw" || PARAM.inp.basis_type == "lcao_in_pw")
417+
{
418+
GlobalC::exx_info.info_global.coulomb_param[Conv_Coulomb_Pot_K::Coulomb_Type::Erfc].resize(erfc_alpha.size());
419+
for(std::size_t i=0; i<erfc_alpha.size(); ++i)
420+
{
421+
GlobalC::exx_info.info_global.coulomb_param[Conv_Coulomb_Pot_K::Coulomb_Type::Erfc] = {{
422+
{"alpha", ModuleBase::GlobalFunc::TO_STRING(erfc_alpha[i])},
423+
{"omega", ModuleBase::GlobalFunc::TO_STRING(PARAM.inp.exx_erfc_omega[i])} }};
424+
}
425+
}
416426
}
417427
}
418428
#ifdef __EXX

0 commit comments

Comments
 (0)