What to do with the `3d_threaded` integrator
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 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時間
- マージ済み PR(30日)
- 12
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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 日以内に返信