[gecode-users] Distributing computation on more processors

Guido Tack tack at ps.uni-sb.de
Wed Nov 30 11:37:42 CET 2005


Hello!

> I have a question about distributing of computation on more processors. In
> principle I should only need to give some part of the search-tree (i.e.
> space with respective variables domains and constraints) to some other
> processor. Exists some functionality in gecode, that can do it, or help
> with it? It is possible to do it myself if exists no functionality in
> gecode?

We have a student working on a parallel search engine for shared-memory 
multi-processor machines. So in principle, it is possible ;-)

The question is how the communication is supposed to happen. If you go for 
network communication, similar to the distributed search engines in Mozart, 
everything is very easy. The Mozart scheme directly carries over to Gecode, 
and in fact we have built a distributed search engine for Alice/Gecode.

If you want to use shared memory for communication, things get a little more 
difficult: you must use something like posix threads for the "workers" and 
make sure that the whole library is thread-safe. Gecode itself is not 
thread-safe, but it can be used in a thread-safe way: every time you clone a 
space, you can specify with an additional Boolean argument whether a 
"shallow" or a "deep" copy should be made. A deep copy really copies 
everything, creating a completely independent space that can safely be used 
by another thread. A shallow copy may preserve sharing of some data 
structures, so these copies must not be used in another thread.

Cheers,
	Guido

-- 
Guido Tack
Programming Systems Lab, Saarland University, Saarbrücken
http://www.ps.uni-sb.de/~tack




More information about the gecode-users mailing list