The basic idea is that the Oz runtime engine doesn't need a statement but an expression, actually an Oz functor. So if you have a file opi.oz that you can use in the OPI, you need to compile a file comp.oz made like this:

functor $
import Search Application
define
\insert opi.oz
{Application.exit 0}
end

The $ is optional, and of course you can replace the \insert line by the actual content of opi.oz.
You can then compile it with :

ozc -x comp.oz

Cheers,

Yves

Lucia Cambise wrote:

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



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

Reply via email to