...
****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
- Install ubuntu using the bootable flash drive
- sudo apt update
- Additional Drivers (GUI) > Nvidia-driver-535 Note: this step can be done manually
- 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)
- sudo apt install g++
- sudo apt install -y python3-pip
- pip3 install numpy
- sudo ln -s /usr/bin/python3 /usr/bin/python (this is to force the python path to python3.10)
- sudo apt install -y build-essential libssl-dev libffi-dev python3-dev
- Download LHAPDF 6.5.4.tar.gz via https://lhapdf.hepforge.org/
- Create a folder called "LHAPDF" inside the Home directory and move the LHAPDF 6.5.4.tar.gz and unzip.
- Create a folder called "LHAPDF-install" inside the/home/LHAPDF directory. This is where we will install the LHAPDF software.
- cd LHAPDF-6.5.4
- 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 - ./configure - - prefix=/home/username/LHAPDF/LHAPDF-install (This will configure the LHAPDF, check the output to ensure no issues).
- make
- make install
- Add the following line to the ~/.bashrc file.
export PYTHONPATH=$LHADIR/local/lib/python3.10/dist-packages:$PYTHONPATH
then, source ~/.bashrc - 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 ......."
- 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.
- Download the relevant grids from https://lhapdf.hepforge.org/pdfsets.html page.
- Copy those .tar.gz files to /LHAPDF-install/share/LHAPDF folder and unpack those using this command: tar -xvzf name.tar.gz
- Add the following line to the ~/.bashrc
export LHAPDF_DATA_PATH=/home/username/LHAPDF/LHAPDF-install/share/LHAPDF:$LHAPDF_DATA_PATH
then, source ~/.bashrc - 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).
- 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.
...