Opened 7 years ago

Last modified 7 years ago

#627 new enhancement

add coordinates of minimum and maximum in reduction operators

Reported by: bruno.giacomazzo@… Owned by:
Priority: major Milestone:
Component: Cactus Version:
Keywords: Cc:


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.

Attachments (0)

Change History (2)

comment:1 Changed 7 years ago by Erik Schnetter

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.)

comment:2 Changed 7 years ago by Roland Haas

This would be possible in an elegant way in the "new" reduction interface ( and 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 :-)

Modify Ticket

Change Properties
Set your email in Preferences
as new The ticket will remain with no owner.
Next status will be 'review'.
as The resolution will be set.
to The owner will be changed from (none) to the specified user.
Next status will be 'confirmed'.
The owner will be changed from (none) to anonymous.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.