[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
new comer and a question
First, please add me into your mailing list.
Second, I had this problem that was for akcl 605 running on SGI.
I am compiling a small lisp program and want to load the *.o into
akcl. Following is what I did,
--------------------------------------------------------------
AKCL (Austin Kyoto Common Lisp) Version(1.605) Tue Mar 24 16:38:22 EST 1992
Contains Enhancements by W. Schelter
>(compile-file "interpolate")
Compiling interpolate.lsp.
End of Pass 1.
End of Pass 2.
OPTIMIZE levels: Safety=0 (No runtime error checking), Space=0,
Speed=3
Finished compiling interpolate.
#"interpolate.o"
>(load "interpolate")
Loading interpolate.o
start address -T b43000
Error: Caught fatal error [memory may be damaged]
Fast links are on: do (use-fast-links nil) for debugging
Error signalled by N_ELEMENTS.
Broken at N_ELEMENTS. Type :H for Help.
>>
--------------------------------------------------------------
It works fine on SUN and HP so I assume the program itself is
OK(source codes attached at the end). Thus I would like
to know what normaly may cause the problem -- "memory may be damaged",
I happended to have had this type of problem before. Does it have
anything to do with compiling akcl itself.
I am running SGI4d with IRIX4.0.1. ou help is appreciated.
Tom Zheng
--
-- tzheng@cs.purdue.edu
--------------------------------------------------------
;;interpolate.lsp;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun n_elements (n element)
(if (zerop n) nil
(cons element (n_elements (1- n) element))))
(defvar *max_b* 180)
(defvar *max_eqn* 180)
(defvar *max_var* 60)
(defvar *ptr_lin* 0)
(defvar *lin_sys*
(make-array (list *max_eqn* *max_var*)
:element-type 'long-float
:initial-contents (n_elements *max_eqn*
(n_elements
*max_var* 0.0))))
(defvar *b* (make-array (list 180) :element-type 'long-float))
(defvar *num_var2d* (vector 1 3 6 10 15 21 28 36))
(defvar *power2d* (make-array (list 40 2)
:element-type 'integer))
(defun *init_b* ()
(do ((i 0 (1+ i)))
((>= i *max_b*) nil)
(setf (aref *b* i) 0.0)))
(defun init_*lin_sys* ()
(do ((i 0 (1+ i)))
((= i *max_eqn*) nil)
(do ((j 0 (1+ j)))
((= j *max_var*) nil)
(setf (aref *lin_sys* i j) 0.0)))
(setf *ptr_lin* 0)
nil)
(defun init_*power2d* (deg)
(let ((k 0))
(do ((i 0 (1+ i)))
((> i deg) nil)
(do ((j 0 (1+ j)))
((> j (- deg i)) nil)
(setf (aref *power2d* k 0) i)
(setf (aref *power2d* k 1) j)
(setf k (1+ k))))))
(defvar *nonzeros* nil)
(defvar *num_var* (vector 1 4 10 20 35 56))
(defvar *f_xyz*
(vector
nil
'((0 1.0 (1 0 0)) (1 1.0 (0 1 0)) (2 1.0 (0 0 1)) (3 1.0 (0 0 0)))
'((0 1.0 (2 0 0)) (1 1.0 (1 1 0)) (2 1.0 (1 0 1)) (3 1.0 (1 0 0))
(4 1.0 (0 2 0)) (5 1.0 (0 1 1)) (6 1.0 (0 1 0)) (7 1.0 (0 0 2))
(8 1.0 (0 0 1)) (9 1.0 (0 0 0)))
'((0 1.0 (3 0 0)) (1 1.0 (0 3 0)) (2 1.0 (0 0 3)) (3 1.0 (2 1 0))
(4 1.0 (1 2 0)) (5 1.0 (2 0 1)) (6 1.0 (1 0 2)) (7 1.0 (0 2 1))
(8 1.0 (0 1 2)) (9 1.0 (1 1 1)) (10 1.0 (2 0 0)) (11 1.0 (0 2 0))
(12 1.0 (0 0 2)) (13 1.0 (1 1 0)) (14 1.0 (0 1 1)) (15 1.0 (1 0 1))
(16 1.0 (1 0 0)) (17 1.0 (0 1 0)) (18 1.0 (0 0 1)) (19 1.0 (0 0 0)))
'((0 1.0 (3 0 0)) (1 1.0 (0 3 0)) (2 1.0 (0 0 3)) (3 1.0 (2 1 0))
(4 1.0 (1 2 0)) (5 1.0 (2 0 1)) (6 1.0 (1 0 2)) (7 1.0 (0 2 1))
(8 1.0 (0 1 2)) (9 1.0 (1 1 1)) (10 1.0 (2 0 0)) (11 1.0 (0 2 0))
(12 1.0 (0 0 2)) (13 1.0 (1 1 0)) (14 1.0 (0 1 1)) (15 1.0 (1 0 1))
(16 1.0 (1 0 0)) (17 1.0 (0 1 0)) (18 1.0 (0 0 1)) (19 1.0 (0 0 0))
(20 1.0 (4 0 0)) (21 1.0 (3 1 0)) (22 1.0 (3 0 1)) (23 1.0 (2 2 0))
(24 1.0 (2 1 1)) (25 1.0 (2 0 2)) (26 1.0 (1 3 0)) (27 1.0 (1 2 1))
(28 1.0 (1 1 2)) (29 1.0 (1 0 3)) (30 1.0 (0 4 0)) (31 1.0 (0 3 1))
(32 1.0 (0 2 2)) (33 1.0 (0 1 3)) (34 1.0 (0 0 4)))
'((0 1.0 (3 0 0)) (1 1.0 (0 3 0)) (2 1.0 (0 0 3)) (3 1.0 (2 1 0))
(4 1.0 (1 2 0)) (5 1.0 (2 0 1)) (6 1.0 (1 0 2)) (7 1.0 (0 2 1))
(8 1.0 (0 1 2)) (9 1.0 (1 1 1)) (10 1.0 (2 0 0)) (11 1.0 (0 2 0))
(12 1.0 (0 0 2)) (13 1.0 (1 1 0)) (14 1.0 (0 1 1)) (15 1.0 (1 0 1))
(16 1.0 (1 0 0)) (17 1.0 (0 1 0)) (18 1.0 (0 0 1)) (19 1.0 (0 0 0))
(20 1.0 (4 0 0)) (21 1.0 (3 1 0)) (22 1.0 (3 0 1)) (23 1.0 (2 2 0))
(24 1.0 (2 1 1)) (25 1.0 (2 0 2)) (26 1.0 (1 3 0)) (27 1.0 (1 2 1))
(28 1.0 (1 1 2)) (29 1.0 (1 0 3)) (30 1.0 (0 4 0)) (31 1.0 (0 3 1))
(32 1.0 (0 2 2)) (33 1.0 (0 1 3)) (34 1.0 (0 0 4))
(35 1.0 (5 0 0)) (36 1.0 (4 1 0)) (37 1.0 (4 0 1)) (38 1.0 (3 2 0))
(39 1.0 (3 1 1)) (40 1.0 (3 0 2)) (41 1.0 (2 3 0)) (42 1.0 (2 2 1))
(43 1.0 (2 1 2)) (44 1.0 (2 0 3)) (45 1.0 (1 4 0)) (46 1.0 (1 3 1))
(47 1.0 (1 2 2)) (48 1.0 (1 1 3)) (49 1.0 (1 0 4)) (50 1.0 (0 5 0))
(51 1.0 (0 4 1)) (52 1.0 (0 3 2)) (53 1.0 (0 2 3)) (54 1.0 (0 1 4))
(55 1.0 (0 0 5)))))
(defvar *grad_f_xyz*
(vector nil
'(((0 1.0 (0 0 0)))
((1 1.0 (0 0 0)))
((2 1.0 (0 0 0))))
'(((0 2.0 (1 0 0)) (1 1.0 (0 1 0)) (2 1.0 (0 0 1)) (3 1.0 (0 0 0)))
((4 2.0 (0 1 0)) (1 1.0 (1 0 0)) (5 1.0 (0 0 1)) (6 1.0 (0 0 0)))
((7 2.0 (0 0 1)) (5 1.0 (0 1 0)) (2 1.0 (1 0 0)) (8 1.0 (0 0 0))))
'(((6 1.0 (0 0 2)) (9 1.0 (0 1 1)) (5 2.0 (1 0 1)) (15 1.0 (0 0 1))
(4 1.0 (0 2 0)) (3 2.0 (1 1 0)) (13 1.0 (0 1 0)) (0 3.0 (2 0 0))
(10 2.0 (1 0 0)) (16 1.0 (0 0 0)))
((8 1.0 (0 0 2)) (7 2.0 (0 1 1)) (9 1.0 (1 0 1)) (14 1.0 (0 0 1))
(1 3.0 (0 2 0)) (4 2.0 (1 1 0)) (11 2.0 (0 1 0)) (3 1.0 (2 0 0))
(13 1.0 (1 0 0)) (17 1.0 (0 0 0)))
((2 3.0 (0 0 2)) (8 2.0 (0 1 1)) (6 2.0 (1 0 1)) (12 2.0 (0 0 1))
(7 1.0 (0 2 0)) (9 1.0 (1 1 0)) (14 1.0 (0 1 0)) (5 1.0 (2 0 0))
(15 1.0 (1 0 0)) (18 1.0 (0 0 0))))
'(((6 1.0 (0 0 2)) (9 1.0 (0 1 1)) (5 2.0 (1 0 1)) (15 1.0 (0 0 1))
(4 1.0 (0 2 0)) (3 2.0 (1 1 0)) (13 1.0 (0 1 0)) (0 3.0 (2 0 0))
(10 2.0 (1 0 0)) (16 1.0 (0 0 0)) (20 4.0 (3 0 0)) (21 3.0 (2 1 0))
(22 3.0 (2 0 1)) (23 2.0 (1 2 0)) (24 2.0 (1 1 1)) (25 2.0 (1 0 2))
(26 1.0 (0 3 0)) (27 1.0 (0 2 1)) (28 1.0 (0 1 2)) (29 1.0 (0 0 3)))
((8 1.0 (0 0 2)) (7 2.0 (0 1 1)) (9 1.0 (1 0 1)) (14 1.0 (0 0 1))
(1 3.0 (0 2 0)) (4 2.0 (1 1 0)) (11 2.0 (0 1 0)) (3 1.0 (2 0 0))
(13 1.0 (1 0 0)) (17 1.0 (0 0 0)) (21 1.0 (3 0 0)) (23 2.0 (2 1 0))
(24 1.0 (2 0 1)) (26 3.0 (1 2 0)) (27 2.0 (1 1 1)) (28 1.0 (1 0 2))
(30 4.0 (0 3 0)) (31 3.0 (0 2 1)) (32 2.0 (0 1 2)) (33 1.0 (0 0 3)))
((2 3.0 (0 0 2)) (8 2.0 (0 1 1)) (6 2.0 (1 0 1)) (12 2.0 (0 0 1))
(7 1.0 (0 2 0)) (9 1.0 (1 1 0)) (14 1.0 (0 1 0)) (5 1.0 (2 0 0))
(15 1.0 (1 0 0)) (18 1.0 (0 0 0)) (22 1.0 (3 0 0)) (24 1.0 (2 1 0))
(25 2.0 (2 0 1)) (27 1.0 (1 2 0)) (28 2.0 (1 1 1)) (29 3.0 (1 0 2))
(31 1.0 (0 3 0)) (32 2.0 (0 2 1)) (33 3.0 (0 1 2)) (34 4.0 (0 0 3))))
'(((6 1.0 (0 0 2)) (9 1.0 (0 1 1)) (5 2.0 (1 0 1)) (15 1.0 (0 0 1))
(4 1.0 (0 2 0)) (3 2.0 (1 1 0)) (13 1.0 (0 1 0)) (0 3.0 (2 0 0))
(10 2.0 (1 0 0)) (16 1.0 (0 0 0)) (20 4.0 (3 0 0)) (21 3.0 (2 1 0))
(22 3.0 (2 0 1)) (23 2.0 (1 2 0)) (24 2.0 (1 1 1)) (25 2.0 (1 0 2))
(26 1.0 (0 3 0)) (27 1.0 (0 2 1)) (28 1.0 (0 1 2)) (29 1.0 (0 0 3))
(35 5.0 (4 0 0)) (36 4.0 (3 1 0)) (37 4.0 (3 0 1)) (38 3.0 (2 2 0))
(39 3.0 (2 1 1)) (40 3.0 (2 0 2)) (41 2.0 (1 3 0)) (42 2.0 (1 2 1))
(43 2.0 (1 1 2)) (44 2.0 (1 0 3)) (45 1.0 (0 4 0)) (46 1.0 (0 3 1))
(47 1.0 (0 2 2)) (48 1.0 (0 1 3)) (49 1.0 (0 0 4)))
((8 1.0 (0 0 2)) (7 2.0 (0 1 1)) (9 1.0 (1 0 1)) (14 1.0 (0 0 1))
(1 3.0 (0 2 0)) (4 2.0 (1 1 0)) (11 2.0 (0 1 0)) (3 1.0 (2 0 0))
(13 1.0 (1 0 0)) (17 1.0 (0 0 0)) (21 1.0 (3 0 0)) (23 2.0 (2 1 0))
(24 1.0 (2 0 1)) (26 3.0 (1 2 0)) (27 2.0 (1 1 1)) (28 1.0 (1 0 2))
(30 4.0 (0 3 0)) (31 3.0 (0 2 1)) (32 2.0 (0 1 2)) (33 1.0 (0 0 3))
(50 5.0 (0 4 0)) (45 4.0 (1 3 0)) (51 4.0 (0 3 1)) (41 3.0 (2 2 0))
(46 3.0 (1 2 1)) (52 3.0 (0 2 2)) (38 2.0 (3 1 0)) (42 2.0 (2 1 1))
(47 2.0 (1 1 2)) (53 2.0 (0 1 3)) (36 1.0 (4 0 0)) (39 1.0 (3 0 1))
(43 1.0 (2 0 2)) (48 1.0 (1 0 3)) (54 1.0 (0 0 4)))
((2 3.0 (0 0 2)) (8 2.0 (0 1 1)) (6 2.0 (1 0 1)) (12 2.0 (0 0 1))
(7 1.0 (0 2 0)) (9 1.0 (1 1 0)) (14 1.0 (0 1 0)) (5 1.0 (2 0 0))
(15 1.0 (1 0 0)) (18 1.0 (0 0 0)) (22 1.0 (3 0 0)) (24 1.0 (2 1 0))
(25 2.0 (2 0 1)) (27 1.0 (1 2 0)) (28 2.0 (1 1 1)) (29 3.0 (1 0 2))
(31 1.0 (0 3 0)) (32 2.0 (0 2 1)) (33 3.0 (0 1 2)) (34 4.0 (0 0 3))
(55 5.0 (0 0 4)) (54 4.0 (0 1 3)) (49 4.0 (1 0 3)) (53 3.0 (0 2 2))
(48 3.0 (1 1 2)) (44 3.0 (2 0 2)) (52 2.0 (0 3 1)) (47 2.0 (1 2 1))
(43 2.0 (2 1 1)) (40 2.0 (3 0 1)) (51 1.0 (0 4 0)) (46 1.0 (1 3 0))
(42 1.0 (2 2 0)) (39 1.0 (3 1 0)) (37 1.0 (4 0 0))))))
(defun Normal_point2d (f_deg point normal)
(do ((k 0 (1+ k)))
((= k (aref *num_var2d* f_deg)) nil)
(setf (aref *lin_sys* *ptr_lin* k)
(- (* (coerce (aref *power2d* k 0) 'long-float)
(expt (first point) (1- (aref *power2d* k 0)))
(expt (second point) (aref *power2d* k 1))
(second normal))
(* (aref *power2d* k 1)
(expt (second point) (1- (aref *power2d* k 1)))
(expt (first point) (aref *power2d* k 0))
(first normal)))))
(setf *ptr_lin* (1+ *ptr_lin*)))
(defun Contain_point2d (f_deg point)
(do ((k 0 (1+ k)))
((= k (aref *num_var2d* f_deg)) nil)
(setf (aref *lin_sys* *ptr_lin* k)
(* (expt (coerce (first point) 'long-float) (aref *power2d* k 0))
(expt (second point) (aref *power2d* k 1)))))
(setf *ptr_lin* (1+ *ptr_lin*)))