RotationIndexer: the fixed-point chain's Ceres solves on 16 threads
One chain runs at a time there, after the parallel candidate solves, on 1-3.5 cores of an otherwise idle machine. Ceres sums per-thread cost and gradient pieces, so the thread count may move a result at rounding level; measured, it did not: identical outputs on the four reference sweeps and all 22 smoke sets, and a sweep that indexes poorly (a chain after every spot-budget rung) went from 96 to 62 s. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D1G8gJVAy6gp1K5Dz3NE5C
This commit is contained in:
1 parent
68b295e9d8
commit
d71cd5b85e
1 file changed
+5
-1
@@ -629,9 +629,13 @@ void RotationIndexer::RunIndexingLocked() {
|
||||
float kept_count = -1.0f;
|
||||
float last_count = 0.0f;
|
||||
LatticeSearchResult kept_class, last_class;
|
||||
// One chain runs at a time here, with the candidate solves done, so it takes the cores
|
||||
// they had. Ceres sums its per-thread cost and gradient pieces, so the thread count moves
|
||||
// the result at rounding level.
|
||||
constexpr int kChainCeresThreads = 16;
|
||||
for (int r = 0; r < ROT_REFINE_OUTER_ROUNDS; ++r) {
|
||||
XtalOptimizerData d = best;
|
||||
if (!XtalOptimizer(d, v_, kCeresThreads))
|
||||
if (!XtalOptimizer(d, v_, kChainCeresThreads))
|
||||
break;
|
||||
const double d1 = std::abs(d.geom.GetPoniRot1_rad() - best.geom.GetPoniRot1_rad());
|
||||
const double d2 = std::abs(d.geom.GetPoniRot2_rad() - best.geom.GetPoniRot2_rad());
|
||||
|
||||
Reference in new issue
Block a user