On 28, Jun 2007, at 8:44 PM, Jason House wrote:

Darren Cook wrote:
Can MPI be as quick as threads on a 2- or 4-core single
machine?

no, but I think you are worried about something that is such a a small percentage of compute time that I doubt that it is significant for a Go program. I would suggest you use MPI if you already know and like it, and use threads if you already know that. If this is an opportunity to learn, then I'd learn threads for a single multicore machine.

The usage of MPI that I've seen required explicit population of (user-defined) communication structures that get copied in the process of doing an MPI call.

This is true and something we tried to put some wrappers around to simplify, but this underlying fact could not be removed. I think it is a pain that whenever we want to modify the message we have to go down a few layers and tell MPI the number of integers and floats we are going to pass. It led to a few debugging headaches when we started, but we are used to it now. Whenever a struct changes we check to see if it is in any messages.

But SlugGo runs on a cluster of many boxes, so threading is not a choice for us. But once the code uses MPI, it works just fine across the network or in the same CPU.

I really didn't want to manually specify, populate, and then read out data for any given inter-process call. I ended up using delegates / functors for inter-process communication and restricted the bot to threading to keep the work to implement it simple.

Maybe after doing enough multi-threaded programming I'll come to realize that MPI isn't much of a cost and shift my IPC design to use MPI. In the mean time, I'm comforted that allowing slug go support can bridge the gap if needed.


What about if a heavy playout algorithm is using a pattern library too
big to fit in the cores local cache? Would that change the MPI vs.
threads decision?

Not to me.

Cheers,
David

_______________________________________________
computer-go mailing list
computer-go@computer-go.org
http://www.computer-go.org/mailman/listinfo/computer-go/

Reply via email to