One of the students wanted this software installed. GENIE Neutrino Monte Carlo Generator

I followed the instructions that were on that website, but here are the details specific to us.

First get the software. Start afs.

cvs -d /afs/rl.ac.uk/user/c/candreop/cvsrep checkout -P GENIE

Move the GENIE directory to /code/GENIE. This will become $GENIE_HOME.

There are also some prerequisites that are needed. libxml2 and log4cpp we already had. Though, later on, it complained about some log4cpp stuff being missing. So we also needed log4cpp-devel, which was not mentioned on the webpage. (yum install log4cpp-devel fixed us up.) Also installed log4cpp in /code/shared, so that it could be run on computers without log4cpp and log4cpp-devel, which in our case means all the Fermi linux computers.

We also needed LDAPDF. It said CERNLIB/PDFLIB could be used, but again, later in the process it complained about missing LDAPDF.

# wget http://www.hepforge.org/archive/lhapdf/lhapdf-5.7.0.tar.gz
untar and unzip
# cd ldapdf
# ./configure --prefix=/code/shared
# make
# make install

Next we needed something called pythia6. There was a script that just needed to be run and would download the library. I put it in /code/pythia6. After running the script, there was a new directory called v6_412 there. That’s all that was required for pythia.

Next, we needed root that had pythia6 enabled.

# ftp root.cern.ch
Connected to lxbuild091.cern.ch.
220 Welcome to ROOT FTP service.
530 Please login with USER and PASS.
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
Name (root.cern.ch:root): ftp
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> cd /root
250 Directory successfully changed.
ftp> bin
200 Switching to Binary mode.
ftp> get root_v5.22.00.source.tar.gz
local: root_v5.22.00.source.tar.gz remote: root_v5.22.00.source.tar.gz
227 Entering Passive Mode (128,142,141,37,23,60)
150 Opening BINARY mode data connection for root_v5.22.00.source.tar.gz (26320334 bytes).
226 File send OK.
26320334 bytes received in 45 seconds (5.7e+02 Kbytes/s)
ftp> bye

Unzip and untar it.

# ./configure --prefix=/code/root_v5.22.00 --etcdir=/code/root_v5.22.00/etc --enable-pythia6 --with-pythia6-libdir=/code/pythia6/v6_412/lib
# make
# make install

Lastly, compile GENIE

export GENIE=/code/GENIE 
export ROOTSYS=/code/root_v5.22.00
export PATH=$PATH:$GENIE/bin:$ROOTSYS/bin
# ./configure --prefix=/code/shared \
--with-pythia6-lib=/code/pythia6/v6_412 \
--with-lhapdf-inc=/code/shared/include \
--with-lhapdf-lib=/code/shared/lib \
--with-libxml2-inc=/usr/include/libxml2 \
--with-libxml2-lib=/usr/lib \
--with-log4cpp-lib=/code/shared/lib \
--with-log4cpp-inc=/code/shared/include/log4cpp

# gmake
# gmake install

That’s it. Then to run the software, be sure to set the following environment variables.

export GENIE=/code/shared
export ROOTSYS=/code/root_v5.22.00
export LD_LIBRARY_PATH=$ROOTSYS/lib/root:/code/pythia6/v6_412:/code/shared/lib:$GENIE/lib
export PATH=$PATH:/code/shared/bin:$ROOTSYS/bin:$GENIE/bin:$GENIE/src/stdapp
# genie 

I then could run the samples given on the installation page:

[mary@computer]$ export GEVGL=QEL 
[mary@computer]$ gmkspl -p 14 -t 1000060120 -n 300 -e 30 -o xsec-spline-numuC12-qel.xml 
[mary@computer]$ export GSPLOAD=xsec-spline-numuC12-qel.xml 
[mary@computer]$ gevgen -s -n 1000 -p 14 -t 1000060120 -e 0,15 -f $GENIE/data/flux/t2kflux.root,h30000 

The following are some notes I took while setting things up and problems I had. I tried to edit the above instructions with anything special that I needed to do to get everything working, but in case I didn’t, my notes might help.

NOTES
Problems
1. When I start genie, I get this error message:

Warning in : macro /code/shared/src/scripts/gcint/genie.C not found

and then root starts instead of genie.

That script is located in the src directory that came with the genie source. I’m copying it to /code/shared.

2. Next I got an error about libGVHE missing. I don’t know why it didn’t get compiled along with all the other libraries. It did get compiled in one of my other attempts. So instead of recompiling everything, I just copied it from the old location to the new one.

3. Next problem, I now get this error:

CINT/ROOT C/C++ Interpreter version 5.16.29, Jan 08, 2008
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.
root [0] 
Processing /code/shared/src/scripts/gcint/genie.C...
dlopen error: libLHAPDF.so.0: cannot map zero-fill pages: Cannot allocate memory
Load Error: Failed to load Dynamic link library /code/shared/lib/libGPDF.so
*** Interpreter error recovered ***
genie [1] 

So we’re running out of memory. I tried to run genie on a system with 16GB of ram and everything worked fine. So I need to install more memory to this computer.

I found a Fermi Linux computer to use for this software. Since Fermi Linux does not include log4cpp in its available packages, I had to compile it from scratch.

./configure --prefix=/code/shared
make
make install

I also had to install libgfortran.

yum install libgfortran

Appears to be working now.

Spoke too soon. Constantinos had a problem running the gmkspl and gevgen programs. They are located in $GENIE/src/stdapp. There was a make file in there, but they never got made. When I ran gmake, I got complaints bout Pythia6 missing, even though the full path was included in the command. (It was set with LD_LIBRARY_PATH.) To solve this, I created a link in /code/shared/lib:

# ln -s /code/pythia6/v6_412/lib/libPythia6.so libPythia6.so

Then gmake worked ok.

Also had to copy /code/genie/config to /code/shared/config for some missing files.

Got an error message like this:

1237576361 ERROR PDG : [n]  : Could not load PDG data
Error in : Could not open PDG particle file /etc/root/pdg_table.txt

I found that all the root installations had a directory $ROOTSYS/etc, inside of which, there was a file pdg_table.txt. So I copied the directory from the root download area to my new $ROOTSYS. This worked, but then I got a new error message:

1237576249 ERROR PDG : [n]  : Can't add non-existent particle [pdgc = 1000060120]

So, I think that I have to use the pdg_table.txt that was found in /code/genie/data/pdg. I copied that file to $ROOTSYS/etc/pdg_table.txt.

Now I have a new error, that I don’t really know how to fix.

gmkspl: INukeHadroData.cxx:173: void genie::INukeHadroData::LoadCrossSections(): Assertion `! gSystem->AccessPathName(datafile_NN. c_str())' failed.
Aborted