Commit 900cb5d5 authored by Giovanni La Mura's avatar Giovanni La Mura
Browse files

Set threshold of Newton iterative improvement at 0.95 from last iteration

parent f6698bc2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -184,7 +184,7 @@ void cublas_zinvert(dcomplex **mat, np_int n, int device_id, const RuntimeSettin
	    rs.logger->log(message);
	    break; // iter for
	  }
	  if (newmax > 0.99 * oldmax) {
	  if (newmax > 0.95 * oldmax) {
	    message = "WARN: cannot improve further. Stopping.\n";
	    rs.logger->log(message, LOG_WARN);
	    break; // iter for
+1 −1
Original line number Diff line number Diff line
@@ -169,7 +169,7 @@ lapack_int lapack_newton(
    sprintf(buffer, "DEBUG: iteration %d has residue %.5le; target residue is %.5le.\n", ri, curmax, target_residue);
    message = buffer;
    rs.logger->log(message, LOG_DEBG);
    if (curmax < 0.99 * oldmax) {
    if (curmax < 0.95 * oldmax) {
      // Compute R = (I - A*X)*X
      zgemm_(
        &lapackNoTrans, &lapackNoTrans, &m, &m, &m, &lapack_one, a, &m,
+1 −1
Original line number Diff line number Diff line
@@ -431,7 +431,7 @@ magma_int_t magma_newton(
    sprintf(buffer, "DEBUG: iteration %d has residue %.5le; target residue is %.5le.\n", ri, curmax, target_residue);
    message = buffer;
    rs.logger->log(message, LOG_DEBG);
    if (curmax < 0.99 * oldmax) {
    if (curmax < 0.95 * oldmax) {
      // Compute R = (A*X - I)*X
      magmablas_zgemm(
        MagmaNoTrans, MagmaNoTrans, m, m, m, magma_one, d_ax, m,