What to do with the `3d_threaded` integrator
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 重构
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 领域
- backend, performance
调研方向
Start by tracing Integrator3DThreaded and the parallel_integrator.py/.h, parallel_reference_profiler.h, and integration/algorithms.h files, including their bindings and tests. Check the listed calculator factories and their uses to identify what exists only for this path. Done means removing the integrator option and its dedicated code, bindings, tests, and factories; the issue describes this as a deletion preference, so confirm the project's direction before undertaking the broad removal.
由索引模型根据 Issue 内容生成。
描述
I spent a bit of time exploring this option, trying to understand why it never became default, and working out whether it is worth investing in it further or remove it entirely. First I found it doesn't work out-of-the-box:
- It doesn't run with default settings. It rejects
background.algorithm=autoand fails onnproc=Auto. - With more than one thread it aborts. There is a data race in dxtbx
Scangetters (non-atomicaf::sharedrefcounts; present since https://github.com/cctbx/dxtbx/pull/620). - No end-to-end tests. Only the individual algorithms are unit-tested.
Some benchmarks using the dxtbx fix, background.algorithm=glm, and a 16-core workstation show that it is slower and loses data:
| Dataset | Standard 3d (nproc=8) | 3d_threaded (best config) |
|---|---|---|
| Insulin, Eiger 16M, 450 images, sparse | 1:12, 0.8 GB | 2:02, 2.2 GB (njobs=2; 1–16 threads all ~3:35) |
| EscoA, Eiger 9M, 900 images, 200 Å axis | 4:39, 2.2 GB, 1.37M refl | 7:54, 8 GB, 565k refl |
This might be because:
- Image reading is single-threaded per job. Threads don't help on sparse data.
- Neighbouring reflections' foreground is masked as
Overlapped, which:- costs about 2× per core on crowded data;
- makes summation fail for any reflection with overlapped foreground. On EscoA that discards 1.13M of 1.78M reflections.
- with masking disabled, the best configuration gets to 4:56 (vs 4:39), but with about 80 % more CPU.
- Memory is higher, not lower. Reflections are held as one
std::mapper row (~4.5 KB each), giving 14 GB peak on EscoA.
It also lacks several features of the standard integrator:
- the valid-foreground filter
- ice-ring flagging
overlaps_filterlookup.mask- multi-sweep support
and it splits ~10× more reflections into partials.
To make it competitive would require, at least:
- parallel image reading
- a larger ring buffer that blocks instead of busy-waiting
- keep reflection data in the table's existing columns instead of converting every row to a std::map (that conversion is most of the memory and a global lock)
- an overlap policy
- default-settings compatibility
- feature parity with the standard integrator
- end-to-end tests
Which looks a lot like a total rewrite to me. My preference would be to delete it and remove the option, as keeping it around is a cognitive load for further development of dials.integrate. This would mean removing:
Integrator3DThreadedparallel_integrator.py/.h,parallel_reference_profiler.handintegration/algorithms.h, with their bindings and tests- the
*CalculatorFactoryclasses inbackground/{simple,glm,gmodel}/algorithm.pyandprofile_model/gaussian_rs/algorithm.py, which exist only to serve this path.
- 主要语言
- Python
- 星标
- 107
- 派生
- 61
- 平均合并
- 2 天 15 小时
- 30 天内合并 PR
- 12
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
dials/dials 的其他 Issue
-
Clear params.inputs in dials.index可能已有人在做 @phyy-nx 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
dials.generate_mask silently ignores masking options when given only mask files可能已有人在做 @CAOShurong 于 5 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 35/100
维护者通常 1 天内回复
-
dials.reindex reference.file= refuses a reference in the enantiomorphic space group, contrary to help text可能已有人在做 @spmeisburger 于 3 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 78/100
维护者通常 1 天内回复
-
search beam position fail可能已有人在做 @mpks 于 3 天前认领。 未关闭
dials/dials#3352 · 2 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
相似的 Issue
-
A JSON chat answer blocks the backend event loop for the whole RAG run可能已有人在做 @NopeCharon 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 85/100
The-OpenROAD-Project/ORAssistant#656 ·
维护者通常 1 天内回复
-
bug(operator): VolterraOperator built inside jax.jit with a concrete decay raises TracerBoolConversionError可能已有人在做 @jejjohnson 今天认领。 未关闭type:bug
难度 2/5 1-3 小时 新手友好度 72/100
jejjohnson/integrix#144 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
finos/ai-governance-framework#459 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
autowarefoundation/autoware_carla_scenario#2963 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复