Guys,

Just a bunch of information about Mozart and OpenMP/MPI.

OpenMP is an API for doing multithread programming in C/C++ and Fortran. It provides facilities for creating threads (that are run on distinct processors if you are on a multicore architecture), distributing work between threads, and sharing memory (with the ultimate bug-prone model of concurrent programming).

MPI is a language-independent specification and implementation that allows computers to communicate with each other by message passing. It is mostly used on clusters. I don't know whether it works well on internet connections (instead of a LAN like clusters). It can be used to distribute an application among several computers.


Mozart use none of them. We have our own implementation of threads and messaging interface. Mozart threads are much more lightweight and flexible than OpenMP's. Our implementation of distribution can be used to take advantage of multicore machines as well as loosely connected computers on the internet.

The implementation of the parallel search engine is written entirely in Oz, using the distribution of the language. It basically spawns remote processes, that execute a "worker" written in Oz. Every worker explores a given part of the search tree. The main Oz process distributes the parts of the search tree to the workers, and balances the load between them.

The implementation is available in the files in the subdirectory share/cp/par/ of the sources of Mozart. The part that deals with the distribution itself is less than 100 loc. A general explanation can be found in chapter 9 of Christian Schulte's thesis "Programming Constraint Services."


Cheers,
raph

George Rudolph wrote:
Torsten,

I'm also working on getting Mozart to run on a parallel cluster,
but on WindowsXP machines (please, no flames!).
I'm glad you asked that question, because I'd like to know too.

On the subject of MPI, you may already know this, but:

Two de facto standards for parallel processing in C/C++
Are MPI and OpenMP. There are various implementations of the
standards/APIs
available as libraries.

I don't know, but my guess is that Mozart follows/uses neither, but does
it's own management of processing and load-balancing of constraint
spaces,
as with any other distributed Oz application. There are only so many
ways to specify and coordinate parallel, distributed processes--you can
think of parallel search as a particular case of more general
distributed application processing that Mozart supports.

The good news is that if you're running Mozart programs in parallel, you
don't have to rewrite your applications to include parallel primitives.


--------------------
George Rudolph


_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to