<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
{font-family:CMR10;
panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:CMSS10;
panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:CMTT10;
panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.E-MailFormatvorlage17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Dear MPI community,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-US">I found a problem when calling MPI_REDUCE with the keyword MPI_IN_PLACE in my Ftn95-code (using the INTEL-12 Ftn95-compiler).<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Depending on the MPI-implementation and the operating system the problem occurs or not.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">This is my experience so far:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> MPICH2 v.1.4.1p1 on Win7(64-bit) PC : It works<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> Microsoft-MPI (v. of 12/11/2012) on WIN7(64-bit) PC : <b>It fails (either assuming the contribution of the root to be zero (i.e. silently a wrong result!),
<o:p></o:p></b></span></p>
<p class="MsoNormal"><b><span lang="EN-US"> or access violation or floating exception on the root in MPI_REDUCE )</span></b><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> OPENMPI v.1.6.2-2 on WIN7(64-bit) PC :
<b>It fails ( in the same manner as with MS-MPI) </b><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> OPENMPI v.1.4.3 and 1.6.3 on 2 LINUX-Clusters : It works<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> INTEL-MPI v. 4.0.3 and 4.1.0 on 2 LINUX-Clusters : It works<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US">My question is: Is the failing possibly caused by an erroneous (‘dangerous’) Ftn-coding causing some MPI implementations to fail and others not?<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span lang="EN-US"> Or is the problem actually caused by a bug in different MPI implementions?<o:p></o:p></span></b></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">This is my Ftn95-coding:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:red">!</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">
</span><b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:blue">subroutine</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">
</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#400040">mpiw_reduce_sumfast_real8</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">(
</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#400040">rbuffarr</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">,
</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#400040">nelem
</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">)</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:red">!</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:red">!===============================================================================</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:red">!</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:red">! sbr mpiw_reduce_sumfast_real8 is a wrapper for the MPI-routine MPI_REDUCE</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:red">! applied for summing element-wise a real(REAL8) 1d-array rbuffarr(nelem)</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:red">! from all processes of communicator commSPRAY</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:red">! and store the sums on master in the same array rbuffarr(nelem) ,</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:red">! i.e. on the master we overwrite the original contribution of the master by:</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:red">!</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:red">! for i=1..nelem: rbuffarr(i) = SUM_over_iproc (rbuffarr(i) ) , with iproc=1,numprocs</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:red">!<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:red">!</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:red">! mpiw_reduce_sumfast_real8 calls : MPI_REDUCE</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:red">!</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:red">! last update: 03.09.2013</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:red">!===============================================================================</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:red">!</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black"> </span><b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:blue">use</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">
</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#400040">MPIHEADER</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black"> ,
</span><b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:blue">only</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">:
</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#400040">MPI_SUM</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">,
</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#400040">MPI_IN_PLACE</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">
</span><b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:blue">use</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">
</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#400040">NUMBER_MODEL</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">,
</span><b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:blue">only</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">:
</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#400040">INT4</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">,</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#400040">REAL8</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">
</span><b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:blue">use</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">
</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#400040">MPARAL</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black"> ,
</span><b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:blue">only</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">:
</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#400040">lmaster</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">,
</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#400040">commSPRAY</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">,
</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#400040">ierr_mpi</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">,
</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#400040">mpiusertype_REAL8</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas;color:red">!</span><span style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:Consolas;color:black">
</span><b><span style="font-size:10.0pt;font-family:Consolas;color:blue">implicit</span></b><span style="font-size:10.0pt;font-family:Consolas;color:black">
</span><b><span style="font-size:10.0pt;font-family:Consolas;color:blue">none</span></b><span style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:red">!</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">
</span><b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:blue">integer</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black"> (</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#400040">INT4</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">)
, </span><b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:blue">intent</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">(</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#400040">IN</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">)
:: </span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#400040">nelem</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">
</span><b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:blue">real</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black"> (</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#400040">REAL8</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">),
</span><b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:blue">intent</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">(</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#400040">INOUT</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">),
</span><b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:blue">dimension</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">(</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#400040">nelem</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">)
:: </span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#400040">rbuffarr</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">
</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:red">! input on master&slaves, result only on master</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:red">!</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">
</span><b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:blue">real</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black"> (</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#400040">REAL8</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">)
:: </span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#400040">rdummyarr</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">(1)</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">
</span><b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:blue">if</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">(</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#400040">lmaster</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">)
</span><b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:blue">then</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">
</span><b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:blue">call</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">
</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#400040">MPI_REDUCE</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">(
</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#400040">MPI_IN_PLACE</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">,
</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#400040">rbuffarr</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">,
</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#400040">nelem</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">,
</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#400040">mpiusertype_REAL8</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">,
</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#400040">MPI_SUM</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black"> &</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black"> ,0</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#400040">_INT4</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">,
</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#400040">commSPRAY</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">,
</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#400040">ierr_mpi</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black"> )</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">
</span><b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:blue">else</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">
</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:red">! slaves</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">
</span><b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:blue">call</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">
</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#400040">MPI_REDUCE</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">(
</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#400040">rbuffarr</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">,
</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#400040">rdummyarr</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">,
</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#400040">nelem</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">,
</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#400040">mpiusertype_REAL8</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">,
</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#400040">MPI_SUM</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black"> &</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black"> ,0</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#400040">_INT4</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">,
</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#400040">commSPRAY</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">,
</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#400040">ierr_mpi</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black"> )</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">
</span><b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:blue">endif</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:red">!</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black"></span><span style="font-size:10.0pt;font-family:Consolas;color:black"> </span><b><span style="font-size:10.0pt;font-family:Consolas;color:blue">return</span></b><span style="font-size:10.0pt;font-family:Consolas"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">
</span><b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:blue">end</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">
</span><b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:blue">subroutine</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:black">
</span><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#400040">mpiw_reduce_sumfast_real8</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Note, that the problem is not dependent on the reduce-operator (here MPI_SUM) chosen.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">The problem does not occur, when I apply MPI_REDUCE without the MPI_IN_PLACE option.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">As a reference I cite here the MPI 2.2 standard (of Sept 4, 2009, p. 164):<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-family:CMR10"> The “in place" option for intracommunicators is specified by passing the value<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span lang="EN-US" style="font-size:10.0pt;font-family:CMSS10"> MPI</span><span lang="EN-US" style="font-size:10.0pt;font-family:CMTT10">_</span><span lang="EN-US" style="font-size:10.0pt;font-family:CMSS10">IN</span><span lang="EN-US" style="font-size:10.0pt;font-family:CMTT10">_</span><span lang="EN-US" style="font-size:10.0pt;font-family:CMSS10">PLACE
</span><span lang="EN-US" style="font-family:CMR10">to the argument </span><span lang="EN-US" style="font-family:CMSS10">sendbuf
</span><span lang="EN-US" style="font-family:CMR10">at the root. In such a case, the input data is taken<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:CMR10"> at the root from the receive buffer, where it will be replaced by the output data.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:CMR10"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Does my coding strictly conform to this?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Greetings<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Michael Rachner</span><span lang="EN-US" style="font-family:CMR10"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:CMR10"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:CMR10"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
</body>
</html>