From 5ca8321df1d9fd896fd2a06d1aee8d6128d15349 Mon Sep 17 00:00:00 2001 From: orichters Date: Tue, 2 Jul 2024 11:33:20 +0200 Subject: [PATCH] fix sacct call in 'rs2 -c' --- .buildlibrary | 2 +- CITATION.cff | 4 ++-- DESCRIPTION | 4 ++-- R/promptAndRun.R | 9 +++------ README.md | 6 +++--- 5 files changed, 11 insertions(+), 14 deletions(-) diff --git a/.buildlibrary b/.buildlibrary index 15ef26d..f1b8ff2 100644 --- a/.buildlibrary +++ b/.buildlibrary @@ -1,4 +1,4 @@ -ValidationKey: '42088500' +ValidationKey: '42121096' AcceptedWarnings: - 'Warning: package ''.*'' was built under R version' - 'Warning: namespace ''.*'' is not available and has been replaced' diff --git a/CITATION.cff b/CITATION.cff index 7d43645..41a8c4b 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -2,8 +2,8 @@ cff-version: 1.2.0 message: If you use this software, please cite it using the metadata from this file. type: software title: 'modelstats: Run Analysis Tools' -version: 0.21.15 -date-released: '2024-06-26' +version: 0.21.16 +date-released: '2024-07-02' abstract: A collection of tools to analyze model runs. authors: - family-names: Giannousakis diff --git a/DESCRIPTION b/DESCRIPTION index b6594b2..da37e43 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: modelstats Type: Package Title: Run Analysis Tools -Version: 0.21.15 -Date: 2024-06-26 +Version: 0.21.16 +Date: 2024-07-02 Authors@R: c( person("Anastasis", "Giannousakis", email = "giannou@pik-potsdam.de", role = c("aut","cre")), person("Oliver", "Richters", role = "aut") diff --git a/R/promptAndRun.R b/R/promptAndRun.R index af2f220..e938be5 100644 --- a/R/promptAndRun.R +++ b/R/promptAndRun.R @@ -80,12 +80,9 @@ promptAndRun <- function(mydir = ".", user = NULL, daysback = 3) { runnames <- system(paste0("squeue -u ", user, " -h -o '%j'"), intern = TRUE) if (all(mydir %in% c("-cr", "-c"))) { - myruns2 <- system(paste0("sacct -u ", user, " -s cd,f,cancelled,timeout,oom -S ", as.Date(format(Sys.Date(), "%Y-%m-%d")) - as.numeric(daysback), " --format WorkDir -P -n"), intern = TRUE) - # myruns2<-myruns2[!grepl("^$",myruns2)] - myruns <- c(myruns, myruns2) - runnames2 <- system(paste0("sacct -u ", user, " -s cd,f,cancelled,timeout,oom -S ", as.Date(format(Sys.Date(), "%Y-%m-%d")) - as.numeric(daysback), " --format JobName -P -n"), intern = TRUE) - # runnames2<-runnames2[!grepl("^batch$",runnames2)] - runnames <- c(runnames, runnames2) + sacctcode <- paste0("sacct -u ", user, " -s cd,f,cancelled,timeout,oom -S ", as.Date(format(Sys.Date(), "%Y-%m-%d")) - as.numeric(daysback), " -E now -P -n") + myruns <- c(myruns, system(paste(sacctcode, "--format WorkDir"), intern = TRUE)) + runnames <- c(runnames, system(paste(sacctcode, "--format JobName"), intern = TRUE)) } if (any(grepl("mag-run", runnames))) { diff --git a/README.md b/README.md index c4b610e..984fc4d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Run Analysis Tools -R package **modelstats**, version **0.21.15** +R package **modelstats**, version **0.21.16** [![CRAN status](https://www.r-pkg.org/badges/version/modelstats)](https://cran.r-project.org/package=modelstats) [![R build status](https://github.com/pik-piam/modelstats/workflows/check/badge.svg)](https://github.com/pik-piam/modelstats/actions) [![codecov](https://codecov.io/gh/pik-piam/modelstats/branch/master/graph/badge.svg)](https://app.codecov.io/gh/pik-piam/modelstats) [![r-universe](https://pik-piam.r-universe.dev/badges/modelstats)](https://pik-piam.r-universe.dev/builds) @@ -47,7 +47,7 @@ In case of questions / problems please contact Anastasis Giannousakis . +Giannousakis A, Richters O (2024). _modelstats: Run Analysis Tools_. R package version 0.21.16, . A BibTeX entry for LaTeX users is @@ -56,7 +56,7 @@ A BibTeX entry for LaTeX users is title = {modelstats: Run Analysis Tools}, author = {Anastasis Giannousakis and Oliver Richters}, year = {2024}, - note = {R package version 0.21.15}, + note = {R package version 0.21.16}, url = {https://github.com/pik-piam/modelstats}, } ```