Difference between revisions of "Building halld recon with JANA2 on ifarm9"

From epsciwiki
Jump to navigation Jump to search
(Created page with " Before proceeding with building halld_recon, ensure you have already built JANA2 following the instructions provided on the [https://wiki.jlab.org/epsciwiki/index.php/Buildin...")
 
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
=== Prerequisites ===
  
Before proceeding with building halld_recon, ensure you have already built JANA2 following the instructions provided on the [https://wiki.jlab.org/epsciwiki/index.php/Building_JANA2_on_ifarm9 Building JANA2 on ifarm9].
+
Before proceeding with building halld_recon, ensure you have already built JANA2 following the instructions provided in [https://wiki.jlab.org/epsciwiki/index.php/Building_JANA2_on_ifarm9 Building JANA2 on ifarm9].
  
=== Steps to Build HALLD_RECON with JANA2 ===
+
=== Steps to Build halld_recon with JANA2 ===
  
 
1. '''Create and Navigate to halld_recon Directory'''
 
1. '''Create and Navigate to halld_recon Directory'''
Line 13: Line 14:
 
2. '''Clone the halld_recon Repository'''
 
2. '''Clone the halld_recon Repository'''
  
Clone the halld_recon code in rasool_halld_recon branch
+
Clone the halld_recon code in rasool_jana2 branch of [https://github.com/JeffersonLab/halld_recon.git JeffersonLab/halld_recon].
  
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
git clone --branch rasool_halld_recon https://github.com/nathanwbrei/halld_recon.git .
+
git clone --branch rasool_jana2 https://github.com/JeffersonLab/halld_recon.git .
 
</syntaxhighlight>
 
</syntaxhighlight>
  
3. '''Edit halld_recon_prereqs_version.xml'''
+
3. '''Create the halld_recon_prereqs_version.xml File'''
  
After cloning, locate and edit `halld_recon_prereqs_version.xml` to update the path in home attribute of the JANA package to point to your locally built JANA2 repository. Example:
+
Create a file names `halld_recon_prereqs_version.xml` and paste following content into it:
  
 
<syntaxhighlight lang="xml">
 
<syntaxhighlight lang="xml">
<package name="jana" version="2.1.2" home="/w/epsci-sciwork18/rasool/gluex_jana2_2023/JANA2"/>
+
 
 +
<?xml version="1.0" encoding="UTF-8"?>
 +
<?xml-stylesheet type="text/xsl" href="https://halldweb.jlab.org/halld_versions/version7.xsl"?>
 +
<gversions file="version_5.12.0.xml" date="2023-10-13">
 +
<description>Update to amptools, gluex_root_analysis, halld_recont, halld_sim, hdgeant4, hd_utilities</description>
 +
<package name="ccdb" version="1.06.11"/>
 +
<package name="cernlib" version="2005" word_length="64-bit"/>
 +
<package name="evio" version="4.4.6"/>
 +
<package name="hddm" version="4.31.0"/>
 +
<package name="hdds" version="4.15.0"/>
 +
<!-- Replace the path in home attribute here with the full path of the JANA2 repository you built on ifamr9 -->
 +
<package name="jana" version="2.1.2" home="/workspace/JANA2/"/>
 +
<!-- =================================================================================== -->
 +
<package name="rcdb" version="0.07.01"/>
 +
<package name="root" version="6.24.04"/>
 +
<package name="sqlitecpp" version="3.1.1"/>
 +
<package name="sqlite" version="3.36.0" year="2021"/>
 +
<package name="xerces-c" version="3.2.3"/>
 +
</gversions>
 +
 
 
</syntaxhighlight>
 
</syntaxhighlight>
  
4. '''Build HALLD_RECON'''
+
'''Note:''' Replace the path in the `home` attribute of the `jana` package with the full path of the JANA2 repository you built on ifamr9.
 +
 
 +
 
 +
4. '''Build and Install halld_recon'''
  
 
In your terminal, execute the following commands:
 
In your terminal, execute the following commands:
Line 37: Line 60:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
''Normal Build:''
+
''Normal Build and Install:''
  
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
Line 43: Line 66:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
''Debugging Build:''
+
''Debugging Build and Install:''
  
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
nice scons install -j32 DEBUG=1 OPTIMIZATION=0 SHOWBUILD=1
 
nice scons install -j32 DEBUG=1 OPTIMIZATION=0 SHOWBUILD=1
nice scons install -j64 DEBUG=1 OPTIMIZATION=0 SHOWBUILD=1
 
 
</syntaxhighlight>
 
</syntaxhighlight>
  
=== Setting up Environment for Using HALLD_RECON ===
+
5. '''Verify the Installation'''
  
Once halld_recon is built, navigate to Linux_Alma9-x86_64-gcc11.4.1/setenv.csh (build_directory/setenv.csh). Copy its absolute path and source it to set up the environment. Example:
+
Once halld_recon is built and installed, navigate to Linux_Alma9-x86_64-gcc11.4.1/setenv.csh (build_directory/setenv.csh). Copy its absolute path and source it to set up the environment. Example:
  
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
Line 58: Line 80:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
For testing purposes, you can use the following command:
+
After setting up the environment, run the following command to confirm that halld_recon is correctly built and installed:
 +
<pre>
 +
hd_dump
 +
</pre>
 +
 
 +
If `halld_recon` is installed correctly, the command will output the following information, confirming its installation. `-B` among the options of this `hd_dump` command indicates that this is the `halld_recon` code that has been updated to work with JANA2, replacing the `-b` option of `hd_dump` with `-B` to avoid conflicts with JANA2's `-b` benchmark option.
 +
 
 +
<pre>
 +
Usage:
 +
      hd_dump [options] source1 source2 ...
 +
 
 +
Print the contents of a Hall-D data source (e.g. a file)
 +
to the screen.
  
<syntaxhighlight lang="bash">
+
Options:
hd_root /cache/halld/RunPeriod-2023-01/rawdata/Run121120/hd_rawdata_121120_000.evio -PPLUGINS=danarest
+
 
</syntaxhighlight>
+
  -h        Print this message
 +
  -Dname    Print the data of type "name" (can be used multiple times)
 +
  -A        Print ALL data types (overrides -s and -DXXX options)
 +
  -L        List available factories and exit
 +
  -p        Don't pause for keystroke between events (def. is to pause)
 +
  -s        Skip events which don't have any of the specified data types
 +
  -qn      Quit after printing n events (default n=1), skip boring events, and don't pause
 +
  -a        List types and number of associated objects
 +
  -S        Don't suppress printing of factories with no objects in summary
 +
  -c        Print summary header lisiting for select factories.
 +
  -V        Print summary header lisiting for all factories.
 +
            (warning: this activates every single factory!)
 +
  -B        Print event status bits
 +
  -e        Don't allow automatic EVIO sparse readout for EPICS data
 +
 
 +
 
 +
Usage:
 +
    jana [options] source1 source2 ...
 +
 
 +
Description:
 +
    Command-line interface for running JANA plugins. This can be used to
 +
    read in events and process them. Command-line flags control configuration
 +
    while additional arguments denote input files, which are to be loaded and
 +
    processed by the appropriate EventSource plugin.
 +
 
 +
Options:
 +
  -h  --help                  Display this message
 +
  -v  --version              Display version information
 +
  -c  --configs              Display configuration parameters
 +
  -l  --loadconfigs <file>    Load configuration parameters from file
 +
  -d  --dumpconfigs <file>   Dump configuration parameters to file
 +
  -b  --benchmark            Run in benchmark mode
 +
  -Pkey=value                  Specify a configuration parameter
 +
 
 +
Example:
 +
    jana -Pplugins=plugin1,plugin2,plugin3 -Pnthreads=8 inputfile1.txt
 +
</pre>
  
Following these steps should successfully build and set up halld_recon with JANA2 on ifarm9. For any issues or further assistance, refer to the respective documentation or contact support.
+
For any issues or further assistance with building, installing or using halld_recon with JANA2 on ifarm9, contact Raiqa Rasool ([mailto:rasool@jlab.org rasool@jlab.org]).

Latest revision as of 14:13, 14 August 2024

Prerequisites

Before proceeding with building halld_recon, ensure you have already built JANA2 following the instructions provided in Building JANA2 on ifarm9.

Steps to Build halld_recon with JANA2

1. Create and Navigate to halld_recon Directory

mkdir halld_recon
cd halld_recon

2. Clone the halld_recon Repository

Clone the halld_recon code in rasool_jana2 branch of JeffersonLab/halld_recon.

git clone --branch rasool_jana2 https://github.com/JeffersonLab/halld_recon.git .

3. Create the halld_recon_prereqs_version.xml File

Create a file names `halld_recon_prereqs_version.xml` and paste following content into it:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://halldweb.jlab.org/halld_versions/version7.xsl"?>
<gversions file="version_5.12.0.xml" date="2023-10-13">
<description>Update to amptools, gluex_root_analysis, halld_recont, halld_sim, hdgeant4, hd_utilities</description>
<package name="ccdb" version="1.06.11"/>
<package name="cernlib" version="2005" word_length="64-bit"/>
<package name="evio" version="4.4.6"/>
<package name="hddm" version="4.31.0"/>
<package name="hdds" version="4.15.0"/>
<!-- Replace the path in home attribute here with the full path of the JANA2 repository you built on ifamr9 -->
<package name="jana" version="2.1.2" home="/workspace/JANA2/"/>
<!-- =================================================================================== -->
<package name="rcdb" version="0.07.01"/>
<package name="root" version="6.24.04"/>
<package name="sqlitecpp" version="3.1.1"/>
<package name="sqlite" version="3.36.0" year="2021"/>
<package name="xerces-c" version="3.2.3"/>
</gversions>

Note: Replace the path in the `home` attribute of the `jana` package with the full path of the JANA2 repository you built on ifamr9.


4. Build and Install halld_recon

In your terminal, execute the following commands:

source /group/halld/Software/build_scripts/gluex_env_boot_jlab.csh
gxenv halld_recon_prereqs_version.xml
cd src

Normal Build and Install:

nice scons install -j32

Debugging Build and Install:

nice scons install -j32 DEBUG=1 OPTIMIZATION=0 SHOWBUILD=1

5. Verify the Installation

Once halld_recon is built and installed, navigate to Linux_Alma9-x86_64-gcc11.4.1/setenv.csh (build_directory/setenv.csh). Copy its absolute path and source it to set up the environment. Example:

source /w/epsci-sciwork18/rasool/halld_recon/Linux_Alma9-x86_64-gcc11.4.1/setenv.csh

After setting up the environment, run the following command to confirm that halld_recon is correctly built and installed:

hd_dump

If `halld_recon` is installed correctly, the command will output the following information, confirming its installation. `-B` among the options of this `hd_dump` command indicates that this is the `halld_recon` code that has been updated to work with JANA2, replacing the `-b` option of `hd_dump` with `-B` to avoid conflicts with JANA2's `-b` benchmark option.

Usage:
       hd_dump [options] source1 source2 ...

Print the contents of a Hall-D data source (e.g. a file)
to the screen.

Options:

   -h        Print this message
   -Dname    Print the data of type "name" (can be used multiple times)
   -A        Print ALL data types (overrides -s and -DXXX options)
   -L        List available factories and exit
   -p        Don't pause for keystroke between events (def. is to pause)
   -s        Skip events which don't have any of the specified data types
   -qn       Quit after printing n events (default n=1), skip boring events, and don't pause
   -a        List types and number of associated objects
   -S        Don't suppress printing of factories with no objects in summary
   -c        Print summary header lisiting for select factories.
   -V        Print summary header lisiting for all factories.
             (warning: this activates every single factory!)
   -B        Print event status bits
   -e        Don't allow automatic EVIO sparse readout for EPICS data


Usage:
    jana [options] source1 source2 ...

Description:
    Command-line interface for running JANA plugins. This can be used to
    read in events and process them. Command-line flags control configuration
    while additional arguments denote input files, which are to be loaded and
    processed by the appropriate EventSource plugin.

Options:
   -h   --help                  Display this message
   -v   --version               Display version information
   -c   --configs               Display configuration parameters
   -l   --loadconfigs <file>    Load configuration parameters from file
   -d   --dumpconfigs <file>    Dump configuration parameters to file
   -b   --benchmark             Run in benchmark mode
   -Pkey=value                  Specify a configuration parameter

Example:
    jana -Pplugins=plugin1,plugin2,plugin3 -Pnthreads=8 inputfile1.txt

For any issues or further assistance with building, installing or using halld_recon with JANA2 on ifarm9, contact Raiqa Rasool (rasool@jlab.org).