diff --git a/404.html b/404.html index eb79c61..a28f532 100644 --- a/404.html +++ b/404.html @@ -33,7 +33,7 @@
diff --git a/CODE_OF_CONDUCT.html b/CODE_OF_CONDUCT.html index 5de9056..b85229b 100644 --- a/CODE_OF_CONDUCT.html +++ b/CODE_OF_CONDUCT.html @@ -17,7 +17,7 @@ diff --git a/CONTRIBUTING.html b/CONTRIBUTING.html index 7aa0d6f..87f2c02 100644 --- a/CONTRIBUTING.html +++ b/CONTRIBUTING.html @@ -17,7 +17,7 @@ diff --git a/SUPPORT.html b/SUPPORT.html index 8e9db23..355589e 100644 --- a/SUPPORT.html +++ b/SUPPORT.html @@ -17,7 +17,7 @@ diff --git a/articles/index.html b/articles/index.html index 493d682..8af8a2e 100644 --- a/articles/index.html +++ b/articles/index.html @@ -17,7 +17,7 @@ diff --git a/articles/slurmjobs.html b/articles/slurmjobs.html index 5d67da5..ab71a5b 100644 --- a/articles/slurmjobs.html +++ b/articles/slurmjobs.html @@ -34,7 +34,7 @@ @@ -85,7 +85,7 @@vignettes/slurmjobs.Rmd
slurmjobs.Rmd
slurmjobs
R
is an open-source statistical environment which can be
-easily modified to enhance its functionality via packages. slurmjobs
+easily modified to enhance its functionality via packages. slurmjobs
is a R
package available via the Bioconductor repository for packages.
R
can be installed on any operating system from CRAN after which you can install
-slurmjobs
+slurmjobs
by using the following commands in your R
session:
if (!requireNamespace("BiocManager", quietly = TRUE)) {
@@ -119,7 +119,7 @@ Install slurmjobs
Required knowledge
-slurmjobs
is designed for interacting with the SLURM job scheduler, and assumes
basic familiarity with terms like “job”, “task”, and “array”, as well as
the sbatch command.
@@ -149,7 +149,7 @@
Asking for help
Citing slurmjobs
-We hope that slurmjobs
+
We hope that slurmjobs
will be useful for your research. Please use the following information
to cite the package and the overall approach. Thank you!
@@ -161,7 +161,7 @@ Citing slurmjobs
#> doi:10.18129/B9.bioc.slurmjobs
#> <https://doi.org/10.18129/B9.bioc.slurmjobs>,
#> https://github.com/LieberInstitute/slurmjobs/slurmjobs - R package
-#> version 0.99.0, <http://www.bioconductor.org/packages/slurmjobs>.
+#> version 1.0.0, <http://www.bioconductor.org/packages/slurmjobs>.
#>
#> LieberInstitute (2023). "slurmjobs: Helper Functions for SLURM Jobs."
#> _bioRxiv_. doi:10.1101/TODO <https://doi.org/10.1101/TODO>,
@@ -206,10 +206,10 @@ Creating Shell Scripts to sbatch
job_single(
name = "my_shell_script", memory = "10G", cores = 2, create_shell = FALSE
)
-#> 2023-10-23 19:14:04.218552 creating the logs directory at: logs
+#> 2023-11-02 15:48:32.980328 creating the logs directory at: logs
#> #!/bin/bash
#> #SBATCH -p shared
-#> #SBATCH --mem-per-cpu=10G
+#> #SBATCH --mem=10G
#> #SBATCH --job-name=my_shell_script
#> #SBATCH -c 2
#> #SBATCH -o logs/my_shell_script.txt
@@ -240,7 +240,7 @@ Creating Shell Scripts to sbatch
#> echo "**** Job ends ****"
#> date
#>
-#> ## This script was made using slurmjobs version 0.99.0
+#> ## This script was made using slurmjobs version 1.0.0
#> ## available from http://research.libd.org/slurmjobs/
Similarly, we can specify task_num
to create an array
job– in this case, one with 10 tasks.
@@ -249,10 +249,10 @@ Creating Shell Scripts to sbatch
name = "my_array_job", memory = "5G", cores = 1, create_shell = FALSE,
task_num = 10
)
-#> 2023-10-23 19:14:04.317075 creating the logs directory at: logs
+#> 2023-11-02 15:48:33.061712 creating the logs directory at: logs
#> #!/bin/bash
#> #SBATCH -p shared
-#> #SBATCH --mem-per-cpu=5G
+#> #SBATCH --mem=5G
#> #SBATCH --job-name=my_array_job
#> #SBATCH -c 1
#> #SBATCH -o logs/my_array_job.%a.txt
@@ -284,7 +284,7 @@ Creating Shell Scripts to sbatch
#> echo "**** Job ends ****"
#> date
#>
-#> ## This script was made using slurmjobs version 0.99.0
+#> ## This script was made using slurmjobs version 1.0.0
#> ## available from http://research.libd.org/slurmjobs/
Another function, job_loop()
, can be used to create more
complex array jobs as compared with job_single()
. It’s
@@ -310,7 +310,7 @@
sbatch
cat(script_pair[["shell"]], sep = "\n")
#> #!/bin/bash
#> #SBATCH -p shared
-#> #SBATCH --mem-per-cpu=10G
+#> #SBATCH --mem=10G
#> #SBATCH --job-name=bsp2_test
#> #SBATCH -c 1
#> #SBATCH -o /dev/null
@@ -355,7 +355,7 @@ Creating Shell Scripts to sbatch
#>
#> } > $log_path 2>&1
#>
-#> ## This script was made using slurmjobs version 0.99.0
+#> ## This script was made using slurmjobs version 1.0.0
#> ## available from http://research.libd.org/slurmjobs/
First, note the line
Rscript bsp2_test.R --region ${region} --feature ${feature}
.
@@ -391,7 +391,7 @@
Creating Shell Scripts to sbatch
#>
#> session_info()
#>
-#> ## This script was made using slurmjobs version 0.99.0
+#> ## This script was made using slurmjobs version 1.0.0
#> ## available from http://research.libd.org/slurmjobs/
The code related to getopt
at the top of the script
reads in the unique combination of variable values into a list called
@@ -420,8 +420,8 @@
Submitting and Resubmitting Jobs name = "my_array_job", memory = "5G", cores = 1, create_shell = TRUE,
task_num = 10
)
-#> 2023-10-23 19:14:04.607837 creating the logs directory at: logs
-#> 2023-10-23 19:14:04.609346 creating the shell file my_array_job.sh
+#> 2023-11-02 15:48:33.296813 creating the logs directory at: logs
+#> 2023-11-02 15:48:33.298239 creating the shell file my_array_job.sh
#> To submit the job use: sbatch my_array_job.sh
# Suppose that tasks 3, 6, 7, and 8 failed
@@ -456,21 +456,22 @@ Monitoring Running Jobs
# On a real SLURM system
print(job_info_df)
-#> # A tibble: 100 × 10
+#> # A tibble: 100 × 11
#> job_id max_rss_gb max_vmem_gb user array_task_id name partition cpus
-#> <dbl> <dbl> <dbl> <chr> <chr> <chr> <fct> <int>
-#> 1 220842 NA NA user1 NA my_job_1 shared 2
-#> 2 221913 NA NA user2 60 my_job_2 shared 2
-#> 3 221940 NA NA user2 61 my_job_2 shared 2
-#> 4 222446 NA NA user2 73 my_job_2 shared 2
-#> 5 225071 NA NA user2 84 my_job_2 shared 2
-#> 6 225430 NA NA user2 88 my_job_2 shared 2
-#> 7 226820 NA NA user2 94 my_job_2 shared 2
-#> 8 264086 NA NA user2 66 my_job_3 shared 1
-#> 9 265466 NA NA user2 67 my_job_3 shared 2
-#> 10 269608 NA NA user2 13 my_job_4 shared 2
+#> <dbl> <dbl> <dbl> <chr> <int> <chr> <fct> <int>
+#> 1 222106 NA NA user1 69 my_job_1 shared 2
+#> 2 271213 NA NA user1 37 my_job_2 shared 1
+#> 3 280839 NA NA user1 11 my_job_3 shared 2
+#> 4 285265 NA NA user1 31 my_job_3 shared 2
+#> 5 285275 NA NA user1 41 my_job_3 shared 2
+#> 6 285276 NA NA user1 42 my_job_3 shared 2
+#> 7 285281 NA NA user1 47 my_job_3 shared 2
+#> 8 285282 NA NA user1 48 my_job_3 shared 2
+#> 9 301953 NA NA user2 180 my_job_4 shared 2
+#> 10 301954 NA NA user2 440 my_job_5 shared 2
#> # ℹ 90 more rows
-#> # ℹ 2 more variables: requested_mem_gb <dbl>, status <fct>
+#> # ℹ 3 more variables: requested_mem_gb <dbl>, status <fct>,
+#> # wallclock_time <drtn>
The benefit to having this data in R, now, is to be able to trivially ask summarizing questions. First, “how much memory and how many CPUs am I currently using?” Knowing this answer can help ensure fair and civil @@ -489,7 +490,7 @@
Now let’s choose a better memory request:
stat_df <- job_df |>
@@ -609,12 +611,12 @@ Analyzing Finished Jobs
Reproducibility
-The slurmjobs
+
The slurmjobs
package (LieberInstitute, 2023) was made possible thanks to:
- R (R Core Team, 2023)
-
-BiocStyle
+BiocStyle
(Oleś, 2023)
-
dplyr (Wickham,
@@ -636,7 +638,7 @@
Reproducibilitytestthat
(Wickham, 2011)
-This package was developed using biocthis.
+This package was developed using biocthis.
Code for creating the vignette
## Create the vignette
@@ -647,13 +649,13 @@ Reproducibilitylibrary("knitr")
knit("slurmjobs.Rmd", tangle = TRUE)
Date the vignette was generated.
-#> [1] "2023-10-23 19:14:05 UTC"
+#> [1] "2023-11-02 15:48:34 UTC"
Wallclock time spent generating the vignette.
-#> Time difference of 2.821 secs
+#> Time difference of 2.336 secs
R
session information.
#> ─ Session info ───────────────────────────────────────────────────────────────────────────────────────────────────────
#> setting value
-#> version R version 4.3.1 (2023-06-16)
+#> version R version 4.3.2 (2023-10-31)
#> os Ubuntu 22.04.3 LTS
#> system x86_64, linux-gnu
#> ui X11
@@ -661,15 +663,15 @@ Reproducibility#> collate en_US.UTF-8
#> ctype en_US.UTF-8
#> tz UTC
-#> date 2023-10-23
+#> date 2023-11-02
#> pandoc 3.1.1 @ /usr/local/bin/ (via rmarkdown)
#>
#> ─ Packages ───────────────────────────────────────────────────────────────────────────────────────────────────────────
#> package * version date (UTC) lib source
-#> backports 1.4.1 2021-12-13 [1] RSPM (R 4.3.0)
-#> bibtex 0.5.1 2023-01-26 [1] RSPM (R 4.3.0)
-#> BiocManager 1.30.22 2023-08-08 [2] CRAN (R 4.3.1)
-#> BiocStyle * 2.28.1 2023-09-14 [1] Bioconductor
+#> backports 1.4.1 2021-12-13 [1] CRAN (R 4.3.1)
+#> bibtex 0.5.1 2023-01-26 [1] CRAN (R 4.3.1)
+#> BiocManager 1.30.22 2023-08-08 [2] CRAN (R 4.3.2)
+#> BiocStyle * 2.30.0 2023-10-24 [1] Bioconductor
#> bookdown 0.36 2023-10-16 [1] RSPM (R 4.3.0)
#> bslib 0.5.1 2023-08-11 [2] RSPM (R 4.3.0)
#> cachem 1.0.8 2023-05-01 [2] RSPM (R 4.3.0)
@@ -677,19 +679,19 @@ Reproducibility#> crayon 1.5.2 2022-09-29 [2] RSPM (R 4.3.0)
#> desc 1.4.2 2022-09-08 [2] RSPM (R 4.3.0)
#> digest 0.6.33 2023-07-07 [2] RSPM (R 4.3.0)
-#> dplyr * 1.1.3 2023-09-03 [1] RSPM (R 4.3.0)
+#> dplyr * 1.1.3 2023-09-03 [1] CRAN (R 4.3.1)
#> evaluate 0.22 2023-09-29 [2] RSPM (R 4.3.0)
#> fansi 1.0.5 2023-10-08 [2] RSPM (R 4.3.0)
#> fastmap 1.1.1 2023-02-24 [2] RSPM (R 4.3.0)
#> fs 1.6.3 2023-07-20 [2] RSPM (R 4.3.0)
-#> generics 0.1.3 2022-07-05 [1] RSPM (R 4.3.0)
+#> generics 0.1.3 2022-07-05 [1] CRAN (R 4.3.1)
#> glue 1.6.2 2022-02-24 [2] RSPM (R 4.3.0)
#> htmltools 0.5.6.1 2023-10-06 [2] RSPM (R 4.3.0)
#> httr 1.4.7 2023-08-15 [2] RSPM (R 4.3.0)
#> jquerylib 0.1.4 2021-04-26 [2] RSPM (R 4.3.0)
#> jsonlite 1.8.7 2023-06-29 [2] RSPM (R 4.3.0)
-#> knitcitations * 1.0.12 2021-01-10 [1] RSPM (R 4.3.0)
-#> knitr 1.44 2023-09-11 [2] RSPM (R 4.3.0)
+#> knitcitations * 1.0.12 2021-01-10 [1] CRAN (R 4.3.1)
+#> knitr 1.45 2023-10-30 [2] RSPM (R 4.3.0)
#> lifecycle 1.0.3 2022-10-07 [2] RSPM (R 4.3.0)
#> lubridate 1.9.3 2023-09-27 [1] RSPM (R 4.3.0)
#> magrittr 2.0.3 2022-03-30 [2] RSPM (R 4.3.0)
@@ -702,23 +704,23 @@ Reproducibility#> R6 2.5.1 2021-08-19 [2] RSPM (R 4.3.0)
#> ragg 1.2.6 2023-10-10 [2] RSPM (R 4.3.0)
#> Rcpp 1.0.11 2023-07-06 [2] RSPM (R 4.3.0)
-#> RefManageR * 1.4.0 2022-09-30 [1] RSPM (R 4.3.0)
+#> RefManageR * 1.4.0 2022-09-30 [1] CRAN (R 4.3.1)
#> rlang 1.1.1 2023-04-28 [2] RSPM (R 4.3.0)
#> rmarkdown 2.25 2023-09-18 [2] RSPM (R 4.3.0)
#> rprojroot 2.0.3 2022-04-02 [2] RSPM (R 4.3.0)
#> sass 0.4.7 2023-07-15 [2] RSPM (R 4.3.0)
#> sessioninfo * 1.2.2 2021-12-06 [2] RSPM (R 4.3.0)
-#> slurmjobs * 0.99.0 2023-10-23 [1] local
+#> slurmjobs * 1.0.0 2023-11-02 [1] local
#> stringi 1.7.12 2023-01-11 [2] RSPM (R 4.3.0)
#> stringr 1.5.0 2022-12-02 [2] RSPM (R 4.3.0)
#> systemfonts 1.0.5 2023-10-09 [2] RSPM (R 4.3.0)
#> textshaping 0.3.7 2023-10-09 [2] RSPM (R 4.3.0)
#> tibble 3.2.1 2023-03-20 [2] RSPM (R 4.3.0)
-#> tidyselect 1.2.0 2022-10-10 [1] RSPM (R 4.3.0)
-#> timechange 0.2.0 2023-01-11 [1] RSPM (R 4.3.0)
+#> tidyselect 1.2.0 2022-10-10 [1] CRAN (R 4.3.1)
+#> timechange 0.2.0 2023-01-11 [1] CRAN (R 4.3.1)
#> utf8 1.2.4 2023-10-22 [2] RSPM (R 4.3.0)
#> vctrs 0.6.4 2023-10-12 [2] RSPM (R 4.3.0)
-#> withr 2.5.1 2023-09-26 [2] RSPM (R 4.3.0)
+#> withr 2.5.2 2023-10-30 [2] RSPM (R 4.3.0)
#> xfun 0.40 2023-08-09 [2] RSPM (R 4.3.0)
#> xml2 1.3.5 2023-07-06 [2] RSPM (R 4.3.0)
#> yaml 2.3.7 2023-01-23 [2] RSPM (R 4.3.0)
@@ -732,7 +734,7 @@ Reproducibility
Bibliography
-This vignette was generated using BiocStyle
+
This vignette was generated using BiocStyle
(Oleś, 2023) with knitr (Xie,
2023) and rmarkdown
(Allaire, Xie, Dervieux et al., 2023) running behind the scenes.
@@ -747,7 +749,7 @@ Bibliography[2]
LieberInstitute. slurmjobs: Helper Functions for SLURM Jobs. https://github.com/LieberInstitute/slurmjobs/slurmjobs -
-R package version 0.99.0. 2023. DOI:
+R package version 1.0.0. 2023. DOI:
10.18129/B9.bioc.slurmjobs.
URL:
http://www.bioconductor.org/packages/slurmjobs.
@@ -762,7 +764,7 @@ Bibliography[4]
A. Oleś. BiocStyle: Standard styles for vignettes and other
-Bioconductor documents. R package version 2.28.1. 2023. DOI:
+Bioconductor documents. R package version 2.30.0. 2023. DOI:
10.18129/B9.bioc.BiocStyle.
URL:
https://bioconductor.org/packages/BiocStyle.
@@ -783,17 +785,19 @@ Bibliography[7]
H. Wickham, W. Chang, R. Flight, et al. sessioninfo: R Session
-Information. https://github.com/r-lib/sessioninfo#readme, https://r-lib.github.io/sessioninfo/. 2021.
+Information. R package version 1.2.2, https://r-lib.github.io/sessioninfo/. 2021. URL:
+https://github.com/r-lib/sessioninfo#readme.
[8]
H. Wickham, R. François, L. Henry, et al. dplyr: A Grammar of Data
-Manipulation. https://dplyr.tidyverse.org, https://github.com/tidyverse/dplyr. 2023.
+Manipulation. R package version 1.1.3. 2023. URL:
+https://CRAN.R-project.org/package=dplyr.
[9]
Y. Xie. knitr: A General-Purpose Package for Dynamic Report
-Generation in R. R package version 1.44. 2023. URL:
+Generation in R. R package version 1.45. 2023. URL:
https://yihui.org/knitr/.
LieberInstitute (2023). slurmjobs: Helper Functions for SLURM Jobs. -doi:10.18129/B9.bioc.slurmjobs, https://github.com/LieberInstitute/slurmjobs/slurmjobs - R package version 0.99.0, http://www.bioconductor.org/packages/slurmjobs. +doi:10.18129/B9.bioc.slurmjobs, https://github.com/LieberInstitute/slurmjobs/slurmjobs - R package version 1.0.0, http://www.bioconductor.org/packages/slurmjobs.
@Manual{, title = {slurmjobs: Helper Functions for SLURM Jobs}, author = {{LieberInstitute}}, year = {2023}, url = {http://www.bioconductor.org/packages/slurmjobs}, - note = {https://github.com/LieberInstitute/slurmjobs/slurmjobs - R package version 0.99.0}, + note = {https://github.com/LieberInstitute/slurmjobs/slurmjobs - R package version 1.0.0}, doi = {10.18129/B9.bioc.slurmjobs}, }
LieberInstitute (2023). diff --git a/index.html b/index.html index 6c2a916..ec54b39 100644 --- a/index.html +++ b/index.html @@ -37,7 +37,7 @@
@@ -98,7 +98,7 @@NEWS.md
+ NEW FEATURES
+job_report()
and partition_info()
+array_submit()
and job_loop()
+job_info_df
and partition_df
. Example outputs of job_info()
and partition_info()
+SIGNIFICANT USER-VISIBLE CHANGES
+job_single()
and job_loop()
is now specified in total (i.e. through --mem
) instead of per core (i.e. through --mem-per-cpu
)NEW FEATURES
diff --git a/pkgdown.yml b/pkgdown.yml index af877af..2dc0a25 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -3,5 +3,5 @@ pkgdown: 2.0.7 pkgdown_sha: ~ articles: slurmjobs: slurmjobs.html -last_built: 2023-10-23T19:13Z +last_built: 2023-11-02T15:48Z diff --git a/reference/array_submit.html b/reference/array_submit.html index 9177768..6f6d01d 100644 --- a/reference/array_submit.html +++ b/reference/array_submit.html @@ -23,7 +23,7 @@job_single()
Build a SLURM job bash script
Parse time intervals reported by SLURM commands into difftime
s
job_info(user = NULL, partition = "shared")
An object of class tbl_df
(inherits from tbl
, data.frame
) with 100 rows and 10 columns.
An object of class tbl_df
(inherits from tbl
, data.frame
) with 100 rows and 11 columns.
The amount of memory per core to request. You can check how
-much a current job is utilizing using the sstat
command.
character(1): the amount of memory in total to request, as a +number and unit accepted by the '--mem' SLURM parameter (e.g. '10G')
The amount of memory per core to request. You can check how
-much a current job is utilizing using the sstat
command.
character(1): the amount of memory in total to request, as a +number and unit accepted by the '--mem' SLURM parameter (e.g. '10G')
difftime
sR/utils.R
+ parse_slurm_time.Rd
Given a character vector 'vec', return a character(1) representing the line +of code used to generate 'vec'
+parse_slurm_time(tim)
A character()
representing time intervals as reported in
+fields like Elapsed
from sacct
, in days-hours:mins:secs
A difftime()
vector of time intervals
+slurm_times <- c("0:00", "1:04:07", "11:03:02", "1-01:39:12", "33-14:40:54")
+slurmjobs:::parse_slurm_time(slurm_times)
+#> Time differences in secs
+#> [1] 0 3847 39782 92352 2904054
+
+