Using AMGX_config_add_parameters with .json options.
Nobody has claimed this yet.
- Dominant language
- Cuda
- Stars
- 692
- Forks
- 197
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
I am trying to use AMGX_config_add_parameters to modify the solver tolerance (which I need to do in my code to adjust the tolerance to the right-hand side normalization), with an initial configuration based on a .json file.
Using the text syntax such as in the examples, I can use
AMGX_config_add_parameters(&cfg, options);
with the options string containing:
config_version=2, main:convergence=ABSOLUTE, main:tolerance=2.042244e-09
But get a return code 12 (Incorrect amgx configuration provided) when using a .json syntax:
{"config_version": 2, "solver": {"convergence": "ABSOLUTE", "tolerance": 4.081224e-09}}
Where the "solver" entry in the main .json file (FGMRES.json from the AmgX examples for example) has "scope": "main".
I can't find anything relative to another .json syntax, and would like to avoid the repeated warning that
Cannot read file as JSON object, trying as AMGX config.
Am I missing something ? Could an example of the correct syntax be provided in the documentation ?
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
Start with the AMGX_config_add_parameters API and the FGMRES.json example mentioned in the issue, then trace how the JSON and text configuration forms are parsed. Document a valid JSON syntax for overriding solver tolerance and convergence without the repeated JSON parsing warning, with an example users can verify against the reported return code.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- json
- Domain
- api, documentation, hpc
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100