On Sat, 2 May 2020 14:10:19 +0200, Dexter Lagan
<dexterla...@gmail.com> wrote:

> I’ve been getting inconsistent results as well. A while ago I made a
>benchmark based on a parallel spectral norm computation. The
>benchmark works fine on Windows on most systems and uses all cores,
>but crashes randomly on other systems. I haven’t been able to figure
>out why. On Linux it doesn’t seem to use more than one core. I’d be
>interested to know if this is related. Here’s the benchmark code :
>
>https://github.com/DexterLagan/benchmark
>
>Dex

I haven't examined the code in detail, but I suspect you're not giving
the futures time to do anything.  Your 'for/par' function touches them
almost immediately, and touching forces a future to be evaluated by
the thread that has touched it.

Also be aware that futures essentially are limited to data access and
math ... in particular if you try to do any kind of I/O within a
future it will force (at least) that future into serial execution.

George

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/i2tuafl9rs29bjlr9i6rb387bdqj02epqg%404ax.com.

Reply via email to