5

I just got a raspberry pi 3 and want to get a rough idea of the max temp I might reach while doing intensive calculations. What would you suggest I calculate in mathematica to get the pi hot?

Criteria are:

  1. Something in mathematica
  2. Low Ram usage
  3. Low time (5-15 minutes)
  4. High cpu usage (I want my pi to get the hottest it's ever going to get while running mathematica specifically)

Thanks!

  • None. Use this (or something similar) instead. – Oleksandr R. May 03 '16 at 03:35
  • Thanks, but I'm looking for an actual temp rather than a synthetic. I've already run sysbench, I think it was. Primes up to 20000, 5x consecutively with temp readings in between. Got up only to 60C with the small fan and case I have. Want to compare this with actual temps while running mathematica. – Elem-Teach-w-Bach-n-Math-Ed May 03 '16 at 03:42
  • Really? Vote me down just because I want a real temp rather than a synthetic? – Elem-Teach-w-Bach-n-Math-Ed May 03 '16 at 03:46
  • @user21 Honestly, hardly anything. I'm new to mathematica in general. Wasn't sure what wouldn't max out the memory or take more than ten or so minutes, but still tax the cpu heavily. – Elem-Teach-w-Bach-n-Math-Ed May 03 '16 at 03:58
  • You probably got downvoted because of your imprecise specifications. Mathematica can be used to do any sort of computation you can imagine, and they all have different performance parameters. That's why I suggested you use a synthetic loop to examine the worst case, which is all that really matters, isn't it? Anyway, what sort of application do you have in mind, in order to be able to get some suggestions? – Oleksandr R. May 03 '16 at 04:02
  • Not really anything in particular, just something that would tax the cpu as mentioned. I've done some stuff related to prime numbers so maybe something like calculating the nth prime? How high should I go? Will this tax memory more or ram? I'm too inexperienced. – Elem-Teach-w-Bach-n-Math-Ed May 03 '16 at 04:07
  • Since you have no particular requirements and so no standard to judge which suggestions are better or worse than any others, why not just do some FFTs or matrix multiplications, or solve some large linear systems? These are classical computationally intensive operations, albeit if you aren't going to use the result for anything, they're just as synthetic as anything else. But I don't know whether these use optimized machine libraries on the Raspberry Pi, which is another reason why I suggested to use the cpuburn code. – Oleksandr R. May 03 '16 at 04:10
  • @OleksandrR. I'll edit the original question to add some criteria. – Elem-Teach-w-Bach-n-Math-Ed May 03 '16 at 04:14

2 Answers2

3

You can try the built-in Benchmark[] function (requires importing the Benchmarking package).

Needs["Benchmarking`"]
Benchmark[]

Be aware that it will take a long time: https://mathematica.stackexchange.com/a/74184/6849

shrx
  • 7,807
  • 2
  • 22
  • 55
  • 3
    ParallelEvaluate[Benchmark[]] to have it running on all cores. But this probably doesn't satisfy the "Low Ram usage" criterion. – Karsten7 May 03 '16 at 13:48
  • This is currently the best solution I've found and really seems to let me know max temps while running just about any calculation Mathematica is capable of. The Parallel Evaluate tip is absolutely necessary, so thanks Karsten. I haven't checked what this does RAM wise, but if RAM usage is high, it's not hindering the CPU from being taxed for all it's worth. Time is my biggest complaint. Something quicker would be nice. – Elem-Teach-w-Bach-n-Math-Ed May 04 '16 at 04:20
  • Also, just for comparison sake, running "ParallelEvaluate[Benchmark[]]" with this fan solution: https://www.amazon.com/gp/product/B019SIAGTO/ref=oh_aui_detailpage_o01_s01?ie=UTF8&psc=1 temperatures never got above 64C. I'd love to hear similar stats from others. – Elem-Teach-w-Bach-n-Math-Ed May 04 '16 at 04:25
1

Here's a self-answer just for example:

AbsoluteTiming[
ParallelTable[
 FactorInteger[Prime[i]], {i, 300000000001, 300000000004}]]

This I suppose does the job, but I'd love to have someone else suggest something that might better fulfill my criteria.