Skip to content

Merge multiple HBFs into STF#384

Merged
sawenzel merged 2 commits intoAliceO2Group:devfrom
ktf:dev-merge-hbf-into-stf
Jun 21, 2017
Merged

Merge multiple HBFs into STF#384
sawenzel merged 2 commits intoAliceO2Group:devfrom
ktf:dev-merge-hbf-into-stf

Conversation

@ktf
Copy link
Copy Markdown
Member

@ktf ktf commented May 18, 2017

From your favourite coding duo, @matthiasrichter & @ktf

@dberzano
Copy link
Copy Markdown
Contributor

With #387 merged, the tests should soon turn green.

@ktf ktf force-pushed the dev-merge-hbf-into-stf branch 2 times, most recently from 5cc9266 to a1f2687 Compare May 19, 2017 11:21
@ktf ktf requested a review from matthiasrichter May 19, 2017 11:22
@alibuild
Copy link
Copy Markdown
Collaborator

Error while checking build/O2/o2 for a1f2687d08d4d0fea2fb861cc0b9700de405aa37:

sw/BUILD/O2-latest/log
+ DEVEL_SOURCES=/mnt/mesos/sandbox/sandbox/O2
+ '[' /mnt/mesos/sandbox/sandbox/O2 '!=' /mnt/mesos/sandbox/sandbox/sw/SOURCES/O2/dev/0 ']'
+ perl -p -i -e 's|/mnt/mesos/sandbox/sandbox/sw/SOURCES/O2/dev/0|/mnt/mesos/sandbox/sandbox/O2|' compile_commands.json
+ ln -sf /mnt/mesos/sandbox/sandbox/sw/BUILD/b3b37fa96d85a0e858b2e6ac9dda2e680aec17de/O2/compile_commands.json /mnt/mesos/sandbox/sandbox/O2/compile_commands.json
+ [[ -n 1 ]]
+ make test
Running tests...
Test project /mnt/mesos/sandbox/sandbox/sw/BUILD/b3b37fa96d85a0e858b2e6ac9dda2e680aec17de/O2
      Start  1: testMessageList
 1/16 Test  #1: testMessageList ..................   Passed    0.01 sec
      Start  2: testDataHeader
 2/16 Test  #2: testDataHeader ...................   Passed    0.60 sec
      Start  3: testTimeStamp
 3/16 Test  #3: testTimeStamp ....................   Passed    0.63 sec
      Start  4: testBasicHits
 4/16 Test  #4: testBasicHits ....................   Passed    0.65 sec
      Start  5: TimeFrameTest
 5/16 Test  #5: TimeFrameTest ....................   Passed    0.79 sec
      Start  6: testTPCBase
 6/16 Test  #6: testTPCBase ......................   Passed    0.55 sec
      Start  7: testTPCCalDet
 7/16 Test  #7: testTPCCalDet ....................   Passed    0.81 sec
      Start  8: testTPCMapper
 8/16 Test  #8: testTPCMapper ....................   Passed    0.52 sec
      Start  9: testTPCSyncPatternMonitor
 9/16 Test  #9: testTPCSyncPatternMonitor ........   Passed    0.59 sec
      Start 10: testTPCAdcClockMonitor
10/16 Test #10: testTPCAdcClockMonitor ...........   Passed    0.57 sec
      Start 11: testTPCElectronTransport
11/16 Test #11: testTPCElectronTransport .........   Passed    0.74 sec
      Start 12: testTPCGEMAmplification
12/16 Test #12: testTPCGEMAmplification ..........   Passed   26.47 sec
      Start 13: testTPCSimulation
13/16 Test #13: testTPCSimulation ................   Passed    0.46 sec
      Start 14: run_flp2epn_distributed
14/16 Test #14: run_flp2epn_distributed ..........***Failed  Required regular expression not found.Regex=[acknowledged after
]  5.10 sec
      Start 15: testExampleModule1
15/16 Test #15: testExampleModule1 ...............   Passed    0.01 sec
      Start 16: O2MessageMonitorTest
16/16 Test #16: O2MessageMonitorTest .............   Passed    0.55 sec

94% tests passed, 1 tests failed out of 16

Total Test time (real) =  39.05 sec

The following tests FAILED:
	 14 - run_flp2epn_distributed (Failed)
Errors while running CTest

Full log here.

@ktf
Copy link
Copy Markdown
Member Author

ktf commented May 19, 2017

@dberzano could you please disable also run_flp2epn_distributed until it's fixed?

@dberzano
Copy link
Copy Markdown
Contributor

Yes, I have noticed the new error. I was wondering whether this was the correct approach... see #390.

@ktf ktf force-pushed the dev-merge-hbf-into-stf branch from a1f2687 to 5b8609e Compare May 19, 2017 12:22
@ktf
Copy link
Copy Markdown
Member Author

ktf commented May 19, 2017

Given we have not changed the code which is crashing, we should probably open an issue about it (since it's probably broken since a while) and disable the test.

@alibuild
Copy link
Copy Markdown
Collaborator

Error while checking build/O2/o2-dev-fairroot for 5b8609e43cc70939bcd77f51cbcf05f372fdd964:

sw/BUILD/O2-latest/log
                 from /mnt/mesos/sandbox/sandbox/sw/SOURCES/O2/0_O2_DEV_FAIRROOT/0/Utilities/DataFlow/src/SubframeBuilderDevice.cxx:6:
/mnt/mesos/sandbox/sandbox/sw/slc7_x86-64/GCC-Toolchain/v6.2.0-alice1-5/include/c++/6.2.0/bits/unique_ptr.h: In instantiation of 'typename std::_MakeUniq<_Tp>::__single_object std::make_unique(_Args&& ...) [with _Tp = char; _Args = {char*}; typename std::_MakeUniq<_Tp>::__single_object = std::unique_ptr<char>]':
/mnt/mesos/sandbox/sandbox/sw/SOURCES/O2/0_O2_DEV_FAIRROOT/0/Utilities/DataFlow/src/SubframeBuilderDevice.cxx:120:58:   required from here
/mnt/mesos/sandbox/sandbox/sw/slc7_x86-64/GCC-Toolchain/v6.2.0-alice1-5/include/c++/6.2.0/bits/unique_ptr.h:787:30: error: invalid conversion from 'char*' to 'char' [-fpermissive]
     { return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...)); }
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /mnt/mesos/sandbox/sandbox/sw/slc7_x86-64/GCC-Toolchain/v6.2.0-alice1-5/include/c++/6.2.0/functional:49:0,
--
/mnt/mesos/sandbox/sandbox/sw/slc7_x86-64/GCC-Toolchain/v6.2.0-alice1-5/include/c++/6.2.0/bits/stl_tree.h:1697:4:   required from 'std::pair<std::_Rb_tree_iterator<_Val>, std::_Rb_tree_iterator<_Val> > std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::equal_range(const _Key&) [with _Key = o2::DataFlow::SubframeBuilderDevice::SubframeId; _Val = std::pair<const o2::DataFlow::SubframeBuilderDevice::SubframeId, o2::DataFlow::SubframeBuilderDevice::SubframeRef>; _KeyOfValue = std::_Select1st<std::pair<const o2::DataFlow::SubframeBuilderDevice::SubframeId, o2::DataFlow::SubframeBuilderDevice::SubframeRef> >; _Compare = std::less<o2::DataFlow::SubframeBuilderDevice::SubframeId>; _Alloc = std::allocator<std::pair<const o2::DataFlow::SubframeBuilderDevice::SubframeId, o2::DataFlow::SubframeBuilderDevice::SubframeRef> >]'
/mnt/mesos/sandbox/sandbox/sw/slc7_x86-64/GCC-Toolchain/v6.2.0-alice1-5/include/c++/6.2.0/bits/stl_multimap.h:911:36:   required from 'std::pair<typename std::_Rb_tree<_Key, std::pair<const _Key, _Tp>, std::_Select1st<std::pair<const _Key, _Tp> >, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<std::pair<const _Key, _Tp> >::other>::iterator, typename std::_Rb_tree<_Key, std::pair<const _Key, _Tp>, std::_Select1st<std::pair<const _Key, _Tp> >, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<std::pair<const _Key, _Tp> >::other>::iterator> std::multimap<_Key, _Tp, _Compare, _Alloc>::equal_range(const key_type&) [with _Key = o2::DataFlow::SubframeBuilderDevice::SubframeId; _Tp = o2::DataFlow::SubframeBuilderDevice::SubframeRef; _Compare = std::less<o2::DataFlow::SubframeBuilderDevice::SubframeId>; _Alloc = std::allocator<std::pair<const o2::DataFlow::SubframeBuilderDevice::SubframeId, o2::DataFlow::SubframeBuilderDevice::SubframeRef> >; typename std::_Rb_tree<_Key, std::pair<const _Key, _Tp>, std::_Select1st<std::pair<const _Key, _Tp> >, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<std::pair<const _Key, _Tp> >::other>::iterator = std::_Rb_tree_iterator<std::pair<const o2::DataFlow::SubframeBuilderDevice::SubframeId, o2::DataFlow::SubframeBuilderDevice::SubframeRef> >; std::multimap<_Key, _Tp, _Compare, _Alloc>::key_type = o2::DataFlow::SubframeBuilderDevice::SubframeId]'
/mnt/mesos/sandbox/sandbox/sw/SOURCES/O2/0_O2_DEV_FAIRROOT/0/Utilities/DataFlow/src/SubframeBuilderDevice.cxx:135:40:   required from here
/mnt/mesos/sandbox/sandbox/sw/slc7_x86-64/GCC-Toolchain/v6.2.0-alice1-5/include/c++/6.2.0/bits/stl_function.h:386:20: error: no match for 'operator<' (operand types are 'const o2::DataFlow::SubframeBuilderDevice::SubframeId' and 'const o2::DataFlow::SubframeBuilderDevice::SubframeId')
       { return __x < __y; }
                ~~~~^~~~~
In file included from /mnt/mesos/sandbox/sandbox/sw/slc7_x86-64/GCC-Toolchain/v6.2.0-alice1-5/include/c++/6.2.0/stack:61:0,

Full log here.

@ktf ktf force-pushed the dev-merge-hbf-into-stf branch from 5b8609e to a6ed118 Compare May 19, 2017 20:31
@ktf ktf force-pushed the dev-merge-hbf-into-stf branch from a6ed118 to 5cd8428 Compare June 15, 2017 11:52
@ktf ktf changed the title [WIP] Merge multiple HBFs into STF Merge multiple HBFs into STF Jun 15, 2017
@ktf ktf force-pushed the dev-merge-hbf-into-stf branch 3 times, most recently from 1525199 to 0e9f90f Compare June 15, 2017 12:00
@AliceO2Group AliceO2Group deleted a comment from alibuild Jun 15, 2017
@AliceO2Group AliceO2Group deleted a comment from alibuild Jun 15, 2017
@AliceO2Group AliceO2Group deleted a comment from alibuild Jun 15, 2017
@AliceO2Group AliceO2Group deleted a comment from alibuild Jun 15, 2017
@AliceO2Group AliceO2Group deleted a comment from alibuild Jun 15, 2017
@AliceO2Group AliceO2Group deleted a comment from alibuild Jun 15, 2017
@AliceO2Group AliceO2Group deleted a comment from alibuild Jun 15, 2017
@AliceO2Group AliceO2Group deleted a comment from alibuild Jun 15, 2017
@alibuild
Copy link
Copy Markdown
Collaborator

Error while checking build/O2/o2-dev-fairroot for 0e9f90ffc17edd74051989d9c593b4173621355a:

sw/BUILD/O2-latest/log
[ 96%] Built target TimeframeWriterDevice
[ 96%] Linking CXX executable ../../bin/FakeTimeframeGeneratorDevice
[ 96%] Linking CXX executable ../../bin/heartbeatSampler
[ 97%] Linking CXX executable ../../bin/FLPSenderDevice
[ 97%] Built target FakeTimeframeGeneratorDevice
[ 97%] Built target heartbeatSampler
[ 97%] Built target FLPSenderDevice
[ 97%] Linking CXX executable ../../bin/test_TimeframeParser
[ 98%] Linking CXX executable ../../bin/TimeframeValidationTool
Scanning dependencies of target SubframeBuilderDevice
[ 98%] Built target TimeframeValidationTool
[ 98%] Building CXX object Utilities/DataFlow/CMakeFiles/SubframeBuilderDevice.dir/src/runSubframeBuilderDevice.cxx.o
[ 98%] Built target test_TimeframeParser
Scanning dependencies of target test_SubframeUtils01
[ 98%] Building CXX object Utilities/DataFlow/CMakeFiles/test_SubframeUtils01.dir/test/test_SubframeUtils01.cxx.o
[ 98%] Linking CXX executable ../../bin/TimeframeReaderDevice
/mnt/mesos/sandbox/sandbox/sw/SOURCES/O2/0_O2_DEV_FAIRROOT/0/Utilities/DataFlow/test/test_SubframeUtils01.cxx: In function 'int main(int, char**)':
/mnt/mesos/sandbox/sandbox/sw/SOURCES/O2/0_O2_DEV_FAIRROOT/0/Utilities/DataFlow/test/test_SubframeUtils01.cxx:36:52: sorry, unimplemented: non-trivial designated initializers not supported
   o2::Header::HeartbeatHeader header1 = {.orbit = 0};
                                                    ^
/mnt/mesos/sandbox/sandbox/sw/SOURCES/O2/0_O2_DEV_FAIRROOT/0/Utilities/DataFlow/test/test_SubframeUtils01.cxx:37:54: sorry, unimplemented: non-trivial designated initializers not supported
   o2::Header::HeartbeatHeader header2 = {.orbit = 255};
                                                      ^
/mnt/mesos/sandbox/sandbox/sw/SOURCES/O2/0_O2_DEV_FAIRROOT/0/Utilities/DataFlow/test/test_SubframeUtils01.cxx:38:54: sorry, unimplemented: non-trivial designated initializers not supported
   o2::Header::HeartbeatHeader header3 = {.orbit = 256};
                                                      ^
[ 99%] Built target TimeframeReaderDevice
make[2]: *** [Utilities/DataFlow/CMakeFiles/test_SubframeUtils01.dir/test/test_SubframeUtils01.cxx.o] Error 1
make[1]: *** [Utilities/DataFlow/CMakeFiles/test_SubframeUtils01.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
/mnt/mesos/sandbox/sandbox/sw/SOURCES/O2/0_O2_DEV_FAIRROOT/0/Utilities/DataFlow/test/test_PayloadMerger01.cxx: In function 'int main(int, char**)':
/mnt/mesos/sandbox/sandbox/sw/SOURCES/O2/0_O2_DEV_FAIRROOT/0/Utilities/DataFlow/test/test_PayloadMerger01.cxx:43:61: warning: 'static std::unique_ptr<FairMQTransportFactory> FairMQDevice::MakeTransport(const string&)' is deprecated: Use 'static auto FairMQTransportFactory::CreateTransportFactory() -> std::shared_ptr<FairMQTransportFactory>' from <FairMQTransportFactory.h> instead. [-Wdeprecated-declarations]
   std::unique_ptr<FairMQTransportFactory> zmq(FairMQDevice::MakeTransport("zeromq"));
                                                             ^~~~~~~~~~~~~
In file included from /mnt/mesos/sandbox/sandbox/sw/SOURCES/O2/0_O2_DEV_FAIRROOT/0/Utilities/DataFlow/test/test_PayloadMerger01.cxx:18:0:
/mnt/mesos/sandbox/sandbox/sw/slc7_x86-64/FairRoot/dev-16/include/fairmq/FairMQDevice.h:331:52: note: declared here
     static std::unique_ptr<FairMQTransportFactory> MakeTransport(const std::string& transport) __attribute__((deprecated("Use 'static auto FairMQTransportFactory::CreateTransportFactory() -> std::shared_ptr<FairMQTransportFactory>' from <FairMQTransportFactory.h> instead.")));
                                                    ^~~~~~~~~~~~~
/mnt/mesos/sandbox/sandbox/sw/SOURCES/O2/0_O2_DEV_FAIRROOT/0/Utilities/DataFlow/test/test_PayloadMerger01.cxx:43:83: warning: 'static std::unique_ptr<FairMQTransportFactory> FairMQDevice::MakeTransport(const string&)' is deprecated: Use 'static auto FairMQTransportFactory::CreateTransportFactory() -> std::shared_ptr<FairMQTransportFactory>' from <FairMQTransportFactory.h> instead. [-Wdeprecated-declarations]
   std::unique_ptr<FairMQTransportFactory> zmq(FairMQDevice::MakeTransport("zeromq"));
                                                                                   ^
In file included from /mnt/mesos/sandbox/sandbox/sw/SOURCES/O2/0_O2_DEV_FAIRROOT/0/Utilities/DataFlow/test/test_PayloadMerger01.cxx:18:0:
/mnt/mesos/sandbox/sandbox/sw/slc7_x86-64/FairRoot/dev-16/include/fairmq/FairMQDevice.h:331:52: note: declared here
     static std::unique_ptr<FairMQTransportFactory> MakeTransport(const std::string& transport) __attribute__((deprecated("Use 'static auto FairMQTransportFactory::CreateTransportFactory() -> std::shared_ptr<FairMQTransportFactory>' from <FairMQTransportFactory.h> instead.")));
                                                    ^~~~~~~~~~~~~
[ 99%] Linking CXX executable ../../bin/test_PayloadMerger01
[ 99%] Built target test_PayloadMerger01
[ 99%] Linking CXX executable ../../bin/SubframeBuilderDevice
[ 99%] Built target SubframeBuilderDevice

Full log here.

@ktf
Copy link
Copy Markdown
Member Author

ktf commented Jun 15, 2017

@matthiasrichter this is my (hopefully final) cleanup for this. As I mentioned to you earlier, I've introduced a new helper class PayloadMerger which can be used to merge payloads (doh) in a configurable manner. This is done via policies, rather than subclassing, because in principle one could think of them as three separate knobs whose implementations we can mix and match.

@AliceO2Group AliceO2Group deleted a comment from alibuild Jun 15, 2017
@AliceO2Group AliceO2Group deleted a comment from alibuild Jun 15, 2017
@alibuild
Copy link
Copy Markdown
Collaborator

Error while checking build/O2/o2 for 009c6b010b180b66f72a32bd86347f40a60bc04c:

sw/BUILD/O2-latest/log
+ make test
Running tests...
Test project /mnt/mesos/sandbox/sandbox/sw/BUILD/c00f17db1f43dc9c3867765fbd92506e60941b4d/O2
      Start  1: testMessageList
 1/19 Test  #1: testMessageList ..................   Passed    0.00 sec
      Start  2: testDataHeader
 2/19 Test  #2: testDataHeader ...................   Passed    0.46 sec
      Start  3: testTimeStamp
 3/19 Test  #3: testTimeStamp ....................   Passed    0.39 sec
      Start  4: testBasicHits
 4/19 Test  #4: testBasicHits ....................   Passed    0.45 sec
      Start  5: TimeFrameTest
 5/19 Test  #5: TimeFrameTest ....................   Passed    0.53 sec
      Start  6: testTPCBase
 6/19 Test  #6: testTPCBase ......................   Passed    0.37 sec
      Start  7: testTPCCalDet
 7/19 Test  #7: testTPCCalDet ....................   Passed    0.70 sec
      Start  8: testTPCMapper
 8/19 Test  #8: testTPCMapper ....................   Passed    0.38 sec
      Start  9: testTPCSyncPatternMonitor
 9/19 Test  #9: testTPCSyncPatternMonitor ........   Passed    0.44 sec
      Start 10: testTPCAdcClockMonitor
10/19 Test #10: testTPCAdcClockMonitor ...........   Passed    0.45 sec
      Start 11: testTPCElectronTransport
11/19 Test #11: testTPCElectronTransport .........   Passed    0.61 sec
      Start 12: testTPCGEMAmplification
12/19 Test #12: testTPCGEMAmplification ..........   Passed   21.22 sec
      Start 13: testTPCSimulation
13/19 Test #13: testTPCSimulation ................   Passed    0.44 sec
      Start 14: testExampleModule1
14/19 Test #14: testExampleModule1 ...............   Passed    0.01 sec
      Start 15: testMessageFormat
15/19 Test #15: testMessageFormat ................   Passed    0.41 sec
      Start 16: O2MessageMonitorTest
16/19 Test #16: O2MessageMonitorTest .............   Passed    0.41 sec
      Start 17: test_TimeframeParser
17/19 Test #17: test_TimeframeParser .............   Passed    0.40 sec
      Start 18: test_SubframeUtils01
18/19 Test #18: test_SubframeUtils01 .............   Passed    0.40 sec
      Start 19: test_PayloadMerger01
19/19 Test #19: test_PayloadMerger01 .............***Exception: Other  0.43 sec

95% tests passed, 1 tests failed out of 19

Total Test time (real) =  28.53 sec

The following tests FAILED:
	 19 - test_PayloadMerger01 (OTHER_FAULT)
Errors while running CTest

Full log here.

@alibuild
Copy link
Copy Markdown
Collaborator

Error while checking build/o2checkcode/o2-daq for 0e9f90ffc17edd74051989d9c593b4173621355a:

sw/BUILD/O2-latest/log
[ 96%] Built target EPNReceiverDevice
[ 96%] Linking CXX executable ../../bin/FakeTimeframeGeneratorDevice
[ 96%] Linking CXX executable ../../bin/heartbeatSampler
[ 97%] Linking CXX executable ../../bin/FLPSenderDevice
[ 97%] Built target FakeTimeframeGeneratorDevice
[ 97%] Built target FLPSenderDevice
[ 97%] Built target heartbeatSampler
[ 98%] Linking CXX executable ../../bin/TimeframeValidationTool
[ 98%] Linking CXX executable ../../bin/test_TimeframeParser
Scanning dependencies of target SubframeBuilderDevice
[ 98%] Building CXX object Utilities/DataFlow/CMakeFiles/SubframeBuilderDevice.dir/src/runSubframeBuilderDevice.cxx.o
[ 98%] Built target TimeframeValidationTool
[ 98%] Built target test_TimeframeParser
Scanning dependencies of target test_SubframeUtils01
[ 98%] Building CXX object Utilities/DataFlow/CMakeFiles/test_SubframeUtils01.dir/test/test_SubframeUtils01.cxx.o
[ 98%] Linking CXX executable ../../bin/TimeframeReaderDevice
/mnt/mesos/sandbox/sandbox/sw/SOURCES/O2/0_O2_DAQ/0/Utilities/DataFlow/test/test_SubframeUtils01.cxx: In function 'int main(int, char**)':
/mnt/mesos/sandbox/sandbox/sw/SOURCES/O2/0_O2_DAQ/0/Utilities/DataFlow/test/test_SubframeUtils01.cxx:36:52: sorry, unimplemented: non-trivial designated initializers not supported
   o2::Header::HeartbeatHeader header1 = {.orbit = 0};
                                                    ^
/mnt/mesos/sandbox/sandbox/sw/SOURCES/O2/0_O2_DAQ/0/Utilities/DataFlow/test/test_SubframeUtils01.cxx:37:54: sorry, unimplemented: non-trivial designated initializers not supported
   o2::Header::HeartbeatHeader header2 = {.orbit = 255};
                                                      ^
/mnt/mesos/sandbox/sandbox/sw/SOURCES/O2/0_O2_DAQ/0/Utilities/DataFlow/test/test_SubframeUtils01.cxx:38:54: sorry, unimplemented: non-trivial designated initializers not supported
   o2::Header::HeartbeatHeader header3 = {.orbit = 256};
                                                      ^
[ 99%] Built target TimeframeReaderDevice
make[2]: *** [Utilities/DataFlow/CMakeFiles/test_SubframeUtils01.dir/test/test_SubframeUtils01.cxx.o] Error 1
make[1]: *** [Utilities/DataFlow/CMakeFiles/test_SubframeUtils01.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
/mnt/mesos/sandbox/sandbox/sw/SOURCES/O2/0_O2_DAQ/0/Utilities/DataFlow/test/test_PayloadMerger01.cxx: In function 'int main(int, char**)':
/mnt/mesos/sandbox/sandbox/sw/SOURCES/O2/0_O2_DAQ/0/Utilities/DataFlow/test/test_PayloadMerger01.cxx:43:61: warning: 'static std::unique_ptr<FairMQTransportFactory> FairMQDevice::MakeTransport(const string&)' is deprecated: Use 'static auto FairMQTransportFactory::CreateTransportFactory() -> std::shared_ptr<FairMQTransportFactory>' from <FairMQTransportFactory.h> instead. [-Wdeprecated-declarations]
   std::unique_ptr<FairMQTransportFactory> zmq(FairMQDevice::MakeTransport("zeromq"));
                                                             ^~~~~~~~~~~~~
In file included from /mnt/mesos/sandbox/sandbox/sw/SOURCES/O2/0_O2_DAQ/0/Utilities/DataFlow/test/test_PayloadMerger01.cxx:18:0:
/mnt/mesos/sandbox/sandbox/sw/slc7_x86-64/FairRoot/alice-dev-20170524-3/include/fairmq/FairMQDevice.h:334:52: note: declared here
     static std::unique_ptr<FairMQTransportFactory> MakeTransport(const std::string& transport) __attribute__((deprecated("Use 'static auto FairMQTransportFactory::CreateTransportFactory() -> std::shared_ptr<FairMQTransportFactory>' from <FairMQTransportFactory.h> instead.")));
                                                    ^~~~~~~~~~~~~
/mnt/mesos/sandbox/sandbox/sw/SOURCES/O2/0_O2_DAQ/0/Utilities/DataFlow/test/test_PayloadMerger01.cxx:43:83: warning: 'static std::unique_ptr<FairMQTransportFactory> FairMQDevice::MakeTransport(const string&)' is deprecated: Use 'static auto FairMQTransportFactory::CreateTransportFactory() -> std::shared_ptr<FairMQTransportFactory>' from <FairMQTransportFactory.h> instead. [-Wdeprecated-declarations]
   std::unique_ptr<FairMQTransportFactory> zmq(FairMQDevice::MakeTransport("zeromq"));
                                                                                   ^
In file included from /mnt/mesos/sandbox/sandbox/sw/SOURCES/O2/0_O2_DAQ/0/Utilities/DataFlow/test/test_PayloadMerger01.cxx:18:0:
/mnt/mesos/sandbox/sandbox/sw/slc7_x86-64/FairRoot/alice-dev-20170524-3/include/fairmq/FairMQDevice.h:334:52: note: declared here
     static std::unique_ptr<FairMQTransportFactory> MakeTransport(const std::string& transport) __attribute__((deprecated("Use 'static auto FairMQTransportFactory::CreateTransportFactory() -> std::shared_ptr<FairMQTransportFactory>' from <FairMQTransportFactory.h> instead.")));
                                                    ^~~~~~~~~~~~~
[ 99%] Linking CXX executable ../../bin/test_PayloadMerger01
[ 99%] Built target test_PayloadMerger01
[ 99%] Linking CXX executable ../../bin/SubframeBuilderDevice
[ 99%] Built target SubframeBuilderDevice

Full log here.

@ktf ktf requested a review from sawenzel June 15, 2017 19:24
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we prefer the C++11 variant: using = ...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

has to be nullptr

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this test is not using the BOOST testing framework as other tests. For consistency we should do so. Moreover, the "asserts" will most likely be compiled away in any release build (which defined -DNDEBUG).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The advantages of a framework are for instance that the program does not crash at the first failure and we get a precise list of passes/fails.

Copy link
Copy Markdown
Member Author

@ktf ktf Jun 15, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can (and will) move to BOOST test, however I disagree on what you say:

  • Tests themselves should not be compiled with -DNDEBUG, ever. If we do, we should fix the build rules.
  • As noted elsewhere we should have the option to have two copies for each test: one compiled against the optimised library, one compiled with the full debug mode library.
  • We should probably have a decision about which unit test framework to use, and not simply rely on consistency. FairRoot uses gtest (which is slightly nicer to read, at least for me, and does not depend on boost, which is always good for compile time) and I've heard good things about catch. @Barthelemy / @dberzano was there any evaluation of the framework for tests?

@dberzano to comment, since this is really a tools issue.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was under the impression that this decision was taken since BOOST is used via the standard macro O2_GENERATE_TESTS. It is successfully deployed in various places. ( I cannot find a disagreement concerning the assert statement since you agree that then one needs to take extra precautions such as a simple #undef NDEBUG in the translation unit of the unit test. )

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was no formal evaluation. I remember a discussion in CWG11 about it. We went for boost.test because any ways we depend on boost. Using gtest meant adding a dependency. As far as I remember, that was the main argument (?).

Pragmatically, at this stage, I would be in favour of continuing with boost.test just because all the tests are using it (also in the other O2 repos such as flp proto). If someone is motivated to make the formal evaluation though, let's do it. If we decide to change there would be then some work to modify the CMake macro, the recipes and the existing tests.

@ktf ktf force-pushed the dev-merge-hbf-into-stf branch from 743763e to 60ca0d6 Compare June 15, 2017 20:20
@alibuild
Copy link
Copy Markdown
Collaborator

alibuild commented Jun 15, 2017

Error while checking build/o2checkcode/o2-daq for 60ca0d6ce9991d0d7d9cbeea27c6d7efb280e206:

sw/BUILD/o2checkcode-latest/log
+ cp /mnt/mesos/sandbox/sandbox/sw/slc7_x86-64/O2/0_O2_DAQ-1/compile_commands.json .
++ grep -m 1 'SOURCES/O2.*/Common/' compile_commands.json
++ sed 's|.*\s-I\(/.*SOURCES/O2/.*\)/Common/.*|\1|'
+ O2SOURCEPATH='/mnt/mesos/sandbox/sandbox/sw/SOURCES/O2/0_O2_DAQ/0/Common/MathUtils -isystem /mnt/mesos/sandbox/sandbox/sw/slc7_x86-64/FairRoot/alice-dev-20170524-4/include/fairmq  -std=c++14 -fPIC -g -O2 -std=c++14 -g -Wshadow  -fPIC   -o CMakeFiles/MathUtils.dir/src/Chebyshev3D.cxx.o -c /mnt/mesos/sandbox/sandbox/sw/SOURCES/O2/0_O2_DAQ/0'
+ '[' -d '/mnt/mesos/sandbox/sandbox/sw/SOURCES/O2/0_O2_DAQ/0/Common/MathUtils -isystem /mnt/mesos/sandbox/sandbox/sw/slc7_x86-64/FairRoot/alice-dev-20170524-4/include/fairmq  -std=c++14 -fPIC -g -O2 -std=c++14 -g -Wshadow  -fPIC   -o CMakeFiles/MathUtils.dir/src/Chebyshev3D.cxx.o -c /mnt/mesos/sandbox/sandbox/sw/SOURCES/O2/0_O2_DAQ/0' ']'
+ echo 'This is not a valid directory'
This is not a valid directory
+ exit 1sw/BUILD/O2-latest/log
+ DEVEL_SOURCES=/mnt/mesos/sandbox/sandbox/O2
+ '[' /mnt/mesos/sandbox/sandbox/O2 '!=' /mnt/mesos/sandbox/sandbox/sw/SOURCES/O2/0_O2_DAQ/0 ']'
+ perl -p -i -e 's|/mnt/mesos/sandbox/sandbox/sw/SOURCES/O2/0_O2_DAQ/0|/mnt/mesos/sandbox/sandbox/O2|' compile_commands.json
+ ln -sf /mnt/mesos/sandbox/sandbox/sw/BUILD/e1a3bc6a54b554470016f8d05e36067db2e11e1f/O2/compile_commands.json /mnt/mesos/sandbox/sandbox/O2/compile_commands.json
+ [[ -n 1 ]]
+ make test
Running tests...
Test project /mnt/mesos/sandbox/sandbox/sw/BUILD/e1a3bc6a54b554470016f8d05e36067db2e11e1f/O2
      Start  1: testMessageList
 1/19 Test  #1: testMessageList ..................   Passed    0.00 sec
      Start  2: testDataHeader
 2/19 Test  #2: testDataHeader ...................   Passed    0.52 sec
      Start  3: testTimeStamp
 3/19 Test  #3: testTimeStamp ....................   Passed    0.54 sec
      Start  4: testBasicHits
 4/19 Test  #4: testBasicHits ....................   Passed    0.61 sec
      Start  5: TimeFrameTest
 5/19 Test  #5: TimeFrameTest ....................   Passed    0.62 sec
      Start  6: testTPCBase
 6/19 Test  #6: testTPCBase ......................   Passed    0.51 sec
      Start  7: testTPCCalDet
 7/19 Test  #7: testTPCCalDet ....................   Passed    0.87 sec
      Start  8: testTPCMapper
 8/19 Test  #8: testTPCMapper ....................   Passed    0.53 sec
      Start  9: testTPCSyncPatternMonitor
 9/19 Test  #9: testTPCSyncPatternMonitor ........   Passed    0.59 sec
      Start 10: testTPCAdcClockMonitor
10/19 Test #10: testTPCAdcClockMonitor ...........   Passed    0.57 sec
      Start 11: testTPCElectronTransport
11/19 Test #11: testTPCElectronTransport .........   Passed    0.80 sec
      Start 12: testTPCGEMAmplification
12/19 Test #12: testTPCGEMAmplification ..........   Passed   27.99 sec
      Start 13: testTPCSimulation
13/19 Test #13: testTPCSimulation ................   Passed    0.52 sec
      Start 14: testExampleModule1
14/19 Test #14: testExampleModule1 ...............   Passed    0.01 sec
      Start 15: testMessageFormat
15/19 Test #15: testMessageFormat ................   Passed    0.53 sec
      Start 16: O2MessageMonitorTest
16/19 Test #16: O2MessageMonitorTest .............   Passed    0.52 sec
      Start 17: test_TimeframeParser

Full log here.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nullptr instead of 0

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return ! (m.count(id) < 3) is slightly shorter

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't need the else here

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return (map.count(id) < this->mOrbitsPerTimeframe);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

according to conventions, there should be a brace { even round single line statements

@ktf ktf force-pushed the dev-merge-hbf-into-stf branch from 60ca0d6 to 784712f Compare June 16, 2017 13:29
@ktf
Copy link
Copy Markdown
Member Author

ktf commented Jun 16, 2017

@sawenzel I think I've addressed all your remarks. On a side note, I wonder why boost.test decided to report *** no errors the same way make reports *** error. :)

@alibuild
Copy link
Copy Markdown
Collaborator

alibuild commented Jun 16, 2017

Error while checking build/o2checkcode/o2-daq for 784712f1c8dbfe2a2f1d2e95ae892e5e4dde4a34:

sw/BUILD/O2-latest/log
+ DEVEL_SOURCES=/mnt/mesos/sandbox/sandbox/O2
+ '[' /mnt/mesos/sandbox/sandbox/O2 '!=' /mnt/mesos/sandbox/sandbox/sw/SOURCES/O2/0_O2_DAQ/0 ']'
+ perl -p -i -e 's|/mnt/mesos/sandbox/sandbox/sw/SOURCES/O2/0_O2_DAQ/0|/mnt/mesos/sandbox/sandbox/O2|' compile_commands.json
+ ln -sf /mnt/mesos/sandbox/sandbox/sw/BUILD/e1a3bc6a54b554470016f8d05e36067db2e11e1f/O2/compile_commands.json /mnt/mesos/sandbox/sandbox/O2/compile_commands.json
+ [[ -n 1 ]]
+ make test
Running tests...
Test project /mnt/mesos/sandbox/sandbox/sw/BUILD/e1a3bc6a54b554470016f8d05e36067db2e11e1f/O2
      Start  1: testMessageList
 1/19 Test  #1: testMessageList ..................   Passed    0.00 sec
      Start  2: testDataHeader
 2/19 Test  #2: testDataHeader ...................   Passed    0.32 sec
      Start  3: testTimeStamp
 3/19 Test  #3: testTimeStamp ....................   Passed    0.46 sec
      Start  4: testBasicHits
 4/19 Test  #4: testBasicHits ....................   Passed    0.47 sec
      Start  5: TimeFrameTest
 5/19 Test  #5: TimeFrameTest ....................   Passed    0.54 sec
      Start  6: testTPCBase
 6/19 Test  #6: testTPCBase ......................   Passed    0.46 sec
      Start  7: testTPCCalDet
 7/19 Test  #7: testTPCCalDet ....................   Passed    0.77 sec
      Start  8: testTPCMapper
 8/19 Test  #8: testTPCMapper ....................   Passed    0.52 sec
      Start  9: testTPCSyncPatternMonitor
 9/19 Test  #9: testTPCSyncPatternMonitor ........   Passed    0.39 sec
      Start 10: testTPCAdcClockMonitor
10/19 Test #10: testTPCAdcClockMonitor ...........   Passed    0.39 sec
      Start 11: testTPCElectronTransport
11/19 Test #11: testTPCElectronTransport .........   Passed    0.66 sec
      Start 12: testTPCGEMAmplification
12/19 Test #12: testTPCGEMAmplification ..........   Passed   24.94 sec
      Start 13: testTPCSimulation
13/19 Test #13: testTPCSimulation ................   Passed    0.43 sec
      Start 14: testExampleModule1
14/19 Test #14: testExampleModule1 ...............   Passed    0.01 sec
      Start 15: testMessageFormat
15/19 Test #15: testMessageFormat ................   Passed    0.48 sec
      Start 16: O2MessageMonitorTest
16/19 Test #16: O2MessageMonitorTest .............   Passed    0.55 sec
      Start 17: test_TimeframeParser
17/19 Test #17: test_TimeframeParser .............   Passed    0.46 sec
      Start 18: test_SubframeUtils01
18/19 Test #18: test_SubframeUtils01 .............   Passed    0.37 sec
      Start 19: test_PayloadMerger01
19/19 Test #19: test_PayloadMerger01 .............   Passed    0.51 sec

100% tests passed, 0 tests failed out of 19

Full log here.

@ktf
Copy link
Copy Markdown
Member Author

ktf commented Jun 16, 2017

@sawenzel any idea of what might be wrong? I do not see any error in the code checker part.

@sawenzel
Copy link
Copy Markdown
Collaborator

sawenzel commented Jun 16, 2017

@ktf: My bad ... the extraction of the source path from the compilations database failed (probably due to a wrong regular expression):

grep -m 1 'SOURCES/O2.*/Common/' compile_commands.json
++ sed 's|.*\s-I\(/.*SOURCES/O2/.*\)/Common/.*|\1|'

This command should extract the actual path to the git sources ... probably the sed command needs to be fixed. Might be due to a platform difference of sed.

Copy link
Copy Markdown
Collaborator

@sawenzel sawenzel Jun 16, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to me this seems no longer seems necessary

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because, as far as I know, the Boost framework works independently of compile flags (advantage over asserts).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You selected the wrong line in your comment.

That said, the -O0 is required to make sure I get the right line numbers when in lldb.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be desirable to compile the unit tests the same way we compile the rest (see another comment). In case a unit test fails, a developer can recompile the project using a debug build in which case the line information should be correct.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should have both optimised and non optimised, as I've already said. I think it's up to WP3 to find and implement a solution for that. Tests are not only there to ensure bugs are not reintroduced, but also to simplify development and evolution of the code, which you cannot easily do if -O2 is used for them. Unless a better solution is provided for such a use case, this will stay as is.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The canonical solution is to make one more PR build for Debug and then one gets both optimised and non optimised builds. The solution now is an awkward mixture.

@sawenzel
Copy link
Copy Markdown
Collaborator

@ktf, @dberzano : Why do we run make test for the o2checkcode check? There are in principle no build-artefacts (and this makes the log output unnecessarily bigger).

@alibuild
Copy link
Copy Markdown
Collaborator

alibuild commented Jun 19, 2017 via email

@sawenzel
Copy link
Copy Markdown
Collaborator

@alibuild: I disagree on this, for the following reasons:
a) I've seen tests fail for release but not for debug since the compiler is doing different stuff
b) A debug build might trigger different compiler warnings and different runtime behaviour (since for example asserts are compiled in) so having an additional PR for the debug option can only have benefits (not disatvantages).

Copy link
Copy Markdown
Collaborator

@matthiasrichter matthiasrichter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks great and elegant. I have a few comments between the lines.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been trying to find a better name, because plain identity lead to a somewhat wrong association. Since it's a/the default PayloadExtracator, maybe identityPayloadExtractor or extractDetectorPayloadIdentity. And a comment should be added.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about fullPayloadExtractor?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At least for the new files we should start adding the correct public link with http instead https.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for the record: we agreed to postpone this for the moment because it would break the PR code check.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't that be available from the FairMQMessage in the FairMQParts?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed... I think this is just an obsolete comment. Will remove.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would call this function either makeId or makeIdFromHeartbeatHeader

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about return Merger::identity(...) or the respective function name if it is renamed

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Al right, we can argue that outgoing is a local variable and should not be used after the Send. The list will still contain the individual messages but they will have empty unique_ptr objects. Like it is now we do not need to clean because the local variable is destroyed anyhow.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. I will remove the clean and the comment.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have started to use AliceO2 instead of man at this point to mark the AliceO2 related man pages.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok. Will align.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm also confused about hardwired compiler options. The flags are just appended and thus override any other optimization settings. The CI never has the chance to build the tests with some other setting. Even if this is ok for the tests, it's a bad example to have this in the cmake setup. It somehow undermines the idea that we globally take care of the cmake settings and dependencies.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I surrender to the crowd and will remove them... Democracy simply does not work... ;-)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets get rid of the 'self triggered' mode and the corresponding option. It doesn't do anything.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets get rid of this option, this was a simple mockup in the beginning of the development

ktf added 2 commits June 20, 2017 21:28
This is now done by introducing a new generic class PayloadMerger which
can be used to merge together multiple payloads into a given buffer,
which can then be sent via O2.

The PayloadMerger class can be configured w.r.t.:

- Given a Payload, determine is the unique identifier for the class
  of equivalence it belongs to.
- Given an id, determine wether or not the class of equivalence it
  represents is complete.
- Given a payload, extract the parts you are interested from it.
@ktf ktf force-pushed the dev-merge-hbf-into-stf branch from 784712f to d0b7983 Compare June 20, 2017 19:53
@ktf
Copy link
Copy Markdown
Member Author

ktf commented Jun 20, 2017

@matthiasrichter @sawenzel I think I addressed all the comments you had. Can you verify and eventually sign off?

Copy link
Copy Markdown
Collaborator

@matthiasrichter matthiasrichter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for the record: we agreed to postpone this for the moment because it would break the PR code check.

@sawenzel sawenzel merged commit 5538c74 into AliceO2Group:dev Jun 21, 2017
@ktf ktf deleted the dev-merge-hbf-into-stf branch February 27, 2019 13:46
knopers8 pushed a commit to knopers8/AliceO2 that referenced this pull request Sep 7, 2020
mbroz84 pushed a commit to mbroz84/AliceO2 that referenced this pull request Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

6 participants