Skip to content

Commit

Permalink
HELP: Add example to makeClusterPSOCK() on how to set up a multi-node…
Browse files Browse the repository at this point in the history
… cluster via 'pjrsh' on an Fujitsu Technical Computing Suite HPC system [#82]
  • Loading branch information
HenrikBengtsson committed May 31, 2022
1 parent 054a5af commit ce327ff
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 4 deletions.
22 changes: 20 additions & 2 deletions incl/makeClusterPSOCK.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ cl <- makeClusterPSOCK(

## EXAMPLE: Remote workers with specific setup
## Setup of remote worker with more detailed control on
## authentication and reverse SSH tunnelling
## authentication and reverse SSH tunneling
cl <- makeClusterPSOCK(
"remote.server.org", user = "johnny",
## Manual configuration of reverse SSH tunnelling
## Manual configuration of reverse SSH tunneling
revtunnel = FALSE,
rshopts = c("-v", "-R 11000:gateway:11942"),
master = "gateway", port = 11942,
Expand Down Expand Up @@ -214,3 +214,21 @@ cl <- makeClusterPSOCK(
"remote.server.org", user = "bob", rshcmd = "<rstudio-ssh>",
dryrun = TRUE, quiet = TRUE
)


## EXAMPLE: The 'Fujitsu Technical Computing Suite' is a high-performance
## compute (HPC) job scheduler where one can request compute resources on
## multiple nodes, each running multiple cores. For example,
##
## pjsub -L vnode=3 -L vnode-core=18 script.sh
##
## reserves 18 cores on three nodes. The job script runs on the first
## with enviroment variables set to infer the other nodes, resulting in
## availableWorkers() to return 3 * 18 workers. When the HPC environment
## does not support SSH between compute nodes, one can use the 'pjrsh'
## command to launch the parallel workers.
cl <- makeClusterPSOCK(
availableWorkers(),
rshcmd = "pjrsh",
dryrun = TRUE, quiet = TRUE
)
22 changes: 20 additions & 2 deletions man/makeClusterPSOCK.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ce327ff

Please sign in to comment.