Program files and modules

There are many programs and libraries already pre-installed on the HPC systems. The HPC system uses modules to manage different versions of these applications, which might have different dependencies – potentially, this can become complicated, although for most people this will be pretty straightforward.

These modules are organized into dependency groups called “stacks”. At the time of this writing (2024-10-09), the most recent stack is stack/2022.2. You can load this stack via

$
module load stack/2022.2

Likely, you will also want to load R. At the time of this writing, the most recent version installed on argon is 4.2.2, which can be loaded via:

$
module load r/4.2.2_gcc-9.5.0

If you don’t want to load these modules every single time you log in to argon, you can save this configuration as your default via

$
module save

There are a few other module commands worth being aware of:

You can also have multiple configurations stored, if you wish. For example, suppose you occasionally do something that requires extra software to be loaded. You could load those modules, then

Note that if you leave off the name, module save and module restore overwrite and load the default configuration that you have set up.

To see what modules are available in your current software stack, use the command module avail. For example:

$
module avail ^r-

To see what modules are available across all software stacks, use module spider, which has the same syntax.

Alternatively, you can look here at this argon software list to see a list of all the programs installed on the HPC.

Your R profile

Since you’ll likely be using R on Argon, and will likely have to install packages, it’s worth mentioning how to set up a local directory in which to install them (otherwise, R will ask you questions about it every time you run install.packages()).

You can put these R packages anywhere you want, although the “standard” place to put them would be in .local/lib. So, let’s make a subdirectory there for our R packages:

$
mkdir -p .local/lib/R

And then tell R to use that as your local library by adding this to your .Rprofile file (you may have to create this file first):

.Rprofile
.libPaths('~/.local/lib/R')
options(repos=c(CRAN="https://mirror.las.iastate.edu/CRAN"))

The second line is optional, but will stop R from asking you about what mirror you want to use every time you install a package.

Your profile

This is optional, but to customize your HPC setup, it is often the case that you would like to run certain commands at the beginning of every Argon session. To do that, you can place these commands in a profile file called either .bash_profile or .bashrc. These files should already exist when you log in for the first time, ready for you to add things to them.

Note: The default setup on Argon is to have your .bash_profile file call your .bashrc file, so it doesn’t really matter where you put these commands as they’ll run either way. You can change this behavior if you wish, but only do so if you know what you’re doing and are comfortable with a nonstandard setup. In this tutorial, we’ll put our setup commands in .bash_profile.

For example, suppose you want to install an application that is not available as a module. You download and compile it and place the compiled binary in .local/bin. You would want to update the environment variable PATH so that the linux command line knows to look in this location for applications. So, the first few lines of your .bash_profile file might look like:

.bash_profile
#!/bin/bash
export PATH=~/.local/bin:$PATH:

alias R="R --no-save"
<...more...>

This sets up the Linux search path so that the OS knows where your user-installed applications are (~/.local/bin), and also sets up an alias so that whenever you run R, it will not save your workspace at the end of the session (something you should never do). Note that the .bash_profile file (and .bashrc file) must be placed in your home directory.