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

Create a check for HPC commands (e.g., eagle, kestrel) that is based on the HPC you are using BSB within #427

Open
whiphi92 opened this issue Jan 24, 2024 · 1 comment

Comments

@whiphi92
Copy link

It would be a luxury to have a check on buildstock commands dependent on which HPC you are using. That is to say, a command like buildstock_eagle will not run if you are logged into Kestrel.

This is not high priority, but would be a nice thing to have for us users who still have the muscle memory of typing buildstock_eagle.

@rajeee
Copy link
Contributor

rajeee commented Jan 24, 2024

For reference, the current behavior when using buildstock_eagle in kestrel is this:

(bsb_dev) [radhikar@kl1 project_national]$ buildstock_eagle --validateonly national_baseline.yml 

     _ __         _     __,              _ __
    ( /  )    o  //   /(    _/_       / ( /  )     _/_    /
     /--< , ,,  // __/  `.  /  __ _, /<  /--< __,  /  _, /
    /___/(_/_(_(/_(_/_(___)(__(_)(__/ |_/___/(_/(_(__(__/ /_
      Executing BuildStock projects with grace since 2018


Starting BSB Jan 2
INFO:2024-01-24 10:54:35:buildstockbatch.base:Base Validation Successful
Traceback (most recent call last):
  File "/home/radhikar/buildstockbatch/buildstockbatch/hpc.py", line 91, in validate_apptainer_image_hpc
    cls.get_apptainer_image(
  File "/home/radhikar/buildstockbatch/buildstockbatch/hpc.py", line 124, in get_apptainer_image
    raise RuntimeError(f"Could not find apptainer image: {' or '.join(map(str, image_paths))}")
RuntimeError: Could not find apptainer image: /shared-projects/buildstock/singularity_images/OpenStudio-3.7.0.d5269793f1-Apptainer.sif or /shared-projects/buildstock/singularity_images/OpenStudio-3.7.0.d5269793f1-Singularity.simg

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/radhikar/my_bsb_envs/bsb_dev/bin/buildstock_eagle", line 8, in <module>
    sys.exit(eagle_cli())
             ^^^^^^^^^^^
  File "/home/radhikar/buildstockbatch/buildstockbatch/hpc.py", line 834, in eagle_cli
    user_cli(EagleBatch, argv)
  File "/home/radhikar/buildstockbatch/buildstockbatch/hpc.py", line 895, in user_cli
    Batch.validate_project(project_filename)
  File "/home/radhikar/buildstockbatch/buildstockbatch/hpc.py", line 763, in validate_project
    super(cls, cls).validate_project(project_file)
  File "/home/radhikar/buildstockbatch/buildstockbatch/hpc.py", line 83, in validate_project
    cls.validate_apptainer_image_hpc(project_file)
  File "/home/radhikar/buildstockbatch/buildstockbatch/hpc.py", line 97, in validate_apptainer_image_hpc
    raise ValidationError(str(err))
buildstockbatch.exc.ValidationError: Could not find apptainer image: /shared-projects/buildstock/singularity_images/OpenStudio-3.7.0.d5269793f1-Apptainer.sif or /shared-projects/buildstock/singularity_images/OpenStudio-3.7.0.d5269793f1-Singularity.simg

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

No branches or pull requests

2 participants