| 56 |
|
printf("-f%c%c\t\t\t\t# format input/output = %s/%s\n", |
| 57 |
|
inpfmt, outfmt, formstr(inpfmt), formstr(outfmt)); |
| 58 |
|
if (report_intvl > 0) |
| 59 |
< |
printf("-t %-9d\t\t\t# time between reports\n", report_intvl); |
| 59 |
> |
printf("-t %-9d\t\t\t# time between reports\n", report_intvl); |
| 60 |
|
printf(erract[WARNING].pf != NULL ? |
| 61 |
|
"-w+\t\t\t\t# warning messages on\n" : |
| 62 |
|
"-w-\t\t\t\t# warning messages off\n"); |
| 358 |
|
if (rval >= myRCmanager.GetRowMax()) { |
| 359 |
|
error(WARNING, "nothing left to compute"); |
| 360 |
|
quit(0); |
| 361 |
< |
} // add processes as requested |
| 362 |
< |
myRCmanager.SetThreadCount(nproc); |
| 363 |
< |
|
| 361 |
> |
} |
| 362 |
|
rxcontrib(rval); /* trace ray contributions (loop) */ |
| 363 |
|
|
| 364 |
|
quit(0); /* exit clean */ |
| 497 |
|
} |
| 498 |
|
last_report = tstart = time(0); |
| 499 |
|
} |
| 500 |
+ |
// start children as requested |
| 501 |
+ |
myRCmanager.SetThreadCount(nproc); |
| 502 |
+ |
|
| 503 |
|
while (r < totRows) { // loop until done |
| 504 |
|
time_t tnow; |
| 505 |
|
if (!getRayBundle(odarr)) |
| 509 |
|
r++; |
| 510 |
|
if (report_intvl <= 0) |
| 511 |
|
continue; |
| 512 |
< |
tnow = time(0); // time to report progress? |
| 513 |
< |
if (r == totRows) |
| 514 |
< |
myRCmanager.FlushQueue(); |
| 515 |
< |
else if (tnow < last_report+report_intvl) |
| 512 |
> |
if (r == totRows) // need to finish up? |
| 513 |
> |
myRCmanager.SetThreadCount(1); |
| 514 |
> |
tnow = time(0); |
| 515 |
> |
if ((r < totRows) & (tnow < last_report+report_intvl)) |
| 516 |
|
continue; |
| 517 |
|
sprintf(errmsg, "%.2f%% done after %.3f hours\n", |
| 518 |
|
100.*myRCmanager.GetRowFinished()/totRows, |