Hi, etj
There is awesomeness with PDL 2.076 in better utilization of the L1/L2/L3 cache. That is something to be proud of and a moment of celebration. Unfortunately, 2.076 introduces an anomaly. IMHO try storing the $$.$tid somewhere. For PDL to be thread-safety friendly, it is important for cleanup to occur by the originating thread which instantiated the object.
I will update the MCE demonstrations with a user_begin block to work around the issue. This I can do safely, because the piddles are instantiated by the main thread; i.e. $$.tid == $$.0
Update: Looking at the code, MCE workers also form piddles for the Strassen demonstrations. So I cannot do this unless I save/check the thread ID.
user_begin => sub { # PDL 2.076 introduced a regression causing all threads to perform # piddle destruction. PDL cleanup should occur once, preferably by # the thread which instantiated the object. no warnings; sub PDL::DESTROY { 0; } },
Not able to do the above, I want to mention that the strassen_07_t.pl example works fine as is in the repo by removing the line introduced in PDL 2.076.
SvOBJECT_off((SV *)it->sv);
In reply to Re^4: XS module in ithreads Perl much slower in threads::join after adding SvOBJECT_off
by marioroy
in thread XS module in ithreads Perl much slower in threads::join after adding SvOBJECT_off
by etj
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |