Skip to content

Commit

Permalink
Merge pull request #122 from orichters/conoptspy
Browse files Browse the repository at this point in the history
let rs2 detect if run was canceled
  • Loading branch information
orichters authored Jan 13, 2025
2 parents 509b69f + 18ce714 commit 10fc170
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 12 deletions.
3 changes: 2 additions & 1 deletion .buildlibrary
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ValidationKey: '4433039'
ValidationKey: '4462422'
AcceptedWarnings:
- 'Warning: package ''.*'' was built under R version'
- 'Warning: namespace ''.*'' is not available and has been replaced'
Expand All @@ -8,3 +8,4 @@ AutocreateReadme: yes
allowLinterWarnings: yes
enforceVersionUpdate: no
skipCoverage: no
AutocreateCITATION: yes
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -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.22.1
date-released: '2024-12-02'
version: 0.22.2
date-released: '2025-01-13'
abstract: A collection of tools to analyze model runs.
authors:
- family-names: Giannousakis
Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: modelstats
Type: Package
Title: Run Analysis Tools
Version: 0.22.1
Date: 2024-12-02
Version: 0.22.2
Date: 2025-01-13
Authors@R: c(
person("Anastasis", "Giannousakis", email = "[email protected]", role = c("aut","cre")),
person("Oliver", "Richters", role = "aut")
Expand Down
4 changes: 3 additions & 1 deletion R/getRunStatus.R
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ getRunStatus <- function(mydir = dir(), sort = "nf", user = NULL) {
if (out[i, "jobInSLURM"] == "no" || grepl("pending$", out[i, "jobInSLURM"])) {
if (file.exists(logtxt)) {
slurmerror <- NULL
suppressWarnings(try(slurmerror <- system(paste0("grep 'slurmstepd: error' ", logtxt), intern = TRUE), silent = TRUE))
suppressWarnings(try(slurmerror <- system(paste0("grep 'slurmstepd.*error' ", logtxt), intern = TRUE), silent = TRUE))
if (isTRUE(any(grepl("DUE TO TIME LIMIT", slurmerror)))) {
out[i, "RunStatus"] <- "Timeout interrupt"
} else if (isTRUE(any(grepl("memory|oom-kill", slurmerror)))) {
Expand All @@ -173,6 +173,8 @@ getRunStatus <- function(mydir = dir(), sort = "nf", user = NULL) {
out[i, "RunStatus"] <- "Preempt interrupt"
} else if (isTRUE(any(grepl("DUE TO JOB REQUEUE", slurmerror)))) {
out[i, "RunStatus"] <- "Run requeued"
} else if (isTRUE(any(grepl("CANCELLED", slurmerror)))) {
out[i, "RunStatus"] <- "Run cancelled"
}
} else {
out[i, "RunStatus"] <- if (out[i, "jobInSLURM"] == "no") "Run interrupted" else "Run restarted"
Expand Down
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Run Analysis Tools

R package **modelstats**, version **0.22.1**
R package **modelstats**, version **0.22.2**

[![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)
[![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)

## Purpose and Functionality

Expand Down Expand Up @@ -47,16 +47,17 @@ In case of questions / problems please contact Anastasis Giannousakis <giannou@p

To cite package **modelstats** in publications use:

Giannousakis A, Richters O (2024). _modelstats: Run Analysis Tools_. R package version 0.22.1, <https://github.com/pik-piam/modelstats>.
Giannousakis A, Richters O (2025). "modelstats: Run Analysis Tools." Version: 0.22.2, <https://github.com/pik-piam/modelstats>.

A BibTeX entry for LaTeX users is

```latex
@Manual{,
@Misc{,
title = {modelstats: Run Analysis Tools},
author = {Anastasis Giannousakis and Oliver Richters},
year = {2024},
note = {R package version 0.22.1},
date = {2025-01-13},
year = {2025},
url = {https://github.com/pik-piam/modelstats},
note = {Version: 0.22.2},
}
```

0 comments on commit 10fc170

Please sign in to comment.