From 4a6db22b799e5d9d4d4648e719853a6fad8dff93 Mon Sep 17 00:00:00 2001
From: Carrie Brown <cbrown58@unl.edu>
Date: Thu, 19 Dec 2019 17:36:39 +0000
Subject: [PATCH] Broke up R documentation and moved GPU page

---
 .../applications/user_software/r_packages.md  | 63 +++++++++++++++++++
 .../app_specific/submitting_r_jobs.md         | 56 +----------------
 ...openacc_jobs.md => submitting_gpu_jobs.md} | 17 +++--
 3 files changed, 78 insertions(+), 58 deletions(-)
 create mode 100644 content/applications/user_software/r_packages.md
 rename content/submitting_jobs/{app_specific/submitting_cuda_or_openacc_jobs.md => submitting_gpu_jobs.md} (90%)

diff --git a/content/applications/user_software/r_packages.md b/content/applications/user_software/r_packages.md
new file mode 100644
index 00000000..aa9e06a1
--- /dev/null
+++ b/content/applications/user_software/r_packages.md
@@ -0,0 +1,63 @@
++++
+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.
diff --git a/content/submitting_jobs/app_specific/submitting_r_jobs.md b/content/submitting_jobs/app_specific/submitting_r_jobs.md
index 77096d3b..d0644b4f 100644
--- a/content/submitting_jobs/app_specific/submitting_r_jobs.md
+++ b/content/submitting_jobs/app_specific/submitting_r_jobs.md
@@ -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
-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 using `R CMD BATCH`](#running-r-scripts-using-r-cmd-batch)
   - [Running R scripts using `Rscript`](#running-r-scripts-using-rscript)
 - [Multicore (parallel) R submission](#multicore-parallel-r-submission)
--  [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)
+- [Multinode R submission with Rmpi](#multinode-r-submission-with-rmpi)
 
   
 ### Running R scripts in batch
@@ -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.
diff --git a/content/submitting_jobs/app_specific/submitting_cuda_or_openacc_jobs.md b/content/submitting_jobs/submitting_gpu_jobs.md
similarity index 90%
rename from content/submitting_jobs/app_specific/submitting_cuda_or_openacc_jobs.md
rename to content/submitting_jobs/submitting_gpu_jobs.md
index 1e1b1764..61d479c5 100644
--- a/content/submitting_jobs/app_specific/submitting_cuda_or_openacc_jobs.md
+++ b/content/submitting_jobs/submitting_gpu_jobs.md
@@ -1,6 +1,7 @@
 +++
 title = "Submitting GPU Jobs"
 description =  "How to submit GPU (CUDA/OpenACC) jobs on HCC resources."
+weight=35
 +++
 
 ### Available GPUs
@@ -53,15 +54,20 @@ You may request multiple GPUs by changing the` --gres` value to
 total of 4 GPUs.
 {{% /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
 
 {{< highlight batch >}}
 --partition=gpu --gres=gpu --constraint=gpu_16gb
 {{< /highlight >}}
 
-will request a GPU with 16GB of RAM, independent of the type of card (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).  
+will request a GPU with 16GB of RAM, independent of the type of card 
+(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,
 
 {{< highlight batch >}}
@@ -71,7 +77,10 @@ For example,
 will request a V100 GPU with 32GB RAM.
 
 {{% 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 %}}
 
 ### Compiling
-- 
GitLab