Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skipping photons in replay due to time-of-flight exceeds max time, then skipping all subsequent photons #57

Closed
fangq opened this issue Jun 11, 2024 · 1 comment

Comments

@fangq
Copy link
Owner

fangq commented Jun 11, 2024

The replay test in mcxcl/test/testmcx.sh has not been robust and often fails in Apple or Intel iGPU OpenCL devices.

this is partly because of two bugs

  1. we dynamically compute replay.tof for each replayed photon when loading from the history file, but the recomputed tof may exceeds cfg.tend slightly because of the accumulated round-off-errors of total tof (f.t) in the kernel
  2. when a replayed photon packet exceeds tend, we skip this packet for replay, but the mcx_utils code fails to reset the cfg->replay.tof[] value, causing the subsequent photons are also skipping until the very end

this issue also happens in CUDA based mcx, but the precision seems to be slightly better on NVIDIA GPUs, and thus the skipped photon does not happen often.

@fangq
Copy link
Owner Author

fangq commented Jun 11, 2024

for solutions:

  1. we need to reset the cfg->replay.tof[] value back to 0 when a photon tof exceeds tof.
  2. we need to make the test more robust in order to allow skipping such packets, but still verify replay works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant