pueoBuilder
Loading...
Searching...
No Matches
Optional: Cardinal

Manual Environment Setup on OSC (Cardinal)

  • This is modified from Optional: Pitzer
  • Last tested: Monday May 20, 2026 with ROOT version 6.40
  • Load the following modules :
    Warning
    Be sure that you are on Cardinal; won't work if you are on Pitzer.
    module load gcc/13.2.0
    module load cmake/3.25.2
    module load fftw/3.3.10

Python

  • Download the source code.
    wget https://www.python.org/ftp/python/3.12.9/Python-3.12.9.tgz
  • Untar as usual,
    tar -xzvf Python-3.12.9.tgz
    cd Python-3.12.9
  • Make the build and install directories.
    mkdir build install; cd build
    Inside the build directory, configure:
    ../configure --prefix=$(pwd)/../install --enable-shared
  • After configuration, compile as usual
    make -j8 && make install
  • After everything is installed, add the install/lib/ directory to the environment variable $LD_LIBRARY_PATH
    export LD_LIBRARY_PATH=path/to/python/install/lib:$LD_LIBRARY_PATH
    and add the newly install python3 to your PATH variable:
    export PATH=path/to/python/install/bin:${PATH}
    Note
    Modify the paths as needed; you might also want to have these in your .bashrc or equivalent so you don't have to type this every time.
  • If you head over to the binary directory,
    cd path/to/python/install/bin
    You should see pip3 and python3.12.
  • If you run
    ./python3
    you should see the Python REPL:
    Python 3.12.9 (main, Mar 24 2025, 19:23:35) [GCC 12.3.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>>
  • If you run ./pip3 list, you'd see an empty list. To install some useful libraries, run
    ./pip3 install numpy scipy matplotlib

ROOT

  • Here are the different versions of ROOT.
  • Download
    wget https://root.cern/download/root_v6.28.06.source.tar.gz
    and untar
    tar -xzvf root_v6.28.06.source.tar.gz
  • Make the install directory:
    cd root-6.28.06
    mkdir install
    cd build
  • Run CMake, but be sure to enable the mathmore and minuit2 options.
    cmake -DCMAKE_INSTALL_PREFIX=$(pwd)/../install/ -Dminuit2=ON -Dmathmore=ON ..
  • Edit: for ROOT 6.40, the command is
    cmake -DCMAKE_INSTALL_PREFIX=$(pwd)/../install/ -Dmathmore=ON -Dbuiltin_gl2ps=ON ..
  • Compile and install as usual:
    make -j8 && make install
  • God willing, there'd be no errors, and you'd be able to run the following to finish setting up ROOT:
    source path/to/your/ROOT/install/bin/thisroot.sh
    Note
    Modify the path as needed and put it in your .bashrc
  • Finally, you should be able to check that ROOT is working; type root to start the REPL

    ------------------------------------------------------------------
    | Welcome to ROOT 6.28/06 https://root.cern |
    | (c) 1995-2023, The ROOT Team; conception: R. Brun, F. Rademakers |
    | Built for linuxx8664gcc on Aug 28 2023, 11:29:15 |
    | From tags/v6-28-06@v6-28-06 |
    | With g++ (Spack GCC) 12.3.0 |
    | Try '.help'/'.?', '.demo', '.license', '.credits', '.quit'/'.q' |
    ------------------------------------------------------------------
    root [0]

    (run .q to quit the ROOT REPL)

    As well, inside the Python REPL, you should be able to run

    import ROOT

GeographicLib

GeographicLib is as of Oct 1 2026 a required dependency for AntarcticaRoot. On OSC, in project space PAS0654 and PAS2608 this has been installed. It's added to your path automatically when you source env.sh. However, if you want to compile it yourself, follow the instructions on its website.

  • Download tarball:
    wget https://sourceforge.net/projects/geographiclib/files/distrib-C++/GeographicLib-2.7.tar.gz
  • Untar:
    tar xfpz GeographicLib-2.7.tar.gz
    cd GeographicLib-2.7
  • Standard cmake and install to current directory:
    cmake -S . -B build -DCMAKE_INSTALL_PREFIX=$(pwd)/install
    cmake --build build --target install -- -j4
Attention
Now the important bit. You need to make sure cmake can find this library when you compile AntarcticaRoot later. To that end, you need this library in CMAKE_PREFIX_PATH and LD_LIBRARY_PATH. Assuming you are in GeographiLib-2.7/ still:
export CMAKE_PREFIX_PATH=$(pwd)/install:${CMAKE_PREFIX_PATH}
export LD_LIBRARY_PATH=$(pwd)/install/lib:${LD_LIBRARY_PATH}

Done