Skip to content

Commit 27bae87

Browse files
spelling
1 parent 3e9bf97 commit 27bae87

File tree

8 files changed

+25
-13
lines changed

8 files changed

+25
-13
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package: parallelly
2-
Version: 1.45.1-9002
2+
Version: 1.45.1-9003
33
Title: Enhancing the 'parallel' Package
44
Imports:
55
parallel,

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
include .make/Makefile
22

33
spelling:
4-
$(R_SCRIPT) -e "spelling::spell_check_files(c('NEWS.md', dir('vignettes', pattern='[.]rsp', full.names=TRUE)), ignore=readLines('inst/WORDLIST', warn=FALSE))"
4+
$(R_SCRIPT) -e "spelling::spell_check_files(c('NEWS.md', 'incl/OVERVIEW.md', dir('vignettes', pattern='[.](md|rsp)$$', full.names=TRUE)), ignore=readLines('inst/WORDLIST', warn=FALSE))"
55

66
vignettes/parallelly-01-intro.md: incl/OVERVIEW.md vignettes/incl/clean.css
77
sed -E -i '/^(<!-- DO NOT EDIT THIS FILE|!\[|#+[[:space:]])/,$$d' $@

incl/OVERVIEW.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Did you know that `parallel::detectCores()` might return NA on some systems, or
5757
Just like other software tools that "hijacks" all cores by default, R scripts, and packages that defaults to `detectCores()` number of parallel workers cause lots of suffering for fellow end-users and system administrators. For instance, a shared server with 48 cores will come to a halt already after a few users run parallel processing using `detectCores()` number of parallel workers. This problem gets worse on machines with many cores because they can host even more concurrent users. If these R users would have used `availableCores()` instead, then the system administrator can limit the number of cores each user get to, say, two (2), by setting the environment variable `R_PARALLELLY_AVAILABLECORES_FALLBACK=2`.
5858
In contrast, it is _not_ possible to override what `parallel::detectCores()` returns, cf. [PR#17641 - WISH: Make parallel::detectCores() agile to new env var R_DEFAULT_CORES ](https://bugs.r-project.org/show_bug.cgi?id=17641).
5959

60-
Similarly, `availableCores()` is also agile to CPU limitations set by Unix control groups (cgroups), which is often used by Linux containers (e.g. Docker, Apptainer / Singularity, and Podman) and Kubernetes (K8s) environments. For example, `docker run --cpuset-cpus=0-2,8 ...` sets the CPU affinity so that the processes can only run on CPUs 0, 1, 2, and 8 on the host system. In this case `availableCores()` detects this and returns four (4). Another example is `docker run --cpu=3.4 ...`, which throttles the CPU quota to on average 3.4 CPUs on the host system. In this case `availableCores()` detects this and returns three (3), because it rounds to the nearest integer. In contrast, `parallel::detectCores()` completely ignores such cgroups settings and returns the number of CPUs on the host system, which results in CPU overuse and degredated performance. Continous Integration (CI) services (e.g. GitHub Actions, Travis CI, and Appveyor CI) and cloud services (e.g. RStudio Cloud) use these types of cgroups settings under the hood, which means `availableCores()` respects their CPU allocations.
60+
Similarly, `availableCores()` is also agile to CPU limitations set by Unix control groups (cgroups), which is often used by Linux containers (e.g. Docker, Apptainer / Singularity, and Podman) and Kubernetes (K8s) environments. For example, `docker run --cpuset-cpus=0-2,8 ...` sets the CPU affinity so that the processes can only run on CPUs 0, 1, 2, and 8 on the host system. In this case `availableCores()` detects this and returns four (4). Another example is `docker run --cpu=3.4 ...`, which throttles the CPU quota to on average 3.4 CPUs on the host system. In this case `availableCores()` detects this and returns three (3), because it rounds to the nearest integer. In contrast, `parallel::detectCores()` completely ignores such cgroups settings and returns the number of CPUs on the host system, which results in CPU overuse and degraded performance. Continuous Integration (CI) services (e.g. GitHub Actions, Travis CI, and AppVeyor CI) and cloud services (e.g. RStudio Cloud) use these types of cgroups settings under the hood, which means `availableCores()` respects their CPU allocations.
6161

6262
If running on an HPC cluster with a job scheduler, a script that uses `availableCores()` will run the number of parallel workers that the job scheduler has assigned to the job. For example, if we submit a Slurm job as `sbatch --cpus-per-task=16 ...`, then `availableCores()` returns 16, because it respects the `SLURM_*` environment variables set by the scheduler. On Son of Grid Engine (SGE), the scheduler sets `NSLOTS` when submitting using `qsub -pe smp 8 ...` and `availableCores()` returns eight (8). See `help("availableCores", package = "parallelly")` for currently supported job schedulers, which includes 'Fujitsu Technical Computing Suite', 'Load Sharing Facility' (LSF), Simple Linux Utility for Resource Management (Slurm), Sun Grid Engine/Oracle Grid Engine/Son of Grid Engine (SGE), Univa Grid Engine (UGE), and TORQUE/PBS.
6363

inst/WORDLIST

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
1-
AppVeyor
1+
AMI
22
Apptainer
3+
AppVeyor
34
AsIs
45
BiocParallel
6+
Bubblewrap
57
CGroups
68
CMD
9+
DDNS
710
DJOB
811
DNS
912
FQDN
13+
GCE
1014
GetConnection
1115
HOSTFILE
1216
HenrikBengtsson
@@ -15,6 +19,7 @@ LSB
1519
LSF
1620
LibreSSL
1721
MSYS
22+
MiB
1823
MinGW
1924
NCPUS
2025
NSLOTS
@@ -30,10 +35,12 @@ PJM
3035
PPK
3136
PPN
3237
PSOCK
38+
Podman
3339
Pre
3440
PuTTY
3541
PuTTY's
3642
RStudio
43+
RStudio's
3744
Renviron
3845
RichSOCKcluster
3946
RichSOCKnode
@@ -90,6 +97,7 @@ freezed
9097
getOption
9198
getOptionOrEnvVar
9299
github
100+
globbing
93101
grepl
94102
hardcoded
95103
hostname
@@ -101,6 +109,7 @@ isForkedChild
101109
isForkedNode
102110
isLocalhostNode
103111
isNodeAlive
112+
jumphost
104113
libPaths
105114
libs
106115
linux
@@ -134,6 +143,7 @@ rshcmd
134143
rshlogfile
135144
rstudio
136145
sQuote
146+
sandboxed
137147
scontrol
138148
setTimeLimit
139149
sig
@@ -150,7 +160,9 @@ tasklist
150160
tcltk
151161
tmp
152162
todo
163+
udocker
153164
useFancyQuotes
154165
useXDR
155166
workRSOCK
156167
yYF
168+
VM

vignettes/parallelly-01-intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Did you know that `parallel::detectCores()` might return NA on some systems, or
6868
Just like other software tools that "hijacks" all cores by default, R scripts, and packages that defaults to `detectCores()` number of parallel workers cause lots of suffering for fellow end-users and system administrators. For instance, a shared server with 48 cores will come to a halt already after a few users run parallel processing using `detectCores()` number of parallel workers. This problem gets worse on machines with many cores because they can host even more concurrent users. If these R users would have used `availableCores()` instead, then the system administrator can limit the number of cores each user get to, say, two (2), by setting the environment variable `R_PARALLELLY_AVAILABLECORES_FALLBACK=2`.
6969
In contrast, it is _not_ possible to override what `parallel::detectCores()` returns, cf. [PR#17641 - WISH: Make parallel::detectCores() agile to new env var R_DEFAULT_CORES ](https://bugs.r-project.org/show_bug.cgi?id=17641).
7070

71-
Similarly, `availableCores()` is also agile to CPU limitations set by Unix control groups (cgroups), which is often used by Linux containers (e.g. Docker, Apptainer / Singularity, and Podman) and Kubernetes (K8s) environments. For example, `docker run --cpuset-cpus=0-2,8 ...` sets the CPU affinity so that the processes can only run on CPUs 0, 1, 2, and 8 on the host system. In this case `availableCores()` detects this and returns four (4). Another example is `docker run --cpu=3.4 ...`, which throttles the CPU quota to on average 3.4 CPUs on the host system. In this case `availableCores()` detects this and returns three (3), because it rounds to the nearest integer. In contrast, `parallel::detectCores()` completely ignores such cgroups settings and returns the number of CPUs on the host system, which results in CPU overuse and degredated performance. Continous Integration (CI) services (e.g. GitHub Actions, Travis CI, and Appveyor CI) and cloud services (e.g. RStudio Cloud) use these types of cgroups settings under the hood, which means `availableCores()` respects their CPU allocations.
71+
Similarly, `availableCores()` is also agile to CPU limitations set by Unix control groups (cgroups), which is often used by Linux containers (e.g. Docker, Apptainer / Singularity, and Podman) and Kubernetes (K8s) environments. For example, `docker run --cpuset-cpus=0-2,8 ...` sets the CPU affinity so that the processes can only run on CPUs 0, 1, 2, and 8 on the host system. In this case `availableCores()` detects this and returns four (4). Another example is `docker run --cpu=3.4 ...`, which throttles the CPU quota to on average 3.4 CPUs on the host system. In this case `availableCores()` detects this and returns three (3), because it rounds to the nearest integer. In contrast, `parallel::detectCores()` completely ignores such cgroups settings and returns the number of CPUs on the host system, which results in CPU overuse and degraded performance. Continuous Integration (CI) services (e.g. GitHub Actions, Travis CI, and AppVeyor CI) and cloud services (e.g. RStudio Cloud) use these types of cgroups settings under the hood, which means `availableCores()` respects their CPU allocations.
7272

7373
If running on an HPC cluster with a job scheduler, a script that uses `availableCores()` will run the number of parallel workers that the job scheduler has assigned to the job. For example, if we submit a Slurm job as `sbatch --cpus-per-task=16 ...`, then `availableCores()` returns 16, because it respects the `SLURM_*` environment variables set by the scheduler. On Son of Grid Engine (SGE), the scheduler sets `NSLOTS` when submitting using `qsub -pe smp 8 ...` and `availableCores()` returns eight (8). See `help("availableCores", package = "parallelly")` for currently supported job schedulers, which includes 'Fujitsu Technical Computing Suite', 'Load Sharing Facility' (LSF), Simple Linux Utility for Resource Management (Slurm), Sun Grid Engine/Oracle Grid Engine/Son of Grid Engine (SGE), Univa Grid Engine (UGE), and TORQUE/PBS.
7474

vignettes/parallelly-10-local-workers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ where R is supported, e.g. Linux, macOS, and MS Windows.
2020
## Example: Launching two parallel workers
2121

2222
The below illustrates how to launch a cluster of two parallel workers
23-
on the current machine, run some basic calculations in paralllel, and
23+
on the current machine, run some basic calculations in parallel, and
2424
then shut down the cluster.
2525

2626
```r
@@ -59,7 +59,7 @@ cl <- makeClusterPSOCK(c("localhost", "localhost"))
5959

6060
The `availableCores()` function will return the number of workers that
6161
the system allows. It respects many common settings that controls the
62-
number of CPU cores that the current R process is alloted, e.g. R
62+
number of CPU cores that the current R process is allotted, e.g. R
6363
options, environment variables, and CGroups settings. For details, see
6464
`help("availableCores")`. For example,
6565

vignettes/parallelly-12-remote-workers.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010

1111
# Introduction
1212

13-
Sometimes it is not sufficient to parallize on a single computer - it
14-
cannot provide all of the compute power we are looking for. When we
13+
Sometimes it is not sufficient to parallelize on a single computer -
14+
it cannot provide all of the compute power we are looking for. When we
1515
hit this limit, a natural next level is to look at other computers
1616
near us, e.g. desktops in an office or other computers we have access
1717
to remotely. In this vignette, we will cover how to run parallel R
@@ -205,7 +205,7 @@ parallel R workers on these machines with little efforts.
205205
206206
Some machines do not use the default port 22 to answer on SSH
207207
connection requests. If the machine uses another port, say, port 2201,
208-
then we canspecify that via option `-p port`, when we connect to it,
208+
then we can specify that via option `-p port`, when we connect to it,
209209
e.g.
210210
211211
```sh
@@ -483,8 +483,8 @@ referred to as a "jumphost". For example, assume machine
483483
{alice@secret1}$
484484
```
485485
486-
To achive the same in a single SSH call, we can specify the "jumphost"
487-
`-J hostname` option for SSH, as in:
486+
To achieve the same in a single SSH call, we can specify the
487+
"jumphost" `-J hostname` option for SSH, as in:
488488
489489
```sh
490490
{ally@local}$ ssh -J alice@login.remote.org alice@secret1.remote.org

vignettes/parallelly-17-hpc-workers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ version 4.5.1 (2025-06-13), platform x86_64-pc-linux-gnu)
9898

9999

100100

101-
## Example: Launch parallel workers via the'Fujitsu Technical Computing Suite job scheduler
101+
## Example: Launch parallel workers via the Fujitsu Technical Computing Suite job scheduler
102102

103103
The 'Fujitsu Technical Computing Suite' is a high-performance compute
104104
(HPC) job scheduler where one can request compute resources on

0 commit comments

Comments
 (0)