module placement: the five concurrent fits each keep every thread
One Ceres fit keeps only ~5-6 of 32 cores busy whatever it is given, and on a loaded machine (load 28-36, JF16M int16, 4000 strong frames) the five side-by-side fits measured 10.9 s with every thread each, 13.8 s with half, 14.6 s with a fifth, against 18.9 s one after the other (bb7c9c). The thread split is dropped: each fit gets gr_settings' threads, as before the fits ran side by side. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015CeEGgpKdfkCTJb3YNMJcu
This commit is contained in:
1 parent
b87b015253
commit
677ef2dfd4
1 file changed
+3
-7
@@ -340,14 +340,13 @@ void Rugnux::RefineStillsGeometry(int start_image, int end_image, int images_to_
|
||||
|
||||
// The four held-out fits and the placement on every frame do not depend on each other, and one fit
|
||||
// keeps only five or six cores busy however many threads it is given (measured on 32): all five run
|
||||
// side by side, each on a fifth of the threads. The placement is computed whether or not the held-out
|
||||
// residuals then call for it.
|
||||
// side by side, each with every thread - on a busy machine that measured faster than a fifth each
|
||||
// (JF16M: 10.9 s against 14.6 s, 18.9 s one after the other). The placement is computed whether or
|
||||
// not the held-out residuals then call for it.
|
||||
TimingMark placement_mark(logger, "module placement fits");
|
||||
const int fit_threads = std::max(1, config_.nthreads / 5);
|
||||
GeometryRefinerSettings st = gr_settings;
|
||||
st.modules = start;
|
||||
st.refine_modules = true;
|
||||
st.num_threads = fit_threads;
|
||||
auto placement = std::async(std::launch::async, [&] {
|
||||
return RefineGlobalGeometry(nominal, *cell, placing, st);
|
||||
});
|
||||
@@ -357,7 +356,6 @@ void Rugnux::RefineStillsGeometry(int start_image, int end_image, int images_to_
|
||||
GeometryRefinerSettings sf = gr_settings;
|
||||
sf.modules = modules;
|
||||
sf.refine_modules = refine;
|
||||
sf.num_threads = fit_threads;
|
||||
const auto f = RefineGlobalGeometry(nominal, *cell, half[fit], sf);
|
||||
if (!f.ok)
|
||||
return std::numeric_limits<double>::infinity();
|
||||
@@ -366,7 +364,6 @@ void Rugnux::RefineStillsGeometry(int start_image, int end_image, int images_to_
|
||||
GeometryRefinerSettings ev = gr_settings;
|
||||
ev.refine_beam_distance = false;
|
||||
ev.modules = f.modules;
|
||||
ev.num_threads = fit_threads;
|
||||
const auto e = RefineGlobalGeometry(g, f.cell, half[1 - fit], ev);
|
||||
if (!e.ok)
|
||||
return std::numeric_limits<double>::infinity();
|
||||
@@ -395,7 +392,6 @@ void Rugnux::RefineStillsGeometry(int start_image, int end_image, int images_to_
|
||||
// so every spot found and every prediction integrated from here on uses it. The image is
|
||||
// not touched.
|
||||
if (config_.module_diagnostics) {
|
||||
st.num_threads = gr_settings.num_threads; // its fits run one at a time
|
||||
ModuleDiagnosticsInput diag{nominal, *cell, placing, centres, start, st, rm,
|
||||
experiment_.GetDetectorSetup().GetSensorMaterial(),
|
||||
experiment_.GetDetectorSetup().GetSensorThickness_um()};
|
||||
|
||||
Reference in new issue
Block a user