Re: Parallel CM problem?
Matthias Blume <[email protected]> Mon, 12 Feb 2007 15:25:06 -0600
| Newsgroups | gmane.comp.lang.sml.smlnj |
|---|---|
| Message-ID | <[email protected]> |
Hi Geoff,
I finally got around to looking into this. Indeed, there seems to be
a problem, although I have not yet gotten to the bottom of it at this
point. (In my test run I saw an even "scarier" effect, indicating
that some internal data structure invariants got violated.)
My current guess is that the "master" process (i.e., the one you
communicate with via the command line) does not properly re-execute
affected compilation units and/or fails to update the dynamic
environment. This would explain that you don't see the changes
you were making, and it would also account for the error messages
that I was seeing here.
I will try to investigate further.
In the meantime, I should warn that the parallel make facility does
not seem to pay for its own weight in most cases. In particular, I
think that using more than 2 servers on SMP machines are hardly worth
the trouble. Spreading things across networked machines almost always
loses more than it wins. The whole thing has been very low priority for
me, since nobody seemed to be using it. You are the first to complain
in earnest. To be honest, my own testing had been confined to
the example of recompiling SML/NJ -- where, by definition, there is no
issue with the dynamic environment because the bootstrap compiler
uses a separate link step. So I never noticed the existing problem.
Matthias
On Feb 1, 2007, at 7:51 PM, Geoffrey Alan Washburn wrote:
> I wrote the following little "build" program based upon my reading of
> the Compilation Manager manual
>
> (*************************************************)
>
> (* Attach CM slave processes on the local machine *)
>
> val smlBin = "..."
>
> fun startServer sname =
> CM.Server.start { name = sname,
> pathtrans = NONE,
> pref = 0,
> cmd = (smlBin, ["@CMslave"]) }
>
> val s1 = startServer "Server 1"
> val s2 = startServer "Server 2"
> val s3 = startServer "Server 3"
> val s4 = startServer "Server 4"
>
> fun build () = CM.make "sources.cm"
>
> (*************************************************)
>
> I then run this via "build.sml" and go on using "build()". The
> messages
> that are printed seem to indeed indicate that Servers 1 through 4 are
> apparently compiling my code, but the changes that I expect do not
> seem
> to be visible from the SML/NJ top-level loop.
>
> - CM.make "sources.cm";
> [scanning sources.cm]
> [scanning (sources.cm):common/sources.cm]
> [parsing (sources.cm):source/inference-patexp.sml]
> [scanning (sources.cm):ml-lpt/lib/ml-lpt-lib.cm]
> [parsing (sources.cm):informl.sml]
> [(Server 3): compiling sources.cm:source/inference-patexp.sml]
> source/inference-patexp.sml:674.14-682.3 Warning: match nonexhaustive
> ((FunBinder (_,tvks,ps,SOME <pat>,e,polyrec),
> (_,ft)),idts) => ...
>
> [receiving (sources.cm):source/inference-patexp.sml]
> [code: 154473, data: 2073, env: 25312 bytes]
> [(Server 3): compiling sources.cm:informl.sml]
> [receiving (sources.cm):informl.sml]
> [code: 7299, data: 315, env: 52 bytes]
> [New bindings added.]
> val it = true : bool
> - (* The structure InforML at this point does not reflect the
> changes I have made in informl.sml *)
>
> As far as I understand what is said in the manual, after I run the
> above
> code, CM.make should behave as it normally does only with parallel
> compilation. Any ideas on what I'm missing? I'm using SML/NJ 110.61.
>
> Thanks!
>
>
> ----------------------------------------------------------------------
> ---
> Using Tomcat but need to do more? Need to support web services,
> security?
> Get stuff done quickly with pre-integrated technology to make your
> job easier.
> Download IBM WebSphere Application Server v.1.0.1 based on Apache
> Geronimo
> http://sel.as-us.falkag.net/sel?
> cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Smlnj-list mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/smlnj-list
>
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642