Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
doku:spack-transition [2023/05/05 06:56] – [New approach without environments] jzdoku:spack-transition [2023/05/05 11:38] – [Continue working with old modules (from environments)] jz
Line 64: Line 64:
  
 ===== Migration script - "spacksearch" ===== ===== Migration script - "spacksearch" =====
 +
 +==== 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 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
Line 147: Line 149:
 ==> Get some additional info with 'spack find -lvd mypackage', e.g.: ==> Get some additional info with 'spack find -lvd mypackage', e.g.:
 spack find -lvd /upkxxi spack find -lvd /upkxxi
 +</code>
 +
 +
 +==== Method 2 ====
 +
 +Add this function to your ''.bashrc'' file:
 +
 +<code>
 +## spack command wrapper, so we can include our own `spack something`
 +## commands, like `spack search`:
 +spack () {
 +    case "$1" in
 +        "search")
 +            python3 /opt/sw/spack-scripts/search/search.py "$2"
 +            ;;
 +        *)
 +            command spack "$@"
 +    esac
 +}
 +</code>
 +
 +Usage example:
 +
 +<code>
 +skylake [user@l41 ~]$ spack search asd
 +
 +==> The package hash asd refers to python and belongs to vsc4 as:
 +     python +bz2+ctypes+dbm~debug+libxml2+lzma~nis~optimizations+pic+pyexpat+pythoncmd+readline+shared+sqlite3+ssl~tix~tkinter~ucs4+uuid+zlib
 +
 +==> Searching similar python modules at skylake...
 +
 +---/gpfs/opt/sw/skylake/spack-0.19.0/share/spack/modules/linux-almalinux8-skylake_avx512---
 +python/3.10.8-gcc-9.5.0-qh22vnd
 +python/3.10.8-gcc-12.2.0-apbi5uz
 +python/3.10.8-intel-2021.7.1-p4x6jid
 +
 +==> Load any one of these packages with 'module load mypackage', e.g.:
 +module load python/3.10.8-intel-2021.7.1-p4x6jid
 +
 +==> Get some additional info with 'spack find -lvd mypackage', e.g.:
 +spack find -lvd /p4x6ji
 </code> </code>
  
Line 163: Line 206:
 export MODULEPATH=/opt/sw/vsc4/VSC/Modules/TUWien:/opt/sw/vsc4/VSC/Modules/Intel/oneAPI:/opt/sw/vsc4/VSC/Modules/Parallel-Environment:/opt/sw/vsc4/VSC/Modules/Libraries:/opt/sw/vsc4/VSC/Modules/Compiler:/opt/sw/vsc4/VSC/Modules/Debugging-and-Profiling:/opt/sw/vsc4/VSC/Modules/Applications:/opt/sw/vsc4/VSC/Modules/p71545:/opt/sw/vsc4/VSC/Modules/p71782::/opt/sw/spack-0.19.0/var/spack/environments/skylake/modules/linux-almalinux8-x86_64:/opt/sw/spack-0.19.0/var/spack/environments/skylake/modules/linux-almalinux8-skylake export MODULEPATH=/opt/sw/vsc4/VSC/Modules/TUWien:/opt/sw/vsc4/VSC/Modules/Intel/oneAPI:/opt/sw/vsc4/VSC/Modules/Parallel-Environment:/opt/sw/vsc4/VSC/Modules/Libraries:/opt/sw/vsc4/VSC/Modules/Compiler:/opt/sw/vsc4/VSC/Modules/Debugging-and-Profiling:/opt/sw/vsc4/VSC/Modules/Applications:/opt/sw/vsc4/VSC/Modules/p71545:/opt/sw/vsc4/VSC/Modules/p71782::/opt/sw/spack-0.19.0/var/spack/environments/skylake/modules/linux-almalinux8-x86_64:/opt/sw/spack-0.19.0/var/spack/environments/skylake/modules/linux-almalinux8-skylake
 </code> </code>
 +
 +===== Continue 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 ==
 +
 +<code>
 +source /opt/sw/spack-0.17.1/share/spack/setup-env.sh
 +spacktivate zen3
 +</code>
 +
 +== On skylake ==
 +
 +<code>
 +source /opt/sw/spack-0.19.0/share/spack/setup-env.sh
 +spacktivate skylake
 +</code>
 +
  
 <box 80% round red|Warning>This approach is not recommended and we will no longer maintain the spack environments or install new packages there</box> <box 80% round red|Warning>This approach is not recommended and we will no longer maintain the spack environments or install new packages there</box>
 +
 ---- ----
  
  • doku/spack-transition.txt
  • Last modified: 2023/05/17 14:48
  • by msiegel