SCOPFLOW multi-period output: constraint multipliers are taken from the primal vector x
Maintainers usually reply within 3 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 68/100
Research direction
Read src/scopflow/interface/scopflowoutput.cpp, focusing on SCOPFLOWPrintSolution and SCOPFLOWSaveSolutionAllBase and how the primal and multiplier arrays are placed. Check the contingency index against scopflow->cstart as well. Done means multi-period output uses multiplier values for multiplier columns, and MINIMAL output associates contingencies with the correct solution across MPI ranks.
Written by the indexing model from the issue text.
Description
Issue applies to:
- pflow
- OPFLOW
- TCOPFLOW
- SCOPFLOW
- SOPFLOW
- CMake and build system
- Spack
- Visualization
- Documentation
- Other
Summary
In the multi-period branches of SCOPFLOWPrintSolution and SCOPFLOWSaveSolutionAllBase
(src/scopflow/interface/scopflowoutput.cpp), the multipliers are fetched with
VecGetArrayRead(tcopflow->Lambda, &lambda), but the per-period OPFLOW multiplier vector
is then placed on the primal array x:
ierr = VecPlaceArray(opflow->Lambda, x + tcopflow->gstarti[t]); // SaveSolutionAllBase
ierr = VecPlaceArray(opflow->Lambda, x + tcopflow->gstarti[0]); // PrintSolution
lambda is never used. The printed and saved multipliers (mult_Pmis, mult_Qmis and the
other multiplier columns) of a multi-period SCOPFLOW run are therefore primal values. Because
gstarti is a constraint offset, the read can also go past the end of x.
Related, same function: in SCOPFLOWSaveSolutionAllBase,
ContigencyAppendMinimal(&(scopflow->ctgclist->cont[c]), c, ...) uses the rank-local index
c, while the solution uses scopflow->cstart + c. With MINIMAL output and more than one
MPI rank, the appended contingency does not match the file.
Description how to reproduce the issue
Found by reading the source; not reproduced on a run. Any multi-period SCOPFLOW run with
-scopflow_enable_multiperiod -save_output (or -print_output) goes through these lines.
ExaGO version
Source read at 587374f and on develop 43726da (2026-10-19); the lines are unchanged between them.
System and environment details
PRETTY_NAME="Ubuntu 24.04.4 LTS"
6.18.33.2-microsoft-standard-WSL2
gcc (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0
Additional information
No response
Possible fix or workaround
Use lambda instead of x in both calls:
ierr = VecPlaceArray(opflow->Lambda, lambda + tcopflow->gstarti[t]);
ierr = VecPlaceArray(opflow->Lambda, lambda + tcopflow->gstarti[0]);
and pass scopflow->cstart + c to ContigencyAppendMinimal.
- Dominant language
- Python
- Stars
- 17
- Forks
- 11
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 2
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- No 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 ORNL/ExaGO
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 3 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 3 days
-
[E38] a DC line at the reference bus demotes it to PV: `PSSetUp`'s condition is always trueMay be free again @hambrickjc claimed this 50 days ago, and no pull request is open. Open
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
ORNL/ExaGO#109 · 3 comments · 1 assignee ·
Maintainers usually reply within 3 days
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 45/100
Maintainers usually reply within 3 days
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
Maintainers usually reply within 3 days
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
Netcracker/qubership-ai-packages#266 ·
Maintainers usually reply within 1 day
-
PROCESSED_DATA_FOLDER: strip whitespace and treat empty as unsetPossibly taken @TorecLuik claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
NL-BioImaging/BIOMERO.importer#63 ·
Maintainers usually reply within 1 day
-
MLX training-complete chat/merge suggestions omit --backend mlxPossibly taken @vaputa claimed this today. Openneeds-triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
MakazhanAlpamys/Soup#2913 · 1 comment ·
Maintainers usually reply within 1 day
-
area:security effort:S priority:P3 status:needs-triage type:chore
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
randomparity/kdive#3657 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
aws/mcp-proxy-for-aws#476 ·
Maintainers usually reply within 1 day