Hi Herwig,
Your suggestion doesn't really apply to my problem because the GA and
the minimax are completely separate...The GA runs in a fixed-size thread
pool which I'm in control of so i can easily set how many threads I want
the GA to spawn, so that is solved (at least theoretically!)...Now, with
regards to the parallel minimax I cannot exactly tune the thread-pool
but i can increase the chunking size when folding (currently set to 2)
but that doesn't imply ignoring some cores but rather more workload for
each forking branch...so basically my problem is how to make the
reducers code run on only 6 cores and devote the rest 10 for the GA...as
I said setting the chunking size will only result in more work for each
thread, thus less threads, however since i've got no fixed branching
factor there is no obvious way to tune the chunking size to guarantee
that the algorithm will ignore some of the cores.
for example:
with chunking of 2 and branching factor of 20 reducers will try to use
10 cores yes?
with chunking of 5 and branching factor of 40 reducers will try to use 8
cores yes?
so in essence:
fixed chunking size + not-fixed branching-factor = no way to predict
how many cores will be used at any given time...
Jim
On 21/09/12 08:38, Herwig Hochleitner wrote:
Have you looked into work-stealing algorithms? Fork-Join (of which
reducers can take advantage) implements that. The basic idea is that
you split your work into delays (as in clojure.core/delay, called
Tasks in Fork-Join) where convenient in your algorithm and push them
onto your work queue. You then force the delays later in your
algorithm when, you need the result. Meanwhile other workers have the
opporunity to compute delays from your work queue, so that their
result is already available when you force them.
The net effect can be pretty optimal parallelism.
I don't know if this answers your question precisely, but it might
provide an angle to think about the problem.
kind regards
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient
with your first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en