[mcstas-users] Inconsistent results using MPI and SPLIT
Peter Kjær Willendrup
pkwi at fysik.dtu.dk
Thu Jun 18 20:03:23 CEST 2020
Dear Thierry,
Just a quick response for now, will have a closer look later.
One has to be quite careful with SPLIT, it is bossing, and if the statistics is not “big enough” it will most certainly lead to bogus and unstable results. What big enough means is hard to quantify, but generally speaking one typically needs on the order of 1e5-1e6 events at the point of split at the given ncount.
I didn’t check your instrument file, but one very important detail is that SPLITS must be inserted right before components that apply Monte Carlo / random numbers, otherwise one event will simply become 10 identical and thus drive the errorbars to unphysically low values. And 5 splits (each 10) is 10^5 and sounds like a quite aggressive splitting. 😊
I am sure we will find a good way to fix this, but I don’t have time this side of the weekend.
Best
Peter
Hent Outlook til iOS<https://aka.ms/o0ukef>
________________________________
Fra: mcstas-users <mcstas-users-bounces at mcstas.org> på vegne af Thierry Bigault <bigault at ill.fr>
Sendt: torsdag, juni 18, 2020 7:03 PM
Til: McStas
Emne: [mcstas-users] Inconsistent results using MPI and SPLIT
Dear All,
I built the attached instrument file to try and simulate a reflectometer.
When I saw that I needed 10 minutes of calculation to get 3 neutrons on
my sample, I thought it was time to try and optimize.
After having a look at the manual, I first put some SPLIT keywords
positioned at 5 different components, which I estimate as strategic. I
gained a lot in statistics on the sample.
Then I decided to use the MPI feature, as my laptop has 8 cores. It
nicely reduces the computing time, at first sight it looks really great !
But the results looked strange, so I made some more systematic tests and
the result is on the attached plots. With all SPLIT commented ("no
SPLIT") it looks fine, the calculated intensity on the sample is
consistent within the error-bars, whatever the number of nodes I use.
When combining all SPLITs active and MPI ("5 SPLIT"), the calculation
time and error-bars can be strongly reduced but the result depends
completely on the number of nodes, with differences much larger than the
error-bar...
Either I did something wrong, or there is a bug somewhere. If someone
has an idea about this issue, I would be interested.
I use version 2.6.1 (May 04, 2020) on Windows 10.
Thierry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman2.mcstas.org/pipermail/mcstas-users/attachments/20200618/8ace731d/attachment.html>
More information about the mcstas-users
mailing list