dca: a bare -- on the command line makes the solver read --MU as a parameter file
Maintainers usually reply within 2 days
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 84/100
Research direction
The command line for the external solver is assembled in ImpuritySolver in src/apps/dmft/dca/libsolver/impurity_solver.h; read that loop first, then check how args_-style arguments reach it from dca after the parameter file. The fix given in the issue inserts the loop's --MU before a bare -- and stops stripping --MU= arguments after it. Done means the new case in impurity_solver_test with arguments {"--U=2", "--", "extra.ini"} produces params.ini --U=2 --MU=0.3 -- extra.ini, with the existing test still passing.
Written by the indexing model from the issue text.
Description
Found while reviewing #464 (fix for #463), at 767720107.
Problem
alps::params reads every argument after a bare -- as another parameter file. With #464, dca passes its arguments after the parameter file on to the solver and then adds the loop's --MU, so after a -- the solver reads --MU=<mu> as a file name and fails:
$ dca params.ini -- extra.ini
Calling external solver as: .../dca_free_solver 'params.ini' '--' 'extra.ini' --MU=0.3
iniparser: cannot open --MU=0.3
free_solver: Cannot read INI file --MU=0.3
System error code 256 encountered when executing command:
The filter that drops a --MU= override also drops a file named --MU=... after the --.
Fix
In ImpuritySolver (src/apps/dmft/dca/libsolver/impurity_solver.h), write the loop's --MU before a --, and stop filtering after it:
command << launch_command_ << " " << shell_quote(param_file_name_);
bool files_only = false;
for (const std::string &argument : arguments_) {
if (!files_only && argument == "--") {
command << " --MU=" << exact(mu_);
files_only = true;
} else if (!files_only && argument.compare(0, 5, "--MU=") == 0) {
continue;
}
command << " " << shell_quote(argument);
}
if (!files_only) command << " --MU=" << exact(mu_);
Test
impurity_solver_test: the arguments {"--U=2", "--", "extra.ini"} reach the solver as params.ini --U=2 --MU=0.3 -- extra.ini.
- Dominant language
- C++
- Stars
- 32
- Forks
- 10
- Avg merge
- 3d 23h
- Merged PRs (30d)
- 109
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
-
dmrg: resuming with a smaller SWEEPS silently skips to the final sweepPossibly taken @skilledwolf claimed this 2 days ago. Openarea:dmrg bug P2
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ALPSim/ALPS#495 · 1 assignee ·
Maintainers usually reply within 2 days
-
fulldiag_evaluate: a result file not named *.out.xml fails with "basic_string::erase"Possibly taken @marcusr2ML claimed this 5 days ago. Openarea:ed bug P3
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
ALPSim/ALPS#433 · 1 assignee ·
Maintainers usually reply within 2 days
-
[Bug]: loadMeasurements without names returns nothing for worm results (Time interval has no mean)Possibly taken @skilledwolf claimed this 1 day ago. Openarea:python bug P2
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
ALPSim/ALPS#421 · 1 assignee ·
Maintainers usually reply within 2 days
-
expression: Block, SimpleFactor and check_character read past the end of inputPossibly taken @skilledwolf claimed this 2 days ago. OpenP2
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
ALPSim/ALPS#407 · 1 assignee ·
Maintainers usually reply within 2 days
-
area:build-sdk enhancement needs-decision P3
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 2 days
Similar issues
-
enhancement help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
area:text difficulty:easy prio:low type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
NatronGitHub/openfx-arena#337 ·
Maintainers usually reply within 1 day
-
difficulty:easy prio:normal type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NatronGitHub/openfx-supportext#326 ·
Maintainers usually reply within 1 day
-
difficulty:easy func:viewer prio:normal type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NatronGitHub/Natron#2300 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
zucch1/android-auto-jetson#293 ·
Maintainers usually reply within 1 day