Raspberry Pi test results

Dave Richards dave at synergy.org
Tue Dec 31 22:10:22 UTC 2019


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))




More information about the ecl-devel mailing list