<div dir="ltr">Sorry for the late reply, was (and am) still testing around...<div><br></div><div>Here is the schedule tree for my thorn:</div><div><br></div><div><div>      disk_analysis::Disk_Analysis_Setup_LoopCounter: [global] </div><div>      while (Disk_Analysis::nradii_LoopCounter)</div><div>        GROUP DISK_ANALYSE: Disk_analysis main loop</div><div>          disk_analysis::Disk_Analysis_Decrement_LoopCounter: [global] </div><div>          disk_analysis::Disk_Analysis_calculate_J_gridpoint_shell: [global] [loop-local] </div><div>          disk_analysis::Disk_Analysis_reduce_J_total_shell: [global] </div><div>          disk_analysis::Disk_Analysis_calculate_angles_shell: [global] </div><div>      end while</div><div>      disk_analysis::Disk_Analysis_extraction_plane: [global] </div><div>      GROUP DISK_GLOBAL_QUANTITIES: </div><div>        disk_analysis::Disk_Analysis_set_global_quantities: [global] [loop-local] </div><div>        disk_analysis::Disk_Analysis_reduce_global_quantities: [global] </div><div>        disk_analysis::Disk_Analysis_set_global_specific_quantities: [global] [loop-local] </div><div><br></div></div><div>The problem is the following:</div><div><br></div><div>I want to calculate some quantities in the function <i>disk_analysis::Disk_Analysis_set_global_specific_quantities</i>, these will be grid functions that I want to output (in 1D and 3D)</div><div><br></div><div>however, the calculation depends on <i>disk_analysis::Disk_Analysis_extraction_plane</i>, where I decide if I need to rotate the coordinate system in which I later want to calculate the grid functions... it basically calculates and stores a rotation matrix, as well as an integer switch that later tells us if we need to rotate..</div><div><br></div><div>now, when scheduling <i>disk_analysis::Disk_Analysis_set_global_specific_quantities</i> as global loop-local, the values obtained in <i>disk_analysis::Disk_Analysis_extraction_plane</i> (which i store as SCALARS and have assigned storage for) are the correct ones, however, I cannot output the grid functions calculated, which I guess is due to this response from Roland in the mailing list earlier this year:</div><div><br></div><div><div><i>On Tue, Jun 2, 2015 at 1:46 PM, Roland Haas &lt;rhaas at <a href="http://aei.mpg.de">aei.mpg.de</a>&gt; wrote:</i></div><div><i><br></i></div><div><i>&gt; Hello all,</i></div><div><i>&gt;</i></div><div><i>&gt; &gt; If you are scheduling everything in GLOBAL (which is the same as</i></div><div><i>&gt; &gt; GLOBAL-LATE in ANALYSIS) then your OUTPUT will be incorrect since OUTPUT</i></div><div><i>&gt; &gt; is happening in LEVEL mode thus refinement level 3 is output before the</i></div><div><i>&gt; &gt; GLOBAL routine (which runs along with level 0) is executed.</i></div><div><i>&gt; Oha, obvious not the right statement. GLOBAL-LATE will happen last but</i></div><div><i>&gt; this happens to be the highest refinement level. Still the effect is the</i></div><div><i>&gt; same OUTPUT happens before GLOBAL-LATE for all but one refinement level</i></div><div><i>&gt; (that refinement level being the finest one).</i></div><div><i>&gt;</i></div><div><i>&gt; This can be seen in Carpet&#39;s Evolve.cc file in the CallAnalysis routine.</i></div><div><i>&gt;</i></div><div><i>&gt; Yours,</i></div><div><i>&gt; Roland</i></div></div><div><br></div><div>now, if i want correct output, i can use either local mode or global-early loop-local mode..</div><div><br></div><div>then however, the values of the rotation matrix and the integer switch of actually using it are not correct, because the routine seems to be called now not in the order indicated by the schedule tree, but rather before the values have been set...</div><div><br></div><div>so: when using <i>global loop-local </i>in<i> </i><i>disk_analysis::Disk_Analysis_set_global_specific_quantities</i>, the grid functions are not output correctly (only in the innermost refinement level)</div><div><br></div><div>and when using <i>local</i> or <i>global-early loop-local </i>the function <i>disk_analysis::Disk_Analysis_set_global_specific_quantities </i>cannot access the data calculated by <i>disk_analysis::Disk_Analysis_extraction_plane..</i></div><div><i><br></i></div><div>is there an obvious way around this? ie getting the correct scheduling for both being able to use the values in the function AND outputting the calculated grid functions correctly??<i><br></i></div><div><br></div><div>best wishes,</div><div><br></div><div>Vassili</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 18, 2015 at 3:17 PM, Frank Loeffler <span dir="ltr">&lt;<a href="mailto:knarf@cct.lsu.edu" target="_blank">knarf@cct.lsu.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Fri, Sep 18, 2015 at 12:53:33PM +0200, Vassilios Mewes wrote:<br>
&gt; I have a scalar variable, which contains the elements of a rotation matrix<br>
&gt; that rotates the z-axis into a given vector...<br>
&gt;<br>
&gt; I want to calculate some quantities (that are grid functions) in<br>
&gt; coordinates that have been rotated by this matrix...<br>
&gt;<br>
&gt; I run into the following problem:<br>
&gt;<br>
&gt; when scheduling the calculation of the quantities in local mode, the<br>
&gt; function doesn&#39;t seem to have access to the rotation matrix elements...<br>
<br>
</span>You should have access to scalars in any mode. What happens when you try?<br>
<span class=""><br>
&gt; when scheduling the calculation in global, loop-local mode, I can&#39;t output<br>
&gt; the data at the grid points (the output gives 1.96808407167164e+243 at each<br>
&gt; point for every refinement level apart from the innermost, where the values<br>
&gt; are output correctly)<br>
<br>
</span>It is difficult to see what is going on without the actual scheduling<br>
statements, and in general more information. Could you please post at<br>
least the declaration of both scalar and GFs from interface.ccl, and the<br>
corresponding SCHEDULE entries in schedule.ccl? Also, I assume you do<br>
have storage enabled for both? Also useful might be the output of the<br>
schedule tree. You get that by default, but also when running with the<br>
-S option (that aborts the run after the tree has been printed).<br>
<span class="HOEnZb"><font color="#888888"><br>
Frank<br>
</font></span></blockquote></div><br></div>