Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make partition configurable for slurm clusters #24

Closed
4 tasks done
kkmann opened this issue Oct 11, 2023 · 1 comment
Closed
4 tasks done

Make partition configurable for slurm clusters #24

kkmann opened this issue Oct 11, 2023 · 1 comment
Assignees

Comments

@kkmann
Copy link

kkmann commented Oct 11, 2023

Prework

  • Read and agree to the Contributor Code of Conduct and contributing guidelines.
  • If there is already a relevant issue, whether open or closed, comment on the existing thread instead of posting a new issue.
  • New features take time and effort to create, and they take even more effort to maintain. So if the purpose of the feature is to resolve a struggle you are encountering personally, please consider first posting a GitHub discussion.
  • Format your code according to the tidyverse style guide.

Proposal

I would like to make the slurm partition configurable for slurm controllers. I would add a new argument partition to crew_controller_slurm()

crew_controller_slurm <- function(
that is then used to set the --partition= option for the sbatch script defined in
script = function(name) {
c(
"#!/bin/sh",
paste0("#SBATCH --job-name=", name),
if_any(
is.null(self$slurm_log_output),
character(0L),
paste0("#SBATCH --output=", self$slurm_log_output)
),
if_any(
is.null(self$slurm_log_error),
character(0L),
paste0("#SBATCH --error=", self$slurm_log_error)
),
if_any(
is.null(self$slurm_memory_gigabytes_per_cpu),
character(0L),
sprintf(
"#SBATCH --mem-per-cpu=%sM",
as.integer(
round(
x = 1024 * self$slurm_memory_gigabytes_per_cpu,
digits = 0L
)
)
)
),
if_any(
is.null(self$slurm_cpus_per_task),
character(0L),
paste0("#SBATCH --cpus-per-task=", self$slurm_cpus_per_task)
),
if_any(
is.null(self$slurm_time_minutes),
character(0L),
paste0("#SBATCH --time=", self$slurm_time_minutes)
),
self$script_lines
)
},

@wlandau
Copy link
Owner

wlandau commented Oct 11, 2023

Fixed in #25.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants