Hi,
On Wed, Jun 29, 2011 at 12:45:11PM -0400, Erik Schnetter wrote:
"I suggest to switch off OpenMP in this routine, to insert a check whether a single component contains multiple maxima and treat this the same as when several components contain multiple maxima
I agree. This algorithm is expected to work poorly for multiple maxima, which is documented (but only poorly: as [long] comments in the source code).
, and to set the location of the maximum to a special error value (or to introduce an error flag) so that it is obvious when the routine fails."
This would also require code which relies on the current non-setting of the location in case of multiple maxima to be changed. In particular, this is true for neutron star trackers which use the location of the maxima as criterion for regridding, and which should not try to regrid at a special error value (and thus fail. An error flag together with not setting a new maxima would circumvent that.
Of course, a much better solution for the regridding would be an entirely different algorithm, which I think everybody agrees to. I don't know of any other application which actually uses the location of the maximum.
Frank