<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<font size="+1"><font face="monospace">IO_writeIntegralQuantities.F90
offers a good place to start.<br>
<br>
Tomek<br>
--</font></font><br>
<div class="moz-cite-prefix">On 6/6/21 10:50 AM, Maksim Kozlov
wrote:<br>
</div>
<blockquote type="cite" cite="mid:CADidur1y1+PL_9+U5Oc4WJXDZZOmoFUUts=_D0tWROdEj3Kpig@mail.gmail.com">
<div dir="ltr">
<div>Dear Flash users,</div>
<div>How can I sum variable across all blocks , not just blocks
calculated by one processor?</div>
<div>I am trying to do the following<br>
</div>
<div>I need to sum some variable calculated inside
Simulation_initBlock over several blocks. So in
"gr_expandDomain" I added</div>
<div> srce_volume=0</div>
<div> do i = 1, count</div>
<div> ...</div>
<div> call Simulation_initBlock (blkList(i),tvolume)</div>
<div> srce_volume=srce_volume+tvolume<br>
end do</div>
<div>to use srce_volume in different subroutines I added <br>
</div>
<div>real, save :: srce_volume</div>
<div>to Simulation_data</div>
<div>and <br>
</div>
<div>use Simulation_data, ONLY : srce_volume</div>
<div>in all subroutines where I need it <br>
</div>
<div>but what happens is that all blocks are divided between
different processors so srce_volume is summed only over blocks
of one processor instead of adding it for all blocks. </div>
<div>Thank you very much!</div>
<div>Maksim Kozlov<br>
</div>
</div>
</blockquote>
<br>
</body>
</html>