[Swift-devel] Re: karajan futures and getfieldvalue/setfieldvalue

Mihael Hategan hategan at mcs.anl.gov
Sun Nov 16 11:13:47 CST 2008


Maybe you're synchronizing on the wrong thing there? I'd try value
instead of value.getRoot().

That's a suspicion. I'll have to check though. Do you have the complete
set of patches?

On Sun, 2008-11-16 at 07:37 +0000, Ben Clifford wrote:
> While playing round with how setfieldvalue works, I came across the 
> following; I don't understand enough about how karajan deals / is meant to 
> deal with futures to see what is going on.
> 
> The attached attach, error.patch, is intended to amend the behaviour of 
> Swift HEAD so that getFieldValue is not used to get an unwrapped 
> (not-in-DSHandle) value to pass into SetFieldValue.
> 
> The attached patch test.patch contains a test, test.swift, which appears 
> to work repeatedly on swift/cog HEAD but fails often on my laptop with 
> error.patch applied (although sometimes works).
> 
> Changing the number of assignment steps in test.swift changes the 
> likelihood that the execution will fail - more steps = higher probability 
> of failure (which makes sense as there is a race to get the circumstances 
> that trigger this).
> 
> It looks like if SetFieldValue throws a FutureNotYetAvailable exception, 
> then this does not have the same behaviour of deferring execution and 
> rerunning later, as when GetFieldValue throws a FutureNotAvailable 
> exception which seems to work ok.
> 
> There is an execution log for a failed log at
> http://www.ci.uchicago.edu/~benc/test-20081116-0133-vr84izb8.log
> 
> (btw When running this test on two different versions, don't forget to 
> force a recompile: touch test.swift && swift test.swift)
> 




More information about the Swift-devel mailing list