Thanks, but probably I was not clear when I explained my problem, or maybe I don't understand what You meant.
I need to execute a code on some networked computers. So, reading the documentation of Mozart I found that the class Search.parallel makes the "simple" (with simple I mean a functor to be executed on a single machine) code running on multiple computers on a network just adding these lines:
 
E = {New Search.parallel init(plm03:1#ssh plm04:1#ssh)}
{E trace(true)}
Xs = {E all(Fractions $)}
 
In fact, when I tried to execute the code (in a functor as explained in the section "Search parallel engines" of documentation), on networked computers from OPI within Emacs, the execution terminated with a correct result and thanks to "trace" I saw that all computers had explored some nodes of the search tree.
 
But now I need to execute the code from command line because I have to leave running it in background. So, if I understood well, first I have to compile the code, then I have to run it with ozengine. But the code is not compiled even importing approriate modules such as Search and others. 
 
I also download the mosh shell, but how can I execute within it a functor in background?
 
Thanks in advance to all for answers.
 
Best regards.
 
LC
 
 


 
2006/2/23, Christian Schulte <[EMAIL PROTECTED]>:
Oh I see: What I meant is you have to make a functor for your entire program
not for the script to be solved. There you need to import Search. Check the
docs (Application Programming) for details and easy -to-get-started
examples.

Christian


--
Christian Schulte, http://www.imit.kth.se/~schulte/
-----Original Message-----
From: Lucia Cambise [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 23, 2006 3:30 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: question: execution parallel code on cmd line


THANKS.

Excuse me, but unfortunately, I have tried to import the Search class but
there are still errors:

1) Search not introduced
2) Statement at express. position (corresponding to last line of code)

The functor (with appropriate import clause) works well on a single machine
(that is without the last three lines that
refer to parallel execution). The parallel code from OPI works well (making
some changes) but I need to execute it from command line.

I don't know if I make other mistakes, but, I do not find them.
For this reason I would ask if anyone could tell me some suggestions.

Thanks in advance to all.

LC


2006/2/22, Christian Schulte <[EMAIL PROTECTED]>:
Just add appropriate import clauses to yur functor (such as import Search).
CS


--
Christian Schulte, http://web.imit.kth.se/~schulte/



-----Original Message-----
From: [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED]] On
Behalf Of Lucia Cambise
Sent: Wednesday, February 22, 2006 3:07 PM
To: [EMAIL PROTECTED]
Subject: question: execution parallel code on cmd line


Hi everyone!

I am trying to execute this code available with the documentation of Mozart:


declare

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

E = {New Search.parallel init(plm03:1#ssh plm04:1#ssh)}
{E trace(true)}
Xs = {E all(Fractions $)}

but when compiling from shell I have errors like "Search not introduced".
I have already executed the sequential code (on a single machine without
using the class Search.parallel) and the result is ok.
I've also tried to include the last three lines in the clause "define-end"
but there are still some errors.
Obviously, I make some mistakes in the definition of the functor, but I
haven't got the solution yet.
So, I would ask if anyone could help me with some suggestions about these
errors. Thanks a lot to all.

Best regards.

Lucia Cambise


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

Reply via email to