Results 1 to 7 of 7
Thread: My own distributed computing

121211, 09:46 PM #1
 Join Date
 Sep 2011
 Posts
 218
My own distributed computing
In short, I have 3 or 4 computer buddies that all want to set up a distributed computing project to find the value of Pi. We don't plan on setting any records or anything. It's just for fun. How can we make a distributed computing project?
My system: Work in progress
Case:Rosewill SmartOne
CPU:AMD 1090T @ 4GHz
GPU:PowerColor PCS+ ATi Radeon HD 5770 1GB @ 900MHz
PSU:Antec 25 EarthWatts 750 watt Continuous Power Supply
MOBO:ASUS Sabertooth 990FX
Cooler:Noctua NHD14
Keyboard:daskeyboard Professional w/ Function keys

121311, 01:59 AM #2
Go to the BOINC website. They have a FAQ for this, last I checked. They WANT your project to use the BOINC client, so they'll assist you, if you ask on their forum. How much, I'm not aware of. Checking with any similar BOINC project, might also help.
Naturally, you'll need some sort of a PC to act as a central collection server  something where the results can be turned into, and something like 1 to 10 points per hour of computation time, can be awarded, and the data updated to show the current status of the search.
Since computers can make errors, it's necessary to have the calculation of each digit checked with the actual value of Pi, digit by digit. Easy enough for a little program to do that.
For the calculation of Pi itself, I'd check with any comp.sci or comp.sci.math newsgroups or forums, and of course, Google. I ran a (singular) homegrown effort on Pi several years back, but my expression for Pi converged much too slowly. Keep in mind that with a poor expression, you can calculate with it for an entire week, and gain less than you would in 2 hours, if you had a much better mathematical expression, on the same hardware.
You want to use a fast expression to converge on Pi, and you want to use a fast "core" program to run that expression. A client program (which can be quite slow, it doesn't matter), will handle the communication with the server (sending in the results), and starting and stopping the core program, as well.
Make sure that your Pi program runs in low priority. If it runs in normal priority, it will simply annoy people who want to use their computers for gaming and other high intensity programs, and won't be able to use all their PC resources.
It would be nice if it could run multiple threaded instances of itself (the client program would handle setting that up), since so many PC's now have multiple cores.
What I'm not sure of, is whether searching for digits in Pi, can be run "independently"  that is, in "parallel", where Bob can run calculations for the first 1000 digits, and Charles can run the second thousand digits, and Ed can run the third thousand digits, and they can all be running at the same time. Specifically, that Ed won't have to wait for Bob and Charles to finish up, before he can begin his calculations. If the calculations have to be run in sequential mode like this, it really cuts down the speed of the whole project, (but it may be even more fun).
The worst thing would be a substantial 'bottleneck" member, on a sequential project. Maybe he/she is running it on a really slow tablet or laptop, or only running it a few hours each week  that would surely kill the project's forward progress, pretty quickly.
BE SURE AND KEEP MULTIPLE BACK UP'S of the data, and any points awarded! You can bet that serious problems will arise eventually, in any serious project.
I just popped over to the BOINC site here:
http://boinc.berkeley.edu/trac/wiki/VolunteerComputing
which had some interesting info, but not the FAQ I had seen way back when.
There are other ways to run a distributed project than with BOINC, so don't hesitate to contact people like CERN's Grid Cafe, Great Internet Merseinne Prime Search, or Folding@Home people to see if they can assist. University comp.sci or math people may be another resource you can use.
Good luck with your project. You may want to use this forum as a central "info" sharing site. You never know, you might get some volunteers even.

121311, 04:52 PM #3
 Join Date
 Sep 2011
 Posts
 218
The problem is that would only work out to about 1,000,000,000 decimal places. I just reread the email. They are looking to prove that there is a last digit, which I believe there must be, as it is acquired by division of two rational numbers.
Also, there will be no major bottlenecks, as we are all on computers with at least 12GHz combined processing power if I use a multithreaded app for the calculation, and we all have at least 8GB of RAM and when I renew my contract with AT&T under a better plan, the weakest link in internet will be 6Mb/s.Last edited by fgf80; 121311 at 05:06 PM.
My system: Work in progress
Case:Rosewill SmartOne
CPU:AMD 1090T @ 4GHz
GPU:PowerColor PCS+ ATi Radeon HD 5770 1GB @ 900MHz
PSU:Antec 25 EarthWatts 750 watt Continuous Power Supply
MOBO:ASUS Sabertooth 990FX
Cooler:Noctua NHD14
Keyboard:daskeyboard Professional w/ Function keys

121311, 10:57 PM #4
I didn't mean to imply that you were running weak PC's. I was looking at possibilities, other new members might bring to the project.
Your results need to be saved as one char per digit. A char uses only one byte (generally 8 bits), of storage, per digit. The only limit would be the amount of storage capacity you can get together  and you'll need enough for the current data, and some backups.
I don't know how you are going to cooperate on this calculation. The last time I ran a Pi program, it needed the previous digits in order to calculate the next digit.
If the project members were online, they could do a roundrobin kind of design, where Bob calculates a new digit, and sends it to Chuck, who calculates another digit and passes it on to Dave's PC, etc.
A GOOD comp.sci guy/math guy, could tell you whether Pi can be calculated in the way you want to do it, and should be able to set you up with a good equation to use in your program, as well. I'm not sure you can solve for Pi in parallel, but the GOOD comp.sci/math guy, might know how to do that.
That's your starting point for the project. Communications will follow, and must fit into the calculation design.
Pi is a transcendental value, which any approximation, no matter how many digits it has, will never exactly equal. Very, very close  yes, equal, no.

121411, 05:32 PM #5
To calculate numbers to that many decimal places, you will need to know computer programming pretty well. Floating point does not allow numbers that small, and processors/GPU instructions are not designed to handle small number computations other than floating point. Because of that, the program would have to be written in a low level language like C with assembly inserts. That's probably beyond a typical college student, but would be impressive.
ASUS N81VgX1: Core 2 Duo P8600, 4GB DDR2, GeForce GT 120M
Dell XPS 410: Core 2 Duo 6600, 3GB DDR2, GeForce GTX 670

121411, 05:58 PM #6
 Join Date
 Sep 2011
 Posts
 218
That is a setback to say the least. In our group, I am the only advocate for C, and I still haven't run into a class that uses it, so I've had to selfstudy (which I did for most languages) on my free time. Also, I have many times had to debug the (supposedly working) examples from the textbook to get them to work. I use "The Language of C," and CodeBlocks. Currently we use (are any of these suitable) Java, by 3 of us; C++, by two of us; PHP, by 3 of us; and I am learning Perl to break the rigidity of always working with C (as I work better learning two or three languages at once (?)). It stands to reason that at least one of us will still need to learn assembly, I assume.
My system: Work in progress
Case:Rosewill SmartOne
CPU:AMD 1090T @ 4GHz
GPU:PowerColor PCS+ ATi Radeon HD 5770 1GB @ 900MHz
PSU:Antec 25 EarthWatts 750 watt Continuous Power Supply
MOBO:ASUS Sabertooth 990FX
Cooler:Noctua NHD14
Keyboard:daskeyboard Professional w/ Function keys

121411, 06:35 PM #7
C or C++ would be the best two to do the core calculations for this job, from your list. (C particularly). Assembly is great, but not needed for this job. PHP and Perl and Java might be useful in writing up the client (communications and manager), program, if you need one.
You can't use basic data types for the calculations, but there are big number libraries that will let you work with very small numbers, and you can always "roll your own".
That's why you need to talk FIRST with a comp.sci/math guy who is familiar with this. I've helped some students write a Pi program, but that was just a one PC effort, and worked within the range of a long unsigned double data type. Nothing like what you want, really.
I'm sure if you Google around the net, you'll find others who have done something similar, and can get some get idea's (to use and to avoid, both), from their experience.
This is one I found interesting:
http://www.codeproject.com/KB/recipes/CRHpi.aspx
He worked out Pi to a million digits and change with the program he posted there. If you are tempted to use the much simpler "harmonic" type series (there are several of them for Pi), I'd advise you against it  because they converge on Pi WAY too slowly for any serious program. They look similar to this:
Pi/4 = 1/1 1/3 +1/5 1/7 +1/9  1/11 ... <<===== Very slow
P.S.:
I ran across a formula for Pi that can be used in parallel, unlike all the others, which are sequential. It could work like this:
You take 1100, Bob takes 101200, Charles takes 201300, etc. on Day 1 of the project. Each of you works on the data until they have their 100 digits calculated, then they email you the numbers they've calculated. You would run a little conversion program on the data, and send them the new value for Pi. Meanwhile, each of you takes the next hundred digits: 301400, 401500, and 501600, and continue.
There are just two problems with this, and I know they can be overcome, if you work at it:
1) The formula isn't the easiest. You'd probably get help on any good programming or math forum or newsgroup.
2) The answers that are calculated, are given in hexadecimal. If you need help with this part, I can provide it.
If you're still interested, let me know and I'll find that equation for it, again.Last edited by Adak; 121611 at 05:23 PM.