maths / stack_util_maximapool

Pooling solution for starting up maxima processes so that moodle-qtype_stack does not need to wait.
10 stars 14 forks source link

Installation problems #17

Closed felopla closed 8 years ago

felopla commented 8 years ago

Hello friends,

We would like to implement Maxima Pool.

We have 2 servers: 1- Moodle server with plugin Stack installed 2- Server with Maxima installed

In the second one, we had installed stack_util_maximapool following the steps in the webpage, but we had problems when we ran the checktest.

We got maximalocal.mac from STACK in the Moodle server. Then we "strip" (comment) the final line load("stackmaxima.mac")$. And finally, we modified the settings in maximapool.conf to load the correct file.

When we ran the healcheck, this doesn't work good, and it gets stuck in %i2.

2015-12-28

We don't know what is it wrong. Can you help us and guide a little, please? What are we doing wrong?

Thanks in advance for your help.

Kind regards Felipe López P.

aharjula commented 8 years ago

Well, do tell me why you stripped the load("stackmaxima.mac") bit? Did you build your own memory image that has that library preloaded, if so the command you are using for starting the Maxima process is surely wrong? Also how current is your STACK install, the newer versions have slightly different looking maximalocal.mac?

Obviously the bit about the optimised maxima setup in the guide is bad, I would guess the writer to that never tried it. It does not include anything about setting the command, do check this for the command bit.

Maybe you could show the output of the health checks (the pool sides not the STACK one) so we see what it is actually outputting?

felopla commented 8 years ago

Hi Matti, in first place, I want to thank you for your help.

We also tried with load("stackmaxima.mac"), but the we had other errors. We got this file, in Moodle Server, specifically in the following path: /home/adm_av_moodle/moodle/question/type/stack/stack/maxima/

We compiled Maxima 5.36.0, and it started fine in the healtcheck. I attach the outputting for you can see what appear:

2016-02-29

2016-02-29 -2

I remain attentive to any question or comment that you have. Thanks again for your help!

Kind regards Felipe López P.

aharjula commented 8 years ago

The second picture tells us that the file_search... paths defined in the beginning of maximalocal.mac do not work. Check that they point to STACKs scripts (the contents of /question/type/stack/stack/maxima/ i.e. the directory with assessment.mac) and that Tomcat can read those files.

Often the simplest method is to copy that entire script directory (/question/type/stack/stack/maxima/) to the same place you have your maximalocal.mac on the Tomcat server and then map all the paths defined in maximalocal.mac to that new location. Just remember to update the scripts on the Pool server when you update your STACK install.

felopla commented 8 years ago

Dear Matti,

Before we did it you told us. We put a directory with all the contents, but still got it errors. Now I made the test again and I ran the "ant" again.
"Works", but still have "problems". I attach the output:

Trying to start a Maxima process.

Executing command-line: /usr/local/bin/maxima

Waiting for target text: (%i1)

Maxima 5.36.0 http://maxima.sourceforge.net
using Lisp SBCL 1.0.11
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) 
Sending command:

load("/var/lib/tomcat6/webapps/maximalocal.mac");
Waiting for target text: STACK-Maxima started

Trying to start a Maxima process.

Executing command-line: /usr/local/bin/maxima

Waiting for target text: (%i1)

Maxima 5.36.0 http://maxima.sourceforge.net
using Lisp SBCL 1.0.11
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) 
Sending command:

load("/var/lib/tomcat6/webapps/maximalocal.mac");
Waiting for target text: STACK-Maxima started

STYLE-WARNING: redefining $EVAL_STRING in DEFUN
STYLE-WARNING: redefining $PARSE_STRING in DEFUN
STYLE-WARNING: redefining PARSE-STRING in DEFUN
STYLE-WARNING: redefining ENSURE-TERMINATOR in DEFUN
; in: LAMBDA NIL
;     (MAP-INTO MAXIMA::RESULT #'- MAXIMA::M1 MAXIMA::M2)
; --> DO BLOCK LET TAGBODY TAGBODY LET LOCALLY SETF SB-KERNEL:%ASET 
; ==>
;   (SB-KERNEL:HAIRY-DATA-VECTOR-SET ARRAY SB-INT:INDEX SB-C::NEW-VALUE)
; 
; note: doing signed word to integer coercion (cost 20), for:
;       the first argument of CHECK-FIXNUM
; in: LAMBDA NIL
;     (MAP-INTO MAXIMA::RESULT #'+ MAXIMA::M1 MAXIMA::M2)
; --> DO BLOCK LET TAGBODY TAGBODY LET LOCALLY SETF SB-KERNEL:%ASET 
; ==>
;   (SB-KERNEL:HAIRY-DATA-VECTOR-SET ARRAY SB-INT:INDEX SB-C::NEW-VALUE)
; 
; note: doing signed word to integer coercion (cost 20), for:
;       the first argument of CHECK-FIXNUM
; in: LAMBDA NIL
;     (DO ((MAXIMA::I (1- MAXIMA::END) (1- MAXIMA::I)))
;       ((< MAXIMA::I MAXIMA::START) (VALUES NIL T))
;     (DECLARE (TYPE FIXNUM MAXIMA::I))
;     (COND
;      ((< (MAXIMA::MONOM-ELT MAXIMA::P MAXIMA::I)
;          (MAXIMA::MONOM-ELT MAXIMA::Q MAXIMA::I))
;       (RETURN-FROM MAXIMA::REVLEX> (VALUES T NIL)))
;      ((> (MAXIMA::MONOM-ELT MAXIMA::P MAXIMA::I)
;          (MAXIMA::MONOM-ELT MAXIMA::Q MAXIMA::I))
;       (RETURN-FROM MAXIMA::REVLEX> (VALUES NIL NIL)))))
; --> BLOCK 
; ==>
;   (LET ((MAXIMA::I (1- MAXIMA::END)))
;     (DECLARE (TYPE FIXNUM MAXIMA::I))
;     (TAGBODY
;       (GO #:G1)
;      #:G0
;       (TAGBODY (COND (# #) (# #)))
;       (PSETQ MAXIMA::I (1- MAXIMA::I))
;      #:G1
;       (UNLESS (< MAXIMA::I MAXIMA::START) (GO #:G0))
;       (RETURN-FROM NIL (PROGN (VALUES NIL T)))))
; 
; note: doing signed word to integer coercion (cost 20), for:
;       the first argument of CHECK-FIXNUM
; in: LAMBDA NIL
;     (DO ((MAXIMA::I (1- MAXIMA::END) (1- MAXIMA::I)))
;       ((< MAXIMA::I MAXIMA::START) (VALUES NIL T))
;     (DECLARE (TYPE FIXNUM MAXIMA::I))
;     (COND
;      ((> (MAXIMA::MONOM-ELT MAXIMA::P MAXIMA::I)
;          (MAXIMA::MONOM-ELT MAXIMA::Q MAXIMA::I))
;       (RETURN-FROM MAXIMA::INVLEX> (VALUES T NIL)))
;      ((< (MAXIMA::MONOM-ELT MAXIMA::P MAXIMA::I)
;          (MAXIMA::MONOM-ELT MAXIMA::Q MAXIMA::I))
;       (RETURN-FROM MAXIMA::INVLEX> (VALUES NIL NIL)))))
; --> BLOCK 
; ==>
;   (LET ((MAXIMA::I (1- MAXIMA::END)))
;     (DECLARE (TYPE FIXNUM MAXIMA::I))
;     (TAGBODY
;       (GO #:G1)
;      #:G0
;       (TAGBODY (COND (# #) (# #)))
;       (PSETQ MAXIMA::I (1- MAXIMA::I))
;      #:G1
;       (UNLESS (< MAXIMA::I MAXIMA::START) (GO #:G0))
;       (RETURN-FROM NIL (PROGN (VALUES NIL T)))))
; 
; note: doing signed word to integer coercion (cost 20), for:
;       the first argument of CHECK-FIXNUM
; in: LAMBDA NIL
;     (FUNCALL MAXIMA::ELEMENT-KEY MAXIMA::Y)
; --> SB-C::%FUNCALL THE 
; ==>
;   (SB-KERNEL:%COERCE-CALLABLE-TO-FUN FUNCTION)
; 
; note: unable to
;   optimize away possible call to FDEFINITION at runtime
; due to type uncertainty:
;   The first argument is a (OR FUNCTION SYMBOL), not a FUNCTION.

;     (FUNCALL MAXIMA::ELEMENT-KEY MAXIMA::X)
; --> SB-C::%FUNCALL THE 
; ==>
;   (SB-KERNEL:%COERCE-CALLABLE-TO-FUN FUNCTION)
; 
; note: unable to
;   optimize away possible call to FDEFINITION at runtime
; due to type uncertainty:
;   The first argument is a (OR FUNCTION SYMBOL), not a FUNCTION.

;     (FUNCALL MAXIMA::TEST (FUNCALL MAXIMA::ELEMENT-KEY MAXIMA::Y)
;            (FUNCALL MAXIMA::ELEMENT-KEY MAXIMA::X))
; --> SB-C::%FUNCALL THE 
; ==>
;   (SB-KERNEL:%COERCE-CALLABLE-TO-FUN FUNCTION)
; 
; note: unable to
;   optimize away possible call to FDEFINITION at runtime
; due to type uncertainty:
;   The first argument is a (OR FUNCTION SYMBOL), not a FUNCTION.
; in: LAMBDA NIL
;     (AREF MAXIMA::A MAXIMA::K)
; ==>
;   (SB-KERNEL:HAIRY-DATA-VECTOR-REF/CHECK-BOUNDS ARRAY SB-INT:INDEX)
; 
; note: unable to
;   optimize
; because:
;   Upgraded element type of array is not known at compile time.

;     (AREF MAXIMA::A MAXIMA::PARENT)
; ==>
;   (SB-KERNEL:HAIRY-DATA-VECTOR-REF/CHECK-BOUNDS ARRAY SB-INT:INDEX)
; 
; note: unable to
;   optimize
; because:
;   Upgraded element type of array is not known at compile time.
;     (FUNCALL MAXIMA::TEST (AREF MAXIMA::A MAXIMA::PARENT) MAXIMA::V)
; --> SB-C::%FUNCALL THE 
; ==>
;   (SB-KERNEL:%COERCE-CALLABLE-TO-FUN FUNCTION)
; 
; note: unable to
;   optimize away possible call to FDEFINITION at runtime
; due to type uncertainty:
;   The first argument is a (OR FUNCTION SYMBOL), not a FUNCTION.

;     (SETF (AREF MAXIMA::A MAXIMA::K) MAXIMA::V)
; --> SB-KERNEL:%ASET 
; ==>
;   (SB-KERNEL:HAIRY-DATA-VECTOR-SET/CHECK-BOUNDS ARRAY SB-INT:INDEX
;                                                 SB-C::NEW-VALUE)
; 
; note: unable to
;   optimize
; because:
;   Upgraded element type of array is not known at compile time.

;     (AREF MAXIMA::A MAXIMA::PARENT)
; ==>
;   (SB-KERNEL:HAIRY-DATA-VECTOR-REF/CHECK-BOUNDS ARRAY SB-INT:INDEX)
; 
; note: unable to
;   optimize
; because:
;   Upgraded element type of array is not known at compile time.

;     (SETF (AREF MAXIMA::A MAXIMA::K)
;           (AREF MAXIMA::A MAXIMA::PARENT)
;         MAXIMA::K
;           MAXIMA::PARENT)
; --> PROGN SETF
 SB-KERNEL:%ASET 
; ==>
;   (SB-KERNEL:HAIRY-DATA-VECTOR-SET/CHECK-BOUNDS ARRAY SB-INT:INDEX
;                                                 SB-C::NEW-VALUE)
; 
; note: unable to
;   optimize
; because:
;   Upgraded element type of array is not known at compile time.
; in: LAMBDA NIL
;     (AREF MAXIMA::A MAXIMA::K)
; ==>
;   (SB-KERNEL:HAIRY-DATA-VECTOR-REF/CHECK-BOUNDS ARRAY SB-INT:INDEX)
; 
; note: unable to
;   optimize
; because:
;   Upgraded element type of array is not known at compile time.

;     (AREF MAXIMA::A (1+ MAXIMA::J))
; ==>
;   (SB-KERNEL:HAIRY-DATA-VECTOR-REF/CHECK-BOUNDS ARRAY SB-INT:INDEX)
; 
; note: unable to
;   optimize
; because:
;   Upgraded element type of array is not known at compile time.

;     (AREF MAXIMA::A MAXIMA::J)
; ==>
;   (SB-KERNEL:HAIRY-DATA-VECTOR-REF/CHECK-BOUNDS ARRAY SB-INT:INDEX)
; 
; note: unable to
;   optimize
; because:
;   Upgraded element type of array is not known at compile time.

;     (FUNCALL MAXIMA::TEST (AREF MAXIMA::A (1+ MAXIMA::J))
;            (AREF MAXIMA::A MAXIMA::J))
; --> SB-C::%FUNCALL THE 
; ==>
;   (SB-KERNEL:%COERCE-CALLABLE-TO-FUN FUNCTION)
; 
; note: unable to
;   optimize away possible call to FDEFINITION at runtime
; due to type uncertainty:
;   The first argument is a (OR FUNCTION SYMBOL), not 
a FUNCTION.

;     (AREF MAXIMA::A MAXIMA::J)
; ==>
;   (SB-KERNEL:HAIRY-DATA-VECTOR-REF/CHECK-BOUNDS ARRAY SB-INT:INDEX)
; 
; note: unable to
;   optimize
; because:
;   Upgraded element type of array is not known at compile time.

;     (FUNCALL MAXIMA::TEST (AREF MAXIMA::A MAXIMA::J) MAXIMA::V)
; --> SB-C::%FUNCALL THE 
; ==>
;   (SB-KERNEL:%COERCE-CALLABLE-TO-FUN FUNCTION)
; 
; note: unable to
;   optimize away possible call to FDEFINITION at runtime
; due to type uncertainty:
;   The first argument is a (OR FUNCTION SYMBOL), not a FUNCTION.

;     (SETF (AREF MAXIMA::A MAXIMA::K) MAXIMA::V)
; --> SB-KERNEL:%ASET 
; ==>
;   (SB-KERNEL:HAIRY-DATA-VECTOR-SET/CHECK-BOUNDS ARRAY SB-INT:INDEX
;                                                 SB-C::NEW-VALUE)
; 
; note: unable to
;   optimize
; because:
;   Upgraded element type of array is not known at compile time.

;     (AREF MAXIMA::A MAXIMA::J)
; ==>
;   (SB-KERNEL:HAIRY-DATA-VECTOR-REF/CHECK-BOUNDS ARRAY SB-INT:INDEX)
; 
; note: unable to
;   optimize
; 
because:
;   Upgraded element type of array is not known at compile time.

;     (SETF (AREF MAXIMA::A MAXIMA::K)
;           (AREF MAXIMA::A MAXIMA::J)
;         MAXIMA::K
;           MAXIMA::J)
; --> PROGN SETF SB-KERNEL:%ASET 
; ==>
;   (SB-KERNEL:HAIRY-DATA-VECTOR-SET/CHECK-BOUNDS ARRAY SB-INT:INDEX
;                                                 SB-C::NEW-VALUE)
; 
; note: unable to
;   optimize
; because:
;   Upgraded element type of array is not known at compile time.
; in: LAMBDA NIL
;     (AREF MAXIMA::A 1)
; ==>
;   (SB-KERNEL:HAIRY-DATA-VECTOR-REF/CHECK-BOUNDS ARRAY SB-INT:INDEX)
; 
; note: unable to
;   optimize
; because:
;   Upgraded element type of array is not known at compile time.

;     (SETF (AREF MAXIMA::A 1) (VECTOR-POP MAXIMA::A))
; --> SB-KERNEL:%ASET 
; ==>
;   (SB-KERNEL:HAIRY-DATA-VECTOR-SET/CHECK-BOUNDS ARRAY SB-INT:INDEX
;                                                 SB-C::NEW-VALUE)
; 
; note: unable to
;   optimize
; because:
;   Upgraded element type of array is not known at compile time.
; in: LAMBDA NIL
;     (/ MAXIMA::X MAXIMA::C)
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a NUMBER, not a RATIONAL.
;   The second argument is a NUMBER, not a COMMON-LISP:FLOAT.
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a NUMBER, not a COMMON-LISP:FLOAT.
;   The second argument is a NUMBER, not a RATIONAL.
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a NUMBER, not a SINGLE-FLOAT.
;   The second argument is a NUMBER, not a DOUBLE-FLOAT.
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a NUMBER, not a DOUBLE-FLOAT.
;   The second argument is a NUMBER, not a SINGLE-FLOAT.
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a NUMBER, not a (COMPLEX SINGLE-FLOAT).
;   The second argument is a NUMBER, not a (COMPLEX SINGLE-FLOAT).
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument i
s a NUMBER, not a (COMPLEX SINGLE-FLOAT).
;   The second argument is a NUMBER, not a REAL.
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a NUMBER, not a (COMPLEX DOUBLE-FLOAT).
;   The second argument is a NUMBER, not a (COMPLEX DOUBLE-FLOAT).
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a NUMBER, not a (COMPLEX DOUBLE-FLOAT).
;   The second argument is a NUMBER, not a REAL.
; 
; note: unable to
;   convert x/2^k to shift
; due to type uncertainty:
;   The first argument is a NUMBER, not a INTEGER.
;   The second argument is a NUMBER, not a INTEGER.

;     (/ MAXIMA::Y MAXIMA::C)
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a NUMBER, not a RATIONAL.
;   The second argument is a NUMBER, not a COMMON-LISP:FLOAT.
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a NUMBER, not a COMMON-LISP:FLOAT.
;   The second argument is a NUMBER, not a RATIONAL.
; 
;
 note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a NUMBER, not a SINGLE-FLOAT.
;   The second argument is a NUMBER, not a DOUBLE-FLOAT.
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a NUMBER, not a DOUBLE-FLOAT.
;   The second argument is a NUMBER, not a SINGLE-FLOAT.
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a NUMBER, not a (COMPLEX SINGLE-FLOAT).
;   The second argument is a NUMBER, not a (COMPLEX SINGLE-FLOAT).
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a NUMBER, not a (COMPLEX SINGLE-FLOAT).
;   The second argument is a NUMBER, not a REAL.
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a NUMBER, not a (COMPLEX DOUBLE-FLOAT).
;   The second argument is a NUMBER, not a (COMPLEX DOUBLE-FLOAT).
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a NUMBER, not a (COMPLEX DOUB
LE-FLOAT).
;   The second argument is a NUMBER, not a REAL.
; 
; note: unable to
;   convert x/2^k to shift
; due to type uncertainty:
;   The first argument is a NUMBER, not a INTEGER.
;   The second argument is a NUMBER, not a INTEGER.

;     (/ MAXIMA::X MAXIMA::C)
; 
; note: forced to do static-fun Two-arg-/ (cost 53)
;       unable to do inline float arithmetic (cost 12) because:
;       The first argument is a T, not a SINGLE-FLOAT.
;       The second argument is a T, not a SINGLE-FLOAT.
;       The result is a (VALUES NUMBER &OPTIONAL), not a (VALUES SINGLE-FLOAT
;                                                                &REST T).
;       unable to do inline float arithmetic (cost 19) because:
;       The first argument is a T, not a DOUBLE-FLOAT.
;       The second argument is a T, not a DOUBLE-FLOAT.
;       The result is a (VALUES NUMBER &OPTIONAL), not a (VALUES DOUBLE-FLOAT
;                                                                &REST T).

;     (/ MAXIMA::Y MAXIMA::C)
; 
; note: forced to do static-fun Two-arg-/ (cost 53)
;       unable to do inline float arithmetic (cost 12) because:
;       The first argument is a T, not a SINGLE-FLOAT.
;       The second argument is a NUMBER, not a SINGLE-FLOAT.
;       The result is a (VALUES NUMBER &OPTIONAL), not a (VALUES SINGLE-FLOAT
;                                                                &REST T).
;       unable to do inline float arithmetic (cost 19) because:
;       The first argument is a T, not a DOUBLE-FLOAT.
;       The second argument is a NUMBER, not a DOUBLE-FLOAT.
;       The result is a (VALUES NUMBER &OPTIONAL), not a (VALUES DOUBLE-FLOAT
;                                                                &REST T).
; in: LAMBDA NIL
;     (INCF (MAXIMA::MONOM-ELT MAXIMA::MONOM MAXIMA::POS) MAXIMA::POWER)
; --> LET* SB-KERNEL:%SETELT SB-KERNEL:%ASET 
; ==>
;   (SB-KERNEL:HAIRY-DATA-VECTOR-SET/CHECK-BOUNDS ARRAY SB-INT:INDEX
;                                                 SB-C::NEW-VALUE)
; 
; note: doing signed word to integer coercion (cost 20), for:
;       the first argument of CHECK-FIXNUM
; in: LAMBDA NIL
;     (MAX MAXIMA::SUGAR (MAXIMA::TERM-SUGAR MAXIMA::TERM))
; --> LET LET IF >= OR LET IF OR = IF 
; ==>
;   (= SB-C::X SB-C::Y)
; 
; note: unable to open code because: The operands might not be the same type.

; --> LET LET IF >= OR LET > IF 
; ==>
;   (> SB-C::X SB-C::Y)
; 
; note: forced to do GENERIC-> (cost 10)
;       unable to do inline fixnum comparison (cost 4) because:
;       The second argument is a REAL, not a FIXNUM.
; in: LAMBDA NIL
;     (MAXIMA::MONOM-MUL (MAXIMA::TERM-MONOM MAXIMA::TERM1)
;                      (MAXIMA::TERM-MONOM MAXIMA::TERM2))
; --> BLOCK MAP-INTO DO BLOCK LET TAGBODY TAGBODY LET LOCALLY SETF 
; --> SB-KERNEL:%ASET 
; ==>
;   (SB-KERNEL:HAIRY-DATA-VECTOR-SET ARRAY SB-INT:INDEX SB-C::NEW-VALUE)
; 
; note: doing signed word to integer coercion (cost 20), for:
;       the first argument of CHECK-FIXNUM
; in: LAMBDA NIL
;     (MAXIMA::MONOM-MUL MAXIMA::M (MAXIMA::TERM-MONOM MAXIMA::TERM))
; --> BLOCK MAP-INTO DO BLOCK LET TAGBODY TAGBODY LET LOCALLY SETF 
; --> SB-KERNEL:%ASET 
; ==>
;   (SB-KERNEL:HAIRY-DATA-VECTOR-SET ARRAY SB-INT:INDEX SB-C::NEW-VALUE)
; 
; note: doing signed word to integer coercion (cost 20), for:
;       the first argument of CHECK-FIXNUM
; in: LAMBDA NIL
;     (DO ((MAXIMA::K 1 (ASH MAXIMA::K 1))
;        (MAXIMA::Q MAXIMA::POLY
;                   (MAXIMA::TERMLIST-MUL MAXIMA::RING MAXIMA::Q MAXIMA::Q))
;        (MAXIMA::P (MAXIMA::TERMLIST-UNIT MAXIMA::RING MAXIMA::DIM)
;                   (IF (NOT #)
;                       (MAXIMA::TERMLIST-MUL MAXIMA::RING MAXIMA::P MAXIMA::Q)
;                       MAXIMA::P)))
;       ((> MAXIMA::K MAXIMA::N) MAXIMA::P)
;     (DECLARE (FIXNUM MAXIMA::K)))
; --> BLOCK LET TAGBODY PSETQ PSETF LET* MULTIPLE-VALUE-BIND LET LET* 
; --> MULTIPLE-VALUE-BIND LET LET* MULTIPLE-VALUE-BIND LET PROGN SETQ 
; ==>
;   (THE # #:G2)
; 
; note: doing signed word to integer coercion (cost 20), for:
;       the first argument of CHECK-FIXNUM
; in: LAMBDA NIL
;     (MAXIMA::MAKE-POLY-FROM-TERMLIST
;    (MAXIMA::MONOM-TIMES-TERMLIST MAXIMA::M (MAXIMA::POLY-TERMLIST MAXIMA::P))
;    (+ (MAXIMA::POLY-SUGAR MAXIMA::P) (MAXIMA::MONOM-SUGAR MAXIMA::M)))
; 
; note: doing signed word to integer coercion (cost 20)
; in: LAMBDA NIL
;     (+ (MAXIMA::POLY-SUGAR MAXIMA::P) (MAXIMA::TERM-SUGAR MAXIMA::TERM))
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The second argument is a NUMBER, not a COMMON-LISP:FLOAT.
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The second argument is a NUMBER, not a (COMPLEX SINGLE-FLOAT).
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The second argument is a NUMBER, not a (COMPLEX DOUBLE-FLOAT).
; 
; note: forced to do GENERIC-+ (cost 10)
;       unable to do inline fixnum arithmetic (cost 2) because:
;       The second argument is a T, not a FIXNUM.
;       The result is a (VALUES NUMBER &OPTIONAL), not a (VALUES FIXNUM &REST T).
;       unable to do inline (signed-byte 64) arithmetic (cost 5) because:
;       The second argument is a T, not a (SIGNED-BYTE 64).
;       The result is a (VALUES NUMBER &OPTIONAL), not a (VALUES (SIGNED-BYTE 64)
;                                                                &REST T).
;       etc.
; in: LAMBDA NIL
;     (MAXIMA::MAKE-POLY-FROM-TERMLIST
;    (MAXIMA::TERMLIST-MUL MAXIMA::RING (MAXIMA::POLY-TERMLIST MAXIMA::P)
;                          (MAXIMA::POLY-TERMLIST MAXIMA::Q))
;    (+ (MAXIMA::POLY-SUGAR MAXIMA::P) (MAXIMA::POLY-SUGAR MAXIMA::Q)))
; 
; note: doing signed word to integer coercion (cost 20)
; in: LAMBDA NIL
;     (* MAXIMA::N (MAXIMA::POLY-SUGAR MAXIMA::P))
; 
; note: forced to do GENERIC-* (cost 30)
;       unable to do inline fixnum arithmetic (cost 4) because:
;       The result is a (VALUES
;                        (INTEGER -1329227995784915871750885555673497600
;                         1329227995784915872903807060280344576)
;                        &OPTIONAL), not a (VALUES FIXNUM &REST T).
;       unable to do inline (signed-byte 64) arithmetic (cost 5) because:
;       The result is a (VALUES
;                        (INTEGER -1329227995784915871750885555673497600
;                         1329227995784915872903807060280344576)
;                        &OPTIONAL), not a (VALUES (SIGNED-BYTE 64) &REST T).
;       etc.
; in: LAMBDA NIL
;     (MAXIMA::MAKE-POLY-FROM-TERMLIST
;    (MAXIMA::TERMLIST-EXTEND (MAXIMA::POLY-TERMLIST MAXIMA::P) MAXIMA::M)
;    (+ (MAXIMA::POLY-SUGAR MAXIMA::P) (MAXIMA::MONOM-SUGAR MAXIMA::M)))
; 
; note: doing signed word to integer coercion (cost 20)
; in: LAMBDA NIL
;     (INCF (MAXIMA::MONOM-ELT (MAXIMA::TERM-MONOM MAXIMA::X) MAXIMA::I))
; --> LET* SB-KERNEL:%SETELT SB-KERNEL:%ASET 
; ==>
;   (SB-KERNEL:HAIRY-DATA-VECTOR-SET/CHECK-BOUNDS ARRAY SB-INT:INDEX
;                                                 SB-C::NEW-VALUE)
; 
; note: doing signed word to integer coercion (cost 20), for:
;       the first argument of CHECK-FIXNUM

;     (INCF (MAXIMA::POLY-SUGAR MAXIMA::G))
; --> LET* FUNCALL SB-C::%FUNCALL 
; --> # :WHERE-FROM :DECLARED :KIND :GLOBAL-FUNCTION {10052CA1C1}> 
; --> LET LET SB-KERNEL:%INSTANCE-SET 
; ==>
;   (THE FIXNUM #:ONCE-ONLY-9)
; 
; note: doing signed word to integer coercion (cost 20), for:
;       the first argument of CHECK-FIXNUM
; in: LAMBDA NIL
;     (LENGTH MAXIMA::PLIST)
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a SEQUENCE, not a (SIMPLE-ARRAY * (*)).
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a SEQUENCE, not a VECTOR.
; in: LAMBDA NIL
;     (LENGTH MAXIMA::PLIST)
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a SEQUENCE, not a (SIMPLE-ARRAY * (*)).
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a SEQUENCE, not a VECTOR.

;     (LENGTH (MAXIMA::POLY-LM (CAR MAXIMA::PLIST)))
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a SEQUENCE, not a (SIMPLE-ARRAY * (*)).
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a SEQUENCE, not a VECTOR.
; in: LAMBDA NIL
;     (LENGTH MAXIMA::VARS)
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a SEQUENCE, not a (SIMPLE-ARRAY * (*)).
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a SEQUENCE, not a VECTOR.
; in: LAMBDA NIL
;     (PLUSP (CADDR MAXIMA::EXPR))
; ==>
;   (> (CADDR MAXIMA::EXPR) 0)
; 
; note: unable to
;   open-code FLOAT to RATIONAL comparison
; due to type uncertainty:
;   The first argument is a REAL, not a COMMON-LISP:FLOAT.
; 
; note: forced to do GENERIC-> (cost 10)
;       unable to do inline fixnum comparison (cost 3) because:
;       The first argument is a REAL, not a FIXNUM.
;       unable to do inline fixnum comparison (cost 4) because:
;       The first argument is a REAL, not a FIXNUM.
;       etc.
; in: LAMBDA NIL
;     (MAXIMA::MONOM-DIV LCM (MAXIMA::POLY-LM MAXIMA::F))
; --> BLOCK MAP-INTO DO BLOCK LET TAGBODY TAGBODY LET LOCALLY SETF 
; --> SB-KERNEL:%ASET 
; ==>
;   (SB-KERNEL:HAIRY-DATA-VECTOR-SET ARRAY SB-INT:INDEX SB-C::NEW-VALUE)
; 
; note: doing signed word to integer coercion (cost 20), for:
;       the first argument of CHECK-FIXNUM

;     (MAXIMA::MONOM-DIV LCM (MAXIMA::POLY-LM MAXIMA::G))
; --> BLOCK MAP-INTO DO BLOCK LET TAGBODY TAGBODY LET LOCALLY SETF 
; --> SB-KERNEL:%ASET 
; ==>
;   (SB-KERNEL:HAIRY-DATA-VECTOR-SET ARRAY SB-INT:INDEX SB-C::NEW-VALUE)
; 
; note: doing signed word to integer coercion (cost 20), for:
;       the first argument of CHECK-FIXNUM
; in: LAMBDA NIL
;     (MAX (MAXIMA::POLY-SUGAR MAXIMA::R)
;        (MAXIMA::TERM-SUGAR (MAXIMA::POLY-LT MAXIMA::P)))
; --> LET LET IF >= OR LET IF OR = IF 
; ==>
;   (= SB-C::X SB-C::Y)
; 
; note: unable to open code because: The operands might not be the same type.

; --> LET LET IF >= OR LET > IF 
; ==>
;   (> SB-C::X SB-C::Y)
; 
; note: forced to do GENERIC-> (cost 10)
;       unable to do inline fixnum comparison (cost 4) because:
;       The second argument is a REAL, not a FIXNUM.
;     (INCF MAXIMA::DIVISION-COUNT)
; --> LET* SETQ 
; ==>
;   (THE # #:G27)
; 
; note: doing signed word to integer coercion (cost 20), for:
;       the first argument of CHECK-FIXNUM

;     (MAXIMA::MONOM-DIV (MAXIMA::POLY-LM MAXIMA::P)
;                      (MAXIMA::POLY-LM (CAR MAXIMA::FL)))
; --> BLOCK MAP-INTO DO BLOCK LET TAGBODY TAGBODY LET LOCALLY SETF 
; --> SB-KERNEL:%ASET 
; ==>
;   (SB-KERNEL:HAIRY-DATA-VECTOR-SET ARRAY SB-INT:INDEX SB-C::NEW-VALUE)
; 
; note: doing signed word to integer coercion (cost 20), for:
;       the first argument of CHECK-FIXNUM
; in: LAMBDA NIL
;     (SB-INT:NAMED-LAMBDA MAXIMA::NORMAL-FORM-STEP
;                        (MAXIMA::RING MAXIMA::FL MAXIMA::P MAXIMA::R MAXIMA::C
;                         MAXIMA::DIVISION-COUNT &AUX
;                         (MAXIMA::G
;                          (FIND (MAXIMA::POLY-LM MAXIMA::P) MAXIMA::FL :TEST
;                                #'MAXIMA::MONOM-DIVISIBLE-BY-P :KEY
;                                #'MAXIMA::POLY-LM)))
;                        (BLOCK MAXIMA::NORMAL-FORM-STEP
;                          (COND
;                           (MAXIMA::G (INCF MAXIMA::DIVISION-COUNT)
;                            (MULTIPLE-VALUE-BIND # # # #)
;                            (MAXIMA::DEBUG-CGB "/"))
;                           (T (PUSH # #) (SETF # #) (POP #)
;                            (MAXIMA::DEBUG-CGB "+")))
;                          (VALUES MAXIMA::P MAXIMA::R MAXIMA::C
;                                  MAXIMA::DIVISION-COUNT)))
; ==>
;   #'(SB-INT:NAMED-LAMBDA MAXIMA::NORMAL-FORM-STEP
;          
                (MAXIMA::RING MAXIMA::FL MAXIMA::P MAXIMA::R MAXIMA::C
;                           MAXIMA::DIVISION-COUNT &AUX
;                           (MAXIMA::G
;                            (FIND (MAXIMA::POLY-LM MAXIMA::P) MAXIMA::FL :TEST
;                                  #'MAXIMA::MONOM-DIVISIBLE-BY-P :KEY
;                                  #'MAXIMA::POLY-LM)))
;                          (BLOCK MAXIMA::NORMAL-FORM-STEP
;                            (COND
;                             (MAXIMA::G (INCF MAXIMA::DIVISION-COUNT)
;                              (MULTIPLE-VALUE-BIND # # # #)
;                              (MAXIMA::DEBUG-CGB "/"))
;                             (T (PUSH # #) (SETF # #) (POP #)
;                              (MAXIMA::DEBUG-CGB "+")))
;                            (VALUES MAXIMA::P MAXIMA::R MAXIMA::C
;                                    MAXIMA::DIVISION-COUNT)))
; 
; note: Assignment to argument: P
;   prevents use of assertion from function type proclamation:
;   POLY
; 
; 
; no
te: Assignment to argument: R
;   prevents use of assertion from function type proclamation:
;   POLY
; 
; 
; note: Assignment to argument: DIVISION-COUNT
;   prevents use of assertion from function type proclamation:
;   FIXNUM
; 
;     (FIND (MAXIMA::POLY-LM MAXIMA::P) MAXIMA::FL :TEST
;         #'MAXIMA::MONOM-DIVISIBLE-BY-P :KEY #'MAXIMA::POLY-LM)
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The second argument is a SEQUENCE, not a (OR CONS NULL VECTOR).

;     (INCF MAXIMA::DIVISION-COUNT)
; --> LET* 
; ==>
;   (+ MAXIMA::DIVISION-COUNT #:G1)
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a NUMBER, not a COMMON-LISP:FLOAT.
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a NUMBER, not a (COMPLEX SINGLE-FLOAT).
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a NUMBER, not a (COMPLEX DOUBLE-FLOAT).

;     (MAX (MAXIMA::POLY-SUGAR MAXIMA::R)
;        (MAXIMA::TERM-SUGAR (MAXIMA::POLY-LT MAXIMA::P)))
; --> LET LET IF >= OR LET IF OR = IF 
; ==>
;   (= SB-C::X SB-C::Y)
; 
; note: unable to open code because: The operands might not be the same type.
;     (INCF MAXIMA::DIVISION-COUNT)
; --> LET* 
; ==>
;   (+ MAXIMA::DIVISION-COUNT #:G1)
; 
; note: forced to do GENERIC-+ (cost 10)
;       unable to do inline fixnum arithmetic (cost 1) because:
;       The first argument is a T, not a FIXNUM.
;       The result is a (VALUES NUMBER &OPTIONAL), not a (VALUES FIXNUM &REST T).
;       unable to do inline fixnum arithmetic (cost 2) because:
;       The first argument is a T, not a FIXNUM.
;       The result is a (VALUES NUMBER &OPTIONAL), not a (VALUES FIXNUM &REST T).
;       etc.

;     (MAX (MAXIMA::POLY-SUGAR MAXIMA::R)
;        (MAXIMA::TERM-SUGAR (MAXIMA::POLY-LT MAXIMA::P)))
; --> LET LET IF >= OR LET > IF 
; ==>
;   (> SB-C::X SB-C::Y)
; 
; note: forced to do GENERIC-> (cost 10)
;       unable to do inline fixnum comparison (cost 4) because:
;       The second argument is a REAL, not a FIXNUM.

;     (MAXIMA::MONOM-DIV (MAXIMA::POLY-LM MAXIMA::P) (MAXIMA::POLY-LM MAXIMA::G))
; --> BLOCK MAP-INTO DO BLOCK LET TAGBODY TAGBODY LET LOCALLY SETF 
; --> SB-
KERNEL:%ASET 
; ==>
;   (SB-KERNEL:HAIRY-DATA-VECTOR-SET ARRAY SB-INT:INDEX SB-C::NEW-VALUE)
; 
; note: doing signed word to integer coercion (cost 20), for:
;       the first argument of CHECK-FIXNUM
; in: LAMBDA NIL
;     (SB-INT:NAMED-LAMBDA MAXIMA::NORMAL-FORM
;                        (MAXIMA::RING MAXIMA::F MAXIMA::FL &OPTIONAL
;                         (MAXIMA::TOP-REDUCTION-ONLY
;                          MAXIMA::$POLY_TOP_REDUCTION_ONLY))
;                        (BLOCK MAXIMA::NORMAL-FORM
;                          (DO ((MAXIMA::R #)
;                               (MAXIMA::C #)
;                               (MAXIMA::DIVISION-COUNT 0))
;                              ((OR # #)
;                               (PROGN # #)
;                               (SETF # #)
;                               (VALUES MAXIMA::F MAXIMA::C
;                                       MAXIMA::DIVISION-COUNT))
;                            (DECLARE (FIXNUM MAXIMA::DIVISION-COUNT)
;                             (TYPE MAXIMA::POLY MAXIMA::R))
;                            (MULTIPLE-VALUE-SETQ
;                                (MAXIMA::F MAXIMA::R MAXIMA::C
;                                 MAXIMA::DIVISION-COUNT)
;             
                 (MAXIMA::NORMAL-FORM-STEP MAXIMA::RING MAXIMA::FL
;                                                        MAXIMA::F MAXIMA::R
;                                                        MAXIMA::C
;                                                        MAXIMA::DIVISION-COUNT)))))
; ==>
;   #'(SB-INT:NAMED-LAMBDA MAXIMA::NORMAL-FORM
;                          (MAXIMA::RING MAXIMA::F MAXIMA::FL &OPTIONAL
;                           (MAXIMA::TOP-REDUCTION-ONLY
;                            MAXIMA::$POLY_TOP_REDUCTION_ONLY))
;                          (BLOCK MAXIMA::NORMAL-FORM
;                            (DO ((MAXIMA::R #)
;                                 (MAXIMA::C #)
;                                 (MAXIMA::DIVISION-COUNT 0))
;                                ((OR # #)
;                                 (PROGN # #)
;                                 (SETF # #)
;                                 (VALUES MAXIMA::F MAXIMA::C
;                                         MAXIMA::DIVISION-COUNT))
;       
                       (DECLARE (FIXNUM MAXIMA::DIVISION-COUNT)
;                               (TYPE MAXIMA::POLY MAXIMA::R))
;                              (MULTIPLE-VALUE-SETQ
;                                  (MAXIMA::F MAXIMA::R MAXIMA::C
;                                   MAXIMA::DIVISION-COUNT)
;                                (MAXIMA::NORMAL-FORM-STEP MAXIMA::RING
;                                                          MAXIMA::FL MAXIMA::F
;                                                          MAXIMA::R MAXIMA::C
;                                                          MAXIMA::DIVISION-COUNT)))))
; 
; note: Assignment to argument: F
;   prevents use of assertion from function type proclamation:
;   POLY
; 
; in: LAMBDA NIL
;     (LENGTH MAXIMA::G)
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a SEQUENCE, not a (SIMPLE-ARRAY * (*)).
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a SEQUENCE, not a VECTOR.
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a SEQUENCE, not a (SIMPLE-ARRAY * (*)).
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a SEQUENCE, not a VECTOR.

;     (ELT MAXIMA::G MAXIMA::I)
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a SEQUENCE, not a (SIMPLE-ARRAY * (*)).
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a SEQUENCE, not a LIST.

;     (ELT MAXIMA::G MAXIMA::J)
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a SEQUENCE, not a (SIMPLE-ARRAY * (*)).
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The fi
rst argument is a SEQUENCE, not a LIST.

;     (EVERY #'MAXIMA::POLY-ZEROP
;          (MAXIMA::MAKELIST
;           (MAXIMA::NORMAL-FORM MAXIMA::RING
;                                (MAXIMA::SPOLY MAXIMA::RING
;                                               (ELT MAXIMA::G MAXIMA::I)
;                                               (ELT MAXIMA::G MAXIMA::J))
;                                MAXIMA::G NIL)
;           (MAXIMA::I 0 (- (LENGTH MAXIMA::G) 2))
;           (MAXIMA::J (1+ MAXIMA::I) (1- (LENGTH MAXIMA::G)))))
; --> LET BLOCK MAP TRULY-THE 
; ==>
;   (SB-KERNEL:%MAP SB-C::RESULT-TYPE-ARG SB-C::FUN #:G20)
; 
; note: unable to open code because: can't determine sequence argument type
; in: LAMBDA NIL
;     (LENGTH MAXIMA::F)
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a SEQUENCE, not a (SIMPLE-ARRAY * (*)).
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a SEQUENCE, not a VECTOR.

;     (ELT MAXIMA::F MAXIMA::I)
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a SEQUENCE, not a (SIMPLE-ARRAY * (*)).
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a SEQUENCE, not a LIST.
; in: LAMBDA NIL
;     (MAX
;    (+ (- MAXIMA::D (MAXIMA::MONOM-SUGAR (MAXIMA::POLY-LM MAXIMA::P)))
;       (MAXIMA::POLY-SUGAR MAXIMA::P))
;    (+ (- MAXIMA::D (MAXIMA::MONOM-SUGAR (MAXIMA::POLY-LM MAXIMA::Q)))
;       (MAXIMA::POLY-SUGAR MAXIMA::Q)))
; --> LET LET IF 
; ==>
;   SB-C::MAXREST
; 
; note: doing signed word to integer coercion (cost 20)

; ==>
;   #:ONCE-ONLY-0
; 
; note: doing signed word to integer coercion (cost 20)
; in: LAMBDA NIL
;     (< (CAR MAXIMA::X) (CAR MAXIMA::Y))
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a REAL, not a SINGLE-FLOAT.
;   The second argument is a REAL, not a DOUBLE-FLOAT.
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a REAL, not a DOUBLE-FLOAT.
;   The second argument is a REAL, not a SINGLE-FLOAT.
; 
; note: unable to
;   open-code FLOAT to RATIONAL comparison
; due to type uncertainty:
;   The first argument is a REAL, not a COMMON-LISP:FLOAT.
;   The second argument is a REAL, not a RATIONAL.

;     (= (CAR MAXIMA::X) (CAR MAXIMA::Y))
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a NUMBER, not a SINGLE-FLOAT.
;   The second argument is a NUMBER, not a DOUBLE-FLOAT.
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a NUMBER, not a DOUBLE-FLOAT.
;   The second argument is a NUMBER, not a SINGLE-FLOAT.
; 
; note: unable to
;   open-code FLOAT to RATIONAL comparison
; due to type uncertainty:
;   The first argument is a NUMBER, not a COMMON-LISP:FLOAT.
;   The second argument is a NUMBER, not a RATIONAL.
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a NUMBER, not a (COMPLEX SINGLE-FLOAT).
;   The second argument is a NUMBER, not a (COMPLEX SINGLE-FLOAT).
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a NUMBER, not a (COMPLEX SINGLE-FLOAT).
;   The second argument is a NUMBER, not a REAL.
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a NUMBER, not a REAL.
;   The second argument is a NUMBER, not a (COMPLEX SINGLE-FLOAT).
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a NUMBER, no
t a (COMPLEX DOUBLE-FLOAT).
;   The second argument is a NUMBER, not a (COMPLEX DOUBLE-FLOAT).
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a NUMBER, not a (COMPLEX DOUBLE-FLOAT).
;   The second argument is a NUMBER, not a REAL.
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a NUMBER, not a REAL.
;   The second argument is a NUMBER, not a (COMPLEX DOUBLE-FLOAT).
; 
; note: unable to open code because: The operands might not be the same type.

;     (< (CAR MAXIMA::X) (CAR MAXIMA::Y))
; 
; note: forced to do GENERIC-< (cost 10)
;       unable to do inline float comparison (cost 3) because:
;       The first argument is a REAL, not a SINGLE-FLOAT.
;       The second argument is a REAL, not a SINGLE-FLOAT.
;       unable to do inline float comparison (cost 3) because:
;       The first argument is a REAL, not a DOUBLE-FLOAT.
;       The second argument is a REAL, not a DOUBLE-FLOAT.
;       etc.

;     (= (CAR MAXIMA::X) (CAR MAXIM
A::Y))
; 
; note: forced to do GENERIC-= (cost 10)
;       unable to do inline float comparison (cost 3) because:
;       The first argument is a T, not a DOUBLE-FLOAT.
;       The second argument is a T, not a DOUBLE-FLOAT.
;       unable to do inline float comparison (cost 3) because:
;       The first argument is a T, not a SINGLE-FLOAT.
;       The second argument is a T, not a SINGLE-FLOAT.
; in: LAMBDA NIL
;     (FUNCALL MAXIMA::*PAIR-KEY-FUNCTION* (MAXIMA::PAIR-FIRST MAXIMA::PAIR)
;            (MAXIMA::PAIR-SECOND MAXIMA::PAIR))
; --> SB-C::%FUNCALL THE 
; ==>
;   (SB-KERNEL:%COERCE-CALLABLE-TO-FUN FUNCTION)
; 
; note: unable to
;   optimize away possible call to FDEFINITION at runtime
; due to type uncertainty:
;   The first argument is a (OR FUNCTION SYMBOL), not a FUNCTION.
; in: LAMBDA NIL
;     (LENGTH MAXIMA::F)
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a SEQUENCE, not a (SIMPLE-ARRAY * (*)).
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a SEQUENCE, not a VECTOR.
;     (ELT MAXIMA::F MAXIMA::I)
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a SEQUENCE, not a (SIMPLE-ARRAY * (*)).
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a SEQUENCE, not a LIST.

;     (ELT MAXIMA::F MAXIMA::J)
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a SEQUENCE, not a (SIMPLE-ARRAY * (*)).
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a SEQUENCE, not a LIST.

;     (ELT MAXIMA::F MAXIMA::I)
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a SEQUENCE, not a (SIMPLE-ARRAY * (*)).
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a SEQUENCE, not a LIST.

;     (ELT MAXIMA::F MAXIMA::J)
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a SEQUENCE, not a (SIMPLE-ARRAY * (*)).
; 
; note: unable to
;   optimize
; due to type unc
ertainty:
;   The first argument is a SEQUENCE, not a LIST.
; in: LAMBDA NIL
;     (LENGTH MAXIMA::F)
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a SEQUENCE, not a (SIMPLE-ARRAY * (*)).
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a SEQUENCE, not a VECTOR.
; in: LAMBDA NIL
;     (LENGTH MAXIMA::F)
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a SEQUENCE, not a (SIMPLE-ARRAY * (*)).
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a SEQUENCE, not a VECTOR.
; in: LAMBDA NIL
;     (LENGTH MAXIMA::G)
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a SEQUENCE, not a (SIMPLE-ARRAY * (*)).
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a SEQUENCE, not a VECTOR.
; in: LAMBDA NIL
;     (NOTANY
;    #'(LAMBDA (MAXIMA::G2)
;        (MAXIMA::MONOM-LCM-DIVIDES-MONOM-LCM-P (MAXIMA::POLY-LM MAXIMA::H)
;                                               (MAXIMA::POLY-LM MAXIMA::G2)
;                                               (MAXIMA::POLY-LM MAXIMA::H)
;                                               (MAXIMA::POLY-LM MAXIMA::G1)))
;    MAXIMA::D)
; --> LET BLOCK MAP TRULY-THE 
; ==>
;   (SB-KERNEL:%MAP SB-C::RESULT-TYPE-ARG SB-C::FUN #:G57)
; 
; note: unable to open code because: can't determine sequence argument type

;     (NOTANY
;    #'(LAMBDA (MAXIMA::G2)
;        (MAXIMA::MONOM-LCM-DIVIDES-MONOM-LCM-P (MAXIMA::POLY-LM MAXIMA::H)
;                                               (MAXIMA::POLY-LM MAXIMA::G2)
;                                               (MAXIMA::POLY-LM MAXIMA::H)
;                                               (MAXIMA::POLY-LM MAXIMA::G1)))
;    MAXIMA::C)
; --> LET BLOCK MAP TRULY-THE 
; ==>
;   (SB-KERNEL:%MAP SB-C::RESULT-TYPE-ARG SB-C::FUN #:G60)
; 
; note: unable to open code because: can't determine sequence argument type
; in: LAMBDA NIL
;     (FUNCALL (MAXIMA::FIND-GROBNER-FUNCTION MAXIMA::$POLY_GROBNER_ALGORITHM)
;            MAXIMA::RING MAXIMA::F MAXIMA::START MAXIMA::TOP-REDUCTION-ONLY)
; --> SB-C::%FUNCALL THE 
; ==>
;   (SB-KERNEL:%COERCE-CALLABLE-TO-FUN FUNCTION)
; 
; note: unable to
;   optimize away possible call to FDEFINITION at runtime
; due to type uncertainty:
;   The first argument is a (OR FUNCTION SYMBOL), not a FUNCTION.
; in: LAMBDA NIL
;     (+ (MAXIMA::POLY-LENGTH MAXIMA::P) (MAXIMA::POLY-LENGTH MAXIMA::Q))
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a NUMBER, not a RATIONAL.
;   The second argument is a NUMBER, not a COMMON-LISP:FLOAT.
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a NUMBER, not a COMMON-LISP:FLOAT.
;   The second argument is a NUMBER, not a RATIONAL.
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a NUMBER, not a SINGLE-FLOAT.
;   The second argument is a NUMBER, not a DOUBLE-FLOAT.
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a NUMBER, not a DOUBLE-FLOAT.
;   The second argument is a NUMBER, not a SINGLE-FLOAT.
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a NUMBER, not a (COMPLEX SINGLE-FLOAT).
;   The second argument is a NUMBER, not a (COMPLEX SINGLE-FLOAT).
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a NUMBER, not a (COMPLEX SINGLE-FLOAT).
;   The second argument is a NUMBER, not a REAL.
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a NUMBER, not a REAL.
;   The second argument is a NUMBER, not a (COMPLEX SINGLE-FLOAT).
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a NUMBER, not a (COMPLEX DOUBLE-FLOAT).
;   The second argument is a NUMBER, not a (COMPLEX DOUBLE-FLOAT).
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a NUMBER, not a (COMPLEX DOUBLE-FLOAT).
;   The second argument is a NUMBER, not a REAL.
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a NUMBER, not a REAL.
;   The second argument is a NUMBER, not a (COMPLEX DOUBLE-FLOAT).
; 
; note: forced to do GENERIC-+ (cost 10)
;       unable to do inline float arithmetic (cost 2) because:
;       The first argument is a T, not a DOUBLE-FLOAT.
;       The second argument is a T, not a DOUBLE-FLOAT.
;       The result is a (VALUES NUMBER &OPTIONAL), not a (VALUES DOUBLE-FLOAT
;                                                                &REST T).
;       unable to do inline float arithmetic (cost 2) because:
;       The first argument is a T, not a SINGLE-FLOAT.
;       The second argument is a T, not a SINGLE-FLOAT.
;       The result is a (VALUES NUMBER &OPTIONAL), not a (VALUES SINGLE-FLOAT
;                                                                &REST T).
;       etc.
; in: LAMBDA NIL
;     (DOTIMES (MAXIMA::I MAXIMA::K MAXIMA::PLIST)
;     (SETF MAXIMA::PLIST
;             (REMOVE-IF
;              #'(LAMBDA (MAXIMA::P)
;                  (MAXIMA::POLY-DEPENDS-P MAXIMA::P MAXIMA::I))
;              MAXIMA::PLIST)))
; --> DO BLOCK LET TAGBODY UNLESS COND IF NOT IF >= IF 
; ==>
;   (< SB-C::X SB-C::Y)
; 
; note: forced to do GENERIC-< (cost 10)
;       unable to do inline fixnum comparison (cost 4) because:
;       The first argument is a UNSIGNED-BYTE, not a FIXNUM.
;       The second argument is a INTEGER, not a FIXNUM.

; --> DO BLOCK LET TAGBODY PSETQ PSETF LET* MULTIPLE-VALUE-BIND LET 1+ 
; ==>
;   (+ MAXIMA::I 1)
; 
; note: forced to do GENERIC-+ (cost 10)
;       unable to do inline fixnum arithmetic (cost 1) because:
;       The first argument is a UNSIGNED-BYTE, not a FIXNUM.
;       The result is a (VALUES (INTEGER 1) &OPTIONAL), not a (VALUES FIXNUM
;                                                                     &REST T).
;       unable to do inline fixnum 
arithmetic (cost 2) because:
;       The first argument is a UNSIGNED-BYTE, not a FIXNUM.
;       The result is a (VALUES (INTEGER 1) &OPTIONAL), not a (VALUES FIXNUM
;                                                                     &REST T).
;       etc.
; in: LAMBDA NIL
;     (EVERY #'MAXIMA::POLY-ZEROP MAXIMA::F)
; --> LET BLOCK MAP TRULY-THE 
; ==>
;   (SB-KERNEL:%MAP SB-C::RESULT-TYPE-ARG SB-C::FUN #:G13)
; 
; note: unable to open code because: can't determine sequence argument type

;     (FIND-IF-NOT #'MAXIMA::POLY-ZEROP MAXIMA::F)
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The second argument is a SEQUENCE, not a (OR CONS NULL VECTOR).
; in: LAMBDA NIL
;     (EVERY
;    #'(LAMBDA (MAXIMA::P)
;        (MAXIMA::GROBNER-MEMBER MAXIMA::RING MAXIMA::P MAXIMA::G2))
;    MAXIMA::G1)
; --> LET BLOCK MAP TRULY-THE 
; ==>
;   (SB-KERNEL:%MAP SB-C::RESULT-TYPE-ARG SB-C::FUN #:G13)
; 
; note: unable to open code because: can't determine sequence argument type
; in: LAMBDA NIL
;     (LENGTH MAXIMA::G)
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a SEQUENCE, not a (SIMPLE-ARRAY * (*)).
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a SEQUENCE, not a VECTOR.
; in: LAMBDA NIL
;     (LENGTH MAXIMA::G)
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a SEQUENCE, not a (SIMPLE-ARRAY * (*)).
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a SEQUENCE, not a VECTOR.
; in: LAMBDA NIL
;     (LENGTH MAXIMA::H)
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a SEQUENCE, not a (SIMPLE-ARRAY * (*)).
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a SEQUENCE, not a VECTOR.
; in: LAMBDA NIL
;     (= MAXIMA::EXPR 0)
; 
; note: unable to
;   open-code FLOAT to RATIONAL comparison
; due to type uncertainty:
;   The first argument is a NUMBER, not a COMMON-LISP:FLOAT.
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a NUMBER, not a (COMPLEX SINGLE-FLOAT).
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The first argument is a NUMBER, not a (COMPLEX DOUBLE-FLOAT).
; 
; note: unable to open code because: The operands might not be the same type.
; in: LAMBDA NIL
;     (PLUSP (CADDR MAXIMA::EXPR))
; ==>
;   (> (CADDR MAXIMA::EXPR) 0)
; 
; note: unable to
;   open-code FLOAT to RATIONAL comparison
; due to type uncertainty:
;   The first argument is a REAL, not a COMMON-LISP:FLOAT.
; 
; note: forced to do GENERIC-> (cost 10)
;       unable to do inline fixnum comparison (cost 3) because:
;       The first argument is a REAL, not a FIXNUM.
;       unable to do inline fixnum comparison (cost 4) because:
;       The first argument is a REAL, not a FIXNUM.
;       etc.
; in: LAMBDA NIL
;     (POSITION MAXIMA::VAR MAXIMA::VARS)
; 
; note: unable to
;   optimize
; due to type uncertainty:
;   The second argument is a SEQUENCE, not a (OR CONS NULL VECTOR).
; 
; compilation unit finished
;   printed 167 notes
STYLE-WARNING: redefining TEX-MQUOTIENT in DEFUN
STYLE-WARNING: redefining TEX-PREFIX in DEFUN
STYLE-WARNING: redefining TEX-STRING in DEFUN
STYLE-WARNING: redefining TEX-DERIVATIVE in DEFUN
STYLE-WARNING: redefining TEX-D in DEFUN
[ STACK-Maxima started, library version 2014100900 ] 
(%o0) "/var/lib/tomcat6/webapps/maximalocal.mac"
(%i1) 
Start-up time: 5308 ms

Sending command:

ATAlgEquiv(x^2-1,(x-1)*(x+1));
concat("--COMPLETED--k","ill--PROCESS--");
Waiting for target text: --COMPLETED--kill--PROCESS--

(%o1) [true,true,"",""]
(%i2) 
(%o2) "--COMPLETED--kill--PROCESS--"
(%i3) 
Sending command:

quit();
Total time: 5357 ms

Thanks in advance.

Kind regards Felipe López P.

aharjula commented 8 years ago

The Maxima/Lisp devs seem to think that it is sensible to optimise things first and try to write them to the disk only after that, so if the write fails they will need to do that extremely expensive optimisation again and again. Most of that is just warnings from the optimisation process which tries to clean up the code and you should only see it once in normal circumstances.

But as that optimised version is often cached under the home directory of the running user there can be trouble when that user has been blocked from writing to his own home directory due to normal security best practices. In this case I would not be too surprised if the user account running Tomcat has that problem. Basically, you have few options:

  1. Let Tomcat write to its home directory so that it can generate these cached files. Naturally, block that writing instantly after those files have been created and things work. Repeat as you update Lisp/Maxima.
  2. When running Maxima processes under Tomcat change the environment so that the Maxima process has a different $HOME, where it can write.
  3. Run Maxima as some other user... Probably the most complex solution.

On the other hand that optimisation is unnecessary if you use a preloaded memory image generated using the software it is supposed to run on. Tends to work every time and requires the least changes affecting to the system security. If the STACK server and the Pool server have different versions of any of the software using the automatically generated optimised memory image is unlikely to work.

But there might be another issue that you will have. You are running version 2014100900 on top of Maxima 5.36.0 which might not be a valid combination, I believe that STACK started to support 5.36.0 around the summer of 2015.

felopla commented 8 years ago

Hello guys,

I made another installation for replicate the first one (that it's worked good a few months ago), but still I can't make it work :/

I made the new installation in Ubuntu 14.04. I want to test all in the same machine. Moodle with Stack and Maxima work fine in local mode, but MaximaPool doesn't pass the health-check test.

Now, in the first healt-check appears:

loadfile: failed to load /usr/local/share/maxima/5.36.0/share/draw/draw.lisp
 -- an error. To debug this try: debugmode(true);
(%i1)  

2

1

The current configuration is:

# Config for maxima pool
### Maxima related commands and parameters
maxima.commandline = /usr/local/bin/maxima
# a file to load to maxima using load(""); set to false or empty if not needed
maxima.load = /opt/moodle/apps/moodle/moodledata/stack/maximalocal.mac
# working directory for the process
maxima.cwd = .
# to identify the state of the process we check the output for specific strings$
# Input the load command after this, if defined...
maxima.ready.for.load = (%i1)
# The process has loaded when this appears. On old versions of STACK use the fi$
#maxima.ready.for.use = Stack-Maxima started
maxima.ready.for.use = STACK-Maxima started

### File handling related parameters, these make the difference between shared $
# Do we handle files?
file.handling = true
# The command template to pass the current working and output directories to th$
## Usable placeholders:
##  %WORK-DIR% the directory that won't be transferred to the client side
##  %WORK-DIR-NE% use this if you do not want \-chars escaped
##  %OUTPUT-DIR% the directory that will be transferred to the client side
##  %OUTPUT-DIR-NE% use this if you do not want \-chars escaped
maxima.path.command = TMP_IMAGE_DIR: "%WORK-DIR%/"$ maxima_tempdir: "%WORK-DIR%$

### Pool related parameters, times in milliseconds
pool.size.min = 5
pool.size.max = 15
# This is the limit of simultaneously starting processes this combined to the u$
pool.start.limit = 40
# Pool update cycle (ms between updates)
pool.update.cycle = 500
# How long does the startup of a process take? We adapt to external load by kee$
pool.adaptation.startuptime.initial.estimate = 2000
# How often do we get requests? 1/ms, kHz
pool.adaptation.demand.initial.estimate = 0.001
# How big a data-set should be kept for estimates, do not make this too big if $
pool.adaptation.averages.length = 5
# Pool size depends on the demand and startuptimes the system tries to maintain$
pool.adaptation.safety.multiplier = 3.0
# This is the time that a process is allowed to take when starting up.
pool.startup.time.limit = 10000
# This is the time added to the lifetime of a process when it is taken to use s$
pool.execution.time.limit = 30000
# This is the lifetime given to a process
pool.process.lifetime = 600000

### Alternative configuration file
# If you give the name of another configuration file here, it will be read after
# this file. That lets you set the properties in a place that is not complied
# into the servlet, so you can change the configuration without re-compiling.
extra.config = /var/lib/tomcat6/webapps/maximapool.conf

Please, could you help me or guide with anything that you know?

Thanks in advance for your help. I really appreciate it!

Kind regards Felipe López P.

aharjula commented 8 years ago

The issue you probably have is with Maxima not being able to write its own cache files to the home-directory of the user running it, in this case tomcatX (X=6 or more likely 7). Any issues related to draw.lisp point that way, do check STACK issue 149 about that.

MaximaPool runs Maxima as the user running the servlet by running the command maxima.commandline and continues by running a load-command in that Maxima as defined in the configuration when the output matches the configuration and if the output does not match the output defined in that configuration it obviously does not work. It is your task to ensure that the user running that command gets that output and that that Maxima works for that user, if not the problem is neither MaximaPools or ours...

So do try running Maxima as that user with that command and see what happens and fix things until your configuration matches the output defined in that configuration.

felopla commented 8 years ago

Dear Matti,

Still doesn't work. I tried with permissions, owners, I created a folder .maxima, etc. I don't know how can I continue or what more can I do. I am still getting the same error:

loadfile: failed to load /usr/local/share/maxima/5.36.0/share/draw/draw.lisp

Could you guide me somehow, please?

Thank you in advance.

Kind regards Felipe López P.

aharjula commented 8 years ago

Your next step will be to compile your own Maxima-installation as that draw.lisp issue is an issue with the maxima-package of your linux distribution and you should probably seek support for that from elsewhere, like from the links already provided.

After that you will probably want to follow the optimisation guide already provided and build a memory image of the maxima process with all those libraries like draw.lisp already loaded so that the user running the maxima-process does not need to load them if he cannot do it due to some security limitations.

That is all the generic information I can give, if that is not enough you should probably hire someone to help and fix your issues.

felopla commented 8 years ago

Finally, it worked! Thanks a lot for your help!

Kind regards Felipe López P.