Skip to content

Commit 3a8c0a9

Browse files
rbxMohammadAlTurany
authored andcommitted
fix test
1 parent 73f6927 commit 3a8c0a9

16 files changed

Lines changed: 114 additions & 108 deletions

Examples/flp2epn-distributed/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/run/startFLP2EPN-distributed.sh.in ${
22
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/test/testFLP2EPN-distributed.sh.in ${CMAKE_BINARY_DIR}/Examples/flp2epn-distributed/test/testFLP2EPN-distributed.sh)
33
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/run/flp2epn-prototype.json ${CMAKE_BINARY_DIR}/bin/config/flp2epn-prototype.json)
44
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/run/flp2epn-prototype-dds.json ${CMAKE_BINARY_DIR}/bin/config/flp2epn-prototype-dds.json)
5+
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/run/flp2epn-dds-topology.xml ${CMAKE_BINARY_DIR}/bin/config/flp2epn-dds-topology.xml @ONLY)
6+
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/run/flp2epn-dds-hosts.cfg ${CMAKE_BINARY_DIR}/bin/config/flp2epn-dds-hosts.cfg COPYONLY)
57

68
set(MODULE_NAME "FLP2EPNex_distributed")
79

Examples/flp2epn-distributed/include/FLP2EPNex_distributed/EPNReceiver.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class EPNReceiver : public FairMQDevice
3838
/// Default destructor
3939
virtual ~EPNReceiver();
4040

41-
void InitTask();
41+
virtual void InitTask();
4242

4343
/// Prints the contents of the timeframe container
4444
void PrintBuffer(const std::unordered_map<uint16_t, TFBuffer> &buffer) const;
@@ -56,6 +56,10 @@ class EPNReceiver : public FairMQDevice
5656
int fNumFLPs; ///< Number of flpSenders
5757
int fBufferTimeoutInMs; ///< Time after which incomplete timeframes are dropped
5858
int fTestMode; ///< Run the device in test mode (only syncSampler+flpSender+epnReceiver)
59+
60+
std::string fInChannelName;
61+
std::string fOutChannelName;
62+
std::string fAckChannelName;
5963
};
6064

6165
} // namespace Devices

Examples/flp2epn-distributed/include/FLP2EPNex_distributed/FLPSender.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ class FLPSender : public FairMQDevice
5555
int fEventSize; ///< Size of the sub-timeframe body (only for test mode)
5656
int fTestMode; ///< Run the device in test mode (only syncSampler+flpSender+epnReceiver)
5757
uint16_t fTimeFrameId;
58+
59+
std::string fInChannelName;
60+
std::string fOutChannelName;
5861
};
5962

6063
} // namespace Devices

Examples/flp2epn-distributed/include/FLP2EPNex_distributed/FLPSyncSampler.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ class FLPSyncSampler : public FairMQDevice
6363
std::thread fAckListener;
6464
std::thread fResetEventCounter;
6565
std::atomic<bool> fLeaving;
66+
67+
std::string fAckChannelName;
68+
std::string fOutChannelName;
6669
};
6770

6871
} // namespace Devices
Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
@bash_begin@
22
echo "DBG: SSH ENV Script"
3-
source /home/arybalch/alice/AliceO2/build/config.sh
3+
source /home/username/alice/AliceO2/build/config.sh
44
@bash_end@
55

6-
sampler, arybalch@cn48.internal, , /tmp/dds_wn_dir, 1
6+
sampler, username@localhost, , /tmp/dds_wn_dir, 1
7+
78

89
# flp
9-
flp00, arybalch@cn49.internal, , /tmp/dds_wn_dir, 16
10-
flp01, arybalch@cn50.internal, , /tmp/dds_wn_dir, 16
11-
flp02, arybalch@cn51.internal, , /tmp/dds_wn_dir, 16
12-
flp03, arybalch@cn52.internal, , /tmp/dds_wn_dir, 16
10+
flp00, username@localhost, , /tmp/dds_wn_dir, 16
11+
flp01, username@localhost, , /tmp/dds_wn_dir, 16
12+
flp02, username@localhost, , /tmp/dds_wn_dir, 16
13+
flp03, username@localhost, , /tmp/dds_wn_dir, 16
1314

1415
# epn
15-
epn00, arybalch@cn54.internal, , /tmp/dds_wn_dir, 16
16-
epn01, arybalch@cn55.internal, , /tmp/dds_wn_dir, 16
17-
epn02, arybalch@cn56.internal, , /tmp/dds_wn_dir, 16
18-
epn03, arybalch@cn53.internal, , /tmp/dds_wn_dir, 16
16+
epn00, username@localhost, , /tmp/dds_wn_dir, 16
17+
epn01, username@localhost, , /tmp/dds_wn_dir, 16
18+
epn02, username@localhost, , /tmp/dds_wn_dir, 16
19+
epn03, username@localhost, , /tmp/dds_wn_dir, 16
20+

Examples/flp2epn-distributed/run/flp2epn-dds-topology.xml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
<var id="numFLPs" value="64" />
44
<var id="numEPNs" value="64" />
55

6-
<property id="FLPSyncSamplerInputAddress" />
7-
<property id="FLPSyncSamplerOutputAddress" />
8-
<property id="EPNReceiverInputAddress" />
9-
<property id="EPNReceiverOutputAddress" />
6+
<property id="ack" />
7+
<property id="stf1" />
8+
<property id="stf2" />
9+
<property id="tf" />
1010

1111
<declrequirement id="FLPSyncSamplerHost">
1212
<hostPattern type="wnname" value="sampler"/>
@@ -21,30 +21,30 @@
2121
</declrequirement>
2222

2323
<decltask id="flpSyncSampler">
24-
<exe reachable="true">/home/arybalch/alice/AliceO2/build/bin/flpSyncSampler --id flpSyncSampler --mq-config /home/arybalch/alice/AliceO2/build/bin/config/flp2epn-prototype-dds.json --log-color 0 --control dds --event-rate 100</exe>
24+
<exe reachable="true">@CMAKE_BINARY_DIR@/bin/flpSyncSampler --id flpSyncSampler --control libFairMQDDSControlPlugin.so --config libFairMQDDSConfigPlugin.so --mq-config @CMAKE_BINARY_DIR@/bin/config/flp2epn-prototype-dds.json --log-color 0 --event-rate 100</exe>
2525
<requirement>FLPSyncSamplerHost</requirement>
2626
<properties>
27-
<id access="write">FLPSyncSamplerInputAddress</id>
28-
<id access="write">FLPSyncSamplerOutputAddress</id>
27+
<id access="write">ack</id>
28+
<id access="write">stf1</id>
2929
</properties>
3030
</decltask>
3131

3232
<decltask id="flpSender">
33-
<exe reachable="true">/home/arybalch/alice/AliceO2/build/bin/flpSender --id flp%taskIndex% --config-key flpSender --mq-config /home/arybalch/alice/AliceO2/build/bin/config/flp2epn-prototype-dds.json --log-color 0 --control dds --event-size 100000 --num-epns ${numEPNs} --test-mode 1</exe>
33+
<exe reachable="true">@CMAKE_BINARY_DIR@/bin/flpSender --id flp%taskIndex% --config-key flpSender --control libFairMQDDSControlPlugin.so --config libFairMQDDSConfigPlugin.so --mq-config @CMAKE_BINARY_DIR@/bin/config/flp2epn-prototype-dds.json --log-color 0 --event-size 100000 --num-epns ${numEPNs} --test-mode 1</exe>
3434
<requirement>FLPSenderHost</requirement>
3535
<properties>
36-
<id access="read">FLPSyncSamplerOutputAddress</id>
37-
<id access="read">EPNReceiverInputAddress</id>
36+
<id access="read">stf1</id>
37+
<id access="read">stf2</id>
3838
</properties>
3939
</decltask>
4040

4141
<decltask id="epnReceiver">
42-
<exe reachable="true">/home/arybalch/alice/AliceO2/build/bin/epnReceiver --id epn%taskIndex% --config-key epnReceiver --mq-config /home/arybalch/alice/AliceO2/build/bin/config/flp2epn-prototype-dds.json --log-color 0 --control dds --num-flps ${numFLPs} --test-mode 1</exe>
42+
<exe reachable="true">@CMAKE_BINARY_DIR@/bin/epnReceiver --id epn%taskIndex% --config-key epnReceiver --control libFairMQDDSControlPlugin.so --config libFairMQDDSConfigPlugin.so --mq-config @CMAKE_BINARY_DIR@/bin/config/flp2epn-prototype-dds.json --log-color 0 --num-flps ${numFLPs} --test-mode 1</exe>
4343
<requirement>EPNReceiverHost</requirement>
4444
<properties>
45-
<id access="write">EPNReceiverInputAddress</id>
46-
<id access="read">FLPSyncSamplerInputAddress</id>
47-
<id access="write">EPNReceiverOutputAddress</id>
45+
<id access="write">stf2</id>
46+
<id access="read">ack</id>
47+
<id access="write">tf</id>
4848
</properties>
4949
</decltask>
5050

Examples/flp2epn-distributed/run/flp2epn-prototype-dds.json

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,15 @@
66
"id": "flpSyncSampler",
77
"channels":
88
[{
9-
"name": "data",
9+
"name": "stf1",
1010
"type": "pub",
1111
"method": "bind",
12-
"property": "FLPSyncSamplerOutputAddress",
1312
"rateLogging": "0"
1413
},
1514
{
1615
"name": "ack",
1716
"type": "pull",
1817
"method": "bind",
19-
"property": "FLPSyncSamplerInputAddress",
2018
"rateLogging": "0"
2119
}]
2220
},
@@ -25,18 +23,16 @@
2523
"key": "flpSender",
2624
"channels":
2725
[{
28-
"name": "data-in",
26+
"name": "stf1",
2927
"type": "sub",
3028
"method": "connect",
31-
"property": "FLPSyncSamplerOutputAddress",
3229
"rcvBufSize": "10"
3330
},
3431
{
35-
"name": "data-out",
32+
"name": "stf2",
3633
"type": "push",
3734
"method": "connect",
38-
"numSockets": "5",
39-
"property": "EPNReceiverInputAddress",
35+
"numSockets": "64",
4036
"sndBufSize": "10"
4137
}]
4238
},
@@ -45,24 +41,21 @@
4541
"key": "epnReceiver",
4642
"channels":
4743
[{
48-
"name": "data-in",
44+
"name": "stf2",
4945
"type": "pull",
5046
"method": "bind",
51-
"property": "EPNReceiverInputAddress",
5247
"rcvBufSize": "10"
5348
},
5449
{
55-
"name": "data-out",
50+
"name": "tf",
5651
"type": "pub",
5752
"method": "bind",
58-
"property": "EPNReceiverOutputAddress",
5953
"sndBufSize": "10"
6054
},
6155
{
6256
"name": "ack",
6357
"type": "push",
6458
"method": "connect",
65-
"property": "FLPSyncSamplerInputAddress",
6659
"rateLogging": "0"
6760
}]
6861
}]

Examples/flp2epn-distributed/run/flp2epn-prototype.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"id": "flpSyncSampler",
77
"channels":
88
[{
9-
"name": "data",
9+
"name": "stf1",
1010
"type": "pub",
1111
"method": "bind",
1212
"address": "tcp://127.0.0.1:5550",
@@ -26,14 +26,14 @@
2626
"id": "flpSender1",
2727
"channels":
2828
[{
29-
"name": "data-in",
29+
"name": "stf1",
3030
"type": "sub",
3131
"method": "connect",
3232
"address": "tcp://127.0.0.1:5550",
3333
"rcvBufSize": "10"
3434
},
3535
{
36-
"name": "data-out",
36+
"name": "stf2",
3737
"type": "push",
3838
"method": "connect",
3939
"sockets":
@@ -49,14 +49,14 @@
4949
"id": "flpSender2",
5050
"channels":
5151
[{
52-
"name": "data-in",
52+
"name": "stf1",
5353
"type": "sub",
5454
"method": "connect",
5555
"address": "tcp://127.0.0.1:5550",
5656
"rcvBufSize": "10"
5757
},
5858
{
59-
"name": "data-out",
59+
"name": "stf2",
6060
"type": "push",
6161
"method": "connect",
6262
"sockets":
@@ -72,14 +72,14 @@
7272
"id": "flpSender3",
7373
"channels":
7474
[{
75-
"name": "data-in",
75+
"name": "stf1",
7676
"type": "sub",
7777
"method": "connect",
7878
"address": "tcp://127.0.0.1:5550",
7979
"rcvBufSize": "10"
8080
},
8181
{
82-
"name": "data-out",
82+
"name": "stf2",
8383
"type": "push",
8484
"method": "connect",
8585
"sockets":
@@ -97,14 +97,14 @@
9797
"id": "epnReceiver1",
9898
"channels":
9999
[{
100-
"name": "data-in",
100+
"name": "stf2",
101101
"type": "pull",
102102
"method": "bind",
103103
"address": "tcp://127.0.0.1:5561",
104104
"rcvBufSize": "10"
105105
},
106106
{
107-
"name": "data-out",
107+
"name": "tf",
108108
"type": "pub",
109109
"method": "bind",
110110
"address": "tcp://127.0.0.1:5591",
@@ -122,14 +122,14 @@
122122
"id": "epnReceiver2",
123123
"channels":
124124
[{
125-
"name": "data-in",
125+
"name": "stf2",
126126
"type": "pull",
127127
"method": "bind",
128128
"address": "tcp://127.0.0.1:5562",
129129
"rcvBufSize": "10"
130130
},
131131
{
132-
"name": "data-out",
132+
"name": "tf",
133133
"type": "pub",
134134
"method": "bind",
135135
"address": "tcp://127.0.0.1:5592",
@@ -147,14 +147,14 @@
147147
"id": "epnReceiver3",
148148
"channels":
149149
[{
150-
"name": "data-in",
150+
"name": "stf2",
151151
"type": "pull",
152152
"method": "bind",
153153
"address": "tcp://127.0.0.1:5563",
154154
"rcvBufSize": "10"
155155
},
156156
{
157-
"name": "data-out",
157+
"name": "tf",
158158
"type": "pub",
159159
"method": "bind",
160160
"address": "tcp://127.0.0.1:5593",

Examples/flp2epn-distributed/run/runEPNReceiver.cxx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,19 @@
88
#include "runFairMQDevice.h"
99
#include "FLP2EPNex_distributed/EPNReceiver.h"
1010

11+
#include <string>
12+
1113
namespace bpo = boost::program_options;
1214

1315
void addCustomOptions(bpo::options_description& options)
1416
{
1517
options.add_options()
16-
("heartbeat-interval", bpo::value<int>()->default_value(5000), "Heartbeat interval in milliseconds")
1718
("buffer-timeout", bpo::value<int>()->default_value(1000), "Buffer timeout in milliseconds")
1819
("num-flps", bpo::value<int>()->required(), "Number of FLPs")
19-
("test-mode", bpo::value<int>()->default_value(0), "Run in test mode");
20+
("test-mode", bpo::value<int>()->default_value(0), "Run in test mode")
21+
("in-chan-name", bpo::value<std::string>()->default_value("stf2"), "Name of the input channel (sub-time frames)")
22+
("out-chan-name", bpo::value<std::string>()->default_value("tf"), "Name of the output channel (time frames)")
23+
("ack-chan-name", bpo::value<std::string>()->default_value("ack"), "Name of the acknowledgement channel");
2024
}
2125

2226
FairMQDevice* getDevice(const FairMQProgOptions& config)

Examples/flp2epn-distributed/run/runFLPSender.cxx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
#include "runFairMQDevice.h"
99
#include "FLP2EPNex_distributed/FLPSender.h"
1010

11+
#include <string>
12+
1113
namespace bpo = boost::program_options;
1214

1315
void addCustomOptions(bpo::options_description& options)
@@ -16,10 +18,11 @@ void addCustomOptions(bpo::options_description& options)
1618
("flp-index", bpo::value<int>()->default_value(0), "FLP Index (for debugging in test mode)")
1719
("event-size", bpo::value<int>()->default_value(1000), "Event size in bytes (test mode)")
1820
("num-epns", bpo::value<int>()->required(), "Number of EPNs")
19-
("heartbeat-timeout", bpo::value<int>()->default_value(20000), "Heartbeat timeout in milliseconds")
2021
("test-mode", bpo::value<int>()->default_value(0), "Run in test mode")
2122
("send-offset", bpo::value<int>()->default_value(0), "Offset for staggered sending")
22-
("send-delay", bpo::value<int>()->default_value(8), "Delay for staggered sending");
23+
("send-delay", bpo::value<int>()->default_value(8), "Delay for staggered sending")
24+
("in-chan-name", bpo::value<std::string>()->default_value("stf1"), "Name of the input channel (sub-time frames)")
25+
("out-chan-name", bpo::value<std::string>()->default_value("stf2"), "Name of the output channel (sub-time frames)");
2326
}
2427

2528
FairMQDevice* getDevice(const FairMQProgOptions& config)

0 commit comments

Comments
 (0)