Skip to content

Instantly share code, notes, and snippets.

@ravage
Last active December 27, 2020 22:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ravage/77dd69e51a7b1c138146c417c2f2aeb1 to your computer and use it in GitHub Desktop.
Save ravage/77dd69e51a7b1c138146c417c2f2aeb1 to your computer and use it in GitHub Desktop.
Slurm Job Submission Policies
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