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

Issue solved with MMA Version 11.3.0 for Raspberry Pi running Raspbian Stretch June 2018 (2018-06-27):

Pi 3B+ V11.3 score is 0.13 and it took 107–110 seconds (test 9 & 15 both around 8 seconds each)

Pi 3B+ V11.2 score is 0.03 and it took 454 seconds (test 9 172 s & test 15 105 s)

Tests 4, 5, 8 are 3-times faster now and test 14 is slightly over 4 times faster. Other tests are about the same as before.

Wow. Great improvement on the same hardware. Especially, but not only, the very slow computations are now greatly accellerated. Great news indeed.

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

Here are a couple of plots showing the performance as a function of frequency for Mathematica and also python3 (first 20000 digits).The procedure used the overclock menu in raspi-config. For G/L 7 Wheezy the options were 700, 800, 900, 950 and 1000. For G/L 8 Jessie the pi2 had two options 900 and 1000, and the pi3 had only 1 setting 1000. The Mathematica benchmarks significantly deteriorate for 10.3.1/Jessie. The Python benchmarks are all better for Jessie, excluding Linux as the problem.

Fig 1 Mathematica benchmarks

Fig 2 python benchmarks

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
POSTED BY: Ilian Gachevski
Posted 10 years ago
POSTED BY: david p
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