From jan@swi.psy.uva.nl  Wed Aug  9 12:28:15 2000
Received: from gollem.swi.psy.uva.nl (root@gollem [145.18.152.30])
	by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id MAA10297;
	Wed, 9 Aug 2000 12:28:09 +0200 (MET DST)
Received: from localhost (localhost [[UNIX: localhost]])
	by gollem.swi.psy.uva.nl (8.9.3/8.9.3/SuSE Linux 8.9.3-0.1) id MAA20324;
	Wed, 9 Aug 2000 12:28:15 +0200
From: Jan Wielemaker <jan@swi.psy.uva.nl>
Organization: SWI, University of Amsterdam
To: Kourakos-Mavromichalis Evagelos <emav@aegean.gr>,
        "'prolog@swi.psy.uva.nl'" <prolog@swi.psy.uva.nl>
Subject: Re: Parallel execution
Date: Wed, 9 Aug 2000 12:21:08 +0200
X-Mailer: KMail [version 1.0.28]
Content-Type: text/plain
References: <81FBBA8C21B9D311A6E500508B6144AA02B0B8@eupalinos.aegean.gr>
In-Reply-To: <81FBBA8C21B9D311A6E500508B6144AA02B0B8@eupalinos.aegean.gr>
MIME-Version: 1.0
Message-Id: <00080912281504.20043@gollem>
Content-Transfer-Encoding: 8bit

On Sat, 29 Jul 2000, Kourakos-Mavromichalis Evagelos wrote:
>Hello,
>I am working in a project and I want to run (in SWI prolog) two procedures
>in parallel. How I can do that in SWI?

Real paralel execution is provided in the multithreaded version, which
is pretty experimental.  You can build it on systems providing the
POSIX thread library.  It has been tested on Linux and Solaris (2.5
and 2.7).  Do:

	% ./configure --enable-mt
	% make
	% make install

and you'll have a multithreaded version.  To install both versions
in the same tree do:

	% ./configure
	% make
	% make install
	% make distclean
	% ./configure --enable-mt
	% make
	% make install-mt

Now the program pl is the normal version and pl-mt is the multithreaded
version.

Of course, (almost) any problem that can be handled in a multi-threaded
version can also be handled in the single-threaded version with proper
redesign of the program.

For server applications in Unix, consider using the `clib' foreign
library providing the fork primitive.

	Regards --- Jan

