Last active
December 27, 2020 22:57
-
-
Save ravage/77dd69e51a7b1c138146c417c2f2aeb1 to your computer and use it in GitHub Desktop.
Slurm Job Submission Policies
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function slurm_job_submit(job_desc, part_list, submit_uid) | |
if job_desc.account == nil then | |
slurm.log_error("User %s did not specify an account.", job_desc.user_id) | |
slurm.log_user("Please speficy an account with every job submission.") | |
slurm.log_user("Check available accounts with: 'sacctmgr -P show assoc user=$USER format=account'.") | |
slurm.log_user("Specify the account with the flags -A or --account.") | |
return slurm.ESLURM_INVALID_ACCOUNT | |
elseif string.match(job_desc.work_dir, "^/home/*") then | |
slurm.log_error("User %s had workdir set to home directory.", job_desc.user_id) | |
slurm.log_user("Please don't run jobs from your home directory.") | |
slurm.log_user("Work directory can be specified with flags -D, --chdir.") | |
return slurm.ESLURM_ACCESS_DENIED | |
end | |
return slurm.SUCCESS | |
end | |
function slurm_job_modify(job_desc, job_rec, part_list, modify_uid) | |
return slurm.SUCCESS | |
end | |
return slurm.SUCCESS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment