Difference between revisions of "Building JANA2 on ifarm9"

From epsciwiki
Jump to navigation Jump to search
m
m
Line 12: Line 12:
 
2. '''Clone the JANA2 Repository'''
 
2. '''Clone the JANA2 Repository'''
  
Clone the JANA2 code available in rasool_gluex_port_fixes branch
+
Clone the JANA2 code available in rasool_gluex_port_fixes branch:
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 
git clone --branch rasool_gluex_port_fixes https://github.com/JeffersonLab/JANA2.git .
 
git clone --branch rasool_gluex_port_fixes https://github.com/JeffersonLab/JANA2.git .
Line 88: Line 88:
 
  </syntaxhighlight>
 
  </syntaxhighlight>
  
6. '''Verify the Installation'''
 
  
To check if JANA2 is built and installed correctly, run:
+
6. '''Verify the Installation '''
  
<syntaxhighlight lang="bash">
+
To confirm that JANA2 is correctly built and installed, follow these steps:
 +
 
 +
# Open your terminal.
 +
# Run the following command:
 +
<pre>
 
jana
 
jana
</syntaxhighlight>
+
</pre>
 +
 
 +
If JANA2 is installed correctly, the command will output the following information, confirming its installation and providing instructions on using the command-line interface to execute JANA plugins:
 +
 
 +
<pre>
 +
Usage:
 +
    jana [options] source1 source2 ...
 +
 
 +
Description:
 +
    Command-line interface for executing JANA plugins. This command is used
 +
    to ingest events and process them. Command-line flags manage configuration
 +
    parameters, while additional arguments specify input files to be loaded and
 +
    processed by the corresponding EventSource plugin.
 +
 
 +
Options:
 +
  -h, --help                  Display this help message
 +
  -v, --version                Display version information
 +
  -c, --configs                Display configuration parameters
 +
  -l, --loadconfigs <file>    Load configuration parameters from a file
 +
  -d, --dumpconfigs <file>    Dump configuration parameters to a 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 allow you to build and install 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 JANA2 on ifarm9, contact Raiqa Rasool ([mailto:rasool@jlab.org rasool@jlab.org]).

Revision as of 13:51, 25 June 2024

This page provides instructions on how to build JANA2 on ifarm9. You can find the JANA2 repository here.

Steps to Build JANA2

1. Create and Navigate to JANA2 Directory

 mkdir JANA2
 cd JANA2

2. Clone the JANA2 Repository

Clone the JANA2 code available in rasool_gluex_port_fixes branch:

git clone --branch rasool_gluex_port_fixes https://github.com/JeffersonLab/JANA2.git .

3. Create the setenv.csh File

Create a file named setenv.csh and paste the following code into it:

#!/bin/tcsh

setenv CC `which gcc`
setenv CXX `which g++`

setenv PROJECT_ROOT /work/epsci/rasool/gluex_jana2_2023 # Replace this path with the path of the directory containing the JANA2 directory
setenv BUILD_SCRIPTS /group/halld/Software/build_scripts

setenv JANA_HOME $PROJECT_ROOT/JANA2
setenv JANA_PLUGIN_PATH $PROJECT_ROOT/JANA2/plugins

source $BUILD_SCRIPTS/gluex_env_boot_jlab.csh
gxenv $PROJECT_ROOT/JANA2/version.xml

Note: Ensure that the `PROJECT_ROOT` variable is set to the path of the directory containing the JANA2 directory, not the path directly to the JANA2 directory itself.

4. Create the version.xml File

Create a file named `version.xml` and paste the 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="amptools" version="0.15.1"/>
<package name="ccdb" version="1.06.11"/>
<package name="cernlib" version="2005" word_length="64-bit"/>
<package name="diracxx" version="2.0.2"/>
<package name="evio" version="4.4.6"/>
<package name="evtgen" version="01.07.00"/>
<package name="geant4" version="10.04.p02"/>
<package name="gluex_MCwrapper" version="v2.7.0"/>
<package name="gluex_root_analysis" version="1.25.0"/>
<package name="halld_recon" version="4.42.0"/>
<package name="halld_sim" version="4.46.0"/>
<package name="hdds" version="4.15.0"/>
<package name="hdgeant4" version="2.36.0"/>
<package name="hd_utilities" version="1.46"/>
<package name="hepmc" version="2.06.10"/>
<!-- Replace the path in home attribute here with the full path to your JANA2 repository -->
<package name="jana" version="2.1.2" home="/w/epsci-sciwork18/rasool/gluex_jana2_2023/testing_building_ins/JANA2"/> 
<!-- --------------------------------------------------------------------------------------------- -->
<package name="lapack" version="3.9.0"/>
<package name="photos" version="3.61"/>
<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 to your JANA2 repository.


5. Build JANA2

Run following commands to build JANA2:

source setenv.csh
mkdir build
cd build
cmake3 ${JANA_HOME} -DUSE_XERCES=1
make -j8 install


6. Verify the Installation

To confirm that JANA2 is correctly built and installed, follow these steps:

  1. Open your terminal.
  2. Run the following command:
jana

If JANA2 is installed correctly, the command will output the following information, confirming its installation and providing instructions on using the command-line interface to execute JANA plugins:

Usage:
    jana [options] source1 source2 ...

Description:
    Command-line interface for executing JANA plugins. This command is used
    to ingest events and process them. Command-line flags manage configuration
    parameters, while additional arguments specify input files to be loaded and
    processed by the corresponding EventSource plugin.

Options:
   -h, --help                   Display this help message
   -v, --version                Display version information
   -c, --configs                Display configuration parameters
   -l, --loadconfigs <file>     Load configuration parameters from a file
   -d, --dumpconfigs <file>     Dump configuration parameters to a 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 JANA2 on ifarm9, contact Raiqa Rasool (rasool@jlab.org).