first release of d ata a cquisition b ackbone c ore

21
First release of Data Acquisition Backbone Core J. Adamczewski-Musch, H.G. Essel, N. Kurz, S. Linev GSI Darmstadt, Germany Experiment Electronics: Data processing group

Upload: marnie

Post on 12-Jan-2016

53 views

Category:

Documents


0 download

DESCRIPTION

First release of D ata A cquisition B ackbone C ore. J. Adamczewski-Musch, H.G. Essel, N. Kurz, S. Linev GSI Darmstadt, Germany Experiment Electronics: Data processing group. FAIR accelerators. Atomic Physics. SIS 100. SIS18 Upgrade. p-linac. SIS 300. SIS100 SIS300. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: First release of D ata  A cquisition  B ackbone  C ore

First release of

Data Acquisition Backbone Core

J. Adamczewski-Musch, H.G. Essel, N. Kurz, S. Linev

GSI Darmstadt, Germany Experiment Electronics: Data processing group

Page 2: First release of D ata  A cquisition  B ackbone  C ore

DABC

J. Adamczewski-Musch, H.G. Essel, N. Kurz, S. Linev http://dabc.gsi.de18.03.2010 2

FAIR accelerators

p-bar target

p-linac

Super- FRS

SIS100 SIS300

HESR

CR

RESR

Unilac

SIS 100

NESR

HESR

Antiproton Prod. Target

SIS18 Upgrade

CR

RESR

p-linac SIS 300

Accelerator

SuperFRSPANDA

Atomic Phys.

Plasma Phys.Low Energy Exp.

High Energy Exp.

NESR Exp.

FLAIR

Atomic Physics

HADES & CBM

Experiment

FAIR baseline*

*FAIR Monthly, April 2009

Page 3: First release of D ata  A cquisition  B ackbone  C ore

DABC

J. Adamczewski-Musch, H.G. Essel, N. Kurz, S. Linev http://dabc.gsi.de18.03.2010 3

CBM experiment at FAIR

Dipolemagnet

Ring ImagingCherenkovDetector

Transition Radiation Detectors

ResistivePlate Chambers(TOF)

Electro-magneticCalorimeter

SiliconTrackingSystem

Projectile SpectatorDetector(Calorimeter)

Micro VertexDetector

Page 4: First release of D ata  A cquisition  B ackbone  C ore

DABC

J. Adamczewski-Musch, H.G. Essel, N. Kurz, S. Linev http://dabc.gsi.de18.03.2010 4

DAQ architectures

Detector

FEE buffer

Readoutbuffer

Switch

Processorfarm

Storage

Self-triggered Front-endall hits shipped to DAQ.Data push architecture

High-throughputEvent building

First event selectiondone in processor farm.

Readout buffer outside radiation area. Many Gbyte

storage easily possible. Allows L1 decision times of

10-100 ms

Fast links

Conventional DAQ

L1trigger

L1trigger

L1trigger

L1trigger

HLTHLTHLTHLTHLTHLTHLTFLES

CBM DAQ

Page 5: First release of D ata  A cquisition  B ackbone  C ore

DABC

J. Adamczewski-Musch, H.G. Essel, N. Kurz, S. Linev http://dabc.gsi.de18.03.2010 5

InfiniBand performance studies

+ 25%> 500 MBytes/s bidirectional

0 0.5 1 1.5 2

Nominal SDR

Unidir. SDR

Bidir. SDR

Nominal DDR

Unidir. DDR

Bidir. DDR

4 nodes Multic.

110 nodes Multic.

GByte/s

thanks to Klaus Merle and Markus Tacke at the Zentrum für Datenverarbeitung in Uni Mainz

Page 6: First release of D ata  A cquisition  B ackbone  C ore

DABC

J. Adamczewski-Musch, H.G. Essel, N. Kurz, S. Linev http://dabc.gsi.de18.03.2010 6

Hardware tests

nXYTER, 128-channel self-triggered

readout chip with few ns time

resolution, DEFNI collaboration

CBM Readout controller (ROC),

Kirchhoff Institut für Physik, Heidelberg

Page 7: First release of D ata  A cquisition  B ackbone  C ore

DABC

J. Adamczewski-Musch, H.G. Essel, N. Kurz, S. Linev http://dabc.gsi.de18.03.2010 7

Future DAQ requirements

Flexible – adopt different kinds of soft- and hardware

Compact – use only necessary code

Scalable – from small detector tests to 100-nodes clusters

Performing – low framework overhead

Multiprocessing & multithreading

Page 8: First release of D ata  A cquisition  B ackbone  C ore

DABC

J. Adamczewski-Musch, H.G. Essel, N. Kurz, S. Linev http://dabc.gsi.de18.03.2010 8

Multithreading

Thread1

void MainLoop() { while (IsWorking()) { … writeSomething(); … }}

Thread2

void MainLoop() { while (IsWorking()) { … doSomething(); … }}

Thread3

void MainLoop() { while (IsWorking()) { … calcSomething(); … }}

Thread4

void MainLoop() { while (IsWorking()) { … readSomething(); … }}

Deadlock!

runs

runs

runs

runs

Page 9: First release of D ata  A cquisition  B ackbone  C ore

DABC

J. Adamczewski-Musch, H.G. Essel, N. Kurz, S. Linev http://dabc.gsi.de18.03.2010 9

Multithreading in DABC

Thread1 Thread2

Thread3 Thread4

ProcessorProcessor

Events queues

• Events• Timeouts• Commands

Processor

ProcessorProcessor

Events queues

• Events• Timeouts• Commands

Processor

ProcessorProcessor

Events queues

• Events• Timeouts• Commands

Processor

ProcessorProcessor

Events queues

• Events• Timeouts• Commands

Processor

ev1

ev2 ev3

runs

runs runs

runs

Page 10: First release of D ata  A cquisition  B ackbone  C ore

DABC

J. Adamczewski-Musch, H.G. Essel, N. Kurz, S. Linev http://dabc.gsi.de18.03.2010 10

dabc::Buffer

References

Memory management

dabc::Buffer

References

dabc::MemoryPool

Memory blocks

Multiple references on resources (blocks)Copy of reference without copy of dataZero copy transfer: PCI/DMA → buffer → IB/DMA

References

dabc::Buffer

Page 11: First release of D ata  A cquisition  B ackbone  C ore

DABC

J. Adamczewski-Musch, H.G. Essel, N. Kurz, S. Linev http://dabc.gsi.de18.03.2010 11

User code - modules

dabc::Module

dabc::PoolHandle

dabc::Timer

dabc::Port

dabc::Port

dabc::Port

dabc::Parameter dabc::Module provides:• I/O ports for communications

• Pools handles to request memory

• Timers for timeouts processing

• Configuration & monitoring parameters

Page 12: First release of D ata  A cquisition  B ackbone  C ore

DABC

J. Adamczewski-Musch, H.G. Essel, N. Kurz, S. Linev http://dabc.gsi.de18.03.2010 12

Two kind of modules: sync & async

CreatePoolHandle("Pool", 2048, 1);CreateInput("Input", Pool(), 5);CreateOutput("Output0", Pool(), 5);CreateOutput("Output1", Pool(), 5);fCnt = 0;

void UserModule::MainLoop(){ while (ModuleWorking()) { dabc::Buffer* buf = Recv(Input()); if (fCnt++ % 2 == 0) Send(Output(0), buf); else Send(Output(1), buf); }}

void UserModule::ProcessIOEvent(dabc::Port*) { while (Input()->CanRecv() && Output(fCnt % 2)->CanSend()) { dabc::Buffer* buf = Input()->Recv(); Output(fCnt++ % 2)->Send(buf); }}

Explicit loop in ModuleSync Event processing in ModuleAsync

Constructors mainly the same

UserModule

“Pool”

“Input”

“Output0”

“Output1”

dabc::Module

dabc::ModuleSync dabc::ModuleAsync

Page 13: First release of D ata  A cquisition  B ackbone  C ore

DABC

J. Adamczewski-Musch, H.G. Essel, N. Kurz, S. Linev http://dabc.gsi.de18.03.2010 13

Transport & device – dataflow

UserModule

“Pool”

“Input”

“Output0”

“Output1”

File

UserModule

“Pool”

“Input”

“Output0”

“Output1”

UserModule

“Pool”

“Input”

“Output0”

“Output1”

File

DataServer

NetworkDevice

NetworkDevice

PCIeDevice

node1

node2

Transport

Transport

Transport

Transport

Transport

Transport

Transport

Transport:• manages buffers queue• runs in own thread• decouples user code from actual transport functionality

Device:• represents hardware items• manages several transports

Page 14: First release of D ata  A cquisition  B ackbone  C ore

DABC

J. Adamczewski-Musch, H.G. Essel, N. Kurz, S. Linev http://dabc.gsi.de18.03.2010 14

Many other features

Central dabc::Manager class

Configuration with XML files

Controlling interface and GUI

dabc::Commands

Factories (plugins) architecture

Application and state machine

Event building network (BNET)

Page 15: First release of D ata  A cquisition  B ackbone  C ore

DABC

J. Adamczewski-Musch, H.G. Essel, N. Kurz, S. Linev http://dabc.gsi.de18.03.2010 15

DABC release 1.0

Controls

core-testnet-testbnet-testmbsbnet-mbsROC

Slim(batch)

DIM

Java GUI

ApplicationsPlugins

socketIB verbs*bnetmbsbnet-mbsROC/udpROC/ABB*

Core

Plugins: Implementation of device/transports and experiment specific data handling code (programmers)Applications: Mainly setup or testing programs (users)

DABC

Download via http://dabc.gsi.de

ROC: CBM Readout Controller boardABB: Active buffer board (PCIe)IB: InfiniBandMBS: Multi Branch System (GSI DAQ)

* external packages needed

Page 16: First release of D ata  A cquisition  B ackbone  C ore

DABC

J. Adamczewski-Musch, H.G. Essel, N. Kurz, S. Linev http://dabc.gsi.de18.03.2010 16

DABC in CBM test beam

Combiner Sorter

raw data

calibrated data

Input0

Input1

Input2

Output0

Output1

Input0 Output0

Output1

roc::Readout

online go4 monitor

STS

GEM

Page 17: First release of D ata  A cquisition  B ackbone  C ore

DABC

J. Adamczewski-Musch, H.G. Essel, N. Kurz, S. Linev http://dabc.gsi.de18.03.2010 17

DABC as access layer to ROC

file I/O online monitor

ROC/udpplugin

ROC/PCIeplugin

Use

r acc

ess

la

yer

DABCUsers

scripts, GUIs

optic

PCIe

Ethernet

Page 18: First release of D ata  A cquisition  B ackbone  C ore

DABC

J. Adamczewski-Musch, H.G. Essel, N. Kurz, S. Linev http://dabc.gsi.de18.03.2010 18

Planned CBM beam tests Readout boards

FEEDetectors Combiner boards

Commodity PCs

Copper Optic InfiniBand

Page 19: First release of D ata  A cquisition  B ackbone  C ore

DABC

J. Adamczewski-Musch, H.G. Essel, N. Kurz, S. Linev http://dabc.gsi.de18.03.2010 19

Event building network test

Rnd

Rnd

Rnd

Rnd

PCIe

Rnd

Rnd

Rnd

Rnd

Rnd

Rnd

Rnd

Rnd

Event builders

Senders ReceiversReadouts

Controller

Worker1

Worker2

Worker3

Worker4

InfiniBand

Libs for all applications

Defaults for all workers

Explicit config for PCIe board

Page 20: First release of D ata  A cquisition  B ackbone  C ore

DABC

J. Adamczewski-Musch, H.G. Essel, N. Kurz, S. Linev http://dabc.gsi.de18.03.2010 20

Conclusion

DABC is general-purpose DAQ framework

Can be used for different purposes – from small detectors tests to multi-nodes application

Through its plugin architecture can be easy extended to specific needs

Open for improvements and new ideas

Page 21: First release of D ata  A cquisition  B ackbone  C ore

DABC

J. Adamczewski-Musch, H.G. Essel, N. Kurz, S. Linev http://dabc.gsi.de

Thanks!

18.03.2010 21