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

From epsciwiki
Jump to navigation Jump to search
m
m
Line 1: Line 1:
 
=== Prerequisites ===
 
=== 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 ===
Line 28: Line 28:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
4. '''Build halld_recon'''
+
4. '''Build & Install halld_recon'''
  
 
In your terminal, execute the following commands:
 
In your terminal, execute the following commands:
Line 38: Line 38:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
''Normal Build:''
+
''Normal Build & Install:''
  
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
Line 44: Line 44:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
''Debugging Build:''
+
''Debugging Build & Install:''
  
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
Line 50: Line 50:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
=== Setting up Environment for Using halld_recon ===
+
=== Using halld_recon ===
  
 
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, 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:
Line 58: Line 58:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
For testing purposes, you can use the following command:
+
Once the environment is set up, to confirm that halld_recon is correctly built and installed, run the following command:
 +
<pre>
 +
hd_dump
 +
</pre>
  
<syntaxhighlight lang="bash">
+
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 it is `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.
hd_root /cache/halld/RunPeriod-2023-01/rawdata/Run121120/hd_rawdata_121120_000.evio -PPLUGINS=danarest
+
 
</syntaxhighlight>
+
<pre>
 +
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
 +
</pre>
  
Following these steps should successfully build and set up halld_recon with JANA2 on ifarm9. For any issues or further assistance, contact Raiqa Rasool ([mailto:rasool@jlab.org rasool@jlab.org]).
+
For any issues or further assistance with building, installing or using halld_recon on ifarm9, contact Raiqa Rasool ([mailto:rasool@jlab.org rasool@jlab.org]).

Revision as of 14:11, 25 June 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_halld_recon branch of nathanwbrei/halld_recon.

git clone --branch rasool_halld_recon https://github.com/nathanwbrei/halld_recon.git .

3. Edit halld_recon_prereqs_version.xml

After cloning, locate and edit `halld_recon_prereqs_version.xml` to update the path in home attribute of the JANA package to the path of the JANA2 repository you built on ifamr9. Example:

<package name="jana" version="2.1.2" home="/w/epsci-sciwork18/rasool/gluex_jana2_2023/JANA2"/>

4. Build & 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 & Install:

nice scons install -j32

Debugging Build & Install:

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

Using halld_recon

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:

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

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

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 it is `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 on ifarm9, contact Raiqa Rasool (rasool@jlab.org).