Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace optparse in llnl_scripts Python scripts #1268

Closed
ltaylor16 opened this issue Feb 5, 2024 · 0 comments · Fixed by #1345
Closed

Replace optparse in llnl_scripts Python scripts #1268

ltaylor16 opened this issue Feb 5, 2024 · 0 comments · Fixed by #1345
Assignees
Labels

Comments

@ltaylor16
Copy link
Member

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 ltaylor16 self-assigned this Feb 5, 2024
ltaylor16 added a commit that referenced this issue May 21, 2024
They were using optparse which has been deprecated since Python 3.2

Converted archive_job.py and report.py to Python3.
They both try to call get_archive_base_dir which does not exist.

#1268
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants