48 |
#ifdef PASO_MPI |
#ifdef PASO_MPI |
49 |
double loc_norm; |
double loc_norm; |
50 |
#endif |
#endif |
51 |
dim_t i,totIter,cntIter,method; |
dim_t i,totIter=0,cntIter,method; |
52 |
bool_t finalizeIteration; |
bool_t finalizeIteration; |
53 |
err_t errorCode=NO_ERROR; |
err_t errorCode=NO_ERROR; |
54 |
dim_t numSol = Paso_SystemMatrix_getTotalNumCols(A); |
dim_t numSol = Paso_SystemMatrix_getTotalNumCols(A); |
258 |
if (options->verbose) printf("Paso_Solver: Breakdown at iter %d (residual = %e). Restarting ...\n", cntIter+totIter, tol); |
if (options->verbose) printf("Paso_Solver: Breakdown at iter %d (residual = %e). Restarting ...\n", cntIter+totIter, tol); |
259 |
finalizeIteration = FALSE; |
finalizeIteration = FALSE; |
260 |
} |
} |
261 |
|
} |
262 |
} else { |
} else { |
263 |
if (options->verbose) printf(". convergence! \n"); |
if (options->verbose) printf(". convergence! \n"); |
264 |
} |
} |
268 |
MEMFREE(r); |
MEMFREE(r); |
269 |
time_iter=Paso_timer()-time_iter; |
time_iter=Paso_timer()-time_iter; |
270 |
if (options->verbose) { |
if (options->verbose) { |
271 |
printf("\ntiming: Paso_Solver: %.4e sec\n",time_iter); |
printf("\ntiming: Paso_Solver: %.4e sec\n",time_iter); |
272 |
|
if (Paso_noError()) { |
273 |
if (totIter>1) { |
if (totIter>1) { |
274 |
if(totIter==options->iter_max) { |
if(totIter==options->iter_max) { |
275 |
printf("timing: Total MAX steps, time per iteration step: %.4e sec\n",time_iter/totIter); |
printf("timing: Total MAX steps, time per iteration step: %.4e sec\n",time_iter/totIter); |
280 |
else { |
else { |
281 |
printf("timing: Total 1 step, time per iteration step: %.4e sec\n",time_iter); |
printf("timing: Total 1 step, time per iteration step: %.4e sec\n",time_iter); |
282 |
} |
} |
283 |
|
} |
284 |
|
else { |
285 |
|
printf("timing: Total: Diverged.\n"); |
286 |
|
} |
287 |
} |
} |
288 |
} |
} |
289 |
} |
} |
290 |
} |
} |
|
} |
|
291 |
Performance_stopMonitor(pp,PERFORMANCE_ALL); |
Performance_stopMonitor(pp,PERFORMANCE_ALL); |
292 |
blocktimer_increment("Paso_Solver()", blocktimer_start); |
blocktimer_increment("Paso_Solver()", blocktimer_start); |
293 |
} |
} |