Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
doku:spack-transition [2023/05/04 08:32] – katrin | doku:spack-transition [2023/05/08 07:45] – katrin | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== SPACK - migration to setup without environment | ====== SPACK - migration to setup without environment | ||
- | ===== Problems | + | ===== Motivation: problems |
Having worked with //spack environments// | Having worked with //spack environments// | ||
Line 14: | Line 14: | ||
===== New approach without environments ===== | ===== New approach without environments ===== | ||
- | There are three separate spack installation trees corresponding to the CPU/GPU architectures on VSC: | + | There are now three separate spack installation trees corresponding to the CPU/GPU architectures on VSC: |
* skylake - Intel CPUs; works on Intel Skylake and Cascadelake CPUs | * skylake - Intel CPUs; works on Intel Skylake and Cascadelake CPUs | ||
Line 63: | Line 63: | ||
---- | ---- | ||
- | ===== Migration script - search.py | + | ===== Migration script - " |
- | If you want to find a list of packages or modules which correspond to the software you have been using until now, you may use the following | + | ==== Method 1 ==== |
+ | |||
+ | If you need to find a list of packages or modules which correspond to the software you have been using until now, you can use the alias **spacksearch** to do that | ||
+ | |||
+ | < | ||
+ | alias spacksearch='/ | ||
+ | </ | ||
+ | |||
+ | The script | ||
< | < | ||
- | zen [user@l51 ~] python3 / | + | zen [user@l51 ~] spacksearch |
</ | </ | ||
- | where ''< | + | where ''< |
==== Usage Example ==== | ==== Usage Example ==== | ||
Line 90: | Line 98: | ||
< | < | ||
- | zen [user@l51 ~]$ module load python/ | + | zen [user@l51 ~]$ spacksearch |
- | + | ||
- | zen [user@l51 ~]$ python3 / | + | |
==> The package hash jsfjwaz refers to netcdf-c and belongs to vsc5 as: | ==> The package hash jsfjwaz refers to netcdf-c and belongs to vsc5 as: | ||
Line 119: | Line 125: | ||
</ | </ | ||
- | You can also switch | + | To search for packages in a different spack tree you can just change |
+ | |||
+ | For example to search in the 'cuda-zen' spack tree: | ||
< | < | ||
zen [user@l51 search]$ cuz | zen [user@l51 search]$ cuz | ||
- | cuda-zen [user@l51 search]$ | + | cuda-zen [user@l51 search]$ |
==> The package hash jsfjwaz refers to netcdf-c and belongs to vsc5 as: | ==> The package hash jsfjwaz refers to netcdf-c and belongs to vsc5 as: | ||
Line 142: | Line 150: | ||
spack find -lvd /upkxxi | spack find -lvd /upkxxi | ||
</ | </ | ||
+ | |||
+ | |||
+ | ==== Method 2 ==== | ||
+ | |||
+ | Add this function to your '' | ||
+ | |||
+ | < | ||
+ | ## spack command wrapper, so we can include our own `spack something` | ||
+ | ## commands, like `spack search`: | ||
+ | spack () { | ||
+ | case " | ||
+ | " | ||
+ | python3 / | ||
+ | ;; | ||
+ | *) | ||
+ | command spack " | ||
+ | esac | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | Usage example: | ||
+ | |||
+ | < | ||
+ | skylake [user@l41 ~]$ spack search asd | ||
+ | |||
+ | ==> The package hash asd refers to python and belongs to vsc4 as: | ||
+ | | ||
+ | |||
+ | ==> Searching similar python modules at skylake... | ||
+ | |||
+ | ---/ | ||
+ | python/ | ||
+ | python/ | ||
+ | python/ | ||
+ | |||
+ | ==> Load any one of these packages with ' | ||
+ | module load python/ | ||
+ | |||
+ | ==> Get some additional info with 'spack find -lvd mypackage', | ||
+ | spack find -lvd /p4x6ji | ||
+ | </ | ||
+ | |||
+ | ---- | ||
Line 159: | Line 210: | ||
<box 80% round red|Warning> | <box 80% round red|Warning> | ||
+ | |||
+ | ===== Continue working with old spack environments ===== | ||
+ | |||
+ | You may also continue to work with the spack environments. If you wish to do so you need the following commands: | ||
+ | |||
+ | ==== On zen3 ==== | ||
+ | |||
+ | < | ||
+ | source / | ||
+ | spacktivate zen3 | ||
+ | </ | ||
+ | |||
+ | ==== On skylake ==== | ||
+ | |||
+ | < | ||
+ | source / | ||
+ | spacktivate skylake | ||
+ | </ | ||
+ | |||
+ | |||
+ | <box 80% round red|Warning> | ||
+ | |||
---- | ---- | ||
Line 182: | Line 255: | ||
---- | ---- | ||
- | ===== Setting LD_LIBRARY_PATH | + | ==== Setting LD_LIBRARY_PATH ==== |
Loading a module does no longer automatically set the '' | Loading a module does no longer automatically set the '' |