compare dyds_global instead

This commit is contained in:
alxvov 2019-07-03 11:38:31 +00:00
parent cebed54a3d
commit 8452afb512
1 changed files with 1 additions and 1 deletions

View File

@ -371,7 +371,7 @@ void MinSpinOSO_LBFGS::calc_search_direction(int iter)
dyds += ds[m_index][i] * dy[m_index][i]; dyds += ds[m_index][i] * dy[m_index][i];
} }
MPI_Allreduce(&dyds, &dyds_global, 1, MPI_DOUBLE, MPI_SUM, world); MPI_Allreduce(&dyds, &dyds_global, 1, MPI_DOUBLE, MPI_SUM, world);
if (fabs(dyds) > 1.0e-60) rho[m_index] = 1.0 / dyds_global; if (fabs(dyds_global) > 1.0e-60) rho[m_index] = 1.0 / dyds_global;
else rho[m_index] = 1.0e60; else rho[m_index] = 1.0e60;
// set the q vector // set the q vector