ExaWorks / psij-python

MIT License
27 stars 13 forks source link

Suggestion: Print out path to submit script if there is a submission error with batch jobs #397

Closed Andrew-S-Rosen closed 1 year ago

Andrew-S-Rosen commented 1 year ago

Overview

https://github.com/ExaWorks/psij-python/blob/331d446103eccfd447b21da152e81e479b2a6520/src/psij/executors/batch/batch_scheduler_executor.py#L214-L215

Currently, if a batch script (e.g. for Slurm) contains system-incompatible parameters, a SubmitException will be raised that prints the error. For instance, one of the errors I received during the initial debugging stages was as follows:

SubmitException: sbatch: error: Job request does not match any supported policy.
sbatch: error: Batch job submission failed: Unspecified error

However, given this information alone, it may not always be immediately clear what to fix.

Proposal

I suggest printing the path to the .job file for easy reference in the error message. Perhaps something like:

Refer to `/global/homes/r/rosen/.psij/work/slurm/12345.job` to view the generated batch submission script.
Andrew-S-Rosen commented 1 year ago

Closing because I don't think this is particularly critical in hindsight.