Skip to content
Marc Mengel edited this page Aug 7, 2024 · 8 revisions

Spack is an excellent package manager with excellent facilities for building and installing packages.

However, for building software that is going to run in a Grid environment, encourage use of binary package distribution, and to assist our users who are migrating from UPS packaging, we have several recommendations and tools, included in this repository.

We have a more complete Spack Tutorial, done initially for Mu2e Spack Tutorial.pdf

Getting Started

The current recommendation is to use our bootstrap script to install spack, for one of our releases:

  • pick a directory path where you want to place your spack instance

  • fetch a release branch of our bootstrap script with wget or curl, one of

  • run "bootstrap.sh /path/to/directory"

  • Get a cup of coffee or your favorite beverage

  • source /path/to/directory/setup-env.sh

Sample session:

$ time wget https://github.com/FNALssi/fermi-spack-tools/raw/v2_21_0/bin/bootstrap
--2024-08-07 13:38:21--  https://raw.githubusercontent.com/FNALssi/fermi-spack-tools/new_make_spack/bin/bootstrap
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 2606:50c0:8002::154, 2606:50c0:8003::154, 2606:50c0:8000::154, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|2606:50c0:8002::154|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4489 (4.4K) [text/plain]
Saving to: 'bootstrap'

     0K                                                      100% 15.4M=0s

2024-08-07 13:38:21 (15.4 MB/s) - 'bootstrap' saved [4489/4489]


real	0m0.343s
user	0m0.102s
sys	0m0.010s
$ time bash ./bootstrap $PWD/t5
Putting detail log in /tmp/bootstrap2688477.log
Cloning FNALssi fermi-spack-tools repository             
Setting up with make_spack                               
Setting up new instance                                  
Finding compilers                                        
Bootstrapping...                                         
installing fermi-spack-tools...                          
                                                         
real	4m37.681s
user	1m50.688s
sys	0m4.599s
$ . $PWD/t5/setup-env.sh
$ spack find
-- linux-almalinux9-x86_64_v2 / [email protected] ----------------------
[email protected]  [email protected]  [email protected]  [email protected]
==> 4 installed packages