hi Giovanna,
unfortunately, photon-sharing -i.e. simulating multiple pattern sources simultaneously- was only implemented in the CPU version of mmc, but not the GPU/OpenCL version.
I just created a ticket to add this to the TODO list. please keep
an eye on this ticket for future updates.
https://github.com/fangq/mmc/issues/86
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/f57b0ede-50ad-423e-bc16-e93f4bd3fa2bn%40googlegroups.com.
hi Giovanna,
thanks for the report. I was able to reproduce the issue - when running on the CPU (cfg.gpuid=-1), but the detp outputs are empty. I also noticed that not just dept, seeds output were also empty if requested. both outputs were non-empty if using GPU
I created the below bug report
https://github.com/fangq/mmc/issues/87
and was also able to fix it with this one-line change (as part of
a jumble commit in which I added support for saving
photon trajectories in mmc last night)
please download the github or nightly build from this folder and test again
let me know if you see any other problem - please also be aware
that photon sharing is still not supported in the GPU.
Qianqian
To view this discussion on the web visit https://groups.google.com/d/msgid/mcx-users/f770efa2-4a09-44ba-a1a7-0c61907a894an%40googlegroups.com.
hi Giovanna,
I debugged this problem and noticed that the CPU code does not return either the launched photon weight (if single pattern) or the 1D index of the pattern pixel at which the photon was launched (if photon sharing, like we did in mcxlab). As a result, the output detp.w0 field is always 1 in all pattern sources.
I just made the following update to mmc, and now detp.w0 should
return the launched pattern weight when using a single pattern
https://github.com/fangq/mmc/commit/da6d04e9f1f2a4890ac4708b00ca66b97363805c
or return the 1D integer index (starting from 0) of the cfg.srcpattern[] 2D array (assumed to be column-major order, like in matlab - that is index 0 is pixel [1,1], index 1 is pixel [2,1], etc) - in the photon-sharing mode. this is now consistent with the output of mcxlab in photon sharing mode.
using the returned index, you should be able to look up the
launched values (as cfg.srcpattern(detp.w0(i)+1) or shifting by
k*Nx*Ny for the (k+1)-th pattern),
when used in combination with wide-field det (i.e. setting
issavedet=2), I believe at least single-pattern case should work.
let me know if this is the case after you update your copy to the latest version.
Qianqian
To view this discussion on the web visit https://groups.google.com/d/msgid/mcx-users/04b539d6-2edd-4890-b6ae-b3a615a43479n%40googlegroups.com.