230 |
|
if (!pm -> distribTarget) |
231 |
|
error(INTERNAL, "no photons to distribute in distribPhotonContrib"); |
232 |
|
|
233 |
< |
/* Get photon ports if specified */ |
234 |
< |
if (ambincl == 1) |
235 |
< |
getPhotonPorts(); |
233 |
> |
/* Get photon ports from modifier list */ |
234 |
> |
getPhotonPorts(photonPortList); |
235 |
|
|
236 |
|
/* Get photon sensor modifiers */ |
237 |
|
getPhotonSensors(photonSensorList); |
392 |
|
} |
393 |
|
#endif |
394 |
|
|
395 |
< |
#if PMAP_SIGUSR |
395 |
> |
#ifdef PMAP_SIGUSR |
396 |
|
signal(SIGUSR1, sigUsrDiags); |
397 |
|
#endif |
398 |
< |
|
398 |
> |
|
399 |
> |
#ifdef DEBUG_PMAP |
400 |
|
/* Output child process PID after random delay to prevent corrupted |
401 |
|
* console output due to race condition */ |
402 |
|
usleep(1e6 * pmapRandom(rouletteState)); |
403 |
< |
fprintf(stderr, "Proc %d: PID = %d\n", proc, getpid()); |
403 |
> |
fprintf(stderr, "Proc %d: PID = %d " |
404 |
> |
"(waiting 10 sec to attach debugger...)\n", |
405 |
> |
proc, getpid()); |
406 |
|
/* Allow time for debugger to attach to child process */ |
407 |
|
sleep(10); |
408 |
+ |
#endif |
409 |
|
|
410 |
|
/* ============================================================= |
411 |
|
* 2-PASS PHOTON DISTRIBUTION |
413 |
|
* Pass 2 (main): based on outcome of pass 1, estimate remaining |
414 |
|
* number of photons to emit to approximate target |
415 |
|
* count |
416 |
< |
* ============================================================= */ |
416 |
> |
* ============================================================= */ |
417 |
|
for (srcIdx = 0; srcIdx < nsources; srcIdx++) { |
418 |
|
#ifndef PMAP_SIGUSR |
419 |
|
unsigned portCnt, passCnt = 0, prePassCnt = 0; |