Difference between revisions of "Getting Started with the GlueX Analysis Software on the JLab CUE"

From GlueXWiki
Jump to: navigation, search
(Building the Software - Procedure 1)
 
(4 intermediate revisions by 4 users not shown)
Line 3: Line 3:
 
* Here we discuss the methods necessary to acquire, build, and install the GlueX Analysis Software.
 
* Here we discuss the methods necessary to acquire, build, and install the GlueX Analysis Software.
  
== Acquiring the Software ==
+
== Initial Steps ==
 
* Begin by logging into the JLab network
 
* Begin by logging into the JLab network
 
  ssh user@login.jlab.org
 
  ssh user@login.jlab.org
 
* Log in to the ifarm of you choice
 
* Log in to the ifarm of you choice
  ssh ifarm1101
+
  ssh ifarm
 
* Descend into the HallD work directory
 
* Descend into the HallD work directory
 
  cd /work/halld/home/
 
  cd /work/halld/home/
Line 14: Line 14:
 
* After descending into the directory you created for yourself you need to create a new work directory named whatever you like.  For example:
 
* After descending into the directory you created for yourself you need to create a new work directory named whatever you like.  For example:
 
  mkdir Hall-D
 
  mkdir Hall-D
* Descend into that directory and do a subversion check out of the latest sim-recon
+
* Descend into that directory:
svn co https://halldsvn.jlab.org/repos/trunk/sim-recon
+
cd Hall-D
 +
* Below are two different ways of building the software.  
  
== Building the Software ==
+
== Building the Software - Procedure 1 ==
* When done you need to setup the proper environment variables needed for the build.  To do this it is best to just copy the appropriate set up script into your current working directory.
+
*Copy the script my_sim-recon_jlab.sh to your newly created folder:
  cp /group/halld/Software/builds/sim-recon/sim-recon-DATE/Linux_CentOS6-x86_64-gcc4.4.6/setenv.csh .
+
cp /group/halld/Software/build_scripts/my_halld_build_jlab .
 +
 
 +
(https://halldweb.jlab.org/wiki/index.php/GlueX_Offline_Meeting,_August_21,_2018:
 +
Enhanced script for private builds: my_halld_build_jlab
 +
The script formerly known as my_sim-recon_jlab.sh is now my_halld_build_jlab. )
 +
 
 +
*This script clones the current master branch of sim-recon and builds it against the current default versions of the other prerequisite packages. Run the script:
 +
./my_halld_build_jlab
 +
 
 +
== Building the Software - Procedure 2 ==
 +
*Clone the current master branch of sim-recon:
 +
git clone https://github.com/JeffersonLab/sim-recon
 +
* When done you need to setup the proper environment variables needed for the build.  To do this it is best to just copy the appropriate set up script into your current working directory, e.g.:
 +
  cp /group/halld/Software/builds/Linux_CentOS7-x86_64-gcc4.8.5/sim-recon/sim-recon-2.16.0/Linux_CentOS7-x86_64-gcc4.8.5/setenv.csh .
 
:* It is important to note that the OS you are running depends where you are on the JLab network.  If you do not know this you need to execute the script osrelease.pl script which will provide that information for you.  This is done with the following command:
 
:* It is important to note that the OS you are running depends where you are on the JLab network.  If you do not know this you need to execute the script osrelease.pl script which will provide that information for you.  This is done with the following command:
 
  ./path-to/sim-recon/src/BMS/osrelease.pl
 
  ./path-to/sim-recon/src/BMS/osrelease.pl
 
:* The string output will then inform you of the environment you should build.
 
:* The string output will then inform you of the environment you should build.
 
* Now that the setup script is in your current working directory you need to modify the location of the HALLD_HOME environment variable to point to the location of your newly checked out subversion of sim-recon.  It should look something like the following:
 
* Now that the setup script is in your current working directory you need to modify the location of the HALLD_HOME environment variable to point to the location of your newly checked out subversion of sim-recon.  It should look something like the following:
  setenv HALLD_HOME /w/halld-scifs1a/home/user/path-to/sim-recon
+
  setenv HALLD_HOME /work/halld/home/user/path-to/sim-recon
* Now you want to source the setenv.csh script to set the approipriate environment for the build.  This is done with the following:
+
* Now you want to source the setenv.csh script to set the appropriate environment for the build.  This is done with the following:
 
  source setenv.csh
 
  source setenv.csh
 
+
* Now you need to get and build RCDB. Clone the latest version, e.g.:
== Installing the Software ==
+
git clone https://github.com/JeffersonLab/rcdb rcdb
* To perform the installation you want to descend into the directory /path-to/sim-recon/src and perform the build with the following command:
+
* Set the RCDB_HOME environment variable:
  scons -j32 install
+
setenv RCDB_HOME /work/halld/home/user/path-to/rcdb/
 +
* Source the environment.csh script:
 +
source $RCDB_HOME/environment.csh
 +
* Set the RCDB_CONNECTION environment variable:
 +
setenv RCDB_CONNECTION mysql://rcdb@hallddb.jlab.org/rcdb
 +
* Descend into the cpp folder:
 +
cd $RCDB_HOME/cpp/
 +
* Build the RCDB:
 +
scons with-mysql=true with-sqlite=true
 +
* Finally, to perform the sim-recon installation you want to descend into the directory /path-to/sim-recon/src and perform the build with the following command:
 +
  scons -j8 install
 
* After performing a top-level build one can modify source and invoke "scons -u install" only in the specific sub-directory without having to do a top-level build every time.
 
* After performing a top-level build one can modify source and invoke "scons -u install" only in the specific sub-directory without having to do a top-level build every time.
 
  scons -u install
 
  scons -u install
 
* Once the scons install is complete type '''hdgeant''' to be sure that the installation was correct.
 
* Once the scons install is complete type '''hdgeant''' to be sure that the installation was correct.

Latest revision as of 14:57, 3 June 2020

Scope

  • Here we discuss the methods necessary to acquire, build, and install the GlueX Analysis Software.

Initial Steps

  • Begin by logging into the JLab network
ssh user@login.jlab.org
  • Log in to the ifarm of you choice
ssh ifarm
  • Descend into the HallD work directory
cd /work/halld/home/
  • Create a directory for yourself
  • Perform an ls and look at some of the existing directories for examples. It should be quite obvious,
  • After descending into the directory you created for yourself you need to create a new work directory named whatever you like. For example:
mkdir Hall-D
  • Descend into that directory:
cd Hall-D
  • Below are two different ways of building the software.

Building the Software - Procedure 1

  • Copy the script my_sim-recon_jlab.sh to your newly created folder:
cp /group/halld/Software/build_scripts/my_halld_build_jlab .

(https://halldweb.jlab.org/wiki/index.php/GlueX_Offline_Meeting,_August_21,_2018: Enhanced script for private builds: my_halld_build_jlab The script formerly known as my_sim-recon_jlab.sh is now my_halld_build_jlab. )

  • This script clones the current master branch of sim-recon and builds it against the current default versions of the other prerequisite packages. Run the script:
./my_halld_build_jlab

Building the Software - Procedure 2

  • Clone the current master branch of sim-recon:
git clone https://github.com/JeffersonLab/sim-recon
  • When done you need to setup the proper environment variables needed for the build. To do this it is best to just copy the appropriate set up script into your current working directory, e.g.:
cp /group/halld/Software/builds/Linux_CentOS7-x86_64-gcc4.8.5/sim-recon/sim-recon-2.16.0/Linux_CentOS7-x86_64-gcc4.8.5/setenv.csh .
  • It is important to note that the OS you are running depends where you are on the JLab network. If you do not know this you need to execute the script osrelease.pl script which will provide that information for you. This is done with the following command:
./path-to/sim-recon/src/BMS/osrelease.pl
  • The string output will then inform you of the environment you should build.
  • Now that the setup script is in your current working directory you need to modify the location of the HALLD_HOME environment variable to point to the location of your newly checked out subversion of sim-recon. It should look something like the following:
setenv HALLD_HOME /work/halld/home/user/path-to/sim-recon
  • Now you want to source the setenv.csh script to set the appropriate environment for the build. This is done with the following:
source setenv.csh
  • Now you need to get and build RCDB. Clone the latest version, e.g.:
git clone https://github.com/JeffersonLab/rcdb rcdb
  • Set the RCDB_HOME environment variable:
setenv RCDB_HOME /work/halld/home/user/path-to/rcdb/
  • Source the environment.csh script:
source $RCDB_HOME/environment.csh
  • Set the RCDB_CONNECTION environment variable:
setenv RCDB_CONNECTION mysql://rcdb@hallddb.jlab.org/rcdb
  • Descend into the cpp folder:
cd $RCDB_HOME/cpp/
  • Build the RCDB:
scons with-mysql=true with-sqlite=true
  • Finally, to perform the sim-recon installation you want to descend into the directory /path-to/sim-recon/src and perform the build with the following command:
scons -j8 install
  • After performing a top-level build one can modify source and invoke "scons -u install" only in the specific sub-directory without having to do a top-level build every time.
scons -u install
  • Once the scons install is complete type hdgeant to be sure that the installation was correct.