Difference between revisions of "Quick Start Guide to building GlueX Software"
(→Check-out and build) |
|||
(7 intermediate revisions by 2 users not shown) | |||
Line 8: | Line 8: | ||
* CERN_LEVEL | * CERN_LEVEL | ||
− | + | and an example for jlabl3 (running RHEL6.4 as of Mon Oct 14 2013): [not yet tested] | |
− | setenv XERCESCROOT /group/halld/Software/ExternalPackages/xerces-c- | + | setenv XERCESCROOT /group/halld/Software/ExternalPackages/xerces-c-3.1.1.Linux_CentOS6-x86_64-gcc4.4.6 |
setenv ROOTSYS /apps/root/PRO/root | setenv ROOTSYS /apps/root/PRO/root | ||
− | setenv CERN /apps/cernlib/ | + | setenv CERN /apps/cernlib/x86_64_rhel6 |
setenv CERN_LEVEL 2005 | setenv CERN_LEVEL 2005 | ||
− | and an example for | + | and an example for jlab1102 (running CentOS6 as of Fri Jan 25 2013): [tested to work by MMD: 2013/01/06] |
− | setenv XERCESCROOT /group/halld/Software/ExternalPackages/xerces-c- | + | setenv XERCESCROOT /group/halld/Software/ExternalPackages/xerces-c-3.1.1.Linux_CentOS6-x86_64-gcc4.4.6 |
setenv ROOTSYS /apps/root/PRO/root | setenv ROOTSYS /apps/root/PRO/root | ||
− | setenv CERN / | + | setenv CERN /group/halld/Software/ExternalPackages/cernlib/Linux_CentOS6-x86_64-gcc4.4.6 |
setenv CERN_LEVEL 2005 | setenv CERN_LEVEL 2005 | ||
+ | |||
+ | ifarml5 (Fedora 8) no longer exists. | ||
=Check-out and build= | =Check-out and build= | ||
− | The following will checkout out and build | + | The following will checkout out and build CCDB, JANA, HDDS, and sim-recon in the current directory in the C-shell: |
setenv GLUEX_TOP `pwd` | setenv GLUEX_TOP `pwd` | ||
svn checkout https://halldsvn.jlab.org/repos/trunk/scripts/build_scripts | svn checkout https://halldsvn.jlab.org/repos/trunk/scripts/build_scripts | ||
source build_scripts/gluex_env.csh | source build_scripts/gluex_env.csh | ||
− | set make_targets="jana_build hdds_build | + | set make_targets="ccdb_build jana_build hdds_build sim-recon_build" |
make -f $BUILD_SCRIPTS/Makefile_all $make_targets | make -f $BUILD_SCRIPTS/Makefile_all $make_targets | ||
− | + | Note that this prescription uses gluex_env.csh to [[HOWTO set up the GlueX environment|set-up the GlueX environment]]. | |
=Run the code= | =Run the code= | ||
− | Again you have to start somewhere. Let's assume that you want to | + | Again you have to start somewhere. Let's assume that you want to create a directory to run the code, update your path, run the default configuration of the Monte Carlo and reconstruct the result with a default analysis code. The following assumes that you have already set up your environment as prescribed in the previous section. |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
==Create a run directory== | ==Create a run directory== | ||
Line 66: | Line 63: | ||
==Run the analysis== | ==Run the analysis== | ||
− | hd_root | + | hd_root hdgeant_smeared.hddm |
=What if I don't have the prerequisites?= | =What if I don't have the prerequisites?= | ||
Line 82: | Line 79: | ||
Likewise you can build ROOT and CERNLIB in a similar manner. The appropriate targets are "cernlib_build" and "root_build" respectively. | Likewise you can build ROOT and CERNLIB in a similar manner. The appropriate targets are "cernlib_build" and "root_build" respectively. | ||
+ | |||
+ | =More information= | ||
+ | |||
+ | For more information on the scripts and makefiles used in this HOWTO, see [[Build Scripts and Makefiles]]. |
Latest revision as of 12:40, 7 January 2014
Contents
Prerequisites
You gotta start somewhere. Here that means you need Xerces-C, Cernlib, and Root. The following need to be defined first:
- XERCESCROOT
- ROOTSYS
- CERN
- CERN_LEVEL
and an example for jlabl3 (running RHEL6.4 as of Mon Oct 14 2013): [not yet tested]
setenv XERCESCROOT /group/halld/Software/ExternalPackages/xerces-c-3.1.1.Linux_CentOS6-x86_64-gcc4.4.6 setenv ROOTSYS /apps/root/PRO/root setenv CERN /apps/cernlib/x86_64_rhel6 setenv CERN_LEVEL 2005
and an example for jlab1102 (running CentOS6 as of Fri Jan 25 2013): [tested to work by MMD: 2013/01/06]
setenv XERCESCROOT /group/halld/Software/ExternalPackages/xerces-c-3.1.1.Linux_CentOS6-x86_64-gcc4.4.6 setenv ROOTSYS /apps/root/PRO/root setenv CERN /group/halld/Software/ExternalPackages/cernlib/Linux_CentOS6-x86_64-gcc4.4.6 setenv CERN_LEVEL 2005
ifarml5 (Fedora 8) no longer exists.
Check-out and build
The following will checkout out and build CCDB, JANA, HDDS, and sim-recon in the current directory in the C-shell:
setenv GLUEX_TOP `pwd` svn checkout https://halldsvn.jlab.org/repos/trunk/scripts/build_scripts source build_scripts/gluex_env.csh set make_targets="ccdb_build jana_build hdds_build sim-recon_build" make -f $BUILD_SCRIPTS/Makefile_all $make_targets
Note that this prescription uses gluex_env.csh to set-up the GlueX environment.
Run the code
Again you have to start somewhere. Let's assume that you want to create a directory to run the code, update your path, run the default configuration of the Monte Carlo and reconstruct the result with a default analysis code. The following assumes that you have already set up your environment as prescribed in the previous section.
Create a run directory
An example:
cd $HOME mkdir run cd run
Refresh the path
rehash
Run the Monte Carlo
cp $HALLD_HOME/src/programs/Simulation/HDGeant/control.in . hdgeant
Smear the hits
mcsmear hdgeant.hddm
Run the analysis
hd_root hdgeant_smeared.hddm
What if I don't have the prerequisites?
If the system you are on does not have Xerces-C, ROOT, or CERNLIB, there are targets in Makefile_all that can build these for you (although YMMV). For example if you do not have xerces on your system then you can modify the instructions above as follows:
- Do not set the XERCESCROOT environment on your own (as described in the "pre-requisites" section above). gluex_env.csh will do that for you.
- Add the target "xerces_build" to the "make_targets" environment variable (as described in the "check-out and build" section above), i. e., say
set make_targets="xerces_build jana_build hdds_build halld_build"
Likewise you can build ROOT and CERNLIB in a similar manner. The appropriate targets are "cernlib_build" and "root_build" respectively.
More information
For more information on the scripts and makefiles used in this HOWTO, see Build Scripts and Makefiles.