Legacy Modules

The Discovery cluster OS has been moved from CentOS 7 to Red Hat Enterprise Linux release 8 (RHEL 8). Some software packages were built on the old OS CentOS 7. Although the current OS is RHEL 8, users can still use the software. In this page, you will learn how to use old software.

Unload os/rhel_8 Module

Once you login to Discovery, you will find os/rhel_8 is loaded in your environment by default. This module is Sticky. This means that it requires --force to be unloaded or purged. To unload os/rhel_8, run the following command.

module --force purge

Now, check if the module was successfully unloaded.

$ module list
No modules loaded

The output of the previous command shows no module is loaded in you environment.

Load os/centos_7

To make all old software modules available, you need load a module named os/centos_7.

module load os/centos_7

Now, old software modules are available.

$ module avail
------------------------------------------------------------ /fs1/software/sstack/centos_7/modules -------------------------------------------------------------
   conda/2022a    sstack/main

------------------------------------------------------------ /software/el7software/anaconda/modules ------------------------------------------------------------
   alfalfa_gbs    anaconda3                     miniconda/3-4.10.3-10        pbbioconda        redbiom                      tensorflow/1.15.0
   amptk/1.4.2    hsc_prediction                miniconda/3-4.11.0-4  (D)    pytorch           soilsystems                  tensorflow/2.0.0  (D)
   anaconda       mambaforge/3-4.10.3-10        miniforge/3-4.10.3-10        qiime2-2019.10    tensorflow-gpu/1.15.0
   anaconda2      mambaforge/3-4.11.0-4  (D)    miniforge/3-4.11.0-4  (D)    qiime2-2021.2     tensorflow-gpu/2.0.0  (D)

--------------------------------------------------------- /software/el7software/custom/el7/modulefiles ---------------------------------------------------------
   bayescan/2.1    cst/2021                gcc/4.9.4    google-cloud-sdk/365.0.1    matlab/2021a        openjdk/1.8.0_292-b10-full    petsc/3.2-p7-transat
   clumpp/1.1.2    fastsimcoal2/2.6.0.3    gcc/9.4.0    matlab/2017b                matlab/2022a (D)    openmpi/1.5.5-transat         transat/5.7.1

---------------------------------------- /fs1/software/el7software/spack/0.16/share/spack/modules/linux-centos7-x86_64 -----------------------------------------
   alsa-lib/1.2.3.2-gcc-9.3.0-qpczwg4                           libxkbfile/1.0.9-gcc-9.3.0-52u5mgd                        (D)
   amber/16-gcc-9.3.0-openmpi-l6gh2av                           libxml2/2.9.10-gcc-9.3.0-pvvnuip                          (D)
   amg/1.2-gcc-9.3.0-openmpi-mlnalne                            libxpm/3.5.12-gcc-9.3.0-n2bmkpd
   arborx/1.1-gcc-9.3.0-openblas-openmpi-g6mzzaz                libxrandr/1.5.0-gcc-9.3.0-rkodgfz

Load the Old Software

Once os/centos_7 is available in your environment, you can load your intended modules. For example, to use SAGA GIS software, you can search for its modules using module spider command.

$ module spider saga
------------------------------------------------------------------------------------------------------------------------------------------------------------
  saga-dev: saga-dev/6.4.0
------------------------------------------------------------------------------------------------------------------------------------------------------------

    This module can be loaded directly: module load saga-dev/6.4.0


------------------------------------------------------------------------------------------------------------------------------------------------------------
  saga-gis:
------------------------------------------------------------------------------------------------------------------------------------------------------------
     Versions:
        saga-gis/7.4.0-gcc-9.2.0-openmpi-qrq45yk
        saga-gis/7.4.0-gcc-9.3.0-openmpi-ljseyw3
        saga-gis/7.9.0-gcc-9.3.0-openmpi-nc2xynr

------------------------------------------------------------------------------------------------------------------------------------------------------------
  For detailed information about a specific "saga-gis" package (including how to load the modules) use the module's full name.
  Note that names that have a trailing (E) are extensions provided by other modules.
  For example:

     $ module spider saga-gis/7.9.0-gcc-9.3.0-openmpi-nc2xynr
------------------------------------------------------------------------------------------------------------------------------------------------------------

The above output shows different versions of saga-gis. To load saga-gis/7.9.0-gcc-9.3.0-openmpi-nc2xynr, run the following command.

module load saga-gis/7.9.0-gcc-9.3.0-openmpi-nc2xynr

Run Legacy Software

A method using Linux container virtualization is provided so that depreciated legacy software can still be run. Apptainer is the container runtime you’ll be using to run legacy software. It allows users to treat *.sif container files as executables. Users can call the .sif executable file without calling Apptainer and feed it with arguments. Apptainer will run provided arguments directly inside the container.

The .sif file, to run your legacy software, can be accessed through an enviormental variable named SIF. To run any legacy software, you need to use the SIF environmental variable followed by the command used to run your software.

In the previous section, you loaded saga-gis software. To check if it was loaded successfully, run module list command.

$ module list
 1) os/centos_7                           (S)  21) pixman/0.40.0-gcc-9.3.0-pxmpxec                    41) libedit/3.1-20191231-gcc-9.3.0-gtnab2l
 2) gdal/3.2.0-gcc-9.3.0-openmpi-2linbii       22) libx11/1.6.7-gcc-9.3.0-ubd5ife
 42) ncurses/6.2-gcc-9.3.0-hwn6g5r
...
 17) freetype/2.10.1-gcc-9.3.0-s7aaxmy          37) inputproto/2.3.2-gcc-9.3.0-o6ytjkn              57) gtkplus/3.20.10-gcc-9.3.0-h7h7tey
 18) libxcb/1.13-gcc-9.3.0-zypalg2              38) libxt/1.1.5-gcc-9.3.0-6v2aeiw                   58) wxwidgets/3.1.0-gcc-9.3.0-cxuily3
 19) libxext/1.3.3-gcc-9.3.0-yiikz3m            39) binutils/2.35.1-gcc-9.3.0-dptqsyw               59) saga-gis/7.9.0-gcc-9.3.0-openmpi-nc2xynr
 20) libxrender/0.9.10-gcc-9.3.0-fxpwvhn        40) hwloc/2.2.0-gcc-9.3.0-oh6qcca
 ...

The output shows that os/centos_7 and saga-gis are loaded.

Now, if you use the saga_cmd command you will get an error saying that saga_cmd: command not found as shown next.

$ saga_cmd --version
-bash: saga_cmd: command not found

To get it working properly, you need to run the above command using the SIF enviromental variable.

$ $SIF saga_cmd --version
SAGA Version: 7.3.0

Notice the dollar sign $ prior SIF. To reference the environment variable, you have to precede the variable with a dollar sign.

Running Old Software Using SBATCH

Legacy software can be run by using a Slurm submission script. For example, to run saga-gis software, create the following submission script.

#!/bin/bash

#SBATCH --output output-1.out
#SBATCH --ntasks 1
#SBATCH --cpus-per-task 1
#SBATCH --mem-per-cpu 4G
#SBATCH --time 00:10:00
#SBATCH --partition normal

# Load modules
module --force purge
module load os/centos_7
module load saga-gis

# Specify job steps to run
"$SIF" saga_cmd --version

Notice the command module --force purge used to unload all loaded modules including sticky ones such as os/rhel_8. The module os/centos_7 makes all legacy modules available. The enviromental variable SIF holds the executable to run the saga_cmd command in a container.

To submit the script, run the following command.

$ sbatch submit.sh
Submitted batch job 155

Once the job is finished, check its output file.

$ cat output-1.out
Autoloading gdal/3.2.0-gcc-9.3.0-openmpi-2linbii
Autoloading hdf5/1.10.7-gcc-9.3.0-openmpi-jejit7t
...
Autoloading icu4c/67.1-gcc-9.3.0-5hcgvdw
Autoloading libxft/2.3.2-gcc-9.3.0-rltvirw
Autoloading shared-mime-info/1.9-gcc-9.3.0-hxpdefu
Autoloading libxml2/2.9.10-gcc-9.3.0-pvvnuip
SAGA Version: 7.3.0

The output shows that all dependency module are loaded and the run successfully.

MPI

MPI programs, such as OpenMPI or MPICH, do not currently work with legacy software and the above container method. This includes anything built with MPI compilers or support enabled.

Affected programs will need to be rebuilt. If you are not familiar with the process you can submit a new software request.