Difference between revisions of "Solgemc installation outside JLAB"

From Hall A Wiki
Jump to: navigation, search
(move scons_scripts up)
(Link to new wiki)
 
(10 intermediate revisions by one other user not shown)
Line 1: Line 1:
 +
This page has been moved to [https://solid.jlab.org/wiki/index.php/Solgemc_installation_outside_JLAB https://solid.jlab.org/wiki/index.php/Solgemc_installation_outside_JLAB] in the new [https://solid.jlab.org/wiki SoLID Wiki].  Please do not edit this page.
 +
 
by Rich Holmes
 
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.
+
I have been working on getting the Geant4 simulation and related software up and running on a couple of non JLAB systems; here are some notes on what I did most recently. This is a much better example to follow than my previous ones, but you can [[Earlier solgemc installation outside JLAB|read about those too]] if you want.
  
The target system for now is one running CentOS 5.6 (32 bit i386), newly installed. Install developer packages, of course.
+
The target system is one running CentOS 6.3 (64 bit). Earlier I installed under Ubuntu 10.10 (32 bit i386) similarly.
  
== scons ==
+
I followed the procedure [https://gemc.jlab.org/gemc/Support/Entries/2011/8/1_Step_by_Step.html here] to install gemc.
  
# ''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.''
+
After that:
# svn checkout https://clas12svn.jlab.org/repos/trunk/clas12/scons_scripts/
+
  
== Qt4 ==
+
# cd $JLAB_SOFTWARE/evio
 +
# ''Edit $JLAB_SOFTWARE/evio/SConstruct: add the following lines after ''env.Append(LIBPATH = ['lib']):<blockquote><br />env.Append(LINKFLAGS = '-fPIC')<br />env.Append(CPPFLAGS = '-fPIC')<br />env.Append(CXXFLAGS = '-fPIC')<br />env.Append(CCFLAGS = '-fPIC')</blockquote>
 +
# scons -c; scons
 +
# cd $JLAB_SOFTWARE/gemc
 +
# ''Edit $JLAB_SOFTWARE/gemc/SConstruct: copy the env.Library line at the end, paste, and replace env.Library with env.SharedLibrary; also add the following lines after ''env.Append(LIBPATH = ['lib']):<blockquote><br />env.Append(LINKFLAGS = '-fPIC')<br />env.Append(CPPFLAGS = '-fPIC')<br />env.Append(CXXFLAGS = '-fPIC')<br />env.Append(CCFLAGS = '-fPIC')</blockquote>
 +
# scons -c; scons
  
# sudo rpm -ivh http://software.freivald.com/centos/software.freivald.com-1.0.0-1.noarch.rpm
+
(The '-fPIC' edits were not needed for Ubuntu 10.10.)
# sudo yum update fontconfig fontconfig-devel qt4 qt4-devel ''(Not sure all those are required)''
+
 
+
== ROOT ==
+
 
+
# ''Install ROOT as usual from source; use'' configure --enable-qt --enable-qtgsi
+
 
+
== gemc ==
+
 
+
# sudo rpm -ivh http://www.jlab.org/12gev_phys/RPMS/noarch/jlab-phys-1.3-1.noarch.rpm
+
# sudo yum install gemc-jlab
+
# ''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 ~/
+
# setenv JLAB_ROOT ~/jlab_software
+
# ''Edit ~/jlab_software/ce/osrelease.pl. Add a test for CentOS 5.6 in the obvious place.''
+
# 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 ==
 
== solgemc ==
  
# svn checkout https://jlabsvn.jlab.org/svnroot/solid/solgemc ''See below for continuation of solgemc installation''
+
# svn checkout https://jlabsvn.jlab.org/svnroot/solid/solgemc ''into $JLAB_SOFTWARE/solgemc and cd there''
# ''from launchpad.net/scons-qt4, download, put in ~/solgemc/site_scons/site_tools/qt4''
+
 
+
== gemc continued ==
+
 
+
# cp -rp ~/solgemc/site_scons ~/jlab_software/Linux_CentOS5.6-i686-gcc4.1.2/gemc
+
# ''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''
+
# cd ~/jlab_software/Linux_CentOS5.6-i686-gcc4.1.2/gemc
+
 
# scons
 
# scons
# 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''
+
# ''In your ~/.cshrc add $JLAB_SOFTWARE/gemc to LD_LIBRARY_PATH environment variable''
 
+
== solgemc continued ==
+
 
+
# ''Edit ~/solgemc/solgemc_env.csh:''
+
## ''Comment out '' set UNAME... '' and following test for 64 bit''
+
## ''Add '' unsetenv JLAB_ROOT ''and'' unsetenv JLAB_ROOT_ARCH
+
## ''Add setenv JLAB_ROOT ~/jlab_software/ ''and'' setenv JLAB_ROOT_ARCH $JLAB_ROOT/Linux_CentOS5.6-i686-gcc4.1.2/
+
## ''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
+
## ''Change'' setenv G4INSTALL $JLAB_ROOT_ARCH/geant4/4.9.3.p02
+
## ''Comment out'' source $G4INSTALL/env.csh ''and add'' source $JLAB_ROOT/ce/jlab.csh
+
## ''Change'' setenv QTDIR /usr/lib/qt4
+
## ''Change'' setenv EVIO $JLAB_ROOT_ARCH/evio
+
## ''Change'' set PYTHONADD=~/scons_scripts
+
# ''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.''
+
 
+
== banks ==
+
 
+
# svn checkout http://clas12svn.jlab.org/repos/trunk/clas12/banks into ~/solgemc/
+
# ''unpack tarball sent by Seamus, copy src/example4.cc to ~/solgemc/banks/src/''
+
# cp -rp ~/solgemc/site_scons ~/solgemc/banks
+
# ln -s /usr/local/root ~/jlab_software/Linux_CentOS5.6-i686-gcc4.1.2/root/5.28
+
# ''Edit ~/jlab_software/ce/root.env to replace root/lib/root with root/lib (In a standard ROOT install the libraries are in /usr/local/root/lib, not /usr/local/root/lib/root. However this turns out not to be enough, so we kludge a fix:)
+
# ln -s /usr/local/root/lib /usr/local/root/lib/root
+
# cd ~/solgemc/banks
+
# ''edit src/bank.cc to replace'' db.setUserName("clasuser"); ''with'' db.setUserName("soliduser"); db.setPassword("ilovesolid");
+
# scons
+
 
+
== event generator ==
+
 
+
# svn co 'http://jlabsvn.jlab.org/svnroot/solid/evgen'
+
# ''follow install instructions for eicRate_20101102 but I needed to add'' -L /home/$(USER)/lib ''in definition of GLIBS in Makefile.arch).''
+
 
+
== root2lund ==
+
  
# ''follow install instructions for root2lund. Did not need any environment variable changes.''
+
For additional packages, e.g. banks, cteq, event generator, root2lund see [[Earlier solgemc installation outside JLAB|Second Installation here]].

Latest revision as of 15:40, 7 December 2020

This page has been moved to https://solid.jlab.org/wiki/index.php/Solgemc_installation_outside_JLAB in the new SoLID Wiki. Please do not edit this page.

by Rich Holmes

I have been working on getting the Geant4 simulation and related software up and running on a couple of non JLAB systems; here are some notes on what I did most recently. This is a much better example to follow than my previous ones, but you can read about those too if you want.

The target system is one running CentOS 6.3 (64 bit). Earlier I installed under Ubuntu 10.10 (32 bit i386) similarly.

I followed the procedure here to install gemc.

After that:

  1. cd $JLAB_SOFTWARE/evio
  2. Edit $JLAB_SOFTWARE/evio/SConstruct: add the following lines after env.Append(LIBPATH = ['lib']):

    env.Append(LINKFLAGS = '-fPIC')
    env.Append(CPPFLAGS = '-fPIC')
    env.Append(CXXFLAGS = '-fPIC')
    env.Append(CCFLAGS = '-fPIC')
  3. scons -c; scons
  4. cd $JLAB_SOFTWARE/gemc
  5. Edit $JLAB_SOFTWARE/gemc/SConstruct: copy the env.Library line at the end, paste, and replace env.Library with env.SharedLibrary; also add the following lines after env.Append(LIBPATH = ['lib']):

    env.Append(LINKFLAGS = '-fPIC')
    env.Append(CPPFLAGS = '-fPIC')
    env.Append(CXXFLAGS = '-fPIC')
    env.Append(CCFLAGS = '-fPIC')
  6. scons -c; scons

(The '-fPIC' edits were not needed for Ubuntu 10.10.)

solgemc

  1. svn checkout https://jlabsvn.jlab.org/svnroot/solid/solgemc into $JLAB_SOFTWARE/solgemc and cd there
  2. scons
  3. In your ~/.cshrc add $JLAB_SOFTWARE/gemc to LD_LIBRARY_PATH environment variable

For additional packages, e.g. banks, cteq, event generator, root2lund see Second Installation here.