Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This is a custom Confluence template that is intended to be re-used in the creation of workshops presented by ARCC on the Wiki. All of the content in these sections is intended to be replaced by the author of the workshop. The first step in this style guide is to ensure that the the page is in wide mode to maximize the real estate for content when possible. The Title of the Page should be the same as the Title of the workshop and this section should include a quick intro to the topic, why it’s important for ARCC users, and what users should expect to get out of this workshop. Next should be a Table of Contents macro in vertical format. The Table is intended to be used as an agenda section for presenter mode as well as navigation for non-presenting viewing so that users can find the documentation and navigate to what they need to brush up on. Finally, at the end of each section, there should be a divider to indicate the separation of “slides”

Table of Contents
minLevel1
maxLevel1
outlinefalse
stylenone
typelist
printabletrue

Headers and Sections

...

Code Examples

Two Column Tables are nice ways to separate content/ Background info along with a code example on the same “Slide”. Please notice the table width. This should stop scroll bars from appearing

...

Bullets are nice to include for distinct points

...

yep

...

they

...

sure

...

Code Block
Please use the "code snippet" in the + button when creating code examples. Also please do not go
past the width of the table. This is to prevent scroll bars appearing













This is the Max number of code lines to show on an example

Straight Code - No context

Code Block
Limit to 16 lines in the example. 














This is the end

Same Thing With Images

...

Two Column Tables are nice ways to separate content/ Background info along with an image example on the same “Slide”. Please notice the table width. This should stop scroll bars from appearing

  • Bullets are nice to include for distinct points

  • yep

  • they

  • sure

  • are

    This is 14 lines

image-20240514-000033.pngImage Removed

Alternatively No Table

image-20240514-000127.pngImage Removed

Finally The End

...

Link to Previous sub-module or Home Module

...

Goal: Introduce the LMOD Module System and the concept of dependencies.

Table of Contents
minLevel1
maxLevel1
outlinefalse
stylenone
typelist
printabletrue

...

What Have We Seen

Note

Although on the login nodes we do have a gcc compiler and the Python language this only caters for a minority of users.

We can see that R is not available, nor most of the applications that researchers will require.

There are:

  • 10s of compilers and languages

  • 100s of applications and utilities.

  • 1000s of underlying libraries and commands.

We can not provide a system that provides everything all at once.

Info

What we need is a method to enable users to find and select that they specifically need, and a method to allow them to configure and setup their sessions/environment to allow them to perform their analysis and research.

...

LMOD: An Environment Module System

...

What do we have available?

Info
  • Compilers and eco systems: GNU family, Intel’s oneAPI, Nvidia’s hpc-sdk

  • Languages: C/C+, Fortran, Go, Java, Julia, Perl, Python, R, Ruby, Rust

  • Scientific libraries and toolkits: Built with a specific compiler: GNU by default

  • Standalone applications and utilities: Installed using:

    • Conda

    • Containers: running Singularity (not Docker)

      • We can create a Singularity image from a Docker image.

    • Binaries/Executables

Check the MedicineBow Software Page.

...

What is Available?

Info
  • ARCC provides a small set of core compilers , languages, libraries and application, which will be updated on a semi regular basis. When updated, we try and use the latest versions, and typically will not be support older versions.

  • The GNU family of compile

  • rs (i.e. gcc) is are primary focus, but we do provide Intel’s oneAPI suite of compilers/libraries as well as NVidia’s hpc-sdk toolset.

  • Please refer to the MedicineBow Software List for what is available and/or use the module spider command to search.

  • ARCC will consider adding to this on a case-by-case basis.

...

What’s available: Using the Module System

Info

Use module list to view the modules you are currently loaded in your session:

Code Block
# Modules currently loaded.
[]$ module list
Currently Loaded Modules:
  1) slurm/latest (S)   2) arcc/1.0 (S)
Info

Use module avail to see what modules are currently available that you can be loaded your current session:

Code Block
# What's available within my 'current' environment.
# With respect to what modules I 'currently' have loaded.
[]$ module avail
...
Info

Notice: There are various categories of available software: containers, compilers, conda environments, Linux binaries…

Info

Modules have a name and a version: <module-name>/<module-version>

Note

The two modules slurm/latest and arcc/1.0 are loaded by default at the start of every session by ARCC.

These make available various commands and scripts that ALL users require (such as Slurm commands). If you purge/unload (see later) these you will not be able to use Slurm.

...

What’s available? Compiler tree

Info

Some software has to be built with respect to a compiler.

By default we build using the GNU family of compilers for C/C++ and Fortran.

Info

Some commands have shortcuts. Using ml is the a shortcut to module list.

Code Block
[]$ module purge
[]$ module load gcc/13.2.0
[]$ ml
Currently Loaded Modules:
  1) slurm/latest (S)   3) gmp/6.2.1    5) mpc/1.3.1       7) zstd/1.5.5
  2) arcc/1.0     (S)   4) mpfr/4.2.0   6) zlib-ng/2.1.4   8) gcc/13.2.0
Info

The gmp, mpc, mpfr, zlib-ng and zstd are know as dependencies.

There are libraries that need to be loaded for gcc to work.

They are loaded automatically so you don’t have to.

Code Block
[] module avail
Info

Question What changed?

We can now see all the modules available that have been compiled with gcc/13.2.0

Note

These are only available after the gcc/13.2.0 module has been loaded.

...

Change Compiler

Info

Let’s see what happens to our environment if we load a different compiler.

Code Block
[]# module load nvhpc-sdk/24.3
Lmod is automatically replacing "gcc/13.2.0" with "nvhpc-sdk/24.3".
Info

Again, what happened?

Code Block
[]$ ml
Currently Loaded Modules:
  1) slurm/latest (S)   2) arcc/1.0 (S)   3) nvhpc-sdk/24.3

[]$ module avail
Info

Only modules relating to nvhpc-sdk/24.3 are now available.

Note

You can only have one module compiler loaded at a time.

Compilers of the same name, but different versions (gcc/12.2.0 vs gcc/13.2.0) are considered different.

...

Purge Your Modules

Info

Use the module purge command to reset your environment to the initial defaults.

Code Block
[]$ module purge
The following modules were not unloaded:
  (Use "module --force purge" to unload all):
  1) slurm/latest   2) arcc/1.0
Info

Again, what has changed?

Code Block
[]$ ml
[]$ module avail
Info

We are back to having the two modules slurm/latest and arcc/1.0 loaded (by default) and the initial set of available modules.

Note

The more modules you have loaded, the more dependencies you will have loaded and the more likely you are to forget what you have loaded…

Note

As mentioned earlier, do not use the --force option to unload the slurm and arcc modules.

...

Looking for Modules: module spider

Info
  • Remember: module avail only shows what is available to be loaded with respect to your current environment and what you currently have loaded.

  • It does not show you everything.

Code Block
[]$ module spider openmpi
----------------------------------------------------------------------------
  openmpi: openmpi/4.1.6
----------------------------------------------------------------------------
     Other possible modules matches:
        nvhpc-openmpi3
    You will need to load all module(s) on any one of the lines below before the "openmpi/4.1.6" module is available to load.
      arcc/1.0  gcc/13.2.0
...

...

Module load/spider: Dependencies

Info

If you module spider a specific version it will list the dependencies that are required to first be loaded before it can be used:

Code Block
[]$ module spider openmpi/4.1.6
----------------------------------------------------------------------------
  openmpi: openmpi/4.1.6
----------------------------------------------------------------------------
    You will need to load all module(s) on any one of the lines below before the "openmpi/4.1.6" module is available to load.
      arcc/1.0  gcc/13.2.0
    Help:
      An open source Message Passing Interface implementation. ...
Note

Try loading before loading gcc/13.2.0:

Code Block
[]$ module load openmpi/4.1.6
Lmod has detected the following error: These module(s) or extension(s) exist
but cannot be loaded as requested: "openmpi/4.1.6"
   Try: "module spider openmpi/4.1.6" to see how to load the module(s).
Info

Load the required dependencies, then re-try:

Code Block
[]$ module load gcc/13.2.0
[]$ module load openmpi/4.1.6
[]$
Info

Let’s check everything has been loaded successfully:

Code Block
[]$ which mpicc
/apps/u/opt/gcc/13.2.0/openmpi/4.1.6/bin/mpicc

[]$ mpicc --version
gcc (Spack GCC) 13.2.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

...

What Do You Notice?

Info

After loading openmpi/4.1.6 what do we notice about what is now loaded and available?

Code Block
[]$ ml
[]$ module avail
Info

Notice we have opened up an additional set of modules:

Code Block
---- /apps/s/lmod/mf/spack/linux-rhel9-x86_64/openmpi/4.1.6-ipshyxb/gcc/13.2.0 ----
   adios2/2.9.2-ompi        netcdf-cxx4/4.3.1-ompi
   cgns/4.4.0-ompi          netlib-scalapack/2.2.0-ompi
   elpa/2023.05.001-ompi    parallel-netcdf/1.12.3-ompi
...
Info

Due to dependencies, there can be a hierarchy of core modules that need to be loaded to make other libraries and software available.

For example, some libraries, such as fftw, need to be built with gcc/13.2.0 and use the openmpi/4.1.6 library.

Typically their version number will be prefixed with -ompi.

Try: []$ module spider fftw

...

What’s different between these command-lines?

Info

What do we notice about the required dependencies for the following versions of Python?

Code Block
[]$ module spider python/3.10.6
[]$ module spider python/3.12.0
[]$ module spider python2

...

What’s different between these command-lines? Dependencies

Info

The two python/3.x versions have both been installed using the gcc/13.2.0 compiler, and thus this needs to be loaded before we can use them.

Code Block
[]$ module spider python/3.10.6
[]$ module spider python/3.12.0
...
    You will need to load all module(s) on any one of the lines below before the "python/3.12.0" module is available to load.
      arcc/1.0  gcc/13.2.0
      arcc/1.0  gcc/14.2.0
...      
Info

The python/2 module has no dependencies, can can be loaded straight away:

Code Block
[]$ module spider python2
----------------------------------------------------------------------------
  python2: python2/2.7.18
----------------------------------------------------------------------------
    You will need to load all module(s) on any one of the lines below before the "python2/2.7.18" module is available to load.
      arcc/1.0

...

More module commands

Info

The module command has lots more sub-commands:

Code Block
[]$ module
Modules based on Lua: Version 8.7  2022-04-16 13:49 -05:00
    by Robert McLay mclay@tacc.utexas.edu

module [options] sub-command [args ...]

Help sub-commands:
------------------
  help                              prints this message
  help                module [...]  print help message from module(s)

Loading/Unloading sub-commands:
-------------------------------
  load | add          module [...]  load module(s)
 ...

...