| 349 |
|
// rval = # rows recovered |
| 350 |
|
rval = myRCmanager.PrepOutput(); |
| 351 |
|
// check if recovered everything |
| 352 |
< |
if (recover && rval >= myRCmanager.GetRowMax()) { |
| 352 |
> |
if (rval >= myRCmanager.GetRowMax()) { |
| 353 |
|
error(WARNING, "nothing left to compute"); |
| 354 |
|
quit(0); |
| 355 |
|
} // add processes as requested |
| 494 |
|
} |
| 495 |
|
last_report = tstart = time(0); |
| 496 |
|
} |
| 497 |
< |
while (r < totRows) { // getting to work... |
| 497 |
> |
while (r < totRows) { // loop until done |
| 498 |
|
time_t tnow; |
| 499 |
|
if (!getRayBundle(odarr)) |
| 500 |
|
goto readerr; |
| 503 |
|
r++; |
| 504 |
|
if (report_intvl <= 0) |
| 505 |
|
continue; |
| 506 |
< |
if ((r < totRows) & ((tnow = time(0)) < last_report+report_intvl)) |
| 506 |
> |
tnow = time(0); // time to report progress? |
| 507 |
> |
if (r == totRows) |
| 508 |
> |
myRCmanager.FlushQueue(); |
| 509 |
> |
else if (tnow < last_report+report_intvl) |
| 510 |
|
continue; |
| 511 |
|
sprintf(errmsg, "%.2f%% done after %.3f hours\n", |
| 512 |
< |
100.*r/totRows, (1./3600.)*(tnow - tstart)); |
| 512 |
> |
100.*myRCmanager.GetRowFinished()/totRows, |
| 513 |
> |
(1./3600.)*(tnow - tstart)); |
| 514 |
|
eputs(errmsg); |
| 515 |
|
last_report = tnow; |
| 516 |
|
} |