Install pueoBuilder#

This is the original guide from Kaeli.

Installing on OSC#

installing Mamba (Conda)#

We use Mamba to manage packages and environments instead of Conda because it is much faster. It is possible to install Mamba through an existing Anaconda (or Miniconda) installation, but this method is not recommended by Mamba.

Instead, head over to the Mambaforge (aka Miniforge) distribution and download Mamba installation script through

wget "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh"

and run

bash Miniforge3-Linux-x86_64.sh

to install the Linux x86_64 (amd64) version of Mambaforge (read the license agreement, type yes and press Enter)

Next, initialize Mamba through

mamba init bash

or if you use zshell,

mamba init zsh

This will set up your .bashrc (.zshrc) file for mamba.

Mamba might ask you

Do you wish the installer to initialize Miniforge3 by running conda init? [yes|no]

and you should enter yes. You will need to exit the terminal and re-open for the change to take effect. Once done, you should see (base) showing up on your terminal prompt, indicating the base environment is active.

If not, try entering bash.

You can confirm that you have an environment called “base” by entering the command

conda info --env

You may delete the installation script through rm Miniforge3-Linux-x86_64.sh.

Next, you would want to install conda-devenv through mamba install conda-devenv. You can find the documentation for conda-devenv here

create PUEO environment#

Next, we will create an environment using mamba. Using vim or any editor, create a text file called pueo.devenv.yml containing the following:

name: pueo_env
channels:
  - conda-forge
  - defaults

dependencies:
  - fftw
  - root

variables:
  PUEO_BUILD_DIR: /users/PASxxxx/${USERNAME}/pueo/usr
  PUEO_UTIL_INSTALL_DIR: /users/PASxxxx/${USERNAME}/pueo/usr/install
  NICEMC_SRC: /users/PASxxxx/${USERNAME}/pueo/usr/components/nicemc
  NICEMC_BUILD: /users/PASxxxx/${USERNAME}/pueo/usr/build/components/nicemc
  PUEOSIM_SRC: /users/PASxxxx/${USERNAME}/pueo/usr/components/pueoSim

Important

Change PASxxxx/${USERNAME} to where your home directory is located!

In the terminal, type cd ~ to go back to your home directory, and create a pueo directory through mkdir -p ~/pueo.

Put the pueo.devenv.yml file inside your pueo folder and enter the folder: cd ~/pueo.

Make sure that (base) is active. If not, run conda activate base. Next, create a new environment called pueo_env through

mamba-devenv -f pueo.devenv.yml

Important

It is important that you run mamba-devenv and not conda-devenv or mamba devenv. Anything that is not mamba-devenv seems to be exceedingly slow on OSC

The above command creates a conda environment with required packages and environment variables (such as ${PUEO_BUILD_DIR}). Activate this new environment through

conda  activate peuo_env

(or mamba activate pueo_env)

installing cmake#

OSC has cmake already installed. To use cmake version 3.11.4, run

module load cmake/3.11.4

and check that the version is activated through cmake --version.

clone the pueoBuilder repository#

  • Refer to How to Set up Github credentials on Linux/macOS to set up your GitHub credentials.

  • Make sure that the pueo_env environment is actived.

  • cd ~/pueo and then clone the pueoBuilder repository through

    git clone git@github.com:PUEOCollaboration/pueoBuilder ./usr
    

    This would put every file in the pueoBuilder repository inside a newly created folder called ~/pueo/usr/.

  • Create a folder inside ~/pueo/usr/ called install through

    mkdir ~/pueo/usr/install
    
  • cd into usr and enter the following command:

    ./pueoBuilder.sh
    

pueoSim test run#

Create a temporary folder in your home directory through

mkdir ~/temp

and head over to to the pueoBuilder directory cd ~/pueo/usr. Start a test run through

./build/components/pueoSim/simulatePueo -i pueo.conf -o ~/temp -r 420 -n 50

where i/o stand for input/output files, r is the run number (just a name) and n is the number of neutrinots.

Once the run is complete, you should see a bunch of root files in the temporary folder.

Congratulations, you have completed pueoSim installation!

Installing on Fedora Linux#

See Installing on OSC. The steps are pretty much the same.

Fedora most like already has CMake installed. If not, run

sudo dnf install cmake

to install cmake. You need your password for this.

Alternatively, refer to CMake section in the original document Install pueoBuilder to compile CMake.

Installing on macOS#

I haven’t figure out how to do this. Maybe it is easier to install Asahi Linux on Mac and then run through all the steps in Installing on OSC.