Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

****If you are running jobs via Rivanna, then there is no need to install any of the below unless you want to test code on your local machine before submitting a job of Rivanna - Rivanna is now equipped with LHAPDF and its required dependencies.



Setting up Ubuntu 22.04 with LHAPDF

  1. Install ubuntu using the bootable flash drive
  2. sudo apt update
  3. Additional Drivers (GUI) > Nvidia-driver-535 Note: this step can be done manually
  4. nvidia-smi : This should show a table with the GPU specs, it may also disply CUDA version if it was installed together with the driver in Step (3)
  5.  sudo apt install g++
  6.  sudo apt install -y python3-pip
  7.  pip3 install numpy
  8.  sudo ln -s /usr/bin/python3 /usr/bin/python (this is to force the  python path to python3.10)
  9.  sudo apt install -y build-essential libssl-dev libffi-dev python3-dev 
  10.  Download LHAPDF 6.5.4.tar.gz via https://lhapdf.hepforge.org/
  11.  Create a folder called "LHAPDF" inside the Home directory and move the LHAPDF 6.5.4.tar.gz and unzip.
  12.  Create a folder called "LHAPDF-install" inside the/home/LHAPDF directory. This is where we will install the LHAPDF software.
  13.  cd LHAPDF-6.5.4
  14.  Check the ~/.bashrc file and ensure you have the following there
     export PATH=$LHADIR/bin:$PATH
     export LHADIR=/home/username/LHAPDF/LHAPDF-install
     export LD_LIBRARY_PATH=$LHADIR/lib:$LD_LIBRARY_PATH
     alias python=python3
     alias Python=python3
     alias python='python3'
    then, source ~/.bashrc
  15.  ./configure - - prefix=/home/username/LHAPDF/LHAPDF-install (This will configure the LHAPDF, check the output to ensure no issues).
  16.  make
  17.  make install
  18.  Add the following line to the ~/.bashrc file.
     export PYTHONPATH=$LHADIR/local/lib/python3.10/dist-packages:$PYTHONPATH
     then, source ~/.bashrc
  19.  Type 'lha' and hit tab, it should auto-complete 'lhapdf' if everything went correctly. Then hit 'enter', and you will see some texts starting from "usage: lhapdf -h ......."
  20.  Next step is to run this PDFs_FFs_in_LHAPDF.py . For that you will need to download the relevant pdf drids. So, download this PDFs_FFs_in_LHAPDF.py  file, open and check which grids you need.
  21.  Download the relevant grids from https://lhapdf.hepforge.org/pdfsets.html page.
  22.  Copy those .tar.gz files to /LHAPDF-install/share/LHAPDF folder and unpack those using this command: tar -xvzf name.tar.gz
  23.  Add the following line to the ~/.bashrc
     export LHAPDF_DATA_PATH=/home/username/LHAPDF/LHAPDF-install/share/LHAPDF:$LHAPDF_DATA_PATH
     then, source ~/.bashrc
  24.  Run the  PDFs_FFs_in_LHAPDF.py, and check whether it generates two plots. (Note: you may comment out 'import pandas as pd' if you did not install pandas yet).





  1. Install Python3.8

Some versions of Linux may come pre-installed with Python, others may not, and those that do may not have an up-to-date version of Python. For the purposes of this guide, Python 3.8 will be used.

...