Skip to main content

Libraries

Elja has the .lua based module system called LMOD. It helps to change the users environment based on what .lua module the user loads. It does so by changing the PATH environment variables aswell 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, they are

  • 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 langauges and other similar tools that can be used to compile and code.
  • lib-chem:library consisting of modulefiles that load software related to the Chemistry-field
  • lib-bio: library consisting of modulefiles that load related to the Biology-field
  • lib-geo: library consisting of modulefiles that load software related to the Geology-field
  • lib-engine: library consisting of modulefiles that load software related to the Engineering-field

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

You can find out what modulefiles 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 moduelfiles in every other library loads modulefiles 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 modulefile that the library offers. To view all available modulefiles 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 modulefiles are named after the software that the modulefile sets the environment for. In the next chapter we will go through how to load a modulefile.

Loading Modulefiles

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

$ ml load Python

However! If there are two modulefiles named Python but have a different version number, like Python/3.11.3 and Python/3.9.3 you'll need to specify which modulefile you want to load by adding the version type aswell ml load Python/3.11.3 like

$ ml load Python/3.11.3

Now after loading the Python modulefile that Python is now 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 modulefile
ml load Python # load the Python modulefile to use Pytohn in your environment

Using other libraries

To load other available libraries that where mentioned in the chapter Libraries on Elja 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