ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/rad.c
(Generate patch)

Comparing ray/src/util/rad.c (file contents):
Revision 2.94 by greg, Tue May 18 04:24:17 2010 UTC vs.
Revision 2.97 by greg, Fri May 28 17:29:14 2010 UTC

# Line 1358 | Line 1358 | rpict(                         /* run rpict and pfilt for each view */
1358                                                  /* parallel running? */
1359                  if (do_rpiece) {
1360                          if (rfdt < oct1date || !fdate(sfile)) {
1361 +                                int     xdiv = 8+nprocs/3, ydiv = 8+nprocs/3;
1362                                  rfdt = 0;               /* start fresh */
1363 +                                if (!silent)
1364 +                                        printf("\techo %d %d > %s\n",
1365 +                                                        xdiv, ydiv, sfile);
1366                                  if ((fp = fopen(sfile, "w")) == NULL) {
1367                                          fprintf(stderr, "%s: cannot create\n",
1368                                                          sfile);
1369                                          quit(1);
1370                                  }
1371 <                                fprintf(fp, "%d %d\n", 8+nprocs/3, 8+nprocs/3);
1371 >                                fprintf(fp, "%d %d\n", xdiv, ydiv);
1372                                  fclose(fp);
1373                          }
1374                  } else if (next_process()) {
# Line 1396 | Line 1400 | rpict(                         /* run rpict and pfilt for each view */
1400                                  "%s%s %s%s -x 64 -y 64 -ps 1 %s > %s",
1401                                                  c_rpict, rep, vw, opts,
1402                                                  oct1name, overfile);
1403 +                                if (do_rpiece)
1404 +                                        while (children_running < nprocs-1 &&
1405 +                                                        next_process())
1406 +                                                sleep(5);
1407                                  if (runcom(combuf)) {
1408                                          fprintf(stderr,
1409                                          "%s: error in overture for view %s\n",
1410                                                  progname, vs);
1411                                          quit(1);
1412 +                                }
1413 +                                if (do_rpiece) {
1414 +                                        finish_process();
1415 +                                        wait_process(1);
1416                                  }
1417   #ifndef NULL_DEVICE
1418                                  rmfile(overfile);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines