However, if I remove the threads from the code and run each function, it works. It is happening when the join is called.
More interestingly, if I run simple functions, the threads work. This points me that the hw accepts threads.
When I ran AddressSanitiser, I get:
AddressSanitizer:DEADLYSIGNAL
=================================================================
==11157==ERROR: AddressSanitizer: stack-overflow on address 0x7f01913ff590 (pc 0x5640906a24b1 bp 0x7f0191bfe5b0 sp 0x7f01913ff590 T1)
#0 0x5640906a24b0 in Calendar_one(Model const&, DEG_ID const&, int, int, double, double, int, int, int, int, checkUpProcedure, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) /home/julio/eclipse-workspace-new/SLIDE/src/Degradation.cpp:90
#1 0x5640906b7d2a in void std::__invoke_impl<void, void (*)(Model const&, DEG_ID const&, int, int, double, double, int, int, int, int, checkUpProcedure, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >), Model, DEG_ID, int, int, double, double, int, int, int, int, checkUpProcedure, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::__invoke_other, void (*&&)(Model const&, DEG_ID const&, int, int, double, double, int, int, int, int, checkUpProcedure, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >), Model&&, DEG_ID&&, int&&, int&&, double&&, double&&, int&&, int&&, int&&, int&&, checkUpProcedure&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&) (/home/julio/eclipse-workspace-new/SLIDE/build/default/slide+0x50d2a)
#2 0x5640906b7629 in std::__invoke_result<void (*)(Model const&, DEG_ID const&, int, int, double, double, int, int, int, int, checkUpProcedure, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >), Model, DEG_ID, int, int, double, double, int, int, int, int, checkUpProcedure, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::type std::__invoke<void (*)(Model const&, DEG_ID const&, int, int, double, double, int, int, int, int, checkUpProcedure, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >), Model, DEG_ID, int, int, double, double, int, int, int, int, checkUpProcedure, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(void (*&&)(Model const&, DEG_ID const&, int, int, double, double, int, int, int, int, checkUpProcedure, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >), Model&&, DEG_ID&&, int&&, int&&, double&&, double&&, int&&, int&&, int&&, int&&, checkUpProcedure&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&) (/home/julio/eclipse-workspace-new/SLIDE/build/default/slide+0x50629)
#3 0x5640906b71ba in void std::thread::_Invoker<std::tuple<void (*)(Model const&, DEG_ID const&, int, int, double, double, int, int, int, int, checkUpProcedure, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >), Model, DEG_ID, int, int, double, double, int, int, int, int, checkUpProcedure, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::_M_invoke<0ul, 1ul, 2ul, 3ul, 4ul, 5ul, 6ul, 7ul, 8ul, 9ul, 10ul, 11ul, 12ul>(std::_Index_tuple<0ul, 1ul, 2ul, 3ul, 4ul, 5ul, 6ul, 7ul, 8ul, 9ul, 10ul, 11ul, 12ul>) (/home/julio/eclipse-workspace-new/SLIDE/build/default/slide+0x501ba)
#4 0x5640906b6ff1 in std::thread::_Invoker<std::tuple<void (*)(Model const&, DEG_ID const&, int, int, double, double, int, int, int, int, checkUpProcedure, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >), Model, DEG_ID, int, int, double, double, int, int, int, int, checkUpProcedure, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::operator()() (/home/julio/eclipse-workspace-new/SLIDE/build/default/slide+0x4fff1)
#5 0x5640906b6f59 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)(Model const&, DEG_ID const&, int, int, double, double, int, int, int, int, checkUpProcedure, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >), Model, DEG_ID, int, int, double, double, int, int, int, int, checkUpProcedure, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >::_M_run() (/home/julio/eclipse-workspace-new/SLIDE/build/default/slide+0x4ff59)
#6 0x7f01956a0d83 (/lib/x86_64-linux-gnu/libstdc++.so.6+0xd6d83)
#7 0x7f0195241608 in start_thread /build/glibc-ZN95T4/glibc-2.31/nptl/pthread_create.c:477
#8 0x7f0195390292 in __clone (/lib/x86_64-linux-gnu/libc.so.6+0x122292)
SUMMARY: AddressSanitizer: stack-overflow /home/julio/eclipse-workspace-new/SLIDE/src/Degradation.cpp:90 in Calendar_one(Model const&, DEG_ID const&, int, int, double, double, int, int, int, int, checkUpProcedure, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)
Thread T1 created by T0 here:
#0 0x7f01957e5805 in pthread_create (/lib/x86_64-linux-gnu/libasan.so.5+0x3a805)
#1 0x7f01956a1048 in std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) (/lib/x86_64-linux-gnu/libstdc++.so.6+0xd7048)
#2 0x5640906aaa7b in CalendarAgeig(Model const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, DEG_ID const&, int, int) /home/julio/eclipse-workspace-new/SLIDE/src/Degradation.cpp:967
#3 0x5640906824e6 in main /home/julio/eclipse-workspace-new/SLIDE/src/main.cpp:187
#4 0x7f01952950b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)
==11157==ABORTING
1 2
|
julio@julio:~/eclipse-workspace-new/SLIDE/build/default$ ulimit
unlimited
|