Hi,
I have been experimenting with parallel search using the program below.
Using 1.3.2, the program works fine but I've had problems running the
same program in 1.4.0
Running the program with 1 or 2 forked processes for search works fine.
However, when trying it with 3 or more processes, at least one of the
processes does not initialise (you get no id value in the inspector) and
Oz times out with a failure to take ticket error.
Also, and this is very strange, in some of the attempts, when the error
showed up in the emulator buffer and I scrolled up to look at the
terminal output, where you would expect the error message containing
details about the ticket that has not been taken, there were a large
number of ^H (control-H) characters in red between the characters 'ti'
and 'cket'.
I might guess that the first error could be caused by the speed at which
Oz attempts to create the three processes in sequence?
But the second error has absolutely confounded me - I have no idea where
the ^H sequences are coming from.
Just to reiterate, the program works perfectly in 1.3.2 for all the
values I have tried.
Any ideas???
Regards
Mark
declare M E Xs
functor Fractions
import FD
export Script
define
proc {Script Root}
sol(a:A b:B c:C d:D e:E f:F g:G h:H i:I) = Root
BC = {FD.decl}
EF = {FD.decl}
HI = {FD.decl}
in
Root ::: 1#9
{FD.distinct Root}
BC =: 10*B + C
EF =: 10*E + F
HI =: 10*H + I
A*EF*HI + D*BC*HI + G*BC*EF =: BC*EF*HI
{FD.distribute ff Root}
end
end
[M]={Module.apply [Fractions]}
E={New Search.parallel init('mark-laptop':3#sh)}
{Inspect E}
{E trace(true)}
Xs={E all(Fractions $)}
{Browse Xs}
--
Mark Richardson
Final year undergraduate
University of Teesside
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users