Difference between revisions of "Getting started with Hall-D Software on the JLab CUE"

From GlueXWiki
Jump to: navigation, search
(Major re-work of the page)
(Using pre-compiled binaries)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
==Using pre-compiled binaries==
 
==Using pre-compiled binaries==
If you have an account on the JLab CUE system that you would like to run Hall-D software from, you can do so using the software installed on the group disk. Tagged releases are built there in the /group/halld/Software/builds directory. The releases have tags reflecting the date which the tag was made (e.g. release-2009-01-06).
+
If you have an account on the JLab CUE system that you would like to run Hall-D software from, you can do so using the software installed on the group disk. Tagged releases are built there in the /group/halld/Software/builds/sim-recon directory. The releases have directory names reflecting the date which the tag was made (e.g. sim-recon-2010-03-29).
  
 
Each of the release directories should have a file called setenv.csh than can be sourced (if you're using ''csh'' or ''tcsh'').  This will setup your environment to use that specific release and add the proper directories to the front of your PATH environment variable.
 
Each of the release directories should have a file called setenv.csh than can be sourced (if you're using ''csh'' or ''tcsh'').  This will setup your environment to use that specific release and add the proper directories to the front of your PATH environment variable.
  
For example, to use the ''release-2009-01-06'' release:
+
For example, to use the ''sim-recon-2010-03-29'' release:
  
  source /group/halld/Software/builds/release-2009-01-06/setenv.csh
+
  source /group/halld/Software/builds/sim-recon/sim-recon-2010-03-29/setenv.csh
  
 
You may want to add the above line to your .cshrc file if you plan to use this a lot and want to avoid typing every time you log in.
 
You may want to add the above line to your .cshrc file if you plan to use this a lot and want to avoid typing every time you log in.
Line 22: Line 22:
 
1.) Create a place to hold the code and binaries in your home directory somewhere and set the HALLD_MY environment variable to point to it:
 
1.) Create a place to hold the code and binaries in your home directory somewhere and set the HALLD_MY environment variable to point to it:
  
  mkdir /home/davidl/GlueX
+
  mkdir /home/davidl/halld_my
  setenv HALLD_MY /home/davidl/GlueX
+
  setenv HALLD_MY /home/davidl/halld_my
  
  
Line 29: Line 29:
  
 
  cd $HALLD_MY
 
  cd $HALLD_MY
  svn export https://halldsvn.jlab.org/repos/tags/release-2009-01-06/src/libraries/FCAL
+
  svn export https://halldsvn.jlab.org/repos/tags/sim-recon-2010-03-29/src/libraries/FCAL
  
  
 
You will also need to recompile/link any executables you want to use so you'll need to get that code as well:
 
You will also need to recompile/link any executables you want to use so you'll need to get that code as well:
  
  svn export https://halldsvn.jlab.org/repos/tags/release-2009-01-06/src/programs/Analysis/hdview2
+
  svn export https://halldsvn.jlab.org/repos/tags/sim-recon-2010-03-29/src/programs/Analysis/hdview2
  svn export https://halldsvn.jlab.org/repos/tags/release-2009-01-06/src/programs/Analysis/hd_root
+
  svn export https://halldsvn.jlab.org/repos/tags/sim-recon-2010-03-29/src/programs/Analysis/hd_root
  svn export https://halldsvn.jlab.org/repos/tags/release-2009-01-06/src/programs/Analysis/hd_dump
+
  svn export https://halldsvn.jlab.org/repos/tags/sim-recon-2010-03-29/src/programs/Analysis/hd_dump
  
  
3.) Modify any of the code in yout HALLD_MY directory and recompile the library and then the executables. Since you may be modifying only the library many times, you will need to force the executables to relink since they make system does not check for updated library dependencies.
+
3.) Modify any of the code in your HALLD_MY directory and recompile the library and then the executables.
  
 
  cd FCAL
 
  cd FCAL
Line 46: Line 46:
 
   
 
   
 
  cd ../hd_dump
 
  cd ../hd_dump
  make relink
+
  make
  
  
 
This will compile and link the executable and then place it in the $HALLD_MY/bin/$BMS_OSNAME directory. To use it, make sure you either specify the full path to the executable or add the $HALLD_MY/bin/$BMS_OSNAME directory to your path.
 
This will compile and link the executable and then place it in the $HALLD_MY/bin/$BMS_OSNAME directory. To use it, make sure you either specify the full path to the executable or add the $HALLD_MY/bin/$BMS_OSNAME directory to your path.

Latest revision as of 11:06, 29 April 2010

Using pre-compiled binaries

If you have an account on the JLab CUE system that you would like to run Hall-D software from, you can do so using the software installed on the group disk. Tagged releases are built there in the /group/halld/Software/builds/sim-recon directory. The releases have directory names reflecting the date which the tag was made (e.g. sim-recon-2010-03-29).

Each of the release directories should have a file called setenv.csh than can be sourced (if you're using csh or tcsh). This will setup your environment to use that specific release and add the proper directories to the front of your PATH environment variable.

For example, to use the sim-recon-2010-03-29 release:

source /group/halld/Software/builds/sim-recon/sim-recon-2010-03-29/setenv.csh

You may want to add the above line to your .cshrc file if you plan to use this a lot and want to avoid typing every time you log in.

Modifying Part of the Code in a Private Area

If you wish to modify only a part of the code for a private study, but then link against libraries in the public area, you can do so through the use of the HALLD_MY environment variable.


EXAMPLE:

Suppose you want to modify something in the FCAL library that is responsible for reconstruction of the Forward Calorimeter. You would do the following:


1.) Create a place to hold the code and binaries in your home directory somewhere and set the HALLD_MY environment variable to point to it:

mkdir /home/davidl/halld_my
setenv HALLD_MY /home/davidl/halld_my


2.) "cd" into the HALLD_MY directory and copy the code you wish to modify into it. Most likely, you will want to use the code from the release you will be linking against. You can either check the source out from the repository or copy it directly from the group area. Be aware though that if you do the latter, it will likely contain object files and libraries from the various platforms used to do the group builds that will end up counting against your quota. Here is how one would get just the source from the repository:

cd $HALLD_MY
svn export https://halldsvn.jlab.org/repos/tags/sim-recon-2010-03-29/src/libraries/FCAL


You will also need to recompile/link any executables you want to use so you'll need to get that code as well:

svn export https://halldsvn.jlab.org/repos/tags/sim-recon-2010-03-29/src/programs/Analysis/hdview2
svn export https://halldsvn.jlab.org/repos/tags/sim-recon-2010-03-29/src/programs/Analysis/hd_root
svn export https://halldsvn.jlab.org/repos/tags/sim-recon-2010-03-29/src/programs/Analysis/hd_dump


3.) Modify any of the code in your HALLD_MY directory and recompile the library and then the executables.

cd FCAL
...<edit files> ...
make

cd ../hd_dump
make


This will compile and link the executable and then place it in the $HALLD_MY/bin/$BMS_OSNAME directory. To use it, make sure you either specify the full path to the executable or add the $HALLD_MY/bin/$BMS_OSNAME directory to your path.