Commit 8452afb5 authored by alxvov's avatar alxvov
Browse files

compare dyds_global instead

parent cebed54a
Loading
Loading
Loading
Loading
+1 −1
Changes for src/SPIN/min_spin_oso_lbfgs.cpp: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -371,7 +371,7 @@ void MinSpinOSO_LBFGS::calc_search_direction(int iter)
      dyds += ds[m_index][i] * dy[m_index][i];
    }
    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;

    // set the q vector