![]() |
pueoBuilder
|
A simple script to download and build nicemc and pueoSim, along with the (modified) necessary ANITA software
Your system will need access to root, fftw, cmake, gsl, and gcc. If you are on the Ohio Supercomputer (OSC), you can load these dependencies using two options:
Option 1: load everything all at once:
module use /users/PAS0654/kaeliautumn/local/share/lmodfiles module load pueo_all
Option 2: load each package individually:
module use /users/PAS0654/wluszczak/local/share/lmodfiles module load cmake, gcc, fftw, gsl, root
On the Chicago Midway computer, you can usually load these libraries individually, using "module load XXX" directly.
On your personal computer, you should install these packages using whatever tools are most familiar. Later in the document there are instructions for using conda for this, which some people prefer.
In your terminal do
git clone git@github.com:PUEOCollaboration/pueoBuilder pueo
If this throws an error, one possibility is that your SSH key is not set up yet for your computer. You can find directions on how to set this up here:
You can optionally give this a name by appending it to the end of hte previous line. Some people like to call it pueo and also use it as an installation target. From now on we will call wherever you checked out to ${PUEO_BUILD_DIR}
This will check out the builder, which will then procede to checkout all other relevant projects into components subdirectories, which are each their own git repository (NOT part of pueoBuilder).
Some people like to symlink directories from components elsewhere for easier access.
The build system needs to know where you want it to install things, which is done using the PUEO_UTIL_INSTALL_DIR environmental variable. This usually should be different from ANITA_UTIL_INSTALL_DIR if you want to be able to work with both. It CAN be /usr or /usr/local though that's not recommended. Two popular options are the same directory that you checked out to (especially if you gave it a name other than pueoBuilder) or something like $HOME/pueo/usr.
The simulation tools (nicemc and pueoSim) also need to know where their source lives for some reason (to be fixed later?).
As an example, say you installed the pueoBuilder code in $HOME/pueo. Then you could do:
export PUEO_UTIL_INSTALL_DIR=$HOME/pueo
export PUEO_BUILD_DIR=$HOME/pueo
export NICEMC_SRC=${PUEO_BUILD_DIR}/components/nicemc
export NICEMC_BUILD=${PUEO_BUILD_DIR}/build/components/nicemc
export PUEOSIM_SRC=${PUEO_BUILD_DIR}/components/pueoSim
It is recommended that you add ${PUEO_UTIL_INSTALL_DIR}/lib to your LD_LIBRARY_PATH (Linux) or DYLD_LIBRARY_PATH (MacOS, though that may also require some other magic to circumvent default security things).
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${PUEO_UTIL_INSTALL_DIR}/lib
Finally, to download and install things, you can simply run
./pueoBuilder.sh
The build script is not very sophisticated it will attempt to:
1) Checkout the libraries from GitHub 2) Make a build directory and run cmake in that directory to generate Makefiles 3) Build the libraries (make) 4) Install the libraries in to PUEO_UTIL_INSTALL_DIR (make install)
This will build and install everything with the defaults. However, there are some optional arguments
./pueoBuilder.sh [njobs = 1] [configure = 0] [nuke build dir = 1]
| Argument | Default | What it does |
|---|---|---|
| njobs | 1 | The number of threads you wish to compile with. njobs > 1 will result in faster compilation, however, warnings and errors may appear out of order. |
| configure | 0 | Edit compiler flags and other options before building. |
| nuke build dir | 1 | Whether or not the build directory will be deleted and completely re-compiled. |
The main prerequisites are: ROOT https://root.cern.ch with Minuit2, MathMore, and Fortran. See https://root.cern.ch/build-prerequisites to make sure you have the prerequisites required for those features. FFTW http://www.fftw.org cmake https://cmake.org these should be available using your favourite package manager for your system.
If you have admin access, it's easiest to get this working on Fedora or EL. For EL, you'll need to install the EPEL repositories. TLDR, dnf install root-devel root-minuit2 root-mathmore fftw3-devel gsl-devel cmake g++ probably does what you need? Might be edited.
root-mathmore is already included in dnf-installed root.dnf.gsl-devel does not seem to be needed.If you don't want to manually install the required dependencies (including ROOT...), you can try installing via Conda. These instructions come from Austin via his colleague at PSU
Working conda installation. We recommend to install Miniconda to save some disk space compared to anaconda.
Step 4 is not strictly neccesary but recommended as mamba is a better solver than base conda (way faster)
Save the following code as pueo.devenv.yml in the desired directory
Now run
This creates a conda enviroment with required packages and enviroment variables. Change the path in the .yml according to your wishes for the path you want the PUEO tools to be installed/built. You can change the enviroment name to what ever you desire. Just remember to activate the enviroment whenever you want to use pueo tools.
Now you can change the src of pueo sim as you like and just redo step 2 above to build pueo sim with your changes.
nicemc/pueoSim is the updated replacement for icemc; it can be run by going to ${PUEO_BUILD_DIR)/build/compononents/pueoSim and running simulatePueo as one would run icemc.
For more information, see the nicemc and pueoSim pages
If you are developing in any of the repositories, you probably want to unshallow it (git pull --unshallow), as by default only shallow clones are made (TODO: fix this?). If you aren't seeing a branch you expect, you may need to do something like ‘git remote set-branches origin ’*'` as shallow cloning seems to only grab one branch.
-Dfortran=ON -Dminuit2=ON when building$(gcc-11.1.0_install_dir) and $(fftw_install_dir) are where your local installations of gcc-11.1.0 and FFTW live.\ilinebr<br> CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: FFTWF_LIB (ADVANCED) ` Then some of the above files are missing and re-compiling FFTW with different flags to fill in the missing files might help.