FIX: update README.md
This commit is contained in:
202
README.md
202
README.md
@ -3,68 +3,25 @@
|
||||
[Official Spack documentation](https://spack.readthedocs.io/en/latest/)
|
||||
|
||||
## How to use on Merlin systems (Merlin6/Merlin7)
|
||||
```bash
|
||||
module load spack
|
||||
|
||||
# If you want to use the unstable software stack do:
|
||||
0. Load the spack module:
|
||||
|
||||
```bash
|
||||
[stable] user@login001:~> module load spack
|
||||
```
|
||||
+ If you want to use the unstable software stack do in addition:
|
||||
|
||||
```bash
|
||||
spack env activate -p unstable
|
||||
```
|
||||
|
||||
### Install your own software
|
||||
```bash
|
||||
# Check if your package is already implemented in Spack
|
||||
# You can also use the following website: https://packages.spack.io/
|
||||
[stable] user@login001:~> spack list $pkg_name # e.g opal
|
||||
|
||||
# Check the package variants you want to set e.g +cuda +openmp ^openmpi ...
|
||||
[stable] user@login001:~> spack info $pkg_name # e.g opal
|
||||
|
||||
# Add your package to the environment
|
||||
[stable] user@login001:~> spack add $pkg_name@version +variant1 ^dep1@version1
|
||||
|
||||
# If you want to install from local source clone your source under
|
||||
# /afs/psi.ch/sys/spack/user/$USER/spack-environment/$pkg_name
|
||||
# and tell Spack you want to use it using:
|
||||
[stable] user@login001:~> spack develop $pkg_name@version # Skip this if you don't want to develop from local source
|
||||
|
||||
# Check the whole dependency tree of your spec and
|
||||
# if you don't need to set more variants
|
||||
[stable] user@login001:~> spack concretize
|
||||
|
||||
# Install your packages
|
||||
[stable] user@login001:~> spack install # -v for verbose
|
||||
|
||||
# Load your package
|
||||
[stable] user@login001:~> spack load $pkg_name@version +variant1 ^dep1@version1
|
||||
|
||||
# Submit your script
|
||||
[stable] user@login001:~> sbatch batch.script
|
||||
```
|
||||
### Switching between environments
|
||||
|
||||
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:
|
||||
### Find out what's already installed
|
||||
|
||||
```bash
|
||||
spack env activate -p unstable # or stable
|
||||
```
|
||||
|
||||
### Managing your environments
|
||||
|
||||
When adding the following command you actually add a package to your own software stack;
|
||||
|
||||
```bash
|
||||
[stable] user@login001:~> spack add $pkg_name@version +variant1 ^dep1@version1
|
||||
```
|
||||
|
||||
You can check which package will be concretized and are in your environment using;
|
||||
|
||||
```bash
|
||||
[unstable] user@login001:~> spack find
|
||||
[unstable] user@login001:~> spack find
|
||||
==> In environment unstable
|
||||
==> 1 root specs
|
||||
- visit ~adios2+vtkm+gui
|
||||
- []
|
||||
|
||||
==> Included specs
|
||||
-- no arch / gcc ------------------------------------------------
|
||||
@ -133,13 +90,148 @@ gromacs@2024.1 hwloc@2.9.1 intel-oneapi-mkl@2024.0.0 intel-oneapi-runtime@202
|
||||
==> 257 installed packages
|
||||
```
|
||||
|
||||
The included specs and installed packages sections shows you all the packages that are pre-installed for you. </br>
|
||||
In case of a package having multiple installations, the following command helps you to find out which software you're interested about. </br>
|
||||
|
||||
For example let's say you are interested in py-alphafold but only in the gpu version; do:
|
||||
|
||||
```
|
||||
[unstable] user@login001:~> spack find -vl py-alphafold
|
||||
==> In environment unstable
|
||||
==> 1 root specs
|
||||
- dpjaszc visit
|
||||
|
||||
==> Included specs
|
||||
-- no arch / gcc ------------------------------------------------
|
||||
------- gromacs%gcc
|
||||
|
||||
-- no arch / gcc@12.3.0 -----------------------------------------
|
||||
------- cp2k@2024.1%gcc@12.3.0 ------- opal@master%gcc@12.3.0 ------- py-alphafold@2.3.2%gcc@12.3.0
|
||||
------- cp2k@2024.1%gcc@12.3.0 ------- py-alphafold@2.3.2%gcc@12.3.0 ------- quantum-espresso@7.3.1%gcc@12.3.0
|
||||
|
||||
-- no arch / oneapi@2024.1.0 ------------------------------------
|
||||
------- gromacs@2024.1%oneapi@2024.1.0
|
||||
|
||||
==> Installed packages
|
||||
-- linux-rhel7-x86_64 / gcc@12.3.0 ------------------------------
|
||||
rrfdppp py-alphafold@2.3.2~cuda build_system=python_pip tqziprv py-alphafold@2.3.2+cuda build_system=python_pip cuda_arch=60
|
||||
==> 2 installed packages
|
||||
```
|
||||
|
||||
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
|
||||
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
|
||||
spack load /tqziprv # refer to the installation with its hash directly.
|
||||
```
|
||||
|
||||
### Install your own software
|
||||
|
||||
1. Check if your package is already implemented in Spack. <br/>
|
||||
You can also use the following website: https://packages.spack.io/
|
||||
|
||||
```bash
|
||||
spack list $pkg_name # e.g opal
|
||||
```
|
||||
|
||||
2. Check the package variants you want to set e.g +cuda +openmp ^openmpi ...
|
||||
|
||||
```bash
|
||||
spack info $pkg_name # e.g opal
|
||||
```
|
||||
|
||||
3. Add your package to your personal environment
|
||||
|
||||
```bash
|
||||
spack add $pkg_name@version +variant1 ^dep1@version1
|
||||
```
|
||||
|
||||
+ If you want to install from local source clone your source under <br/>
|
||||
/afs/psi.ch/sys/spack/user/$USER/spack-environment/$pkg_name <br/>
|
||||
and tell Spack you want to use it using:
|
||||
|
||||
```bash
|
||||
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
|
||||
spack concretize
|
||||
```
|
||||
|
||||
5. Install the packages in your environment
|
||||
|
||||
```bash
|
||||
spack install # -v for verbose
|
||||
```
|
||||
|
||||
6. Load your package
|
||||
|
||||
```bash
|
||||
spack load $pkg_name@version +variant1 ^dep1@version1
|
||||
```
|
||||
|
||||
7. Submit your script
|
||||
|
||||
```bash
|
||||
sbatch batch.script
|
||||
```
|
||||
### Switching between environments
|
||||
|
||||
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
|
||||
spack env activate -p unstable # or stable
|
||||
```
|
||||
|
||||
### Managing your environments
|
||||
|
||||
When adding the following command you actually add a package to your own software stack;
|
||||
|
||||
```bash
|
||||
spack add $pkg_name@version +variant1 ^dep1@version1
|
||||
```
|
||||
|
||||
You can check which package will be concretized and are in your environment using;
|
||||
|
||||
```bash
|
||||
[unstable] user@login001:~> spack find
|
||||
==> In environment unstable
|
||||
==> 1 root specs
|
||||
- visit ~adios2+vtkm+gui
|
||||
|
||||
==> Included specs
|
||||
-- no arch / gcc ------------------------------------------------
|
||||
gromacs%gcc
|
||||
|
||||
-- no arch / gcc@12.3.0 -----------------------------------------
|
||||
cp2k@2024.1%gcc@12.3.0 opal@master%gcc@12.3.0 py-alphafold@2.3.2%gcc@12.3.0
|
||||
cp2k@2024.1%gcc@12.3.0 py-alphafold@2.3.2%gcc@12.3.0 quantum-espresso@7.3.1%gcc@12.3.0
|
||||
|
||||
-- no arch / oneapi@2024.1.0 ------------------------------------
|
||||
gromacs@2024.1%oneapi@2024.1.0
|
||||
|
||||
==> Installed packages
|
||||
...
|
||||
==> 257 installed packages
|
||||
```
|
||||
|
||||
The root spec is the specs that are personal to you and that will be concretized and installed. <br/>
|
||||
The installed packages are either packages that were previously installed by admins or packages that you already installed but that are not root. <br/>
|
||||
|
||||
If you want to remove this package from your personal env, you can use the following command: <br/>
|
||||
|
||||
```bash
|
||||
[stable] user@login001:~> spack rm $pkg_name@version +variant1 ^dep1@version1
|
||||
spack rm $pkg_name@version +variant1 ^dep1@version1
|
||||
```
|
||||
|
||||
or
|
||||
|
Reference in New Issue
Block a user