Skip to content

Commit

Permalink
Merge pull request #342 from pyiron/inputcheck
Browse files Browse the repository at this point in the history
Add input checks
  • Loading branch information
jan-janssen authored May 30, 2024
2 parents 635acdb + 0f9227a commit 1e55fa3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pympipool/shared/inputcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,14 @@ def validate_backend(
+ backend
+ " is not a valid choice."
)
elif backend == "flux" and not flux_installed:
raise ImportError(
"Flux backend is selected but not installed. Please install the flux framework."
)
elif backend == "slurm" and not slurm_installed:
raise RuntimeError(
"Slurm backend is selected but not installed. Please ensure SLURM is correctly configured."
)
elif backend == "flux" or (backend == "auto" and flux_installed):
return "flux"
elif backend == "slurm" or (backend == "auto" and slurm_installed):
Expand Down

0 comments on commit 1e55fa3

Please sign in to comment.