Skip to content

Commit 10fc170

Browse files
authored
Merge pull request #122 from orichters/conoptspy
let rs2 detect if run was canceled
2 parents 509b69f + 18ce714 commit 10fc170

File tree

5 files changed

+16
-12
lines changed

5 files changed

+16
-12
lines changed

.buildlibrary

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ValidationKey: '4433039'
1+
ValidationKey: '4462422'
22
AcceptedWarnings:
33
- 'Warning: package ''.*'' was built under R version'
44
- 'Warning: namespace ''.*'' is not available and has been replaced'
@@ -8,3 +8,4 @@ AutocreateReadme: yes
88
allowLinterWarnings: yes
99
enforceVersionUpdate: no
1010
skipCoverage: no
11+
AutocreateCITATION: yes

CITATION.cff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ cff-version: 1.2.0
22
message: If you use this software, please cite it using the metadata from this file.
33
type: software
44
title: 'modelstats: Run Analysis Tools'
5-
version: 0.22.1
6-
date-released: '2024-12-02'
5+
version: 0.22.2
6+
date-released: '2025-01-13'
77
abstract: A collection of tools to analyze model runs.
88
authors:
99
- family-names: Giannousakis

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Package: modelstats
22
Type: Package
33
Title: Run Analysis Tools
4-
Version: 0.22.1
5-
Date: 2024-12-02
4+
Version: 0.22.2
5+
Date: 2025-01-13
66
Authors@R: c(
77
person("Anastasis", "Giannousakis", email = "giannou@pik-potsdam.de", role = c("aut","cre")),
88
person("Oliver", "Richters", role = "aut")

R/getRunStatus.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ getRunStatus <- function(mydir = dir(), sort = "nf", user = NULL) {
164164
if (out[i, "jobInSLURM"] == "no" || grepl("pending$", out[i, "jobInSLURM"])) {
165165
if (file.exists(logtxt)) {
166166
slurmerror <- NULL
167-
suppressWarnings(try(slurmerror <- system(paste0("grep 'slurmstepd: error' ", logtxt), intern = TRUE), silent = TRUE))
167+
suppressWarnings(try(slurmerror <- system(paste0("grep 'slurmstepd.*error' ", logtxt), intern = TRUE), silent = TRUE))
168168
if (isTRUE(any(grepl("DUE TO TIME LIMIT", slurmerror)))) {
169169
out[i, "RunStatus"] <- "Timeout interrupt"
170170
} else if (isTRUE(any(grepl("memory|oom-kill", slurmerror)))) {
@@ -173,6 +173,8 @@ getRunStatus <- function(mydir = dir(), sort = "nf", user = NULL) {
173173
out[i, "RunStatus"] <- "Preempt interrupt"
174174
} else if (isTRUE(any(grepl("DUE TO JOB REQUEUE", slurmerror)))) {
175175
out[i, "RunStatus"] <- "Run requeued"
176+
} else if (isTRUE(any(grepl("CANCELLED", slurmerror)))) {
177+
out[i, "RunStatus"] <- "Run cancelled"
176178
}
177179
} else {
178180
out[i, "RunStatus"] <- if (out[i, "jobInSLURM"] == "no") "Run interrupted" else "Run restarted"

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Run Analysis Tools
22

3-
R package **modelstats**, version **0.22.1**
3+
R package **modelstats**, version **0.22.2**
44

5-
[![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)
5+
[![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)
66

77
## Purpose and Functionality
88

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

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

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

5252
A BibTeX entry for LaTeX users is
5353

5454
```latex
55-
@Manual{,
55+
@Misc{,
5656
title = {modelstats: Run Analysis Tools},
5757
author = {Anastasis Giannousakis and Oliver Richters},
58-
year = {2024},
59-
note = {R package version 0.22.1},
58+
date = {2025-01-13},
59+
year = {2025},
6060
url = {https://github.com/pik-piam/modelstats},
61+
note = {Version: 0.22.2},
6162
}
6263
```

0 commit comments

Comments
 (0)