Tabard: Multiple GNU Prolog Engines in a Distributed Environment
Tabard provides a way to run multiple GNU Prolog engines in a distributed
environment. The environment can be a cluster of networked
workstations or a set of workstations wide-spread by the Internet. In
fact, these workstations need only to be running Linux and have
ssh/rsh access.
Why?
Although parallel computing has been widely researched, the process of
bringing concurrency and parallel programming to the mainstream has
just begun. By combining a distributed multithreading environment like
PM2 with Prolog, it is possible to exploit concurrency and parallel
computing using the power of logic programming. In the pursuit of such
purpose we developed Tabard, an interface system to PM2. It allows
multithreaded Prolog applications to run in multiple GNU Prolog
engines in a distributed environment, thus taking advantage of the
resources available on a computer network. This is especially useful
for computational intensive problems, where speedup is a factor of
paramount importance. The system API offers thread management
primitives as well as explicit communication routines and
synchronization mechanisms between threads. Preliminary test results
show good speedups when compared to the sequential version of GNU Prolog.
How can I use it?
- You have a Prolog program.
- Include the Tabard library file.
- Compile the program with both the PM2 libraries and the gprolog libraries
linked.
- At this point you have obtained a program binary ready to be launched
with pm2load. Hosts can be configured via the
pm2conf command.
An example Makefile that can be used for compiling such a program can be found here.
Caveats
- There are many situations with the API that can lead to deadlocks.
- The Prolog threads have to receive at least one message during the program execution.
- Thread with rank zero must end with the predicate finish_listeners/0
- If you get the error "poll: protocol failure in circuit setup" then you may need to edit /etc/inetd.conf and increase the number of connections that the shell should take. A reasonable config might be 'nowait.1000'. Check the inetd(8) manpage if you need further info on inetd configuration.
- If you a error message like "syntax error, unexpected LEOP_ID" you probably have forgotten to add some host to your leonie network configuration file. You can set what file to use by setting the environment variable PM2_LEONIE_NETWORK_FILE.
CVS
If you want state of the art information about the project's status, it
is recommended that you take a look at the
CVS repository.
Example Programs
Examples you can test:
Miscellanea
Copyright (C) 2006 Nuno Morgadinho
Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.
$Id: index.html,v 1.2 2006/12/04 18:08:25 nunomorgadinho Exp $