Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions source/module_io/write_HS_R.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ void ModuleIO::output_HS_R(const int& istep,
GlobalV::CURRENT_SPIN = kv.isk[ik];
}

const double* vr_eff1 = &(v_eff(GlobalV::CURRENT_SPIN, 0));
//note: some MPI process will not have grids when MPI cores is too many, v_eff in these processes are empty
const double* vr_eff1 = v_eff.nc * v_eff.nr > 0? &(v_eff(GlobalV::CURRENT_SPIN, 0)):nullptr;

if(!GlobalV::GAMMA_ONLY_LOCAL)
{
Expand Down Expand Up @@ -90,7 +91,8 @@ void ModuleIO::output_dH_R(const int& istep,
GlobalV::CURRENT_SPIN = kv.isk[ik];
}

const double* vr_eff1 = &(v_eff(GlobalV::CURRENT_SPIN, 0));
//note: some MPI process will not have grids when MPI cores is too many, v_eff in these processes are empty
const double* vr_eff1 = v_eff.nc * v_eff.nr > 0? &(v_eff(GlobalV::CURRENT_SPIN, 0)):nullptr;

if(!GlobalV::GAMMA_ONLY_LOCAL)
{
Expand Down