View Single Post
Old 4th June 2010, 12:50   #14  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,391
@ tritical - thanks, I see. (Hope so, at least).

Let me ask the other way round: IF a script involves decimation via tdecimate, what would be promising approaches to make use of multi-threading? Any? Or not at all, necessarily?


Gavino, jpsdr -
I might be a novice with MT, but I'm not silly. Of course I did not do TGMC().threadrequest(). Surely it was fiddled into the script, but ... problems.

Practical example and problem: Consider this quite-familiar piece of code:
Code:
o = bob(0,0.5)                                 #.threadrequest(10,5,2) 
					       #			      
o.temporalsoften(1,255,255,28,2).merge(o,0.25) #.threadrequest(10,5,2) 
					       #			      
sup = msuper()                                 #.synchronize(80)	      
bv3 = sup.manalyse(isb=true,delta=3,search=4)  #.threadrequest(10,5,2) 
bv2 = sup.manalyse(isb=true,delta=2,search=4)  #.threadrequest(10,5,2) 
bv1 = sup.manalyse(isb=true,delta=1,search=4)  #.threadrequest(10,5,2) 
fv1 = sup.manalyse(isb=false,delta=1,search=4) #.threadrequest(10,5,2) 
fv2 = sup.manalyse(isb=false,delta=2,search=4) #.threadrequest(10,5,2) 
fv3 = sup.manalyse(isb=false,delta=3,search=4) #.threadrequest(10,5,2) 
					       #			      
o.mdegrain3(sup,bv1,fv1,bv2,fv2,bv3,fv3)       #.threadrequest(10,5,2)
Challenge: Use ThreadRequest within this little script, so that it actually works.

I added TR to some lines, I added it to all lines, with default parameters, with larger-than-default parameters, also with synchronize in various places .... my clueless try is shown right of the # column.

All I get is crashes after a few frames. It seems to get better when adding Synchronize(xx) to the sup=msuper() line - with that, it won't crash after just a view frames, but will crash after a few hundred frames.

Seems its quite some hassle to get it right ...

(... while SetMTMode runs out-of-the-box on this example. And for the time while the ThreadRequest'ed script IS running, it is slower than SetMTmode (66fps vs. 72fps).
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)

Last edited by Didée; 4th June 2010 at 12:53.
Didée is offline   Reply With Quote