Hi James,
Thanks for reporting this – I had indeed noticed this issue before announcing the release. This only happens when using OpenCL on the GPU. For the majority of the replay, it worked ok – meaning that all photons were able to retrace their paths in the baseline simulation, and became recaptured (please see the below message you attached: a total of 711 photons were replayed and all of them were “recaptured”, this is an indication that the replay mechanism is working).
What failed in this example originates from this line:
https://github.com/fangq/mmc/blob/master/mmclab/example/demo_example_replay.m#L64
where I compare the detected photon from original and replayed simulations, and expect them to be the same (up to 10 decimal places). What I found was that there is one photon fails to match its data up to the desired precision among 700 photons. I tested several other configurations and the difference remains to be 1 photon.
I have a feeling that this is related to the GPU precision when massively parallel threads are used. I am not yet able to step-by-step debug the failed photon, but I suspect it is mostly ok, but has a small floating-point round-off error.
If you set cfg.gpuid=-1 and use CPU based mmc, this error will go away (but of course, a lot slower).
I believe this is a minor issue, but I’ve created a ticket anyways to keep track of this problem until a fix is found.
https://github.com/fangq/mmc/issues/56
Qianqian
--
You received this message because you are subscribed to the Google Groups "mcx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
mcx-users+...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/mcx-users/c3094949-e18e-42b9-9dbd-d4613b7e2654n%40googlegroups.com.
Hi James
Just want to you let you know that my student Shijie Yan had submitted a patch and fixed the error you initially reported when using OpenCL based mmclab, see
https://github.com/fangq/mmc/issues/56
I’ve also recompiled nightly build packages, please go to http://mcx.space/nightly/ to get the fixed mmclab.
For the issue that you reported below when gpuid=-1, I was also able to reproduce and will look into a fix for that as well.
To view this discussion on the web visit https://groups.google.com/d/msgid/mcx-users/777eea24-d90d-4de7-81f3-f436141eea5an%40googlegroups.com.