FIX: use shell instead of bash

This commit is contained in:
2024-07-02 16:48:55 +02:00
parent e91e04a81b
commit faa44c7d87

View File

@ -4,20 +4,24 @@
## How to use on Merlin systems (Merlin6/Merlin7)
0. Load the spack module:
Load the spack module
```bash
```shell
[stable] user@login001:~> module load spack
```
+ If you want to use the unstable software stack do in addition:
```bash
Voilà you're done you can use Spack! :)
+ Side note: the default software stack loaded for you is stable, which might not contain all the packages you're looking for, </br>
so if you want to use the unstable software stack switch to it using:
```shell
spack env activate -p unstable
```
### Find out what's already installed
## Find out what's already installed
```bash
```shell
[unstable] user@login001:~> spack find
==> In environment unstable
==> 1 root specs
@ -121,13 +125,13 @@ rrfdppp py-alphafold@2.3.2~cuda build_system=python_pip tqziprv py-alphafold@2.
As you can see there are two installation of py-alphafold, one with +cuda and one without. </br>
In this particular example, there is only one variant that interests you, so you can do:
``` bash
``` shell
spack load py-alphafold +cuda
```
However if multiple variants are interesting to you and you don't want to have to cite all of them you can do:
``` bash
``` shell
spack load /tqziprv # refer to the installation with its hash directly.
```
@ -136,19 +140,19 @@ spack load /tqziprv # refer to the installation with its hash directly.
1. Check if your package is already implemented in Spack. <br/>
You can also use the following website: https://packages.spack.io/
```bash
```shell
spack list $pkg_name # e.g opal
```
2. Check the package variants you want to set e.g +cuda +openmp ^openmpi ...
```bash
```shell
spack info $pkg_name # e.g opal
```
3. Add your package to your personal environment
```bash
```shell
spack add $pkg_name@version +variant1 ^dep1@version1
```
@ -156,31 +160,31 @@ spack add $pkg_name@version +variant1 ^dep1@version1
/afs/psi.ch/sys/spack/user/$USER/spack-environment/$pkg_name <br/>
and tell Spack you want to use it using:
```bash
```shell
spack develop $pkg_name@version # Skip this if you don't want to develop from local source
```
4. Check the whole dependency tree of your spec and <br/>
if you don't need to set more variants
```bash
```shell
spack concretize
```
5. Install the packages in your environment
```bash
```shell
spack install # -v for verbose
```
6. Load your package
```bash
```shell
spack load $pkg_name@version +variant1 ^dep1@version1
```
7. Submit your script
```bash
```shell
sbatch batch.script
```
### Switching between environments
@ -189,7 +193,7 @@ There are two environment available to users; stable and unstable. <br/>
The first one is loaded by default when loading the module. <br/>
If you want to switch between the two and use different software stack you can use the following command:
```bash
```shell
spack env activate -p unstable # or stable
```
@ -197,13 +201,13 @@ spack env activate -p unstable # or stable
When adding the following command you actually add a package to your own software stack;
```bash
```shell
spack add $pkg_name@version +variant1 ^dep1@version1
```
You can check which package will be concretized and are in your environment using;
```bash
```shell
[unstable] user@login001:~> spack find
==> In environment unstable
==> 1 root specs
@ -230,13 +234,13 @@ The installed packages are either packages that were previously installed by adm
If you want to remove this package from your personal env, you can use the following command: <br/>
```bash
```shell
spack rm $pkg_name@version +variant1 ^dep1@version1
```
or
```bash
```shell
[stable] user@login001:~> spack config edit
spack:
...
@ -251,7 +255,7 @@ and remove it manually from the spec list.
### Install Spack
```bash
```shell
user@supersystem:~> cd /scratch/$USER
user@supersystem:~> git clone -c feature.manyFiles=true https://github.com/spack/spack.git