<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div dir="ltr">
<div></div>
<div data-ogsc="" style="">
<div>
<div dir="ltr"></div>
</div>
<div dir="ltr">Dear Thierry,</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">Just a quick response for now, will have a closer look later.</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">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.</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">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. 😊</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">I am sure we will find a good way to fix this, but I don’t have time this side of the weekend.</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">Best</div>
<div dir="ltr"><br>
</div>
<div dir="ltr">Peter</div>
<div dir="ltr"><br>
</div>
<div class="ms-outlook-ios-signature">Hent <a href="https://aka.ms/o0ukef" data-ogsc="" style="">
Outlook til iOS</a></div>
</div>
<div id="id-8b3d29c7-938b-4a46-827c-1f9260a485fb" class="ms-outlook-mobile-reference-message">
<hr style="display: inline-block; width: 98%; font-family: -webkit-standard; font-size: 12pt; color: rgb(0, 0, 0);" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif"><b>Fra:</b> mcstas-users <mcstas-users-bounces@mcstas.org> på vegne af Thierry Bigault <bigault@ill.fr><br>
<b>Sendt:</b> torsdag, juni 18, 2020 7:03 PM<br>
<b>Til:</b> McStas<br>
<b>Emne:</b> [mcstas-users] Inconsistent results using MPI and SPLIT
<div> </div>
</font></div>
Dear All, <br>
<br>
I built the attached instrument file to try and simulate a reflectometer. <br>
When I saw that I needed 10 minutes of calculation to get 3 neutrons on <br>
my sample, I thought it was time to try and optimize. <br>
After having a look at the manual, I first put some SPLIT keywords <br>
positioned at 5 different components, which I estimate as strategic. I <br>
gained a lot in statistics on the sample. <br>
Then I decided to use the MPI feature, as my laptop has 8 cores. It <br>
nicely reduces the computing time, at first sight it looks really great ! <br>
But the results looked strange, so I made some more systematic tests and <br>
the result is on the attached plots. With all SPLIT commented ("no <br>
SPLIT") it looks fine, the calculated intensity on the sample is <br>
consistent within the error-bars, whatever the number of nodes I use. <br>
When combining all SPLITs active and MPI ("5 SPLIT"), the calculation <br>
time and error-bars can be strongly reduced but the result depends <br>
completely on the number of nodes, with differences much larger than the <br>
error-bar... <br>
Either I did something wrong, or there is a bug somewhere. If someone <br>
has an idea about this issue, I would be interested. <br>
I use version 2.6.1 (May 04, 2020) on Windows 10. <br>
<br>
Thierry <br>
<br>
<br>
<br>
<br>
<br>
</div>
</div>
</body>
</html>