I figured I ought to do something with the Pi for Pi day (3/14) so i installed Pi on my Pi,
sudo apt-get install pi
then i calculated Pi on the Pi to 3.141593 (rounded) million decimal places.
pi 3141593 > pimil.txt
The calculation took 132 seconds on my old Pi (256 MB version B) running at 1100 Mhz arm, 500 ram, and 500 core.
If you were to run a heavily overclocked Pi all day (on Pi day) calculating Pi, I think you could probably get close to calculating Pi-billion decimal places of Pi but I'm not sure if Pi would calculate that many digits of Pi on the Pi due to memory size constraints.
Bryan
-
- Posts: 32
- Joined: Fri Sep 14, 2012 4:32 pm
Re: Pi Day
Makes me think of that distributed SETI project. With 2.5 million Pis, we should have found ET by now.
If they weren't busy mining bitcoins, I guess.
If they weren't busy mining bitcoins, I guess.
-
- Posts: 32
- Joined: Fri Sep 14, 2012 4:32 pm
Re: Pi Day
How many digits per day could a beowulf cluster of 314 Pi's calculate? The world may never know.
Turns out that my Pi runs out of memory after only 20 minutes or so and kills the process. So the max number of digits I can calculate is something like 20 million. The 512 MB Pi's could probably do quite a bit better.
Bryan
Turns out that my Pi runs out of memory after only 20 minutes or so and kills the process. So the max number of digits I can calculate is something like 20 million. The 512 MB Pi's could probably do quite a bit better.
Bryan
Re: Pi Day
The Pis are actually very very VERY terrible for mining any type of cryptocoin, let alone bitcoin. It is literally a waste of power to even attempt it.Douglas6 wrote:Makes me think of that distributed SETI project. With 2.5 million Pis, we should have found ET by now.
If they weren't busy mining bitcoins, I guess.
If you are talking about people who spend thousands of dollars on 6 GPU systems for mining, then yes, that is indeed also a waste of effort.
Re: Pi Day
Its getting to be a waste of money using dedicated ASICs to mine Bitcoin nowadays. It a lot cheaper to just buy it....
Ebay is awash with S/H Bitcoin ASICs at knock down rates.
Ebay is awash with S/H Bitcoin ASICs at knock down rates.
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......
I must not tread on too many sacred cows......
- DougieLawson
- Posts: 42483
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
Re: Pi Day
Is it?pluggy wrote:Its getting to be a waste of money using dedicated ASICs to mine Bitcoin nowadays. It a lot cheaper to just buy it....
Ebay is awash with S/H Bitcoin ASICs at knock down rates.
http://www.raspberrypi.org/archives/6437
Languages using left-hand whitespace for syntax are ridiculous
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
Re: Pi Day
Cheap power, if you watch the video. Its not viable at consumer power prices.
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......
I must not tread on too many sacred cows......
-
- Posts: 32
- Joined: Fri Sep 14, 2012 4:32 pm
Re: Pi Day
Just found a post on Mathematica about calculating pi and it looks like that speeds things up quite a bit.
Code below:
(*Clear Cache*)
ClearSystemCache[]
(*Calculate pi to 1 million decimal places and store the result*)
AbsoluteTiming[pi = N[Pi, 1000000];]
On the same setup as before I got:
pi million decimal places 38.4 seconds
2pi million decimal places 93.8 seconds
4pi million dp 241.4 seconds
Same memory limits seem to apply. Limit is somewhere around 20 million dp
Code below:
(*Clear Cache*)
ClearSystemCache[]
(*Calculate pi to 1 million decimal places and store the result*)
AbsoluteTiming[pi = N[Pi, 1000000];]
On the same setup as before I got:
pi million decimal places 38.4 seconds
2pi million decimal places 93.8 seconds
4pi million dp 241.4 seconds
Same memory limits seem to apply. Limit is somewhere around 20 million dp
-
- Posts: 32
- Joined: Fri Sep 14, 2012 4:32 pm
Re: Pi Day
In honor of the special once a century pi day I repeated the above calc on a B+ with maximum memory allocated to the CPU. I got clear up to 5.654866 x 10^7 decimal places of pi. Calculation took 1662 seconds using a standard turbo mode at 900 Mhz. No other overclocking features were used.
Maybe next year I'll try with a B2
Gotta go make some pie
Bryan
Maybe next year I'll try with a B2
Gotta go make some pie
Bryan
Re: Pi Day
For doing the actual crypto work you are correct. However, because low power Pis make ideal controller interfaces to the ASICs and run CGMiner very well and extremely stable. My CGMiner host is an old 256MB Model B. So, many thousands of Pis are in fact employed in crypto-coin mining supporting roles and are very good at it.lazarus78 wrote: The Pis are actually very very VERY terrible for mining any type of cryptocoin, let alone bitcoin. It is literally a waste of power to even attempt it.
Bitcoin prices over the last 2 weeks recovered to around £200, and this has caused a lot of ASICs to switch on, and pools have become very well populated again.pluggy wrote: Its getting to be a waste of money using dedicated ASICs to mine Bitcoin nowadays. It a lot cheaper to just buy it....
- DougieLawson
- Posts: 42483
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
Re: Pi Day
Yep. A bunch of silly people who write their dates backwards (compared to EUR, JIS & ISO standards) fussed about the day of the month and the month of the year and got ever more silly at 9:26:53 on that same day.solar3000 wrote:so did anything actually happen on pi day?
Languages using left-hand whitespace for syntax are ridiculous
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
Re: Pi Day
There was no mention this Saturday in the new at all (USA).DougieLawson wrote:Yep. A bunch of silly people who write their dates backwards (compared to EUR, JIS & ISO standards) fussed about the day of the month and the month of the year and got ever more silly at 9:26:53 on that same day.solar3000 wrote:so did anything actually happen on pi day?
As for dates, I use this format to name my files: YYYY-MM-DD. Sorts out just fine.
We should use this date: The date and time now is: 1426515396
Antikythera
- DougieLawson
- Posts: 42483
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
Re: Pi Day
Here in Rightpondia we really do say "Saturday, 14th of March" it comes from the mouthful "The fourteenth day of March in the year of our Lord two thousand and fifteen" (from when we were just a bit more religious).bertwert wrote: I do not like that date format, it makes no sense.![]()
Their argument:
It is like saying March 14 2015 and you wouldn't say 14th of March 2015.
Uh yes I would....
Unfortunately 2015 doesn't have 14 months...
We can have our own Pi approximation day on 22nd July.
Languages using left-hand whitespace for syntax are ridiculous
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
Re: Pi Day
Goddamned parochial yanks......
It really was the 14th of March, like today is the 16th of March.
It really was the 14th of March, like today is the 16th of March.
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......
I must not tread on too many sacred cows......
-
- Posts: 32
- Joined: Fri Sep 14, 2012 4:32 pm
Re: Pi Day
Pi day again. Gotta calculate pi. I ran the mathematica calculation on a B2 this year with 16MB video memory to maximize the CPU memory. The calculation only took 25% CPU so it is obviously not multi-threaded. No big deal since the calculation is still very much memory limited.
On a B2 this year. I got
pi million DP took 20.5 seconds
2pi million DP took 53.3 seconds
4pi million DP took 116 seconds
and 35pi million DP took 1527 seconds.
Looks like 35pi million decimal places (~110 million DP) is close to the memory limit on the B2. I haven't crashed the calculation yet though.
Finally, it is interesting to note that this thread is now in its third year. Three, as we all know, is a pretty good approximation for pi. Maybe we should just have a pi month in march so that the date formatting pedants can all breath a sigh of relief and live in harmony with the rest of us. In honor of that suggestion I think I'll go eat a small slice of pie (about 4.5%) such that the remaining pie will have a circumference equal to three times the diameter.
On a B2 this year. I got
pi million DP took 20.5 seconds
2pi million DP took 53.3 seconds
4pi million DP took 116 seconds
and 35pi million DP took 1527 seconds.
Looks like 35pi million decimal places (~110 million DP) is close to the memory limit on the B2. I haven't crashed the calculation yet though.
Finally, it is interesting to note that this thread is now in its third year. Three, as we all know, is a pretty good approximation for pi. Maybe we should just have a pi month in march so that the date formatting pedants can all breath a sigh of relief and live in harmony with the rest of us. In honor of that suggestion I think I'll go eat a small slice of pie (about 4.5%) such that the remaining pie will have a circumference equal to three times the diameter.
Re: Pi Day
100 million digits of Pi? On a Pi 2B?
Easy.
Took about 56 minutes. You can check the results here:
http://devserv.rsmtech.fi/pi.txt.gz
I used gmp-chudnovsky, see attachment. Had to add a swap file. It was 1GB about a third of which got used. Probably not wise, or fast, to have a swap file on SD card.
Clustering a bunch of Pi, or any other machines, won't help. So far the best methods of calculating massive numbers of digits of Pi do not parallellize well. The current world record for calculating the digits of Pi stands at 13,300,000,000,000 digits. It was not done on a super computer, or cluster. No it was done on basically an off the shelf PC:
https://en.wikipedia.org/wiki/Chronolog ... _of_%CF%80
Super computers and clusters have not been able to touch this problem since 2009.
We have discussed this extensively here before. I think it was here: viewtopic.php?f=63&t=43867
Easy.
Took about 56 minutes. You can check the results here:
http://devserv.rsmtech.fi/pi.txt.gz
I used gmp-chudnovsky, see attachment. Had to add a swap file. It was 1GB about a third of which got used. Probably not wise, or fast, to have a swap file on SD card.
Clustering a bunch of Pi, or any other machines, won't help. So far the best methods of calculating massive numbers of digits of Pi do not parallellize well. The current world record for calculating the digits of Pi stands at 13,300,000,000,000 digits. It was not done on a super computer, or cluster. No it was done on basically an off the shelf PC:
https://en.wikipedia.org/wiki/Chronolog ... _of_%CF%80
Super computers and clusters have not been able to touch this problem since 2009.
We have discussed this extensively here before. I think it was here: viewtopic.php?f=63&t=43867
- Attachments
-
- gmp-chudnovsky.c.gz
- (5.18 KiB) Downloaded 94 times
Slava Ukrayini.
-
- Posts: 32
- Joined: Fri Sep 14, 2012 4:32 pm
Re: Pi Day
Perhaps I was being too cute with the reporting format. The final calculation in the list (35pi million DP) comes to about 109.96 million decimal places. This calculated on Mathematica in 1527 second or 25.5 minutes. The calculation was done without swap. I doubt you would be able to get much further without a swap file. Perhaps next year I'll get around to doing a longer calc with swap. And then again, maybe not. The thread really isn't about calculating pi as much as it is about having some geeky fun on pi day.
Re: Pi Day
bryanandaimee,
Damn, you beat me
Aside from eating pie and drinking beer whilst he waits.
Except...this geek has the source code of the Pi algorithm and was curious how gmp works. Sadly the maths involved in the Chudnovsky algorithm goes way over my head.
Edit: Wait a minute how can you have .96 of a decimal place? Did you actually get an output from your calculation? Like in a file?
Damn, you beat me

What more fun could a geek have on Pi day than setting his latest machine to calculating the digits of Pi ?The thread really isn't about calculating pi as much as it is about having some geeky fun on pi day.
Aside from eating pie and drinking beer whilst he waits.
Except...this geek has the source code of the Pi algorithm and was curious how gmp works. Sadly the maths involved in the Chudnovsky algorithm goes way over my head.
Edit: Wait a minute how can you have .96 of a decimal place? Did you actually get an output from your calculation? Like in a file?
Slava Ukrayini.
- davidcoton
- Posts: 7005
- Joined: Mon Sep 01, 2014 2:37 pm
- Location: Cambridge, UK
Re: Pi Day
You can't, in a normal world. But you can easily have 0.96 of a million decimal places. Obviously your slower process led to too much drinking of beer while you waitedHeater wrote:Edit: Wait a minute how can you have .96 of a decimal place?

Location: 345th cell on the right of the 210th row of L2 cache
Re: Pi Day
david,
Ah yes.
Sadly it can't be the beer that did it. My few remaining neurons are getting old and lonely.
Ah yes.
Sadly it can't be the beer that did it. My few remaining neurons are getting old and lonely.
Slava Ukrayini.
-
- Posts: 32
- Joined: Fri Sep 14, 2012 4:32 pm
Re: Pi Day
Strangely my new Pi3 is not a great pi calculator.
I get 36 seconds for 3,141,593 decimal places vs. 20.5 seconds on the Pi2.
Perhaps an optimization issue?
I get 36 seconds for 3,141,593 decimal places vs. 20.5 seconds on the Pi2.
Perhaps an optimization issue?
Re: Pi Day
has your Pi3 got a heat sink on it ?bryanandaimee wrote:Strangely my new Pi3 is not a great pi calculator.
I get 36 seconds for 3,141,593 decimal places vs. 20.5 seconds on the Pi2.
Perhaps an optimization issue?
is it throttleing
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV
1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe
WARNING - some parts of this post may be erroneous YMMV
1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe
Re: Pi Day
How would 64bit Pi3 do and is there a VC4 Pi?
Re: Pi Day
For: time pi 3141593 >/dev/nullbensimmo wrote:How would 64bit Pi3 do and is there a VC4 Pi?
Odroid C2: 25.7 sec (64-bit Cortex-A53 - same as Pi3)
Pi3: 61 sec (32-bit)
Pi0: 150.8 sec (32-bit)
Intel PC: 4.3 sec (64-bit)