ADD: README.md
This commit is contained in:
112
README.md
112
README.md
@ -1,72 +1,76 @@
|
|||||||
WIP
|
|
||||||
|
|
||||||
# The PSI Spack Deployment
|
# The PSI Spack Deployment
|
||||||
|
|
||||||
## How to use on Merlin7
|
## How to use on Merlin7
|
||||||
|
|
||||||
|
### Install your own software
|
||||||
```bash
|
```bash
|
||||||
source /afs/psi.ch/sys/spack-rhel7/spack/share/spack/setup-env.sh # can be also include in your .bashrc
|
# Check if your package is already in Spack
|
||||||
|
user@login001:~> spack list $pkg_name # e.g opal
|
||||||
|
|
||||||
spack env list
|
# Check the package variants you want to set e.g +cuda +openmp ^openmpi ...
|
||||||
spack env activate -d <package> # e.g ffbidx all for whole software stack
|
user@login001:~> spack info $pkg_name # e.g opal
|
||||||
|
|
||||||
# Install env if local development, else skip
|
# Check the whole dependency tree of your spec and
|
||||||
spack install # -v for verbose
|
# if you don't need to set more variants
|
||||||
|
user@login001:~> spack spec $pkg_name@version +variant1 ^dep1@version ...
|
||||||
|
|
||||||
spack load <package>
|
# e.g spack spec opal@2022.1%gcc@7.5.0 +mithra ~python ^openmpi@4.1.6 ^openblas
|
||||||
|
|
||||||
|
# Install your package
|
||||||
|
user@login001:~> spack install $pkg_name@version +variant1 ^dep1@version1
|
||||||
|
|
||||||
|
# Load your package
|
||||||
|
user@login001:~> spack load $pkg_name@version +variant1 ^dep1@version1
|
||||||
|
|
||||||
|
# Submit your script
|
||||||
|
user@login001:~> sbatch batch.script
|
||||||
```
|
```
|
||||||
|
|
||||||
## How to use on Merlin6
|
### Develop your own software
|
||||||
|
```bash
|
||||||
|
# Check if your package is already in Spack
|
||||||
|
user@login001:~> spack list $pkg_name # e.g opal
|
||||||
|
|
||||||
|
# Check the package variants you want to set e.g +cuda +openmp ^openmpi ...
|
||||||
|
user@login001:~> spack info $pkg_name # e.g opal
|
||||||
|
|
||||||
|
# Create your own env and load it
|
||||||
|
user@login001:~> spack env activate --create -p myenv
|
||||||
|
|
||||||
|
# Add the spec you want to build to your environement
|
||||||
|
user@login001:~> spack add $pkg_name@version +variant1 ^dep1@version ...
|
||||||
|
|
||||||
|
# e.g spack add opal@master%gcc@7.5.0 +mithra ~python ^openmpi@4.1.6 ^openblas
|
||||||
|
|
||||||
|
# Tell Spack you want to develop locally under
|
||||||
|
# /afs/psi.ch/sys/spack.x86_64_cos3.0/user/$USER/spack-environment/$pkg_name
|
||||||
|
user@login001:~> spack develop $pkg_name@version
|
||||||
|
|
||||||
|
# Install the package locally
|
||||||
|
user@login001:~> spack install # first time, then you can just use make directly
|
||||||
|
|
||||||
|
# Load your package
|
||||||
|
user@login001:~> spack load $pkg_name@version +variant1 ^dep1@version1
|
||||||
|
|
||||||
|
# Submit your script
|
||||||
|
user@login001:~> sbatch batch.script
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
## How to use on other systems
|
||||||
|
|
||||||
|
### Install Spack
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
source /afs/psi.ch/sys/spack-rhel7/spack/share/spack/setup-env.sh # can be also include in your .bashrc
|
user@supersystem:~> cd /scratch/$USER
|
||||||
|
|
||||||
spack env list
|
user@supersystem:~> git clone -c feature.manyFiles=true https://github.com/spack/spack.git
|
||||||
spack env activate -d <package> # e.g ffbidx all for whole software stack
|
|
||||||
|
|
||||||
# Install env if local development, else skip
|
user@supersystem:~> . spack/share/spack/setup-env.sh
|
||||||
spack install # -v for verbose
|
|
||||||
|
|
||||||
spack load <package>
|
|
||||||
|
|
||||||
# The OPAL Spack recipe
|
|
||||||
|
|
||||||
[Official Spack documentation](https://spack.readthedocs.io/en/latest/)
|
|
||||||
|
|
||||||
## Install Spack
|
|
||||||
|
|
||||||
```bash
|
|
||||||
cd /scratch/$USER
|
|
||||||
git clone -c feature.manyFiles=true https://github.com/spack/spack.git
|
|
||||||
. spack/share/spack/setup-env.sh
|
|
||||||
|
|
||||||
# Add PSI specific recipes
|
# Add PSI specific recipes
|
||||||
cd OPAL/spack
|
user@supersystem:~> git clone https://gitlab.psi.ch/lsm-hpce/alps/spack-psi.git
|
||||||
spack repo add .
|
|
||||||
```
|
|
||||||
|
|
||||||
## Install OPAL@version
|
user@supersystem:~> spack repo add $PWD/spack-psi
|
||||||
|
|
||||||
```bash
|
user@supersystem:~> spack install $pkg_name # -v for verbose
|
||||||
spack info opal # Find out which version and which variants you want to set
|
|
||||||
|
|
||||||
# Install env if local development, else skip
|
|
||||||
spack install opal@2022.1.0 # -v for verbose -j 8 for 8 parallel jobs
|
|
||||||
|
|
||||||
# Load environment before launching any scripts
|
|
||||||
spack load opal
|
|
||||||
|
|
||||||
sbatch ...
|
|
||||||
```
|
|
||||||
|
|
||||||
## Develop OPAL
|
|
||||||
|
|
||||||
```bash
|
|
||||||
spack env activate -d OPAL/spack/env/opal/
|
|
||||||
|
|
||||||
# $OPAL_SRC_DIRECTORY is where you did the git clone git@gitlab.psi.ch:OPAL/src.git
|
|
||||||
spack develop -p $OPAL_SRC_DIRECTORY opal@master
|
|
||||||
|
|
||||||
spack install # -v for verbose -j 8 for 8 parallel jobs
|
|
||||||
|
|
||||||
```
|
|
||||||
|
Reference in New Issue
Block a user