<div dir="ltr">On Fri, Feb 22, 2013 at 12:01 PM, Ian Hinder <span dir="ltr"><<a href="mailto:ian.hinder@aei.mpg.de" target="_blank">ian.hinder@aei.mpg.de</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><br>
On 22 Feb 2013, at 17:43, Frank Loeffler <<a href="mailto:knarf@cct.lsu.edu">knarf@cct.lsu.edu</a>> wrote:<br>
<br>
> Hi Kentaro,<br>
><br>
> On Fri, Feb 22, 2013 at 04:48:48PM +0100, Kentaro Takami wrote:<br>
>> I encountered the problem in which the simulation result is randomly different<br>
>> at each run( of course I used same executable, par file, HPC and so on.).<br>
><br>
> I see the same for some of my runs, but I wouldn't expect otherwise.<br>
><br>
> In my case the simulation depends on 'global' quantities, e.g.,<br>
> quantities obtained by reductions. Reductions cannot be done exactly, at<br>
> least not efficiently. Thus, values obtained via reductions (can) have<br>
> always an error that is different even when running the same simulation<br>
> twice, at least when done in parallel. If your simulation depends on<br>
> this, then these (small) differences can quickly grow, especially in<br>
> iterative schemes, e.g., hydro.<br>
<br>
</div>I disagree. Reductions should be deterministic; assuming the same number of MPI processes, the contributions to the reduction should always be added in the same order. If you change the number of MPI processes, then I agree that the result of reductions can change, as the order of the sum over points will change, and floating point addition is not associative.<br>
</blockquote><div><br></div><div style>MPI assumes that reduction operations are associative. So does OpenMP, and Carpet. So does SimFactory it its option settings. So does Kranc when it generates code...</div><div style>
<br></div><div style>-erik</div><div><br></div></div>-- <br>Erik Schnetter <<a href="mailto:schnetter@cct.lsu.edu" target="_blank">schnetter@cct.lsu.edu</a>><br><a href="http://www.perimeterinstitute.ca/personal/eschnetter/" target="_blank">http://www.perimeterinstitute.ca/personal/eschnetter/</a>
</div></div>