Spack: Difference between revisions
Line 51: | Line 51: | ||
==References== | ==References== | ||
*[https://fifewiki.fnal.gov/wiki/Spack New Fermilab spack wiki] | *[https://fifewiki.fnal.gov/wiki/Spack New Fermilab spack wiki] | ||
** [https://fifewiki.fnal.gov/wiki/Using_fermi-spack-tools_for_test_releases Using fermi-spack-tools for test releases] | ** [https://fifewiki.fnal.gov/wiki/Using_fermi-spack-tools_for_test_releases Using fermi-spack-tools for test releases] | ||
*[https://cdcvs.fnal.gov/redmine/projects/spack-infrastructure/wiki/Wiki Old Fermilab spack wiki] | *[https://cdcvs.fnal.gov/redmine/projects/spack-infrastructure/wiki/Wiki Old Fermilab spack wiki] | ||
*[https://spack.readthedocs.io/en/latest/ Spack docs] | *[https://spack.readthedocs.io/en/latest/ Spack docs] | ||
*[https://github.com/FNALssi fnal ssi github] | |||
*[https://github.com/spack/spack github] | *[https://github.com/spack/spack github] | ||
*[https://github.com/FNALssi/fermi-spack-tools spack-tools github] | *[https://github.com/FNALssi/fermi-spack-tools spack-tools github] |
Revision as of 15:19, 18 January 2024
Introduction
Spack is a multi-package setup and build system. It replaces UPS and MRB (Multi-Repo Build) and related packages. The computing division will work to build and provide their software (art, ifdhc) within spack. Mu2e will probably not use the spack build features, but will have to use spack to access pre-built software, instead of ups setup command.
Scripts are provided to allow a spack setup of a UPS product and vice versa. The user doesn't see the difference.
Usage
setup mu2e source /cvmfs/fermilab.opensciencegrid.org/packages/common/spack/rollout/NULL/share/spack/setup-env.sh
defines
SPACK_ROOT=/cvmfs/fermilab.opensciencegrid.org/packages/common/spack/rollout/NULL MODULEPATH=$SPACK_ROOT/share/spack/modules/linux-scientific7-x86_64 DK_NODE=$SPACK_ROOT/share/spack/dotkit/linux-scientific7-x86_64 PATH= ... /cvmfs/fermilab.opensciencegrid.org/packages/common/spack/rollout/NULL/bin BASH_FUNC_spack()=... load ... unload ...
and some useful commands
spack -h spack find -h spack arch spack find spack find --variants art_root_io arch=linux-scientific7-x86_64_v2 %gcc@13.1.0 spack find -ldv
You can see the common lab packages are available in spack: ifdhc, jobsub_client, sam_web_client.
spack load ifdhc # load (like ups setup) using a hash for the version and qualifiers spack load ifdhc/242t7pk
Notes
show what spack knows about architectures
spack arch --known-targets
full listing of dependencies
spack find --long --show-flags --deps --variants ifdhc
diff between two hashes
spack diff art-root-io/jrcjyn4 art-root-io/h43e5rd
How to group sets of setups into one. You can make a spack environment, like
spack env create uboone_analysis_current_sl7_x86_64
then
spack activate uboone_analysis_current_sl7_x86_64
and "spack install" packages into it; then if you
spack env activate uboone_analysis_current_sl7_x86_64
those will be the packages you see, and they're all spack loaded at once. Marc stills need to add support for that to the cvmfs scripts though...