I'm attempting to run parallel search,
following the documentation in section
4.4 of System Modules on Search engines.
I'm finding it incomplete and very confusing.
It doesn't seen to match the other documentation on
functions and distributed programming.
When I enter the following code in the OPI,
I receive the compiler error message below.
Can anyone help?
I'm running on a dual-processor Windows machine
as a test.
I have several questions/observations from section 4.4:
1. The statement "Your scripts do not need rewriting.
They must be wrapped into a functor definition."
seems misleading. You have to figure out what to wrap,
and what to import and export, and how...
2. If I execute the Fractions functor in the OPI as written,
I get an error about "Fractions" not being a defined variable.
If I leave it off, I get some other error.
3. Is there anything I have to pickle or configure, beyond
having Mozart installed (with typical env variables set)
on all machines in the cluster?
That's not clear from this section.
--------------- code -----------
functor
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
E={New Search.parallel init(192.168.2.3:2)}
Xs={E all(Fractions $)}
-------- end code ---------------------
---------compiler error--------------
%*************************** parse error ************************
%**
%** expecting `)'
%**
%** in file "c:/work/Fraction.oz", line 21, column 39
%** ------------------ rejected (1 error)
--------- end error -------------------
Thanks!
George Rudolph
Assistant Professor of Computer Science
TH 225
Department of Mathematics and Computer Science
The Citadel
Charleston, SC 29409
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users