CT-INT: FourierTransformer and U_matrix default FLAVORS to 2 while the solver falls back to N_ORBITALS
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 58/100
Research direction
Read src/apps/dmft/qmc/fouriertransform.C, src/apps/dmft/qmc/U_matrix.h, and the solver’s flavor-count handling to see how defaults reach the legacy consumers. Reproduce the reported case with N_ORBITALS = 4 and no FLAVORS; the issue suggests adding a regression test and running it under the sanitizer build. Done means the consumers use the solver’s resolved flavor count and the regression test passes.
Written by the indexing model from the issue text.
Description
Summary
The CT-INT solver (interaction) and the legacy code it calls disagree on the number of flavors when FLAVORS is not given:
| Where | Number of flavors without FLAVORS |
|---|---|
Solver (ctint_parameters::n_flavors on master, read_ctint_parameters in #288) |
N_ORBITALS |
FourierTransformer::generate_transformer / generate_transformer_U (src/apps/dmft/qmc/fouriertransform.C) |
2, via value_or_default("FLAVORS", 2) |
U_matrix (src/apps/dmft/qmc/U_matrix.h) |
2, via value_or_default("FLAVORS", 2) |
The legacy consumers receive an alps::Parameters built by make_deprecated_parameters, which since 9de5b581a copies only the keys the user supplied. A resolved flavor count never reaches them; they see FLAVORS only if it was in the input.
Consequence
With N_ORBITALS = 4 and no FLAVORS:
- The solver uses 4 flavors.
MultiBandDensityHubbardInteractionExpansion::try_add(interaction_expansion2/model.cpp) drawsflavor1andflavor2from[0, 4)and evaluatesU(flavor1, flavor2). U_matrixwas built withnf_ = 2.operator()returnsval_[flavor_i*nf_ + flavor_j]from a 4-element array, so indices up to 15 are read past the end of the heap allocation.- The Fourier transformers are built for 2 flavors, while the Green's functions they transform have 4.
I found this by reading the code and have not run it. Expect a crash, or silently wrong results (garbage interaction values and tail coefficients). It affects standalone interaction runs, and dmft runs whose parameters set N_ORBITALS but not FLAVORS.
This is already on master; #288 does not change it.
Possible fix
Pass the resolved flavor count to the legacy consumers, for example by adding FLAVORS to the Parameters built for U_matrix and the Fourier transformers. Alternatively, make those consumers fall back to N_ORBITALS the way the solver does. A regression test with N_ORBITALS = 4 and no FLAVORS would catch it. Running it under the sanitizer build would show the out-of-bounds read.
- Dominant language
- C++
- Stars
- 32
- Forks
- 10
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 54
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ALPSim/ALPS
-
Parallel Ising example: operator precedence makes the heat-bath energy difference wrongPossibly taken @skilledwolf claimed this 1 day ago. Openarea:tutorials bug scientific-correctness
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ALPSim/ALPS#313 · 1 assignee ·
Maintainers usually reply within 2 days
-
Replica exchange with PROCESS_PER_WORKER > 1 creates too few replicasPossibly taken @skilledwolf claimed this today. Openarea:parapack bug scientific-correctness
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ALPSim/ALPS#312 · 1 assignee ·
Maintainers usually reply within 2 days
-
area:lattice bug
Difficulty 1/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days
-
Read parameter files straight into the solver input structsPossibly taken @Ooolab claimed this 1 day ago. Open
ALPSim/ALPS#317 · 1 assignee ·
Maintainers usually reply within 2 days
-
parapack MPI: messages over 2 GiB fail without a clear error; CHANGELOG note missingPossibly taken @skilledwolf claimed this 1 day ago. Openarea:parapack compatibility-change enhancement
Difficulty 3/5 1-2 days Newbie friendliness 57/100
ALPSim/ALPS#315 · 1 assignee ·
Maintainers usually reply within 2 days
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
xiaoyifang/goldendict-ng#3148 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 91/100
triton-inference-server/server#9069 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 4 days
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
[Bug]: Launching Space Calibrator causes Bluetooth mouse lag due to a 100% duty-cycle BLE scanPossibly taken @Yuuki204 claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100