Skip to content

Commit

Permalink
added sbatch slurm-mock
Browse files Browse the repository at this point in the history
  • Loading branch information
mduncans committed Sep 9, 2024
1 parent e4fb1d1 commit e8eeca3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/workflows/RunChecks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ jobs:
mv ./squeue /usr/local/bin/squeue
chmod 755 /usr/local/bin/squeue
gh release download "sbatch/v0.2.0" -R a2-ai-tech-training/slurm-mocks -p "*Linux_x86_64.tar.gz" -D /usr/local/bin/"
tar -xvf /usr/local/bin/sbatch_Linux_x86_64.tar.gz
mv ./sbatch /usr/local/bin/sbatch
chmod 755 /usr/local/bin/sbatch
echo "/usr/local/bin" >> $GITHUB_PATH
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
3 changes: 2 additions & 1 deletion R/submit-model.R
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ submit_nonmem_model <-
template_list
)
})

script_file_path <-
file.path(submission_root, sprintf("%s.sh", basename(.mod$absolute_model_path)))
if (!dry_run) {
Expand All @@ -118,7 +119,7 @@ submit_nonmem_model <-
brio::write_file(template_script, script_file_path)
fs::file_chmod(script_file_path, "0755")
}
cmd <- list(cmd = "sbatch", args = script_file_path, template_script = template_script, partition = partition)
cmd <- list(cmd = Sys.which("sbatch"), args = script_file_path, template_script = template_script, partition = partition)
if (dry_run) {
return(cmd)
}
Expand Down

0 comments on commit e8eeca3

Please sign in to comment.