Skip to content

Commit

Permalink
BUG FIX: Call isNodeAlive() and killNode() on cluster nodes runni…
Browse files Browse the repository at this point in the history
…ng on external machines would produce `Error: ‘length(rsh_call) == 1L’ is not TRUE` if options `rshopts` were specified during creation
  • Loading branch information
HenrikBengtsson committed Jan 28, 2025
1 parent 5ddcd0d commit ce97b7e
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: parallelly
Version: 1.41.0-9010
Version: 1.41.0-9011
Title: Enhancing the 'parallel' Package
Imports:
parallel,
Expand Down
6 changes: 5 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@
known_types, several.ok = FALSE) : 'arg' must be of length 1`. This
bug was introduced in version 1.38.0 (2024-07-27), when adding
richer support for the `rscript_sh` argument.


* Call `isNodeAlive()` and `killNode()` on cluster nodes running on
external machines would produce `Error: ‘length(rsh_call) == 1L’ is
not TRUE` if options `rshopts` were specified during creation.

* The value of `availableCores()` was numeric rather than integer as
documented. This harmless bug was introduced in version 1.31.0
(2022-04-07).
Expand Down
1 change: 1 addition & 0 deletions R/isNodeAlive.R
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ isNodeAlive.RichSOCKnode <- function(x, timeout = 0.0, ...) {

rshopts <- args_org$rshopts
if (length(args_org$user) == 1L) rshopts <- c("-l", args_org$user, rshopts)
rshopts <- paste(rshopts, collapse = " ")
rsh_call <- paste(paste(shQuote(rshcmd), collapse = " "), rshopts, worker)
debug && mdebugf("- Command to connect to the other host: %s", rsh_call)
stop_if_not(length(rsh_call) == 1L)
Expand Down
1 change: 1 addition & 0 deletions R/killNode.R
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ killNode.RichSOCKnode <- function(x, signal = tools::SIGTERM, timeout = 0.0, ...

rshopts <- args_org$rshopts
if (length(args_org$user) == 1L) rshopts <- c("-l", args_org$user, rshopts)
rshopts <- paste(rshopts, collapse = " ")
rsh_call <- paste(paste(shQuote(rshcmd), collapse = " "), rshopts, worker)
debug && mdebugf("- Command to connect to the other host: %s", rsh_call)
stop_if_not(length(rsh_call) == 1L)
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,8 @@ This will install the package from source. Because of this and because this pac

<!-- pkgdown-drop-below -->


## Contributing

To contribute to this package, please see [CONTRIBUTING.md](CONTRIBUTING.md).

0 comments on commit ce97b7e

Please sign in to comment.