[gambit-list] Gambit on Raspberry Pi 2 B

Francois Magnan magnan at categoricaldesign.com
Tue Mar 10 08:25:00 EDT 2015


Wow! I was planning to do the same experiment. To control the lights and energy in my home I use Gambit running on a Mac mini but I was planning to replace this with a RaspberryPi. I will!
Thank you for sharing.
Francois Magnan


> On Mar 9, 2015, at 6:05 PM, Bradley Lucier <lucier at math.purdue.edu> wrote:
> 
> More numbers:
> 
>> On Mar 9, 2015, at 3:52 PM, Bradley Lucier <lucier at math.purdue.edu> wrote:
>> 
>> I got a Raspberry Pi 2 B (RPI2), and it’s a lot of fun.  Gambit from Github runs out of the box with the compiler that’s shipped with Raspbian (the RPI version of Debian).
>> 
>> I was trying out some options to see how to best take advantage of the hardware. The numbers follow my sig.
>> 
>> Brad
>> 
>> I have a simple test:
>> 
>> cutie-pi:~/programs/gambit> gsi -v
>> v4.7.4 20150228031125 armv7l-unknown-linux-gnueabihf "./configure 'CC=gcc -march=armv7-a -mfpu=vfpv4 -mhard-float' '--enable-single-host' '--enable-shared' '--enable-multiple-versions'"
>> cutie-pi:~/programs/gambit>  gsi -e '(define a (time (expt 3 1000000)))(define b (time (* a a)))'
>> (time (expt 3 1000000))
>>   494 ms real time
>>   490 ms cpu time (490 user, 0 system)
>>   7 collections accounting for 8 ms real time (10 user, 0 system)
>>   9166544 bytes allocated
>>   2001 minor faults
>>   no major faults
>> (time (* a a))
>>   522 ms real time
>>   530 ms cpu time (520 user, 10 system)
>>   2 collections accounting for 4 ms real time (10 user, 0 system)
>>   8817880 bytes allocated
>>   2067 minor faults
>>   no major faults
>> 
>> You can install gcc-4.8, but then it runs out of memory compiling _t-univ.c, so I reconfigured Gambit to not include _t-univ.*, and got the following results:
>> 
>> cutie-pi:~/programs/gambit> gsi -v
>> v4.7.4 20150228031125 armv7l-unknown-linux-gnueabihf "./configure 'CC=gcc-4.8 -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard' '--enable-single-host' '--enable-shared' '--enable-multiple-versions'"
>> cutie-pi:~/programs/gambit> gsi -e '(define a (time (expt 3 1000000)))(define b (time (* a a)))'
>> (time (expt 3 1000000))
>>   430 ms real time
>>   430 ms cpu time (420 user, 10 system)
>>   7 collections accounting for 8 ms real time (10 user, 0 system)
>>   9166544 bytes allocated
>>   2001 minor faults
>>   no major faults
>> (time (* a a))
>>   453 ms real time
>>   450 ms cpu time (440 user, 10 system)
>>   2 collections accounting for 3 ms real time (0 user, 0 system)
>>   8817880 bytes allocated
>>   2067 minor faults
>>   no major faults
> 
> Changing -fno-strict-aliasing to -fstrict-aliasing by hand gives an even better result:
> 
> cutie-pi:~/programs/gambit> gsi -v
> v4.7.4 20150228031125 armv7l-unknown-linux-gnueabihf "./configure 'CC=gcc-4.8 -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard' '--enable-single-host' '--enable-shared' '--enable-multiple-versions'"
> cutie-pi:~/programs/gambit> gsi -e '(define a (time (expt 3 1000000)))(define b (time (* a a)))'
> (time (expt 3 1000000))
>    395 ms real time
>    390 ms cpu time (370 user, 20 system)
>    7 collections accounting for 12 ms real time (0 user, 0 system)
>    9166544 bytes allocated
>    2000 minor faults
>    no major faults
> (time (* a a))
>    405 ms real time
>    400 ms cpu time (400 user, 0 system)
>    2 collections accounting for 5 ms real time (0 user, 0 system)
>    8817880 bytes allocated
>    2067 minor faults
>    no major faults
> 
> This may introduce impossible to debug errors, but I don’t think gcc’s aliasing analysis is yet smart enough to figure out how to do that.
> 
>> 
>> And on an experiment in spectral identification that mainly does F64 inner products, I get with the default build
>> 
>> (time (run-experiment-and-graph 5))
>>  785617 ms real time
>>  785590 ms cpu time (785040 user, 550 system)
>>  33 collections accounting for 442 ms real time (350 user, 80 system)
>>  3216061748 bytes allocated
>>  30338 minor faults
>>  no major faults
>> 
>> and with the gcc-4.8 build I get
>> 
>>> (time (run-experiment-and-graph 5))
>> (time (run-experiment-and-graph 5))
>>   739829 ms real time
>>   739790 ms cpu time (739620 user, 170 system)
>>   33 collections accounting for 292 ms real time (310 user, 0 system)
>>   3216060588 bytes allocated
>>   17663 minor faults
>>   no major faults
> 
> using -fstrict-aliasing didn’t help the spectral identification code much:
> 
>> (time (run-experiment-and-graph 5))
> (time (run-experiment-and-graph 5))
>    733849 ms real time
>    733750 ms cpu time (733330 user, 420 system)
>    33 collections accounting for 219 ms real time (210 user, 0 system)
>    3216086556 bytes allocated
>    16938 minor faults
>    no major faults
> 
> 
> 
> _______________________________________________
> Gambit-list mailing list
> Gambit-list at iro.umontreal.ca <mailto:Gambit-list at iro.umontreal.ca>
> https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list <https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20150310/c6ec7e16/attachment.htm>


More information about the Gambit-list mailing list