diff --git a/404.html b/404.html index eb79c61..a28f532 100644 --- a/404.html +++ b/404.html @@ -33,7 +33,7 @@ slurmjobs - 0.99.0 + 1.0.0 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 @@ slurmjobs - 0.99.0 + 1.0.0 diff --git a/CONTRIBUTING.html b/CONTRIBUTING.html index 7aa0d6f..87f2c02 100644 --- a/CONTRIBUTING.html +++ b/CONTRIBUTING.html @@ -17,7 +17,7 @@ slurmjobs - 0.99.0 + 1.0.0 diff --git a/SUPPORT.html b/SUPPORT.html index 8e9db23..355589e 100644 --- a/SUPPORT.html +++ b/SUPPORT.html @@ -17,7 +17,7 @@ slurmjobs - 0.99.0 + 1.0.0 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 @@ slurmjobs - 0.99.0 + 1.0.0 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 @@ slurmjobs - 0.99.0 + 1.0.0 @@ -85,7 +85,7 @@

Leonardo University
lcolladotor@gmail.com -

23 October 2023

+

2 November 2023

Source: vignettes/slurmjobs.Rmd @@ -101,10 +101,10 @@

Basics

Install 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 +

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 @@

Creating Shell Scripts to 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 @@

Monitoring Running Jobs#> # A tibble: 1 × 2 #> total_mem_req total_cpus #> <dbl> <int> -#> 1 60 2 +#> 1 50 2

Monitoring Partitions @@ -567,20 +568,21 @@

Analyzing Finished Jobs system.file("extdata", "job_report_df.rds", package = "slurmjobs") ) print(job_df) -#> # A tibble: 10 × 11 +#> # A tibble: 10 × 12 #> job_id user name partition cpus requested_mem_gb max_rss_gb max_vmem_gb -#> <chr> <chr> <chr> <fct> <int> <dbl> <dbl> <dbl> -#> 1 297332 user1 broken_… shared 2 5 0.04 0.04 -#> 2 297333 user1 broken_… shared 2 5 0.48 0.48 -#> 3 297334 user1 broken_… shared 2 5 0.61 0.61 -#> 4 297335 user1 broken_… shared 2 5 0.04 0.04 -#> 5 297336 user1 broken_… shared 2 5 1.15 1.15 -#> 6 297337 user1 broken_… shared 2 5 1.38 1.38 -#> 7 297338 user1 broken_… shared 2 5 0.04 0.04 -#> 8 297339 user1 broken_… shared 2 5 0.04 0.04 -#> 9 297340 user1 broken_… shared 2 5 0.04 0.04 -#> 10 297331 user1 broken_… shared 2 5 1.16 1.16 -#> # ℹ 3 more variables: array_task_id <int>, exit_code <dbl>, status <fct>

+#> <int> <chr> <chr> <fct> <int> <dbl> <dbl> <dbl> +#> 1 297332 user1 broken_… shared 2 5 0.04 0.04 +#> 2 297333 user1 broken_… shared 2 5 0.48 0.48 +#> 3 297334 user1 broken_… shared 2 5 0.61 0.61 +#> 4 297335 user1 broken_… shared 2 5 0.04 0.04 +#> 5 297336 user1 broken_… shared 2 5 1.15 1.15 +#> 6 297337 user1 broken_… shared 2 5 1.38 1.38 +#> 7 297338 user1 broken_… shared 2 5 0.04 0.04 +#> 8 297339 user1 broken_… shared 2 5 0.04 0.04 +#> 9 297340 user1 broken_… shared 2 5 0.04 0.04 +#> 10 297331 user1 broken_… shared 2 5 1.16 1.16 +#> # ℹ 4 more variables: array_task_id <int>, exit_code <int>, +#> # wallclock_time <drtn>, status <fct>

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:

-

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/.

diff --git a/authors.html b/authors.html index 9beee17..37002de 100644 --- a/authors.html +++ b/authors.html @@ -17,7 +17,7 @@ slurmjobs - 0.99.0 + 1.0.0 @@ -66,14 +66,14 @@

Citation

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 @@ slurmjobs - 0.99.0 + 1.0.0 @@ -98,7 +98,7 @@

Citation#> 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>. #> #> A BibTeX entry for LaTeX users is #> @@ -107,7 +107,7 @@

Citation#> 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}, #> } #> @@ -192,9 +192,9 @@

Dev status

  • GitHub issues
  • GitHub pulls
  • -
  • Lifecycle: experimental
  • R-CMD-check-bioc
  • Codecov test coverage
  • +
  • Lifecycle: stable
diff --git a/news/index.html b/news/index.html index 52040a7..7d8d038 100644 --- a/news/index.html +++ b/news/index.html @@ -17,7 +17,7 @@ slurmjobs - 0.99.0 + 1.0.0 @@ -50,6 +50,19 @@

Changelog

Source: NEWS.md +
+ +

NEW FEATURES

+

SIGNIFICANT USER-VISIBLE CHANGES

+
  • Memory for job_single() and job_loop() is now specified in total (i.e. through --mem) instead of per core (i.e. through --mem-per-cpu)
  • +
  • Complete vignette and documentation
  • +

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 @@ slurmjobs - 0.99.0 + 1.0.0
@@ -136,9 +136,9 @@

Examples

create_shell = TRUE, task_num = 100 ) -#> 2023-10-23 19:13:59.40058 creating the logs directory at: logs -#> 2023-10-23 19:13:59.402209 creating the shell file array_submit_example_2023-10-23.sh -#> To submit the job use: sbatch array_submit_example_2023-10-23.sh +#> 2023-11-02 15:48:28.795857 creating the logs directory at: logs +#> 2023-11-02 15:48:28.797326 creating the shell file array_submit_example_2023-11-02.sh +#> To submit the job use: sbatch array_submit_example_2023-11-02.sh ## Now we can submit the job for a set of task IDs (or omit 'task_ids' ## to automatically grab those same failed task IDs) diff --git a/reference/array_submit_example_2023-11-02.sh b/reference/array_submit_example_2023-11-02.sh new file mode 100644 index 0000000..2ec78d9 --- /dev/null +++ b/reference/array_submit_example_2023-11-02.sh @@ -0,0 +1,36 @@ +#!/bin/bash +#SBATCH -p shared +#SBATCH --mem=10G +#SBATCH --job-name=array_submit_example_2023-11-02 +#SBATCH -c 1 +#SBATCH -o logs/array_submit_example_2023-11-02.%a.txt +#SBATCH -e logs/array_submit_example_2023-11-02.%a.txt +#SBATCH --mail-type=ALL +#SBATCH --array=1-100%20 + +set -e + +echo "**** Job starts ****" +date + +echo "**** JHPCE info ****" +echo "User: ${USER}" +echo "Job id: ${SLURM_JOB_ID}" +echo "Job name: ${SLURM_JOB_NAME}" +echo "Node name: ${SLURMD_NODENAME}" +echo "Task id: ${SLURM_ARRAY_TASK_ID}" + +## Load the R module +module load conda_R/4.3 + +## List current modules for reproducibility +module list + +## Edit with your job command +Rscript -e "options(width = 120); sessioninfo::session_info()" + +echo "**** Job ends ****" +date + +## This script was made using slurmjobs version 1.0.0 +## available from http://research.libd.org/slurmjobs/ diff --git a/reference/get_list_indexing.html b/reference/get_list_indexing.html index aa6a859..4a30255 100644 --- a/reference/get_list_indexing.html +++ b/reference/get_list_indexing.html @@ -22,7 +22,7 @@ slurmjobs - 0.99.0 + 1.0.0 diff --git a/reference/get_short_flags.html b/reference/get_short_flags.html index 00b2461..cf58713 100644 --- a/reference/get_short_flags.html +++ b/reference/get_short_flags.html @@ -20,7 +20,7 @@ slurmjobs - 0.99.0 + 1.0.0 diff --git a/reference/index.html b/reference/index.html index fffd699..e0a87c1 100644 --- a/reference/index.html +++ b/reference/index.html @@ -17,7 +17,7 @@ slurmjobs - 0.99.0 + 1.0.0 @@ -87,6 +87,10 @@

All functions job_single()

Build a SLURM job bash script

+ +

parse_slurm_time()

+ +

Parse time intervals reported by SLURM commands into difftimes

partition_df

diff --git a/reference/job_info.html b/reference/job_info.html index eda6a04..db75c88 100644 --- a/reference/job_info.html +++ b/reference/job_info.html @@ -19,7 +19,7 @@ slurmjobs - 0.99.0 + 1.0.0 diff --git a/reference/job_info_df.html b/reference/job_info_df.html index 945e9a6..46c16a9 100644 --- a/reference/job_info_df.html +++ b/reference/job_info_df.html @@ -18,7 +18,7 @@ slurmjobs - 0.99.0 + 1.0.0 @@ -63,7 +63,7 @@

Example output from job_info(user = NULL, partition = "shared")

Format

-

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.

diff --git a/reference/job_loop.html b/reference/job_loop.html index 82482a7..a340540 100644 --- a/reference/job_loop.html +++ b/reference/job_loop.html @@ -18,7 +18,7 @@ slurmjobs - 0.99.0 + 1.0.0 @@ -96,8 +96,8 @@

Arguments

memory
-

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')

cores
diff --git a/reference/job_report.html b/reference/job_report.html index 7879f20..47ce60e 100644 --- a/reference/job_report.html +++ b/reference/job_report.html @@ -23,7 +23,7 @@ slurmjobs - 0.99.0 + 1.0.0 diff --git a/reference/job_single.html b/reference/job_single.html index 912dce1..a7b311f 100644 --- a/reference/job_single.html +++ b/reference/job_single.html @@ -20,7 +20,7 @@ slurmjobs - 0.99.0 + 1.0.0 @@ -96,8 +96,8 @@

Arguments

memory
-

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')

cores
@@ -167,7 +167,7 @@

Examples

job_single("jhpce_job", create_logdir = FALSE) #> #!/bin/bash #> #SBATCH -p shared -#> #SBATCH --mem-per-cpu=10G +#> #SBATCH --mem=10G #> #SBATCH --job-name=jhpce_job #> #SBATCH -c 1 #> #SBATCH -o logs/jhpce_job.txt @@ -198,7 +198,7 @@

Examples

#> 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/ #> @@ -209,7 +209,7 @@

Examples

) #> #!/bin/bash #> #SBATCH -p imaginary -#> #SBATCH --mem-per-cpu=10G +#> #SBATCH --mem=10G #> #SBATCH --job-name=jhpce_job #> #SBATCH -c 10 #> #SBATCH -o logs/jhpce_job.txt @@ -240,7 +240,7 @@

Examples

#> 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/ #> @@ -248,7 +248,7 @@

Examples

job_single("jhpce_job_array", task_num = 20, create_logdir = FALSE) #> #!/bin/bash #> #SBATCH -p shared -#> #SBATCH --mem-per-cpu=10G +#> #SBATCH --mem=10G #> #SBATCH --job-name=jhpce_job_array #> #SBATCH -c 1 #> #SBATCH -o logs/jhpce_job_array.%a.txt @@ -280,7 +280,7 @@

Examples

#> 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/ #> diff --git a/reference/parse_slurm_time.html b/reference/parse_slurm_time.html new file mode 100644 index 0000000..166f358 --- /dev/null +++ b/reference/parse_slurm_time.html @@ -0,0 +1,115 @@ + +Parse time intervals reported by SLURM commands into difftimes — parse_slurm_time • slurmjobs + + +
+
+ + + +
+
+ + +
+

Given a character vector 'vec', return a character(1) representing the line +of code used to generate 'vec'

+
+ +
+
parse_slurm_time(tim)
+
+ +
+

Arguments

+
tim
+

A character() representing time intervals as reported in +fields like Elapsed from sacct, in days-hours:mins:secs

+ +
+
+

Value

+ + +

A difftime() vector of time intervals

+
+
+

Author

+

Nicholas J. Eagles

+
+ +
+

Examples

+

+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
+
+
+
+
+ +
+ + +
+ +
+

Site built with pkgdown 2.0.7.

+
+ +
+ + + + + + + + diff --git a/reference/partition_df.html b/reference/partition_df.html index 5f0f86a..7069cb2 100644 --- a/reference/partition_df.html +++ b/reference/partition_df.html @@ -18,7 +18,7 @@ slurmjobs - 0.99.0 + 1.0.0 diff --git a/reference/partition_info.html b/reference/partition_info.html index 791651c..9b69bdc 100644 --- a/reference/partition_info.html +++ b/reference/partition_info.html @@ -19,7 +19,7 @@ slurmjobs - 0.99.0 + 1.0.0 diff --git a/reference/vector_as_code.html b/reference/vector_as_code.html index 6ead2c3..56cd24b 100644 --- a/reference/vector_as_code.html +++ b/reference/vector_as_code.html @@ -18,7 +18,7 @@ slurmjobs - 0.99.0 + 1.0.0 diff --git a/sitemap.xml b/sitemap.xml index 327d399..c8b408c 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -54,6 +54,9 @@ /reference/job_single.html + + /reference/parse_slurm_time.html + /reference/partition_df.html