add coordinates of minimum and maximum in reduction operators

Issue #627 new
Bruno Giacomazzo created an issue

In several cases it would be useful for some quantities to know not only their maximum (minimum), but also the (x,y,z) coordinates of the position of their maximum (minimum). Is it possible to modify the reduction operators so that the maximum/minimum can return also the position on the grid of the maximum/minimum of a quantity? According to the Cactus manuals this does not seem possible now.

Keyword:

Comments (2)

  1. Erik Schnetter
    • removed comment

    Yes, we should do this.

    The current specification of reduction operations in Cactus is not quite ideal. It is quite complicated to implement because it allows for type conversions while reducing (which people generally do not use), is less efficient than necessary because one cannot combine multiple reductions (e.g. min/max or avg/sdv at the same time), and PUGH and Carpet provide different APIs.

    One idea would be to implement a single, new reduction call that calculates min, max, minpos, maxpos, avg, sdv, norm1, norm2, sum, and count at the same time. Given that memory bandwidth and MPI latency are likely to dominate, this should be efficient, and would be very easy to use. (Just call the reduction operator, and look at the structure it returns.)

  2. Roland Haas
    • removed comment

    This would be possible in an elegant way in the "new" reduction interface (http://einsteintoolkit.org/documentation/UsersGuide/UsersGuidech9.html#x13-116000C1.7.4 and http://einsteintoolkit.org/documentation/ReferenceManual/ReferenceManualch2.html#x4-156000A2) by returning the position in the name-value list param_table_handle. Or via one-to-many mapping between input values and output values (both version of the interface). MPI already offers such operators in MINLOC and MAXLOC. Note that I am by no means volunteering to do so :-)

  3. Log in to comment