# DCSR Software Stack

### What is it?

The DCSR provides a software environment including commonly used scientific tools and libraries.
The software is optimised to make best use of the CPUs, GPUs and high speed Infiniband interconnect.

In order to create the environment we use the [Spack](https://github.com/spack/spack) package manager and [Lmod](https://lmod.readthedocs.io/en/latest/).

For information on the deprecated Vital-IT software stack please [see here](https://wiki.unil.ch/ci/books/high-performance-computing-hpc/page/old-software-stack).

### Release and lifecycle

Each year we provide a new release of the software stack which fixes versions for key tools and libraries.

The following table list all the software stacks avaiable:

| Name      | Date | Comments |
| ----------- | ----------- |----|
| Arolle      | 2022       | SSL library incompatible with OS (after 2025 update)|
| 20240303    | 2024        | |
| 20240704    | 2024  | New stack based on Open MPI |
| 20241118    | 2025  | R is provided by r-light module which uses a container, remove of miniconda3 (license problems)|


Newer versions of tools may be made available during the year but the default versions will remain the default.

### How to use it

The latest software stack is loaded by default. You just have to list the module using the `module` command:

```bash
module available
```

To load a given software:

```bash
module load python
```

If you want to change of software stack you have to use the command: `dcsrsoft`

```bash
dcsrsoft use arolle
```
Do not forge to do a `module purge` before changing software stack.

### How to use it on jobs

You need to start your jobs with:

```bash
#!/bin/bash -l

#SBATCH ...

dcsrsoft use 20241118
```

You need to put the name of the stack you are using. If you want to know the name of the stack that it is currently used, you can type:

```bash
dcsrsoft show
```
Please keep in mind that old software stack would eventually removed. Therefore, you should migrate your script to the current software stack, if any problem arises please send us a ticket via: <helpdesk@unil.ch> ( with DCSR on the subject of the mail)

### Common problems

#### SSL problem in old software stacks

If you observe one of the following errors:

```bash
ImportError: cannot import name 'HTTPSConnection' from 'http.client'
```
or

```bash
ImportError: cannot import name 'ssl' from 'urllib3.util.ssl_
```
You should do define the following environment variable:

```bash
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/dcsrsoft/arolle_libs
```
Before executing your script