[Openmcl-devel] clozurecl-1.5: maxima-5.20.1 testsuite failures

Gary Byers gb at clozure.com
Thu Apr 22 18:36:50 PDT 2010


Maxima expects the value of *READ-DEFAULT-FLOAT-FORMAT* to be
DOUBLE-FLOAT.  In CCL 1.4 and earlier, simply assigning that value to
that variable during the Maxima build process was enough to ensure
that that (static) binding would persist in a saved image and be seen
in all threads.

As the release notes(<http://trac.clozure.com/ccl/wiki/ReleaseNotes/1.5>) 
mention, I/O control variables are now bound per-thread, so a simple
assignment of the value DOUBLE-FLOAT to *READ-DEFAULT-FLOAT-FORMAT*
only affects the dynamic binding of that variable in the listener
thread; that's part of the dynamic state of that thread, which
generally isn't saved in a heap image.

(Anyone whose eyes are glazing over and who may be thinking "oh no! he's
going to lecture us on special binding semantics again!" can rest easy,
at least this time ...)

A simple workaround is to ensure that Maxima's initial function binds
*READ-DEFAULT-FLOAT-FORMAT* to the expected value before calling 
CL-USER::RUN:

;; in MAXIMA-DUMP:

   #+ccl (ccl:save-application "binary-openmcl/maxima" :toplevel-function
    (lambda () (let* ((*read-default-float-format* 'double-float))
      (cl-user::run))))

With that change in place, Maxima's test suite reports 0 unexpected failures
in CCL 1.5 as well.  (I don't know whether Maxima expects other printer
control variables to have non-default values even if the testsuite doesn't
expose that; if so, it might be wise to bind those variables as well.)

On Fri, 23 Apr 2010, Andrey G. Grozin wrote:

> Hello *,
>
> with clozurecl-1.4, the maxima-5.20.1 testsuite produced 0 unexpected
> errors.
>
> After upgrading to clozurecl-1.5 and re-compiling maxima, I get
[lots of errors, all apparently due to the fact that *READ-DEFAULT-FLOAT-FORMAT*
  has reverted to *SINGLE-FLOAT* in the new thread running in the new image.]



More information about the Openmcl-devel mailing list