axom icon indicating copy to clipboard operation
axom copied to clipboard

Replace optparse in llnl_scripts Python scripts

Open ltaylor16 opened this issue 1 year ago • 0 comments

I went to make some changes to command line arguments in build_devtools.py . Looking at the documentation for optparse I find:

Deprecated since version 3.2: The optparse module is deprecated and will not be developed further;
development will continue with the argparse module.

I wanted to allow multiple uses of the --spec argument since spack/specs.yaml file can lists multiple specs. The get_specs_for_current_machine function prefixes each spec with % with the line

specs = ['%' + spec for spec in specs]

This is not being done for the --spec command line argument and causes problems. It runs but is not building what I expected. It eventually ends but did not create the .cmake files.

[ERROR: No host configs found at /g/g14/taylor/ws/axom-tpl/toss_4_x86_64_ib/2024_02_01_10_20_13]
[ERROR: Build and test of src vs tpls test failed.]

I also ran into a problem where i used -spec instead of --spec. This did not report an error but ran. It ignored the spec I gave it and instead used pec. A result of stacking single letter options I assume.

[Building and testing tpls for specs: 
pec
]

ltaylor16 avatar Feb 05 '24 21:02 ltaylor16