diff --git a/source/module_hamilt_lcao/module_gint/gint_vl_cpu_interface.cpp b/source/module_hamilt_lcao/module_gint/gint_vl_cpu_interface.cpp index 8fec419ab0..01368d329b 100644 --- a/source/module_hamilt_lcao/module_gint/gint_vl_cpu_interface.cpp +++ b/source/module_hamilt_lcao/module_gint/gint_vl_cpu_interface.cpp @@ -241,6 +241,15 @@ void Gint::gint_kernel_vlocal_meta(Gint_inout* inout) { const double dv = ucell.omega / this->ncxyz; const double delta_r = this->gridt->dr_uniform; + if (!GlobalV::GAMMA_ONLY_LOCAL) { + if (!pvpR_alloc_flag) { + ModuleBase::WARNING_QUIT("Gint_interface::cal_gint", + "pvpR has not been allocated yet!"); + } else { + ModuleBase::GlobalFunc::ZEROS(this->pvpR_reduced[inout->ispin], nnrg); + } + } + #pragma omp parallel { // define HContainer here to reference.