[Users] Reduction operations during runtime

Erik Schnetter schnetter at cct.lsu.edu
Fri Jun 1 08:12:38 CDT 2018


Jens

A global reduction operations accesses data on grid function from all
levels and all processes. You thus need to make sure that all such data is
calculated before, and that the respective grid functions still have
storage. Reduction operations might also access boundary data, so you
should also apply proper boundary conditions to the reduced variables
beforehand. A schedule tag "option: global-late" might be required to
ensure this, in addition to the respective "after" schedule modifiers.

Also, since you are calculating an average: In what sense do you want this
average to be defined? Are you interested in the average over all
respective grid points, or should the average be scaled with the volume of
grid cells (which are much larger on coarse cells)? How do you expect the
average to change if you change the resolution? How do you expect it to
change if part of the domain is refined? Do you view the average as a
quantity that is fundamentally only defined in the discrete, or is it a
discretized approximation of an underlying quantity defined in the
continuous, i.e. via an integral? These questions will help us decide
whether "average" is the right reduction operation, or whether "iaverage"
or a combination of several reduction operations would be more appropriate.

-erik



On Fri, Jun 1, 2018 at 6:51 AM, Jens Mahlmann <jensmahl at alumni.uv.es> wrote:

> Dear all,
>
> I am currently trying to use the results of a global reduction operation
> (average) during runtime for the derivation of source terms.
>
> Especially, I run
>
>
>
>
>
> * if (CCTK_Reduce(cctkGH, -1, CCTK_ReductionHandle("average"), 1,
>   CCTK_VARIABLE_REAL,           magvaravg, 1,
> CCTK_VarIndex("FFEvolve::magvar")))     CCTK_WARN(0, "Error while reducing
> FFEvolve::magvaravg");*
>
> with OPTION:GLOBAL prior to my source term derivation (especially not in
> the Analysis schedule block). However, this basically gives me NaNs during
> runtime. Still, when I produce output of the respective quantities,
> everything works fine - it seems that only the quantity storing the average
> value is not available for all processes during runtime.
>
> Maybe you have a hint for me - I am sure I am missing something basic.
>
> Thank you very much for your input and my best from Valencia
>
> Jens
>
> _______________________________________________
> Users mailing list
> Users at einsteintoolkit.org
> http://lists.einsteintoolkit.org/mailman/listinfo/users
>
>


-- 
Erik Schnetter <schnetter at gmail.com>
http://www.perimeterinstitute.ca/personal/eschnetter/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.einsteintoolkit.org/pipermail/users/attachments/20180601/508e841c/attachment.html 


More information about the Users mailing list