On 6/7/2012 10:23 PM, Yamashita Okito wrote:
> Dear Dr.Fang
>
> Thank you very much for your reply.
>
> I tried -n 1e8 option for all modes as well as -R for cached.
> The result is attached with this e-mail (see distance_fang.png).
> For your information, I also attached more detailed version (see
> detail_MCX_comparison.pdf)
hi Okito
the attached plots and comparisons are quite informative.
However, I am not quite sure about the plots for mcx_cached
shown on pages 4 and 9. When using -R positive_num,
the width of the cached region should be 2*positive_num+1
centered at the source. In your case, the horizontal region
size is 7x7 pixels, vertically is >=10 pixels. Can you confirm
if these plots were generated by -R +num or by -R -1?
My second suggestion is to use absolute difference instead
of the normalized error. From many of the plots, a grain-like
noise can be seen which I believe is due to the stochastic
error amplified by dividing atomic(mcx) solution. If you had
simulated the same number of photons, the absolution
difference should be proportional to the error due to
racing. No need to normalize.
One thing I also want to point out is that the power bar
plot is, in my opinion, an overstatement of the data racing
problem, as you can see the highest difference is highly
localized (use mcx_cached as a proof). Therefore, if ones
interest is not around the source, the dominant portion
of the domain has reasonably accurate solution, despite
the high power loss near the source.
> Now all the results make sense for me like
> - the effect of the number of thread is much less in atomic
> - cached -R 5 is OK
> - mcx is less accurate when the number of thread is large
> and so on.
> I also found that the zone set by cached -R -1 does not look
> appropriate, which causes large error.
Apparently, one of the major differences was made by
-R +/- mcx_cached. For photon numbers, I guess you
drew the conclusion based on the comparisons between
the two distance.png plots (between atomic variants).
I agree this is worrisome.
Your second distance plot makes a lot of sense: the
atomic-vs-atomic are mostly close to 0, except
atomic-1024 vs others. I believe this is related to the
seeding issue I mentioned in the first reply. When
running more photons, I expect this difference
diminishes. However, this is not the case in your
first distance plot.
On thing that may explain this is your relatively small
thread numbers and large photon number. This may cause
issues for random number generator (RNG). For example,
if you run 1e10 photons total with 1024 threads, each
thread needs to run 1e7 photons; assuming each photon
needs ~20 scattering events to terminate, each event needs
5 random numbers (with logistic-lattice-5 RNG), then you
need to produce 1e9 RNGs in a thread sequentially. For a
RNG with period 2^32-1=4.3e9, this maybe ok, but when
scattering coefficient becomes very high, you have the risk
of cycling. For the chaotic RNG I used in MCX, the period
is supposed to be long, but varies depending on the seed.
I suspect for high scattering cases, the limited period can
be an issue.
For this reason, I often suggest running less photons
per kernel call, and use -r to repeat. Also, by default, MCX
uses many more threads (10000-40000), this can also
reduce the effect of RNG quality. MCX can be compiled with
MT19967 RNG, which has a huge period.
>
> But I am now wondering why the number of photons affects results so
> much (based on comparison between the previous one with this one).
> For example, when we want to use 1e10 photons, which is better, to
> simulate with 1e8 photons 100 times or to simulate with 1e10 photons
> once ?
> Would you let me know your opinions ?
I am in traveling, but I am strongly interested in knowing
if you have any further findings regarding MCX. I will investigate
the offset issues for the cached version when I have time.
Qianqian
The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.