Skip to main content

Libraries

Elja has the .lua based module system called LMOD. It helps to change the user's environment based on what .lua module the user loads. It does so by changing the PATH environment variables as well as others in order to enable the user to run specific software or provide them access to another library.

Currently, the Elja library consists of many libraries at your disposal:

  • lib-edda: The main core library that the other libraries call to load a specific module file that is not located in the other libraries.
  • lib-tools: Contains module files that load compilers, programming languages, and other similar tools that can be used to compile and code.
  • lib-chem: Library consisting of module files that load software related to the Chemistry field.
  • lib-bio: Library consisting of module files that load software related to the Biology field.
  • lib-geo: Library consisting of module files that load software related to the Geology field.
  • lib-engine: Library consisting of module files that load software related to the Engineering field.

Each module file in the library is named after the software that the module file creates an environment for.

You can find out what module files are available in each library in the software section on this wiki site.

Selecting libraries

Before loading in any libraries, you'll need to load the library lib-edda/Core since all module files in every other library load module files from there. To select lib-edda/Core you'll need to type in the following command:

$ ml use /hpcapps/lib-edda/modules/all/Core/

To load the other libraries, you'll also have to use the command ml use. For example, if we want to use the library lib-tools, we can do so by typing in the command line:

$ ml use /hpcapps/lib-tools/modules/all

After loading in the library, you can see every available module file that the library offers. To view all available module files, you type in the command line ml avail like so:

$ ml avail

----------------------------- /hpcapps/lib-tools/modules/all -----------------------------
Anaconda3/2023.09-0 ParaView/5.11.2-OpenMPI-4.1.5
Autotools/20220317 Perl/5.36.1
BLIS/0.9.0 Py3k/v
CMake/3.26.3 Python/3.11.3
FFTW/3.3.10 R/4.3.2-gfbf-2023a
FlexiBLAS/3.3.1 RSTUDIO/v2023.09
GCC/12.3.0 SQLite/3.42.0
GCCcore/11.2.0 UnZip/6.0
GCCcore/12.3.0 cURL/8.0.1
GCCcore/13.2.0 (D) f5c/1.4-OpenMPI-4.1.5
HDFView/3.3.1 foss/2023a
Java/11.0.20 gompi/2023a
Lobster/5.0.0 matplotlib/3.7.2-python-3.11.3
OpenBLAS/0.3.23 ncurses/6.4
OpenFOAM/10-OpenMPI-4.1.5 tqdm/4.66.1-python-3.11.3
OpenMPI/4.1.5 zlib/1.2.13

As we can see, the module files are named after the software that the module file sets the environment for. In the next chapter, we will go through how to load a module file.

Loading Module Files

The next step is to load a particular module file after loading a library, as we did in the Selecting Libraries chapter. In the lib-tools library, we can see it has a module file named Python/3.11.3. To load that module file, you'll simply need to type ml load <name of module file>, in this case Python, so to use Python you'll need to type in the following:

$ ml load Python

However! If there are two module files named Python but with different version numbers, like Python/3.11.3 and Python/3.9.3, you'll need to specify which module file you want to load by adding the version type as well: ml load Python/3.11.3, like:

$ ml load Python/3.11.3

Now after loading the Python module file, Python is available to you. To verify that this particular version of Python has been loaded in your environment, you can simply type ml list like so:

$ ml list

Currently Loaded Modules:
1) GCCcore/.12.3.0 (H) 5) libreadline/.8.2 (H) 9) libffi/.3.4.4 (H)
2) bzip2/.1.0.8 (H) 6) Tcl/.8.6.13 (H) 10) OpenSSL/.1.1 (H)
3) zlib/.1.2.13 (H) 7) SQLite/.3.42.0 (H) 11) Python/3.11.3
4) ncurses/.6.4 (H) 8) XZ/.5.4.2 (H)

Summary

The steps in the previous chapter can be summarized into these steps:

ml use /hpcapps/lib-edda/modules/all/Core # Important to load this beforehand
ml use /hpcapps/lib-tools/modules/all # Library containing the Python module file
ml load Python # Load the Python module file to use Python in your environment

Using other libraries

To load other available libraries that were mentioned in the chapter Libraries you can do the following:

  • lib-tools:

    $ ml use /hpcapps/lib-tools/modules/all
  • lib-chem:

    $ ml use /hpcapps/lib-chem/modules/all
  • lib-bio:

    $ ml use /hpcapps/lib-bio/modules/all
  • lib-geo:

    $ ml use /hpcapps/lib-geo/modules/all
  • lib-engine:

    $ ml use /hpcapps/lib-engine/modules/all