diff options
author | jthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5> | 2005-06-14 11:58:38 +0000 |
---|---|---|
committer | jthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5> | 2005-06-14 11:58:38 +0000 |
commit | 8145d1876ae2c8d3fa50f44fbd16e595d9ed9152 (patch) | |
tree | 345a851083526d2dd265a66eda4533fea515a859 /src/driver | |
parent | cdd674a46d8f14de3078259e8cfc38506ca46f02 (diff) |
fix a bug found by Yosef Zlochower:
In a multiprocessor run, AHFinderDirect finds different horizons
in parallel on different processors, and doesn't broadcast horizon
shapes to all processors unless it thinks they'll be needed. However,
the "the information will be needed" calculation doesn't take into
account the possibility of the HorizonRadiusInDirection() aliased
function being called on another processor, and in this case this
function returns a wrong result if AHFinderDirect hasn't broadcast
the horizon shapes.
* introduce a new Boolean parameter always_broadcast_horizon_shape
(defaults to false)
* document in interface.ccl, param.ccl, and doc/documentation.tex,
that this parameter should be set to true if you expect
HorizonRadiusInDirection() to be used
* inclusive-or this parameter into the "should we broadcast the horizon shape?"
calculation in src/driver/find_horizons.cc
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@1419 f88db872-0e4f-0410-b76b-b9085cfa78c5
Diffstat (limited to 'src/driver')
-rw-r--r-- | src/driver/driver.hh | 5 | ||||
-rw-r--r-- | src/driver/find_horizons.cc | 3 | ||||
-rw-r--r-- | src/driver/setup.cc | 2 |
3 files changed, 9 insertions, 1 deletions
diff --git a/src/driver/driver.hh b/src/driver/driver.hh index 6f9c992..d951f97 100644 --- a/src/driver/driver.hh +++ b/src/driver/driver.hh @@ -366,6 +366,11 @@ struct state bool announce_centroid_flag; // should we announce horizon centroid? int which_horizon_to_announce_centroid; // if so, which horizon? + // should we always broadcast each horizon shape from the processor + // that finds it, to all processors, even if there's no apparent need + // for this information on other processors? + bool always_broadcast_horizon_shape; + // this is the inclusive-or of AH_data.store_info_in_SS_vars // over all horizons, i.e. it says if we will store horizon // information in the SphericalSurface variables for *any* horizon diff --git a/src/driver/find_horizons.cc b/src/driver/find_horizons.cc index e252528..a4d2b65 100644 --- a/src/driver/find_horizons.cc +++ b/src/driver/find_horizons.cc @@ -105,7 +105,8 @@ const int N_horizons = state.N_horizons; horizon_sequence& hs = *state.my_hs; const bool active_flag = hs.has_genuine_horizons(); const bool broadcast_horizon_shape - = state.mask_info.set_mask_for_any_horizon + = state.always_broadcast_horizon_shape + || state.mask_info.set_mask_for_any_horizon || state.store_info_in_SS_vars_for_any_horizon; struct cactus_grid_info& cgi = state.cgi; diff --git a/src/driver/setup.cc b/src/driver/setup.cc index 51c5562..44c0d65 100644 --- a/src/driver/setup.cc +++ b/src/driver/setup.cc @@ -304,6 +304,8 @@ IO_info.time = 0.0; state.BH_diagnostics_info.integral_method = patch::decode_integration_method(integral_method); +state.always_broadcast_horizon_shape = (always_broadcast_horizon_shape != 0); + // // mask parameters |