[Users] scheduling and SCALAR variable
vassilios.mewes at uv.es
Sat Sep 19 10:40:48 CDT 2015
Sorry for the late reply, was (and am) still testing around...
Here is the schedule tree for my thorn:
GROUP DISK_ANALYSE: Disk_analysis main loop
The problem is the following:
I want to calculate some quantities in the function
*disk_analysis::Disk_Analysis_set_global_specific_quantities*, these will
be grid functions that I want to output (in 1D and 3D)
however, the calculation depends on
*disk_analysis::Disk_Analysis_extraction_plane*, 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..
now, when scheduling
*disk_analysis::Disk_Analysis_set_global_specific_quantities* as global
loop-local, the values obtained in
*disk_analysis::Disk_Analysis_extraction_plane* (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:
*On Tue, Jun 2, 2015 at 1:46 PM, Roland Haas <rhaas at aei.mpg.de
*> Hello all,*
*> > If you are scheduling everything in GLOBAL (which is the same as*
*> > GLOBAL-LATE in ANALYSIS) then your OUTPUT will be incorrect since
*> > is happening in LEVEL mode thus refinement level 3 is output before
*> > GLOBAL routine (which runs along with level 0) is executed.*
*> Oha, obvious not the right statement. GLOBAL-LATE will happen last but*
*> this happens to be the highest refinement level. Still the effect is the*
*> same OUTPUT happens before GLOBAL-LATE for all but one refinement level*
*> (that refinement level being the finest one).*
*> This can be seen in Carpet's Evolve.cc file in the CallAnalysis routine.*
now, if i want correct output, i can use either local mode or global-early
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...
so: when using *global loop-local *in
*disk_analysis::Disk_Analysis_set_global_specific_quantities*, the grid
functions are not output correctly (only in the innermost refinement level)
and when using *local* or *global-early loop-local *the function
*disk_analysis::Disk_Analysis_set_global_specific_quantities *cannot access
the data calculated by *disk_analysis::Disk_Analysis_extraction_plane..*
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??
On Fri, Sep 18, 2015 at 3:17 PM, Frank Loeffler <knarf at cct.lsu.edu> wrote:
> On Fri, Sep 18, 2015 at 12:53:33PM +0200, Vassilios Mewes wrote:
> > I have a scalar variable, which contains the elements of a rotation
> > that rotates the z-axis into a given vector...
> > I want to calculate some quantities (that are grid functions) in
> > coordinates that have been rotated by this matrix...
> > I run into the following problem:
> > when scheduling the calculation of the quantities in local mode, the
> > function doesn't seem to have access to the rotation matrix elements...
> You should have access to scalars in any mode. What happens when you try?
> > when scheduling the calculation in global, loop-local mode, I can't
> > the data at the grid points (the output gives 1.96808407167164e+243 at
> > point for every refinement level apart from the innermost, where the
> > are output correctly)
> It is difficult to see what is going on without the actual scheduling
> statements, and in general more information. Could you please post at
> least the declaration of both scalar and GFs from interface.ccl, and the
> corresponding SCHEDULE entries in schedule.ccl? Also, I assume you do
> have storage enabled for both? Also useful might be the output of the
> schedule tree. You get that by default, but also when running with the
> -S option (that aborts the run after the tree has been printed).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Users