Solgemc installation outside JLAB

From Hall A Wiki
Revision as of 11:29, 13 May 2011 by Rsholmes (Talk | contribs) (Initial version (in progress))

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

by Rich Holmes

I have been working on getting the Geant4 simulation and related software up and running on a non JLAB system; here are some notes on what I needed to do. I may be omitting some steps here and I definitely have rearranged the order and left out some steps that I tried but that didn't seem to give useful results, so there are no guarantees this will work for anyone else, but it should cut down on confusion, or so I hope.

The target system for now is one running CentOS 5.6 (32 bit i386), newly installed. Install developer packages, of course.

scons

  1. go to http://rpm.pbone.net and search for scons. I find a link for RH EL5 i386 version 1.2.0. This is an older version but it's what's on ifarml6. Install with rpm.

Qt4

  1. sudo rpm -ivh http://software.freivald.com/centos/software.freivald.com-1.0.0-1.noarch.rpm
  2. sudo yum update fontconfig fontconfig-devel qt4 qt4-devel (Not sure all those are required)

gemc

  1. sudo rpm -ivh http://www.jlab.org/12gev_phys/RPMS/noarch/jlab-phys-1.3-1.noarch.rpm
  2. sudo yum install gemc-jlab
  3. Note that it appears one must work in (t)csh to run gemc. Irritating — I prefer bash — but that's life. To facilitate modifications, copy to user directory and work with that: cp -rp /usr/local/jlab_software ~/
  4. svn checkout https://clas12svn.jlab.org/repos/trunk/clas12/scons_scripts/
  5. setenv JLAB_ROOT ~/jlab_software
  6. Edit ~/jlab_software/ce/osrelease.pl. Add a test for CentOS 5.6 in the obvious place.
  7. sudo ln -s ~/jlab_software/Linux_RHEL5-i686-gcc4.1.2 ~/jlab_software/Linux_CentOS5.6-i686-gcc4.1.2 See below for continuation of gemc installation

solgemc

  1. svn checkout https://jlabsvn.jlab.org/svnroot/solid/solgemc See below for continuation of solgemc installation

gemc continued

  1. cp -rp ~/solgemc/site_scons ~/jlab_software/Linux_CentOS5.6-i686-gcc4.1.2/gemc
  2. Edit ~/jlab_software/Linux_CentOS5.6-i686-gcc4.1.2/gemc/SConstruct: copy the env.Library line at the end, paste, and replace env.Library with env.SharedLibrary
  3. cd ~/jlab_software/Linux_CentOS5.6-i686-gcc4.1.2/gemc
  4. scons
  5. sudo chcon -t texrel_shlib_t ~/jlab_software/Linux_CentOS5.6-i686-gcc4.1.2/gemc/libgemc.so to avoid an error caused by selinux

solgemc continued

  1. Edit ~/solgemc/solgemc_env.csh:
    1. Comment out set UNAME... and following test for 64 bit
    2. Add unsetenv JLAB_ROOT and unsetenv JLAB_ROOT_ARCH
    3. Add setenv JLAB_ROOT ~/jlab_software/ and setenv JLAB_ROOT_ARCH $JLAB_ROOT/Linux_CentOS5.6-i686-gcc4.1.2/
    4. Add or change setenv GEMC $JLAB_ROOT_ARCH/gemc and setenv GEMC_EVIO2ROOT $JLAB_ROOT_ARCH/bin and setenv GEMC_HOST 127.0.0.1 and setenv GEMC_USER soliduser
    5. Change setenv G4INSTALL $JLAB_ROOT_ARCH/geant4/4.9.3.p02
    6. Comment out source $G4INSTALL/env.csh and add source $JLAB_ROOT/ce/jlab.csh
    7. Change setenv QTDIR /usr/lib/qt4
    8. Change setenv EVIO $JLAB_ROOT_ARCH/evio
    9. Change set PYTHONADD=~/scons_scripts
  2. To test, set up mysql tunneling. In runnewbaf_solgemc.sh comment out first command and uncomment second, change -N to 10000, then run this. I get a memory allocation crash at the end but the output file is written.