Skip to content

Commit

Permalink
mdlin/pyspell fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kcgthb committed Sep 29, 2023
1 parent 63a7cc4 commit a197356
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 18 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/config/spellcheck.wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,12 @@ ECDSA
SaaS
CLI
GUI
CPU
CPUs
GPU
GPUs
Schrödinger
OnDemand
CRAN
mailto
parallelize
35 changes: 17 additions & 18 deletions src/docs/software/using/R.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,10 @@ have different ways of presenting the script's output:

Here's an example R batch script that can be submitted via `sbatch`. It runs a
simple matrix multiplication example, and demonstrates how to feed R code as a
[HEREDOC][url_heredoc] to R directly, so no intermediate R script is necessary:
[`HEREDOC`][url_heredoc] to R directly, so no intermediate R script is
necessary:

=== "Rtest.sbatch"
=== "`Rtest.sbatch`"

``` bash
#!/usr/bin/bash
Expand Down Expand Up @@ -137,12 +138,10 @@ directory.

!!! Warning "Install R packages in a standard shell session"

Make sure to install your packages in a standard Sherlock shell session and not in an RStudio session.
Make sure to install your packages in a standard Sherlock shell session,
not in an RStudio session.





To install a R package in your personal environment, the first thing to do is
load the R module:

Expand Down Expand Up @@ -419,17 +418,17 @@ To remove a package from your local R library, you can use the

### Examples

#### Installing devtools
#### Installing `devtools`

[`devtools`][url_devtools] is a package that provides R functions that simplify
many common tasks. While its core functionality revolves around package
development, `devtools` can also be used to install packages, particularly
those on GitHub.

Installing `devtools` is somewhat memory-intensive and has several
dependencies. The following example shows how to run an interactive dev
session with 4 CPUs, load the modules for the necessary dependencies, and
install `devtools` for R version 4.2.0.
dependencies. The following example shows how to run an interactive session
with 4 CPUs, load the modules for the necessary dependencies, and install
`devtools` for R version 4.2.0.

```none
# Launch interactive dev session with 4 CPUs
Expand All @@ -452,18 +451,18 @@ $ R

#### Single node

R has a couple of powerful and easy to use tools for parallelizing your R jobs.
R has a couple of powerful and easy-to-use tools to parallelize your R jobs.
[`doParallel`][url_doparallel] is one of them. If the `doParallel` package is
not installed in your environment yet, you can [install it in a few easy
steps](#installing).
steps](#installing-packages).

Here is a quick `doParallel` example that uses one node and 16 cores on
Sherlock (more nodes or CPU cores can be requested, as needed).


Save the two scripts below in a directory on Sherlock:

=== "doParallel_test.R"
=== "`doParallel_test.R`"

``` R
# Example doParallel script
Expand Down Expand Up @@ -496,7 +495,7 @@ Save the two scripts below in a directory on Sherlock:
parallel_time
```

=== "doParallel_test.sbatch"
=== "`doParallel_test.sbatch`"

``` shell
#!/bin/bash
Expand Down Expand Up @@ -570,7 +569,7 @@ Once the package is installed, the following scripts demonstrate a very basic
`Rmpi` example.


=== "Rmpi-test.R"
=== "`Rmpi-test.R`"

``` R
# Example Rmpi script
Expand All @@ -595,7 +594,7 @@ Once the package is installed, the following scripts demonstrate a very basic
mpi.exit()
```

=== "Rmpi-test.sbatch"
=== "`Rmpi-test.sbatch`"

``` shell
#!/bin/bash
Expand Down Expand Up @@ -648,7 +647,7 @@ Here's a quick example that compares running a matrix multiplication on a CPU
and on a GPU using R. It requires [submitting a job to a GPU node][url_gpu] and
the [`gpuR`][url_gpuR] R package.

=== "gpuR-test.R"
=== "`gpuR-test.R`"

``` R
# Example gpuR script
Expand All @@ -675,7 +674,7 @@ the [`gpuR`][url_gpuR] R package.
}
```

=== "gpuR-test.sbatch"
=== "`gpuR-test.sbatch`"

``` shell
#!/bin/bash
Expand Down

0 comments on commit a197356

Please sign in to comment.