This lesson is being piloted (Beta version)

Computing Basics for DUNE - Revised 2025 edition: 2025 Example AL9 setup for a new session

You can store the code below as myal9.sh and run it every time you log in.

Note - the full LArSoft suite doesn’t work yet with spack

Use the Apptainer/ method until we get larsoft working if you want to use the full DUNE software suite.

Set up software

# find a spack environment and set it up
# setup spack  (pre spack 1.0 version)

source /cvmfs/larsoft.opensciencegrid.org/spack-v0.22.0-fermi/setup-env.sh

# get the packages you need to run this - this will become simple in future
echo "ROOT"
spack load root@6.28.12%gcc@12.2.0 arch=linux-almalinux9-x86_64_v3

echo "CMAKE"
spack load cmake@3.27.9%gcc@11.4.1 arch=linux-almalinux9-x86_64_v3

echo "GCC"
spack load gcc@12.2.0

echo "Rucio and metacat"
spack load r-m-dd-config experiment=dune lab=fnal.gov
export RUCIO_ACCOUNT=justinreadonly

echo "IFDHC"
spack load ifdhc@2.8.0%gcc@12.2.0 arch=linux-almalinux9-x86_64_v3
spack load ifdhc-config@2.6.20%gcc@11.4.1 arch=linux-almalinux9-x86_64_v3


echo "PY-PIP"                       
spack load py-pip@23.1.2%gcc@11.4.1 arch=linux-almalinux9-x86_64_v3

echo "no justIN yet"
#spack load justin

Get a token

Note: The justin get-token method for authentication does not currently work on AL9

The justin get-token command is not distributed on AL9/Spack currently. Please use SL7 if you need to use rucio.

normal tokens (below) for xroot access do work

getting a token for xroot access in AL9

Make certain you have al9 set up

Then use htgettoken to get a token so you can read the files you find.

htgettoken -i dune --vaultserver htvaultprod.fnal.gov #:8200
export BEARER_TOKEN_FILE=/run/user/`id -u`/bt_u`id -u`

The first time you do it it will ask you to authenticate using a web browser.

You should be able to read files at remote sites now. You may need to repeat the htgettoken as the interactive tokens are pretty short-lived. Batch jobs do their own tokens.