Files
Dennis Klein b568535910 test: support an alternative runtime library dir per test
- introduce FAIRMQ_TEST_LD_LIBRARY_PATH, which prepends a directory to
  each test's environment via ctest, so the tests can run against an
  alternative runtime library (e.g. a tsan-instrumented libstdc++)
- LD_LIBRARY_PATH rather than an injected rpath: an rpath added via the
  linker flags cannot precede the rpath spack's gcc adds through its
  specs file, so the compiler's own libstdc++ would keep winning the
  runtime search order
- scoped per test on purpose: an instrumented library has unresolved
  __tsan_* symbols and must not be loaded into uninstrumented tools
  like cmake, ctest or ninja
- fail the configuration instead of silently dropping the injection on
  CMake < 3.22 (ENVIRONMENT_MODIFICATION)
- cover the example tests too; they share the instrumented runtime but
  not the locale-cache warmup (their main() is the installed public
  header). The custom-controller env block was dead before: it tested
  lsan_options, which only ever existed in the add_example() function
  scope, so the test also never received the LSan suppressions
2026-06-10 19:31:19 +02:00
..
2022-01-24 06:40:24 +01:00
2023-06-13 21:24:40 +02:00
2022-01-24 06:40:24 +01:00
2020-05-11 17:38:16 +02:00

FairMQ Examples

Set of FairMQ examples. More examples that combine FairMQ with FairRoot can be found in the FairRoot repository.

1-1

A simple topology of two devices - Sampler and Sink. Sampler sends data to Sink with the PUSH-PULL pattern.

1-n-1

A simple topology of three device types - Sampler, Processor and Sink. Sampler sends data to one or more Processors, who modify the data and send it to one Sink. Transport with the PUSH-PULL pattern. The example also shows the configuration via JSON files, as oposed to --channel-config that is used by other examples.

Built-in devices

Usage of generic devies provided with FairMQ.

Copy & Push

A topology consisting of one Sampler and two Sinks. The Sampler uses the Copy method to send the same data to both sinks with the PUSH-PULL pattern. In countrary to the PUB-SUB pattern, this ensures that all receivers are connected and no data is lost, but requires additional channels to be configured.

DDS

This example demonstrates usage of the Dynamic Deployment System (DDS) to dynamically deploy and configure a topology of devices. The topology is similar to those of Example 2, but now it can be easily distributed on different computing nodes without the need for manual reconfiguration of the devices.

Multipart

This example shows how to send a multipart message from one device to the other. (two parts message parts - header and body).

Multiple Channels

This example demonstrates how to work with multiple channels and multiplex between them.

Multiple Transports

This examples shows how to combine different channel transports (zeromq/shmem) inside of one device and/or topology.

n-m

A topology consisting of three layers of devices: synchronizer -> n * senders -> m * receivers.

QC

A topology consisting of 4 devices - Sampler, QCDispatcher, QCTask and Sink. The data flows from Sampler through QCDispatcher to Sink. On demand - by setting the corresponding configuration property - the QCDispatcher device will duplicate the data to the QCTask device. The property is set by the topology controller, in this example this is the fairmq-dds-command-ui utility.

Readout

Two example topologies of setups to be distributed to two kinds of nodes - detector readout node and processing node. Detector readout node contains readout process, data builder and data sender (and optionally an additional processor), while processing node contains data receiver devices. communication within readout nodes is done via unmanaged region through shared memory transport.

Region

This example demonstrates the use of a more advanced feature - UnmanagedRegion, that can be used to create a buffer through one of FairMQ transports. The contents of this buffer are managed by the user, who can also create messages out of sub-buffers of the created buffer. Such feature can be interesting in environments that have special requirements by the hardware that writes the data, to keep the transfer efficient (e.g. shared memory).

Request & Reply

This topology contains two devices that communicate with each other via the REQ-REP pettern. Bidirectional communication via a single socket.