Title: | slurm tooling |
---|---|
Description: | What the package does (one paragraph). |
Authors: | Devin Pastoor [aut, cre], Jenna Elwing [aut], Matthew Smith [aut] |
Maintainer: | Devin Pastoor <[email protected]> |
License: | GPL (>= 3) |
Version: | 0.0.0.9000 |
Built: | 2024-09-25 15:14:46 UTC |
Source: | https://github.com/a2-ai/slurmtools |
throws error if the number of requested CPUs exceeds the number of CPUs available in the requested partition
check_slurm_partitions(ncpu, partition, cache = TRUE)
check_slurm_partitions(ncpu, partition, cache = TRUE)
ncpu |
number of CPUs requested by user |
partition |
name of partition requested by user |
cache |
optional argument to forgo caching |
## Not run: check_slurm_partitions(17, "cpu2mem4gb") check_slurm_partitions(3, "cpu2mem4gb") check_slurm_partitions(5, "cpu4mem32gb") check_slurm_partitions(5, "cpu4mem32gb") check_slurm_partitions(100, "cpu32mem128gb") check_slurm_partitions(2, "cpu2mem4gb") ## End(Not run)
## Not run: check_slurm_partitions(17, "cpu2mem4gb") check_slurm_partitions(3, "cpu2mem4gb") check_slurm_partitions(5, "cpu4mem32gb") check_slurm_partitions(5, "cpu4mem32gb") check_slurm_partitions(100, "cpu32mem128gb") check_slurm_partitions(2, "cpu2mem4gb") ## End(Not run)
get slurm jobs
get_slurm_jobs(user = NULL)
get_slurm_jobs(user = NULL)
user |
user filter |
get list of partition names for the given cluster
get_slurm_partitions(cache = TRUE)
get_slurm_partitions(cache = TRUE)
cache |
optional argument to forgo caching |
gets the raw string output from run_sinfo()
converts to a data frame
reorders and removes *
from default partition with
process_slurm_partitions()
lookup_partitions_by_cpu(cache = TRUE)
lookup_partitions_by_cpu(cache = TRUE)
cache |
optional argument to forgo caching |
the processed table of each partition's number of CPUs and memory
In a call to submit_slurm_model()
, if the number of requested CPUs exceeds
the number of CPUs available in the requested partition,
check_slurm_partitions()
errors.
This function follows up with a message providing one or two suggestions for
the partition with the smallest sufficient number of CPUs and least amount
of memory.
If there are no partitions with enough CPUs to accommodate the number
requested, this function's return message clarifies this.
partition_advice(ncpu, partition, avail_cpus_table, cache)
partition_advice(ncpu, partition, avail_cpus_table, cache)
ncpu |
number of CPUs requested by user |
partition |
name of partition requested by user |
avail_cpus_table |
table of partitions with respective number of CPUs and memory |
cache |
optional argument to forgo caching |
string with suggestion upon check_slurm_partitions()
error
manipulate partition table for usability
process_slurm_partitions(table)
process_slurm_partitions(table)
table |
the table created by lookup_partitions_by_cpu |
the table such that the default partition will be first and will have the asterisk removed
get list of each partition's number of CPUs and memory
run_sinfo()
run_sinfo()
the raw partition-cpu-memory string output from sinfo
submit a nonmem model to slurm in parallel
submit_nonmem_model( .mod, partition = get_slurm_partitions(), ncpu = 1, overwrite = FALSE, dry_run = FALSE, ..., slurm_job_template_path = getOption("slurmtools.slurm_job_template_path"), submission_root = getOption("slurmtools.submission_root"), bbi_config_path = getOption("slurmtools.bbi_config_path"), slurm_template_opts = list() )
submit_nonmem_model( .mod, partition = get_slurm_partitions(), ncpu = 1, overwrite = FALSE, dry_run = FALSE, ..., slurm_job_template_path = getOption("slurmtools.slurm_job_template_path"), submission_root = getOption("slurmtools.submission_root"), bbi_config_path = getOption("slurmtools.bbi_config_path"), slurm_template_opts = list() )
.mod |
a path to a model or a bbi nonmem model object |
partition |
name of the partition to submit the model |
ncpu |
number of cpus to run the model against |
overwrite |
whether to overwrite existing model results |
dry_run |
return the command that would have been invoked, without invoking |
... |
arguments to pass to processx::run |
slurm_job_template_path |
path to slurm job template |
submission_root |
directory to track job submission scripts and output |
bbi_config_path |
path to bbi.yaml file for bbi configuration |
slurm_template_opts |
choose slurm template |