These are the results of testing ECL on a Raspberry Pi 3B+ running Raspbian Buster.
Because the Raspberry Pi 3B+ has only 1G of RAM and the default swap size for Raspbian Buster is 100M it is highly recommended that you extend the swap size to something larger. I use 1G. Instructions for doing this are located at:
https://wpitchoune.net/tricks/raspberry_pi3_increase_swap_size.html
(I was unable to build Ironclad successfully without doing this.)
My build configuration is:
./configure \ --enable-shared \ --enable-threads \ --enable-boehm=system \ --enable-libatomic=system \ --enable-gmp=system \ --enable-c99complex \ --enable-unicode=32 \ --enable-smallcons \ --with-tcp \ --with-serve-event \ --with-clos-streams \ --with-cmuformat \ --with-asdf \ --without-defsystem \ --with-cmp \ --with-bytecmp \ --with-dffi=included \ --with-fpe \ --with-signed-zero \ --with-ieee-fp \ --prefix=${HOME}/ecl
The FPU on the Raspberry Pi does not generate CPUexceptions, which prevents Linux from generating SIGFPE signals, which prevents ECL from detecting floating-point errors and delivering appropriate error conditions. The patch below causes ECL to poll for floating-point errors (rather than relying on SIGFPEs). This situation is properly detected by 'make check'.
diff --git a/src/aclocal.m4 b/src/aclocal.m4 index d1e626a7..ffcd1ad3 100644 --- a/src/aclocal.m4 +++ b/src/aclocal.m4 @@ -865,6 +865,10 @@ case "${host_cpu}" in ECL_FPE_CODE="arch/fpe_x86.c" AC_MSG_RESULT([x86_64]) ;; + arm* ) + ECL_FPE_CODE="arch/fpe_fenv.c" + AC_MSG_RESULT([arm]) + ;; *) ECL_FPE_CODE="arch/fpe_none.c" AC_MSG_RESULT([not available])
(src/configure needs to be re-generated.)
Add the file src/c/arch/fpe_fenv.c:
/* -*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*- */ /* vim: set filetype=c tabstop=8 shiftwidth=4 expandtab: */
/* fpe_fenv.c -- ISO C99 version of the floating point code */ /* Copyright (c) 2005, Juan Jose Garcia Ripoll.
ECL is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
See file '../Copyright' for full details. */
/* * See fpe_none.c for a description */
#define ecl_detect_fpe() do { \ int bits = fetestexcept(FE_ALL_EXCEPT); \ unlikely_if (bits) ecl_deliver_fpe(bits); } while(0)
The results of 'make check' are as follows:
Did 215 tests (0 crashed), 17647 checks. Pass: 17645 (100%) Fail: 2 ( 0%)
Failure details: -------------------------------- MIX.0016.FIFO-TESTS: FAIL: (EQUAL "foobar" (READ-LINE STREAM NIL :FOO)) -------------------------------- CMP.0044.INLINE-COS: FAIL: (NULL #:OO-1328) Expected NIL, but got (SHORT-FLOAT SINGLE-FLOAT) --------------------------------
I did not run ansi-test. It takes too long to run on a Raspberry Pi.
I did not run the maxima tests. I gave up after being unable to get them to build and run. I was curious to see how the C99 complex data type would perform.
The cl-bench results are:
;; -*- lisp -*- ECL 16.1.3 ;; #| Implementation *features*: (:QUICKLISP :ASDF-PACKAGE-SYSTEM :ASDF3.1 :ASDF3 :ASDF2 :ASDF :OS-UNIX :NON-BASE-CHARS-EXIST-P :ASDF-UNICODE :WALKER :CDR-1 :CDR-5 :LINUX :FORMATTER :CDR-7 :ECL-WEAK-HASH :LITTLE-ENDIAN :ECL-READ-WRITE-LOCK :LONG-LONG :UINT64-T :UINT32-T :UINT16-T :COMPLEX-FLOAT :LONG-FLOAT :UNICODE :DFFI :CLOS-STREAMS :CMU-FORMAT :UNIX :ECL-PDE :DLOPEN :CLOS :THREADS :BOEHM-GC :ANSI-CL :COMMON-LISP :IEEE-FLOATING-POINT :PACKAGE-LOCAL-NICKNAMES :CDR-14 :PREFIXED-API :FFI :ARMV7L :COMMON :ECL) |# ;; ;; Function real user sys consed ;; ---------------------------------------------------------------- ;; COMPILER 42.38 6.79 NIL NIL ;; LOAD-FASL 0.85 0.73 NIL NIL ;; SUM-PERMUTATIONS 4.23 4.31 NIL NIL ;; WALK-LIST/SEQ 0.02 0.02 NIL NIL ;; WALK-LIST/MESS 0.21 0.21 NIL NIL ;; BOYER 4.66 4.66 NIL NIL ;; BROWSE 1.81 1.81 NIL NIL ;; DDERIV 4.19 4.23 NIL NIL ;; DERIV 4.44 4.48 NIL NIL ;; DESTRUCTIVE 2.16 2.16 NIL NIL ;; DIV2-TEST-1 5.33 5.42 NIL NIL ;; DIV2-TEST-2 6.77 6.87 NIL NIL ;; FFT 3.10 3.09 NIL NIL ;; FRPOLY/FIXNUM 4.64 4.64 NIL NIL ;; FRPOLY/BIGNUM 1.93 1.93 NIL NIL ;; FRPOLY/FLOAT 5.36 5.36 NIL NIL ;; PUZZLE 15.64 15.64 NIL NIL ;; TAK 5.69 5.69 NIL NIL ;; CTAK 7.32 7.32 NIL NIL ;; TRTAK 5.72 5.72 NIL NIL ;; TAKL 3.30 3.30 NIL NIL ;; STAK 7.51 7.51 NIL NIL ;; FPRINT/UGLY 5.31 5.19 NIL NIL ;; FPRINT/PRETTY 55.37 54.43 NIL NIL ;; TRAVERSE 18.21 18.21 NIL NIL ;; TRIANGLE 13.39 13.39 NIL NIL ;; RICHARDS 37.24 37.24 NIL NIL ;; FACTORIAL 0.68 0.74 NIL NIL ;; FIB 2.66 2.66 NIL NIL ;; FIB-RATIO 0.28 0.28 NIL NIL ;; ACKERMANN 25.50 25.49 NIL NIL ;; MANDELBROT/COMPLEX 0.80 0.80 NIL NIL ;; MANDELBROT/DFLOAT 3.88 3.99 NIL NIL ;; MRG32K3A 11.40 11.56 NIL NIL ;; CRC40 473.48 481.94 NIL NIL ;; BIGNUM/ELEM-100-1000 0.14 0.14 NIL NIL ;; BIGNUM/ELEM-1000-100 0.18 0.18 NIL NIL ;; BIGNUM/ELEM-10000-1 0.24 0.24 NIL NIL ;; BIGNUM/PARI-100-10 0.02 0.02 NIL NIL ;; BIGNUM/PARI-200-5 0.06 0.06 NIL NIL ;; PI-DECIMAL/SMALL 5.43 5.43 NIL NIL ;; PI-DECIMAL/BIG 5.99 5.98 NIL NIL ;; PI-ATAN 1.26 1.36 NIL NIL ;; PI-RATIOS 1.66 1.66 NIL NIL ;; HASH-STRINGS 2.03 2.03 NIL NIL ;; HASH-INTEGERS 2.23 2.23 NIL NIL ;; SLURP-LINES 0.00 0.00 NIL NIL ;; BOEHM-GC 20.03 21.11 NIL NIL ;; DEFLATE-FILE 7.48 7.47 NIL NIL ;; 1D-ARRAYS 0.72 0.72 NIL NIL ;; 2D-ARRAYS 9.32 9.34 NIL NIL ;; 3D-ARRAYS 19.78 19.81 NIL NIL ;; BITVECTORS 8.37 8.42 NIL NIL ;; BENCH-STRINGS 19.93 19.93 NIL NIL ;; fill-strings/adjustable 9.83 20.80 NIL NIL ;; STRING-CONCAT 169.24 175.45 NIL NIL ;; SEARCH-SEQUENCE 11.97 11.97 NIL NIL ;; CLOS/defclass 7.03 1.19 NIL NIL ;; CLOS/defmethod 7.45 0.85 NIL NIL ;; CLOS/instantiate 29.34 29.33 NIL NIL ;; CLOS/simple-instantiate 94.13 94.17 NIL NIL ;; CLOS/methodcalls 8.39 8.53 NIL NIL ;; CLOS/method+after 12.48 6.62 NIL NIL ;; CLOS/complex-methods 4.43 4.43 NIL NIL ;; EQL-SPECIALIZED-FIB 9.37 9.37 NIL NIL
("ECL 16.1.3" ("EQL-SPECIALIZED-FIB" 9.37 9.366 NIL NIL) ("CLOS/complex-methods" 4.431 4.431 NIL NIL) ("CLOS/method+after" 12.478 6.618 NIL NIL) ("CLOS/methodcalls" 8.389 8.531 NIL NIL) ("CLOS/simple-instantiate" 94.132 94.17 NIL NIL) ("CLOS/instantiate" 29.339 29.329 NIL NIL) ("CLOS/defmethod" 7.449 0.85 NIL NIL) ("CLOS/defclass" 7.025 1.194 NIL NIL) ("SEARCH-SEQUENCE" 11.974 11.973 NIL NIL) ("STRING-CONCAT" 169.244 175.447 NIL NIL) ("fill-strings/adjustable" 9.834 20.797 NIL NIL) ("BENCH-STRINGS" 19.926 19.927 NIL NIL) ("BITVECTORS" 8.366 8.422 NIL NIL) ("3D-ARRAYS" 19.779 19.811 NIL NIL) ("2D-ARRAYS" 9.317 9.337 NIL NIL) ("1D-ARRAYS" 0.724 0.724 NIL NIL) ("DEFLATE-FILE" 7.476 7.468 NIL NIL) ("BOEHM-GC" 20.031 21.107 NIL NIL) ("SLURP-LINES" 0.004 0.003 NIL NIL) ("HASH-INTEGERS" 2.23 2.227 NIL NIL) ("HASH-STRINGS" 2.027 2.025 NIL NIL) ("PI-RATIOS" 1.663 1.662 NIL NIL) ("PI-ATAN" 1.257 1.36 NIL NIL) ("PI-DECIMAL/BIG" 5.989 5.983 NIL NIL) ("PI-DECIMAL/SMALL" 5.429 5.427 NIL NIL) ("BIGNUM/PARI-200-5" 0.065 0.064 NIL NIL) ("BIGNUM/PARI-100-10" 0.019 0.019 NIL NIL) ("BIGNUM/ELEM-10000-1" 0.239 0.238 NIL NIL) ("BIGNUM/ELEM-1000-100" 0.179 0.177 NIL NIL) ("BIGNUM/ELEM-100-1000" 0.138 0.139 NIL NIL) ("CRC40" 473.485 481.938 NIL NIL) ("MRG32K3A" 11.4 11.564 NIL NIL) ("MANDELBROT/DFLOAT" 3.879 3.987 NIL NIL) ("MANDELBROT/COMPLEX" 0.798 0.798 NIL NIL) ("ACKERMANN" 25.495 25.494 NIL NIL) ("FIB-RATIO" 0.275 0.275 NIL NIL) ("FIB" 2.665 2.665 NIL NIL) ("FACTORIAL" 0.683 0.736 NIL NIL) ("RICHARDS" 37.243 37.244 NIL NIL) ("TRIANGLE" 13.387 13.386 NIL NIL) ("TRAVERSE" 18.207 18.206 NIL NIL) ("FPRINT/PRETTY" 55.373 54.429 NIL NIL) ("FPRINT/UGLY" 5.308 5.191 NIL NIL) ("STAK" 7.511 7.511 NIL NIL) ("TAKL" 3.303 3.302 NIL NIL) ("TRTAK" 5.718 5.718 NIL NIL) ("CTAK" 7.325 7.324 NIL NIL) ("TAK" 5.692 5.692 NIL NIL) ("PUZZLE" 15.643 15.642 NIL NIL) ("FRPOLY/FLOAT" 5.357 5.357 NIL NIL) ("FRPOLY/BIGNUM" 1.932 1.933 NIL NIL) ("FRPOLY/FIXNUM" 4.643 4.643 NIL NIL) ("FFT" 3.095 3.094 NIL NIL) ("DIV2-TEST-2" 6.772 6.869 NIL NIL) ("DIV2-TEST-1" 5.331 5.424 NIL NIL) ("DESTRUCTIVE" 2.16 2.16 NIL NIL) ("DERIV" 4.437 4.476 NIL NIL) ("DDERIV" 4.188 4.234 NIL NIL) ("BROWSE" 1.809 1.807 NIL NIL) ("BOYER" 4.662 4.662 NIL NIL) ("WALK-LIST/MESS" 0.207 0.207 NIL NIL) ("WALK-LIST/SEQ" 0.017 0.017 NIL NIL) ("SUM-PERMUTATIONS" 4.23 4.312 NIL NIL) ("LOAD-FASL" 0.85 0.732 NIL NIL) ("COMPILER" 42.378 6.788 NIL NIL))
Hey Dave,
thank you for this,
Dave Richards writes:
Add the file src/c/arch/fpe_fenv.c:
/* -*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*- */ /* vim: set filetype=c tabstop=8 shiftwidth=4 expandtab: */
/* fpe_fenv.c -- ISO C99 version of the floating point code */ /* Copyright (c) 2005, Juan Jose Garcia Ripoll.
Did you bring back an old file? If not please adjust the copyright note accordingly.
The cl-bench results are:
could you also run cl-bench against the last release build? they make sense only in scenario when we compare results with previous versions.
Best regards, Daniel
PS Happy new year!
-- Daniel Kochmański ;; aka jackdaniel | Przemyśl, Poland TurtleWare - Daniel Kochmański | www.turtleware.eu
"Be the change that you wish to see in the world." - Mahatma Gandhi
Copyright (c) 2005, Juan Jose Garcia Ripoll.
Did you bring back an old file? If not please adjust the copyright note accordingly.
I just copied fpe_x86.c as a basis for fpe_fenv.c The code in fpe_fenv.c is copied right out of h/impl/math_fenv.h, which has a copyright date of 2010. Feel free to change the date if you wish. Juan wrote the code, I just copied it (with a single edit).
Dave
Here are the cl-bench results for 16.1.3 release:
;; -*- lisp -*- ECL 16.1.3 ;; #| Implementation *features*: (:QUICKLISP :ASDF-PACKAGE-SYSTEM :ASDF3.1 :ASDF3 :ASDF2 :ASDF :OS-UNIX :NON-BASE-CHARS-EXIST-P :ASDF-UNICODE :WALKER :CDR-1 :CDR-5 :LINUX :FORMATTER :CDR-7 :ECL-WEAK-HASH :LITTLE-ENDIAN :ECL-READ-WRITE-LOCK :LONG-LONG :UINT64-T :UINT32-T :UINT16-T :RELATIVE-PACKAGE-NAMES :LONG-FLOAT :UNICODE :DFFI :CLOS-STREAMS :CMU-FORMAT :UNIX :ECL-PDE :DLOPEN :CLOS :THREADS :BOEHM-GC :ANSI-CL :COMMON-LISP :IEEE-FLOATING-POINT :CDR-14 :PREFIXED-API :FFI :ARMV7L :COMMON :ECL) |# ;; ;; Function real user sys consed ;; ---------------------------------------------------------------- ;; COMPILER 37.44 5.59 NIL NIL ;; LOAD-FASL 0.85 0.79 NIL NIL ;; SUM-PERMUTATIONS 4.32 4.45 NIL NIL ;; WALK-LIST/SEQ 0.01 0.01 NIL NIL ;; WALK-LIST/MESS 0.23 0.23 NIL NIL ;; BOYER 4.69 4.69 NIL NIL ;; BROWSE 1.77 1.77 NIL NIL ;; DDERIV 4.38 4.43 NIL NIL ;; DERIV 4.50 4.57 NIL NIL ;; DESTRUCTIVE 2.15 2.15 NIL NIL ;; DIV2-TEST-1 5.39 5.46 NIL NIL ;; DIV2-TEST-2 6.90 6.97 NIL NIL ;; FFT 2.66 2.66 NIL NIL ;; FRPOLY/FIXNUM 4.65 4.65 NIL NIL ;; FRPOLY/BIGNUM 1.92 1.92 NIL NIL ;; FRPOLY/FLOAT 5.39 5.39 NIL NIL ;; PUZZLE 15.28 15.28 NIL NIL ;; TAK 5.48 5.48 NIL NIL ;; CTAK 7.20 7.21 NIL NIL ;; TRTAK 5.55 5.55 NIL NIL ;; TAKL 3.16 3.16 NIL NIL ;; STAK 7.29 7.29 NIL NIL ;; FPRINT/UGLY 7.68 7.59 NIL NIL ;; FPRINT/PRETTY 46.03 44.96 NIL NIL ;; TRAVERSE 18.34 18.34 NIL NIL ;; TRIANGLE 12.94 12.94 NIL NIL ;; RICHARDS 36.51 36.51 NIL NIL ;; FACTORIAL 0.69 0.76 NIL NIL ;; FIB 2.54 2.55 NIL NIL ;; FIB-RATIO 0.25 0.25 NIL NIL ;; ACKERMANN 24.49 24.48 NIL NIL ;; MANDELBROT/COMPLEX 2.68 2.75 NIL NIL ;; MANDELBROT/DFLOAT 3.19 3.25 NIL NIL ;; MRG32K3A 11.07 11.27 NIL NIL ;; CRC40 451.12 461.79 NIL NIL ;; BIGNUM/ELEM-100-1000 0.14 0.14 NIL NIL ;; BIGNUM/ELEM-1000-100 0.18 0.18 NIL NIL ;; BIGNUM/ELEM-10000-1 0.24 0.24 NIL NIL ;; BIGNUM/PARI-100-10 0.02 0.02 NIL NIL ;; BIGNUM/PARI-200-5 0.06 0.06 NIL NIL ;; PI-DECIMAL/SMALL 5.38 5.38 NIL NIL ;; PI-DECIMAL/BIG 5.93 5.93 NIL NIL ;; PI-ATAN 1.21 1.28 NIL NIL ;; PI-RATIOS 1.63 1.63 NIL NIL ;; HASH-STRINGS 1.99 1.99 NIL NIL ;; HASH-INTEGERS 2.26 2.26 NIL NIL ;; SLURP-LINES 0.00 0.00 NIL NIL ;; BOEHM-GC 19.67 21.06 NIL NIL ;; DEFLATE-FILE 7.05 7.05 NIL NIL ;; 1D-ARRAYS 0.71 0.71 NIL NIL ;; 2D-ARRAYS 9.01 9.08 NIL NIL ;; 3D-ARRAYS 18.85 18.93 NIL NIL ;; BITVECTORS 8.32 8.38 NIL NIL ;; BENCH-STRINGS 22.94 22.94 NIL NIL ;; fill-strings/adjustable 8.27 15.37 NIL NIL ;; STRING-CONCAT 153.63 163.83 NIL NIL ;; SEARCH-SEQUENCE 12.20 12.20 NIL NIL ;; CLOS/defclass 6.96 1.23 NIL NIL ;; CLOS/defmethod 6.90 0.81 NIL NIL ;; CLOS/instantiate 28.53 28.54 NIL NIL ;; CLOS/simple-instantiate 90.00 90.08 NIL NIL ;; CLOS/methodcalls 7.42 7.59 NIL NIL ;; CLOS/method+after 11.85 6.47 NIL NIL ;; CLOS/complex-methods 4.07 4.07 NIL NIL ;; EQL-SPECIALIZED-FIB 8.94 8.94 NIL NIL
("ECL 16.1.3" ("EQL-SPECIALIZED-FIB" 8.941 8.941 NIL NIL) ("CLOS/complex-methods" 4.069 4.069 NIL NIL) ("CLOS/method+after" 11.845 6.465 NIL NIL) ("CLOS/methodcalls" 7.424 7.587 NIL NIL) ("CLOS/simple-instantiate" 89.997 90.076 NIL NIL) ("CLOS/instantiate" 28.527 28.537 NIL NIL) ("CLOS/defmethod" 6.902 0.812 NIL NIL) ("CLOS/defclass" 6.96 1.232 NIL NIL) ("SEARCH-SEQUENCE" 12.205 12.204 NIL NIL) ("STRING-CONCAT" 153.625 163.828 NIL NIL) ("fill-strings/adjustable" 8.266 15.373 NIL NIL) ("BENCH-STRINGS" 22.944 22.943 NIL NIL) ("BITVECTORS" 8.316 8.38 NIL NIL) ("3D-ARRAYS" 18.847 18.934 NIL NIL) ("2D-ARRAYS" 9.009 9.084 NIL NIL) ("1D-ARRAYS" 0.706 0.707 NIL NIL) ("DEFLATE-FILE" 7.047 7.048 NIL NIL) ("BOEHM-GC" 19.665 21.059 NIL NIL) ("SLURP-LINES" 0.002 0.002 NIL NIL) ("HASH-INTEGERS" 2.256 2.256 NIL NIL) ("HASH-STRINGS" 1.985 1.985 NIL NIL) ("PI-RATIOS" 1.631 1.632 NIL NIL) ("PI-ATAN" 1.21 1.282 NIL NIL) ("PI-DECIMAL/BIG" 5.933 5.933 NIL NIL) ("PI-DECIMAL/SMALL" 5.376 5.375 NIL NIL) ("BIGNUM/PARI-200-5" 0.064 0.064 NIL NIL) ("BIGNUM/PARI-100-10" 0.02 0.019 NIL NIL) ("BIGNUM/ELEM-10000-1" 0.238 0.238 NIL NIL) ("BIGNUM/ELEM-1000-100" 0.179 0.177 NIL NIL) ("BIGNUM/ELEM-100-1000" 0.137 0.136 NIL NIL) ("CRC40" 451.117 461.792 NIL NIL) ("MRG32K3A" 11.069 11.271 NIL NIL) ("MANDELBROT/DFLOAT" 3.186 3.249 NIL NIL) ("MANDELBROT/COMPLEX" 2.676 2.749 NIL NIL) ("ACKERMANN" 24.487 24.476 NIL NIL) ("FIB-RATIO" 0.253 0.251 NIL NIL) ("FIB" 2.544 2.545 NIL NIL) ("FACTORIAL" 0.692 0.765 NIL NIL) ("RICHARDS" 36.512 36.511 NIL NIL) ("TRIANGLE" 12.937 12.937 NIL NIL) ("TRAVERSE" 18.34 18.339 NIL NIL) ("FPRINT/PRETTY" 46.03 44.96 NIL NIL) ("FPRINT/UGLY" 7.68 7.591 NIL NIL) ("STAK" 7.293 7.293 NIL NIL) ("TAKL" 3.165 3.165 NIL NIL) ("TRTAK" 5.546 5.545 NIL NIL) ("CTAK" 7.205 7.206 NIL NIL) ("TAK" 5.476 5.476 NIL NIL) ("PUZZLE" 15.28 15.28 NIL NIL) ("FRPOLY/FLOAT" 5.394 5.394 NIL NIL) ("FRPOLY/BIGNUM" 1.92 1.92 NIL NIL) ("FRPOLY/FIXNUM" 4.65 4.65 NIL NIL) ("FFT" 2.66 2.658 NIL NIL) ("DIV2-TEST-2" 6.9 6.967 NIL NIL) ("DIV2-TEST-1" 5.388 5.456 NIL NIL) ("DESTRUCTIVE" 2.147 2.147 NIL NIL) ("DERIV" 4.498 4.566 NIL NIL) ("DDERIV" 4.38 4.435 NIL NIL) ("BROWSE" 1.768 1.768 NIL NIL) ("BOYER" 4.693 4.692 NIL NIL) ("WALK-LIST/MESS" 0.229 0.23 NIL NIL) ("WALK-LIST/SEQ" 0.015 0.015 NIL NIL) ("SUM-PERMUTATIONS" 4.321 4.449 NIL NIL) ("LOAD-FASL" 0.85 0.793 NIL NIL) ("COMPILER" 37.444 5.589 NIL NIL))
I decided to try running ansi-test via 'make test' (rather than using the test-compiled target). It runs much faster this way.
The expurgated results for ansi-test are:
Test PROCLAIM.ERROR.7 failed Test SHIFTF.7 failed Test DESTRUCTURING-BIND.ERROR.10 failed Test EQUALP.5 failed Test EQUALP.6 failed Test LOOP.1.40 failed Test LOOP.1.41 failed Test LOOP.1.42 failed Test LOOP.1.43 failed Test DEFGENERIC.ERROR.20 failed Test DEFGENERIC.ERROR.21 failed Test CALL-NEXT-METHOD.ERROR.1 failed Test CALL-NEXT-METHOD.ERROR.2 failed Test DEFMETHOD.ERROR.14 failed Test DEFMETHOD.ERROR.15 failed Test MAKE-CONDITION.4 failed Test UPGRADED-ARRAY-ELEMENT-TYPE.8 failed Test EXP.ERROR.8 failed Test EXP.ERROR.9 failed Test EXP.ERROR.10 failed Test EXP.ERROR.11 failed Test EXPT.ERROR.8 failed Test EXPT.ERROR.9 failed Test EXPT.ERROR.10 failed Test EXPT.ERROR.11 failed Test MAKE-RANDOM-STATE.ERROR.4 failed Test MAP.ERROR.11 failed Test ALL-STANDARD-GENERIC-FUNCTIONS-ARE-INSTANCES-OF-THAT-CLASS failed Test SUBTYPEP-COMPLEX.8 failed Test LOGICAL-PATHNAME.3 failed Test FORMAT.E.26 failed Test COMPILE-FILE.6A failed Test COMPILE-FILE.18 failed 33 out of 21842 total tests failed:
real time : 1245.708 secs run time : 946.591 secs gc count : 710 times consed : 6795819255 bytes
Hi Dave,
I just opened a merge request at https://gitlab.com/embeddable-common-lisp/ecl/merge_requests/177 based on your idea for detecting floating point exceptions. It containts also a new check in the configure script that should detect cases where feenableexcept is declared but the CPU doesn't generate floating point exceptions. Could you test whether these changes solve the problems you reported?
Best regards, Marius Gerbershagen
Am 31.12.19 um 23:10 schrieb Dave Richards:
The FPU on the Raspberry Pi does not generate CPUexceptions, which prevents Linux from generating SIGFPE signals, which prevents ECL from detecting floating-point errors and delivering appropriate error conditions. The patch below causes ECL to poll for floating-point errors (rather than relying on SIGFPEs). This situation is properly detected by 'make check'.
diff --git a/src/aclocal.m4 b/src/aclocal.m4 index d1e626a7..ffcd1ad3 100644 --- a/src/aclocal.m4 +++ b/src/aclocal.m4 @@ -865,6 +865,10 @@ case "${host_cpu}" in ECL_FPE_CODE="arch/fpe_x86.c" AC_MSG_RESULT([x86_64]) ;;
- arm* )
- ECL_FPE_CODE="arch/fpe_fenv.c"
- AC_MSG_RESULT([arm])
- ;; *) ECL_FPE_CODE="arch/fpe_none.c" AC_MSG_RESULT([not available])
(src/configure needs to be re-generated.)
Add the file src/c/arch/fpe_fenv.c:
/* -*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*- */ /* vim: set filetype=c tabstop=8 shiftwidth=4 expandtab: */
/* fpe_fenv.c -- ISO C99 version of the floating point code */ /* Copyright (c) 2005, Juan Jose Garcia Ripoll.
ECL is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. See file '../Copyright' for full details.
*/
/*
- See fpe_none.c for a description
*/
#define ecl_detect_fpe() do { \ int bits = fetestexcept(FE_ALL_EXCEPT); \ unlikely_if (bits) ecl_deliver_fpe(bits); } while(0)