How to set up a basic session in al9
Table of Contents for al9_setup
a tip
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/dune.opensciencegrid.org/spack/setup-env.sh
echo "Activate dune-workflow"
spack env activate dune-workflow
echo "load GCC and CMAKE so don't use system"
echo "GCC"
spack load gcc@12.5.0 arch=linux-almalinux9-x86_64_v2
echo "PY-PIP"
spack load py-pip@23.1.2%gcc@11.4.1 arch=linux-almalinux9-x86_64_v3
You can check your environment by doing this
# test-paths.sh
echo "which root"
which root
root --version
echo "which gcc"
which gcc
gcc --version
echo "which python"
which python
python --version
echo "which cmake"
which cmake
cmake --version
Get a token
Interactive file access
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 -r interactive
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.
Accessing rucio and justIn resources requires a bit more
You should already be set up above. Now you can use justIn to get you a token.
- First tell
justInknows about you
justin time
The first time you do this you will get asked (after the justin time command)
To authorize this computer to run the justin command, visit this page with your
usual web browser and follow the instructions within the next 10 minutes:
https://dunejustin.fnal.gov/authorize/XXXXX
Check that the Session ID displayed on that page is BfhVBmQ
Once you've followed the instructions on that web page, please run the command
you tried again. You won't need to authorize this computer again for 7 days.
Once again go to the website that appears and authenticate.
- After the first authentication to justIn you need to do a second justin call
justin get-token
You will need to do this sequence weekly as your justin access expires.
Note:
Despite the name of this command it gets you both a token and a special X.509 proxy and it is the latter you are actually using to talk to rucio in these SL7 examples