Group Abstract Group Abstract

Message Boards Message Boards

Mathematica slow down on Raspberry Pi 3

Posted 10 years ago

Just benchmarked my RPI3 vs RPI2 Model B V1.1 with the built in Mathematica Benchmark[]. I was quite surprised to see the benchmark significantly decline. RPI3 had benchmark of 0.03 and time of 465 while the RPI2 had benchmark of 0.045 and time of 305 sec. On the RPI3, two tests dominated the time, matrix multiply and solving linear systems which took only slightly less than the entire benchmark on RPI2. Both systems were fully updated. I wonder if Wolfram could comment on this : do they feel it is the hardware or this might be improved in a future release?. As it is it is difficult to use Mathematica on an RPI and I was looking to RPI3 to improve this. Thanks

POSTED BY: david p
13 Replies
POSTED BY: Amelie Schuster

Here's my enthusiastic vote for making 10.0.2 the default distribution until 10.0.3 is ready.

Face it. Mathematica is a tough sell on Raspberry Pi, and this isn't making it any easier.

Cheers, Fred Klingener

POSTED BY: Fred Klingener
Posted 10 years ago

Thanks. Thats at least two votes now. Its clear that the RPI is really making progress with the hardware. I would hope that Mathematica would advance with it. The RPI 3 is great and let's put it to good use.

POSTED BY: david p
Posted 10 years ago
POSTED BY: david p
Posted 10 years ago

There's a Raspberry Pi 3? I never saw anything on the tech review sites.

POSTED BY: Dan M
Posted 10 years ago

I have no Pi 3 - but in my opinion you should install the temp-monitor to your taskbar and watch it while running Mathematica. On my slightly overclocked Pi2 some calculations bring it to temperatures around 70°C - and as the Pi 3 runs hotter, I could imagine that it possibly runs too hot and clocks down while calculating.

POSTED BY: Michael Steffen

A good idea to check the temperature/cpu clock. Alas, the problem evidently can't be fixed with a couple of heat sinks and a fan.

I installed a power monitor on the USB power cord, the Raspberry Pi's temperature monitor and the CPU clock monitor on the taskbars of both computers.

I updated both the Raspberry Pi 2 and a Raspberry Pi 3 to Jessie (uname -r -> 4.1.13-v7+) and wolfram-engine ($Version -> 10.3.1 for Linux ARM (32-bit) (January 11, 2016).

The benchmark summary is as follows:

Model                Benchmark        Total Time        Voltage        Current    Temperature Range    CPU clock
Raspberry Pi 2       0.011                1248                >5. V          0.3-0.4 A      <49 deg C                 900MHz
Raspberry Pi 3        0.022                 842                >5. V           0.3-0.4 A      <50 deg C                    -

These data are less confusing to me in that the 3 is faster than the 2 running the same versions of the software (to the extent arranged by $sudo apt-get install). Evidently, there's no quick fix.

Finding whether the 3 is going to be usable for my projects will have to wait. Doing linear algebra on the GPU wold be a worthwhile step though.

Cheers, Fred Klingener

POSTED BY: Fred Klingener
Posted 10 years ago
POSTED BY: Michael Steffen
Posted 10 years ago
POSTED BY: david p

While I don't have a RPi3 handy, any change in linear algebra performance is likely explained by this portion of @Alex Newman 's post in another thread.

We also experimented with performance tuned BLAS libraries for the ARM CPU, but the Raspberry Pi distribution's use of ARMv6 [Raspberry Pi 1] software for their ARMv7 [Raspberry Pi 2] and ARMv8 [Raspberry Pi 3] devices makes that very difficult. Libraries like OpenBLAS don't do the same sort of runtime CPU detection that things like Intel MKL do and the hand-tuned assembly for ARMv6 will often just crash on ARMv7 (and have missing operations if you target ARMv7 and attempt to run it on ARMv6).

I would definitely be interested if anyone did create such libraries, though. Of course a tremendous amount of time and validation from vendors and the community would be required to get them up the quality where they'll be accurate enough in all scenarios we rely on them. For now, I'm having to use very basic CBLAS because it's the best way to deliver software that runs on all generations of the Raspberry Pi and is relatively accurate.

POSTED BY: Ilian Gachevski

The general linear algebra performance has been improved considerably in the recent 11.3.0 Raspberry Pi release while still maintaining ARMv6 compatibility.

This will be reflected as a corresponding improvement in the Benchmark[] results.

POSTED BY: Ilian Gachevski
Posted 10 years ago

Update: I think the issue is related to Mathematica 10.3.1. I turns out the fastest benchmark on the RPI2 was collected with 10.0.2. I could not get my RPI3 to boot with older systems (NOOBS 1.4) so I built a brand new one (NOOBS 1.8). The new system works on older RPI's so I compared the same hardware and switched the SD cards out on the RPI2. Using 10.3.1 on an RPI2 I got a benchmark of 0.015 and time of 907, which is almost 2x slower than the same SD card in the RPI3. So RPI3 is faster than RPI2, but Mathematica 10.3.1 is slower than 10.0.1

POSTED BY: david p

FYI, I can replicate your results. On RPi v2 with 10.3 I get a score of 0.015 with a time of ~ 900s and the time is cut in half for the v3 with a score of 0.03. I'm pleasantly surprised that 2D graphics in a manipulate on a v3 are acceptably smooth and a 3D plot can be rotated with less lag than on a v2; however 3D graphics are still not ready for prime time on the RPi.

POSTED BY: BoB LeSuer
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard