ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/rxtrace.cpp
(Generate patch)

Comparing ray/src/rt/rxtrace.cpp (file contents):
Revision 2.1 by greg, Mon Aug 21 22:39:05 2023 UTC vs.
Revision 2.2 by greg, Tue Mar 12 16:54:51 2024 UTC

# Line 187 | Line 187 | rtrace(                                /* trace rays from stdin or file */
187          if (inform != 'a')
188                  SET_FILE_BINARY(inpfp);
189                                          /* set up output */
190 <        if (castonly || every_out[0] != NULL)
190 >        if (castonly || every_out[0] != NULL) {
191                  nproc = 1;              /* don't bother multiprocessing */
192 <        else if (nproc <= 0)            // need to get default for system?
193 <                nproc = myRTmanager.GetNCores();
192 >        } else if (nproc <= 0) {        // need to get default for system?
193 >                nproc = myRTmanager.GetNCores() + nproc;
194 >                if (nproc <= 0) nproc = 1;
195 >        }
196          if ((flushIntvl > 0) & (nproc > flushIntvl)) {
197                  error(WARNING, "reducing number of processes to match flush interval");
198                  nproc = flushIntvl;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines