mmaul / clml

Common Lisp Machine Learning Library
Other
260 stars 36 forks source link

Erroneous error reporting for unsufficient heap #10

Closed FrankRuben closed 4 years ago

FrankRuben commented 8 years ago

Hi, trying to compile w/o increasing heap size for sbcl will not report an error, but an error for unknown condition class dynamic-heap-space-too-small:

CLML.LAPACK-ENVIRONMENT::DYNAMIC-HEAP-SPACE-TOO-SMALL does not designate a condition class..

Replacing the error reporting w/ (error "dynamic-heap-space-too-small" ...) solves that. Also the suggested 2560 MB seem to be no longer sufficient. I increased up to 2750, where it still didn't compile (stopping now, since it's a pain on my ages-old x201). Anyway very cool project, so thanks for all your effort. I'll be back w/ my shiny new notebook soon ;) Regards, Frank

mmaul commented 8 years ago

What version of SBCL are you using? What arguments were passed when starting SBCL?

FrankRuben commented 8 years ago

Hi, I'm on SBCL 1.2.11 on Ubuntu 14.04. I'm starting sbcl as "sbcl --dynamic-space-size 2750 --no-linedit --load /home/frank/quicklisp/setup.lisp". And I'm loading cl-ml using (ql:quickload :clml :verbose t). Usually the compile runs for some time and stops, once I enter a key, it will give me an error about exhausted memory (cannot reproduce currently - my notebook again decides to die before, but it's somewhere in an ldb shell). More info required? Regards, Frank

mmaul commented 8 years ago

I believe the lapack system was problematic in 1.2.11. Is it possible for you to try with the current version of SBCL? Perhaps something on the 1.3 branch?

anquegi commented 8 years ago

I'm using roswell, and have the same problem: on mac os x

CL-USER> (machine-instance)
"Antonios-MacBook-Pro.local"
CL-USER> (machine-type)
"X86-64"
CL-USER> (machine-version)
"Intel(R) Core(TM) i7-3540M CPU @ 3.00GHz"
CL-USER> (software-type)
"Darwin"
CL-USER> (software-version)
"15.5.0"

CL-USER> (lisp-implementation-type) "SBCL" CL-USER> (lisp-implementation-version) "1.3.5" CL-USER> (ql:quickload :clml) To load "clml": Load 1 ASDF system: clml ; Loading "clml" .. with this condition and restart:

CLML.LAPACK-ENVIRONMENT::DYNAMIC-HEAP-SPACE-TOO-SMALL does not designate a condition class. [Condition of type SIMPLE-TYPE-ERROR]

Restarts: 0: [RETRY] Retry compiling #<CL-SOURCE-FILE "clml.lapack-real" "package">. 1: [ACCEPT] Continue, treating compiling #<CL-SOURCE-FILE "clml.lapack-real" "package"> as having been successful. 2: [RETRY] Retry ASDF operation. 3: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the configuration. 4: [ABORT] Give up on "clml" 5: [*ABORT] Return to SLIME's top level. 6: [ABORT] abort thread (#<THREAD "repl-thread" RUNNING {1005100003}>)

Backtrace: 0: (SB-KERNEL:ALLOCATE-CONDITION CLML.LAPACK-ENVIRONMENT::DYNAMIC-HEAP-SPACE-TOO-SMALL :TEXT "Durring compilation with SBCL this system requires that the heap space be set to 2560 or greater. ..) 1: (MAKE-CONDITION CLML.LAPACK-ENVIRONMENT::DYNAMIC-HEAP-SPACE-TOO-SMALL :TEXT "Durring compilation with SBCL this system requires that the heap space be set to 2560 or greater. ..) 2: (ERROR CLML.LAPACK-ENVIRONMENT::DYNAMIC-HEAP-SPACE-TOO-SMALL :TEXT "Durring compilation with SBCL this system requires that the heap space be set to 2560 or greater. ..) 3: (CLML.LAPACK-ENVIRONMENT::CALL-WITH-ENVIRONMENT #<CLOSURE (LAMBDA (&REST ASDF/LISP-ACTION:FLAGS) :IN ASDF/LISP-ACTION:PERFORM-LISP-COMPILATION) {1003046FCB}>) 4: (ASDF/LISP-ACTION:PERFORM-LISP-COMPILATION #<ASDF/LISP-ACTION:COMPILE-OP > #<ASDF/LISP-ACTION:CL-SOURCE-FILE "clml.lapack-real" "package">) 5: ((SB-PCL::EMF ASDF/ACTION:PERFORM) # # #<ASDF/LISP-ACTION:COMPILE-OP > #<ASDF/LISP-ACTION:CL-SOURCE-FILE "clml.lapack-real" "package">) 6: ((:METHOD ASDF/ACTION:PERFORM-WITH-RESTARTS :AROUND (T T)) #<ASDF/LISP-ACTION:COMPILE-OP > #<ASDF/LISP-ACTION:CL-SOURCE-FILE "clml.lapack-real" "package">) [fast-method] 7: ((:METHOD ASDF/PLAN:PERFORM-PLAN (LIST)) ((#1=#<ASDF/LISP-ACTION:PREPARE-OP > . #<ASDF/SYSTEM:SYSTEM #2="alexandria">) (#1# . #3=#<ASDF/COMPONENT:STATIC-FILE #2# "LICENCE">) (#4=#<ASDF/LISP-ACTION:COM.. 8: ((FLET SB-C::WITH-IT :IN SB-C::%WITH-COMPILATION-UNIT)) 9: ((:METHOD ASDF/PLAN:PERFORM-PLAN :AROUND (T)) ((#1=#<ASDF/LISP-ACTION:PREPARE-OP > . #<ASDF/SYSTEM:SYSTEM #2="alexandria">) (#1# . #3=#<ASDF/COMPONENT:STATIC-FILE #2# "LICENCE">) (#4=#<ASDF/LISP-ACTIO.. 10: ((FLET SB-C::WITH-IT :IN SB-C::%WITH-COMPILATION-UNIT)) 11: ((:METHOD ASDF/PLAN:PERFORM-PLAN :AROUND (T)) #<ASDF/PLAN:SEQUENTIAL-PLAN {1006F353F3}> :VERBOSE NIL) [fast-method] 12: ((:METHOD ASDF/OPERATE:OPERATE (ASDF/OPERATION:OPERATION ASDF/COMPONENT:COMPONENT)) #<ASDF/LISP-ACTION:LOAD-OP :VERBOSE NIL> #<ASDF/SYSTEM:SYSTEM "clml"> :VERBOSE NIL) [fast-method] 13: ((SB-PCL::EMF ASDF/OPERATE:OPERATE) # # #<ASDF/LISP-ACTION:LOAD-OP :VERBOSE NIL> #<ASDF/SYSTEM:SYSTEM "clml"> :VERBOSE NIL) 14: ((LAMBDA NIL :IN ASDF/OPERATE:OPERATE)) 15: ((:METHOD ASDF/OPERATE:OPERATE :AROUND (T T)) #<ASDF/LISP-ACTION:LOAD-OP :VERBOSE NIL> #<ASDF/SYSTEM:SYSTEM "clml"> :VERBOSE NIL) [fast-method] 16: ((SB-PCL::EMF ASDF/OPERATE:OPERATE) # # ASDF/LISP-ACTION:LOAD-OP "clml" :VERBOSE NIL) 17: ((LAMBDA NIL :IN ASDF/OPERATE:OPERATE)) 18: (ASDF/CACHE:CALL-WITH-ASDF-CACHE #<CLOSURE (LAMBDA NIL :IN ASDF/OPERATE:OPERATE) {1006F1BC8B}> :OVERRIDE NIL :KEY NIL) 19: ((:METHOD ASDF/OPERATE:OPERATE :AROUND (T T)) ASDF/LISP-ACTION:LOAD-OP "clml" :VERBOSE NIL) [fast-method] 20: ((:METHOD ASDF/OPERATE:OPERATE :AROUND (T T)) ASDF/LISP-ACTION:LOAD-OP "clml" :VERBOSE NIL) [fast-method] 21: (ASDF/OPERATE:LOAD-SYSTEM "clml" :VERBOSE NIL) 22: (QUICKLISP-CLIENT::CALL-WITH-MACROEXPAND-PROGRESS #<CLOSURE (LAMBDA NIL :IN QUICKLISP-CLIENT::APPLY-LOAD-STRATEGY) {1006DBC3CB}>) 23: (QUICKLISP-CLIENT::AUTOLOAD-SYSTEM-AND-DEPENDENCIES "clml" :PROMPT NIL) 24: ((:METHOD QL-IMPL-UTIL::%CALL-WITH-QUIET-COMPILATION (T T)) # #<CLOSURE (FLET QUICKLISP-CLIENT::QL :IN QUICKLISP-CLIENT:QUICKLOAD) {1006D4371B}>) [fast-method] 25: ((:METHOD QL-IMPL-UTIL::%CALL-WITH-QUIET-COMPILATION :AROUND (QL-IMPL:SBCL T)) #<QL-IMPL:SBCL {1003A9CBF3}> #<CLOSURE (FLET QUICKLISP-CLIENT::QL :IN QUICKLISP-CLIENT:QUICKLOAD) {1006D4371B}>) [fast-me.. 26: ((:METHOD QUICKLISP-CLIENT:QUICKLOAD (T)) # :PROMPT NIL :SILENT NIL :VERBOSE NIL) [fast-method] 27: (QL-DIST::CALL-WITH-CONSISTENT-DISTS #<CLOSURE (LAMBDA NIL :IN QUICKLISP-CLIENT:QUICKLOAD) {1006D3748B}>) 28: (SB-INT:SIMPLE-EVAL-IN-LEXENV (QUICKLISP-CLIENT:QUICKLOAD :CLML) #) 29: (EVAL (QUICKLISP-CLIENT:QUICKLOAD :CLML)) 30: (SWANK::%EVAL-REGION "(ql:quickload :clml) ..) 31: ((LAMBDA NIL :IN SWANK::%LISTENER-EVAL)) 32: (SWANK-REPL::TRACK-PACKAGE #<CLOSURE (LAMBDA NIL :IN SWANK::%LISTENER-EVAL) {1006D3733B}>) 33: (SWANK::CALL-WITH-BUFFER-SYNTAX NIL #<CLOSURE (LAMBDA NIL :IN SWANK::%LISTENER-EVAL) {1006D3731B}>) 34: (SWANK::%LISTENER-EVAL "(ql:quickload :clml) ..) 35: (SB-INT:SIMPLE-EVAL-IN-LEXENV (SWANK-REPL:LISTENER-EVAL "(ql:quickload :clml) ..) 36: (EVAL (SWANK-REPL:LISTENER-EVAL "(ql:quickload :clml) ..) 37: (SWANK:EVAL-FOR-EMACS (SWANK-REPL:LISTENER-EVAL "(ql:quickload :clml) ..) 38: (SWANK::PROCESS-REQUESTS NIL) 39: ((LAMBDA NIL :IN SWANK::HANDLE-REQUESTS)) 40: ((LAMBDA NIL :IN SWANK::HANDLE-REQUESTS)) 41: (SWANK/SBCL::CALL-WITH-BREAK-HOOK # #<CLOSURE (LAMBDA NIL :IN SWANK::HANDLE-REQUESTS) {100510800B}>) 42: ((FLET SWANK/BACKEND:CALL-WITH-DEBUGGER-HOOK :IN "/Users/toni/.roswell/lisp/quicklisp/dists/quicklisp/software/slime-v2.18/swank/sbcl.lisp") # #<CLOSURE (LAMBDA NIL.. 43: (SWANK::CALL-WITH-BINDINGS ((STANDARD-INPUT . #1=#<SWANK/GRAY::SLIME-INPUT-STREAM {1005015E13}>) (STANDARD-OUTPUT . #2=#<SWANK/GRAY::SLIME-OUTPUT-STREAM {10050E7153}>) (TRACE-OUTPUT . #2#) (*ERR.. 44: (SWANK::HANDLE-REQUESTS #<SWANK::MULTITHREADED-CONNECTION {10042215A3}> NIL) 45: ((FLET #:WITHOUT-INTERRUPTS-BODY-1171 :IN SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE)) 46: ((FLET SB-THREAD::WITH-MUTEX-THUNK :IN SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE)) 47: ((FLET #:WITHOUT-INTERRUPTS-BODY-359 :IN SB-THREAD::CALL-WITH-MUTEX)) 48: (SB-THREAD::CALL-WITH-MUTEX #<CLOSURE (FLET SB-THREAD::WITH-MUTEX-THUNK :IN SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE) {CA79CEB}> #<SB-THREAD:MUTEX "thread result lock" owner: #<SB-THREAD:THREAD ".. 49: (SB-THREAD::INITIAL-THREAD-FUNCTION-TRAMPOLINE #<SB-THREAD:THREAD "repl-thread" RUNNING {1005100003}> NIL #<CLOSURE (LAMBDA NIL :IN SWANK-REPL::SPAWN-REPL-THREAD) {10050FFF7B}> (#<SB-THREAD:THREAD "re.. 50: ("foreign function: call_into_lisp") 51: ("foreign function: new_thread_trampoline") 52: ("foreign function: _pthread_body") 53: ("foreign function: _pthread_body") 54: ("foreign function: thread_start")

with clozure common lisp 1.11 it works as expected

guicho271828 commented 8 years ago

https://github.com/roswell/roswell/wiki/0.-FAQ#how-can-i-extend-the-dynamic-space-size-sbcl-specific

paulogeyer commented 7 years ago

just had the same problem here, after increasing the sbcl dynamic memory, it built succesfully

perhaps this should be added to the README/INSTALL?

mmaul commented 7 years ago

Addressed both issues: In branch issue-10-Erroneous-error-reporting-for-unsufficient-heap-1 the missing condition was added In branch issue-10-Erroneous-error-reporting-for-unsufficient-heap roswell instructions for increasing dynamic heap space is sbcl was added. Both branches merged to head

bmansurov commented 5 years ago

I also had similar issues on an old laptop similar to OP. I forgot that I had these lines in my ~/.sbclrc file:

(setf *read-default-float-format* 'double-float)
(declaim (optimize (speed 0) (safety 3) (debug 3)))

After commenting out the above lines, the build was quick.

mmaul commented 4 years ago

I think solutions for this issue have been sufficiently discussed