1 of 5

The JANA Reconstruction Framework

1

JANA - David Lawrence - JLab

Design Goals:

  • Efficient multi-threading
  • Simple API

May 17, 2018

David Lawrence, JLab

5/17/18

2 of 5

Factory Model

2

JANA - David Lawrence - JLab

Data on demand = Don’t do it unless you need it

5/17/18

STOCK

MANUFACTURE

in stock?

ORDER

PRODUCT

YES

NO

FACTORY

(algorithm)

STOCK

MANUFACTURE

in stock?

YES

NO

FACTORY

STOCK

MANUFACTURE

in stock?

YES

NO

FACTORY

Stock = Don’t do it twice

Conservation of CPU cycles!

3 of 5

Multi-threading

3

JANA - David Lawrence - JLab

5/17/18

9

Event Processor

Event Source

thread

thread

thread

thread

  • Each thread has a complete set of factories making it capable of completely reconstructing a single event
  • Factories only work with other factories in the same thread eliminating the need for expensive mutex locking within the factories
  • All events are seen by all Event Processors (multiple processors can exist in a program)

4 of 5

4

JANA - David Lawrence - JLab

JANA rate scaling for CPU intensive task

5/17/18

JANA RAM usage

Multi-threaded GB/thread is about 1/3 that of multi-process

5 of 5

Concluding Remarks

  • Plugin feature allows a process (job) to be built a’la carte by specifying plugins at run time via command line or config file
  • Factory API makes it easy to decouple algorithms and therefore divide work into well-defined sub-projects
  • On-demand model makes it efficient CPU-wise to use same program for partial or full reconstruction

5