Skip to content
Snippets Groups Projects
Commit 4a6db22b authored by Carrie A Brown's avatar Carrie A Brown
Browse files

Broke up R documentation and moved GPU page

parent 2e2b41a8
No related branches found
No related tags found
1 merge request!174Broke up R documentation and moved GPU page
+++
title = "Using R Libraries"
description = "How to install R packages on HCC resources."
+++
Many commonly used R packages are included in the base R installation available on HCC clusters,
such as `tidyverse` and `stringr`. However, users are able to install other packages in their
user libraries.
- [Adding packages](#adding-packages)
- [Installing packages interactively](#installing-packages-interactively)
- [Installing packages using R CMD INSTALL](#installing-packages-using-r-cmd-install)
### Adding packages
There are two options to install packages. The first is to run R on the
login node and run R interactively to install packages. The second is to
use the `R CMD INSTALL` command.
{{% notice info %}}
All R packages must be installed from the login node. R libraries are
stored in user's home directories which are not writable from the worker
nodes.
{{% /notice %}}
#### Installing packages interactively
1. Load the R module with the command `module load R`
- Note that each version of R uses its own user libraries. To
install packages under a specific version of R, specify which
version by using the module load command followed by the version
number. For example, to load R version 3.5, you would use the
command `module load R/3.5`
2. Run R interactively using the command `R`
3. From within R, use the `install.packages()` command to install
desired packages. For example, to install the package `ggplot2`
use the command `install.packages("ggplot2")`
Some R packages, require external compilers or additional libraries. If
you see an error when installing your package you might need to load
additional modules to make these compilers or libraries available. For
more information about this, refer to the package documentation.
#### Installing packages using R CMD INSTALL
To install packages using `R CMD INSTALL` the zipped package must
already be downloaded to the cluster. You can download package source
using `wget`. Then the `R CMD INSTALL` command can be used when
pointed to the full path of the source tar file. For example, to install
ggplot2 the following commands are used:
{{< highlight bash >}}
# Download the package source:
wget https://cran.r-project.org/src/contrib/ggplot2_3.2.1.tar.gz
# Install the package:
R CMD INSTALL ./ggplot2_2.2.1.tar.gz
{{< /highlight >}}
Additional information on using the `R CMD INSTALL` command can be
found in the R documentation which can be seen by typing `?INSTALL`
within the R console.
...@@ -4,16 +4,13 @@ description = "How to submit R jobs on HCC resources." ...@@ -4,16 +4,13 @@ description = "How to submit R jobs on HCC resources."
+++ +++
Submitting an R job is very similar to submitting a serial job shown Submitting an R job is very similar to submitting a serial job shown
on [Submitting Jobs]({{< relref "/guides/submitting_jobs/_index.md" >}}). on [Submitting Jobs]({{< relref "../submitting_jobs/_index.md" >}}).
- [Running R scripts in batch](#running-r-scripts-in-batch) - [Running R scripts in batch](#running-r-scripts-in-batch)
- [Running R scripts using `R CMD BATCH`](#running-r-scripts-using-r-cmd-batch) - [Running R scripts using `R CMD BATCH`](#running-r-scripts-using-r-cmd-batch)
- [Running R scripts using `Rscript`](#running-r-scripts-using-rscript) - [Running R scripts using `Rscript`](#running-r-scripts-using-rscript)
- [Multicore (parallel) R submission](#multicore-parallel-r-submission) - [Multicore (parallel) R submission](#multicore-parallel-r-submission)
- [Multinode R submission with Rmpi](#multinode-r-submission-with-rmpi) - [Multinode R submission with Rmpi](#multinode-r-submission-with-rmpi)
- [Adding packages](#adding-packages)
- [Installing packages interactively](#installing-packages-interactively)
- [Installing packages using R CMD INSTALL](#installing-packages-using-r-cmd-install)
### Running R scripts in batch ### Running R scripts in batch
...@@ -223,52 +220,3 @@ mpi.exit() ...@@ -223,52 +220,3 @@ mpi.exit()
--- ---
### Adding packages
There are two options to install packages. The first is to run R on the
login node and run R interactively to install packages. The second is to
use the `R CMD INSTALL` command.
{{% notice info %}}
All R packages must be installed from the login node. R libraries are
stored in user's home directories which are not writable from the worker
nodes.
{{% /notice %}}
#### Installing packages interactively
1. Load the R module with the command `module load R`
- Note that each version of R uses its own user libraries. To
install packages under a specific version of R, specify which
version by using the module load command followed by the version
number. For example, to load R version 3.5, you would use the
command `module load R/3.5`
2. Run R interactively using the command `R`
3. From within R, use the `install.packages()` command to install
desired packages. For example, to install the package `ggplot2`
use the command `install.packages("ggplot2")`
Some R packages, require external compilers or additional libraries. If
you see an error when installing your package you might need to load
additional modules to make these compilers or libraries available. For
more information about this, refer to the package documentation.
#### Installing packages using R CMD INSTALL
To install packages using `R CMD INSTALL` the zipped package must
already be downloaded to the cluster. You can download package source
using `wget`. Then the `R CMD INSTALL` command can be used when
pointed to the full path of the source tar file. For example, to install
ggplot2 the following commands are used:
{{< highlight bash >}}
# Download the package source:
wget https://cran.r-project.org/src/contrib/ggplot2_2.2.1.tar.gz
# Install the package:
R CMD INSTALL ./ggplot2_2.2.1.tar.gz
{{< /highlight >}}
Additional information on using the `R CMD INSTALL` command can be
found in the R documentation which can be seen by typing `?INSTALL`
within the R console.
+++ +++
title = "Submitting GPU Jobs" title = "Submitting GPU Jobs"
description = "How to submit GPU (CUDA/OpenACC) jobs on HCC resources." description = "How to submit GPU (CUDA/OpenACC) jobs on HCC resources."
weight=35
+++ +++
### Available GPUs ### Available GPUs
...@@ -53,15 +54,20 @@ You may request multiple GPUs by changing the` --gres` value to ...@@ -53,15 +54,20 @@ You may request multiple GPUs by changing the` --gres` value to
total of 4 GPUs. total of 4 GPUs.
{{% /notice %}} {{% /notice %}}
The GPU memory feature may be used to specify a GPU RAM amount either independent of architecture, or in combination with it. The GPU memory feature may be used to specify a GPU RAM amount either
independent of architecture, or in combination with it.
For example, using For example, using
{{< highlight batch >}} {{< highlight batch >}}
--partition=gpu --gres=gpu --constraint=gpu_16gb --partition=gpu --gres=gpu --constraint=gpu_16gb
{{< /highlight >}} {{< /highlight >}}
will request a GPU with 16GB of RAM, independent of the type of card (K20, K40, P100, etc.). You may also will request a GPU with 16GB of RAM, independent of the type of card
request both a GPU type _and_ memory amount using the `&` operator (single quotes are used because `&` is a special character). (K20, K40, P100, etc.). You may also request both a GPU type _and_
memory amount using the `&` operator (single quotes are used because
`&` is a special character).
For example, For example,
{{< highlight batch >}} {{< highlight batch >}}
...@@ -71,7 +77,10 @@ For example, ...@@ -71,7 +77,10 @@ For example,
will request a V100 GPU with 32GB RAM. will request a V100 GPU with 32GB RAM.
{{% notice warning %}} {{% notice warning %}}
You must verify the GPU type and memory combination is valid based on the [available GPU types.]({{< relref "submitting_cuda_or_openacc_jobs/#available-gpus" >}}). Requesting a nonexistent combination will cause your job to be rejected with a `Requested node configuration is not available` error. You must verify the GPU type and memory combination is valid based on the
[available GPU types.]({{< relref "submitting_gpu_jobs/#available-gpus" >}}).
Requesting a nonexistent combination will cause your job to be rejected with
a `Requested node configuration is not available` error.
{{% /notice %}} {{% /notice %}}
### Compiling ### Compiling
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment