Aaron's Homepage Forum
Aaron's Homepage Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Miscellaneous
 Lounge
 CPU Burner
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

wasssup1990
Nobel Prize Winner

A Land Down Under
2261 Posts

Posted - Jun 01 2010 :  04:57:17 AM  Show Profile  Visit wasssup1990's Homepage  Reply with Quote
Try this:
http://www.apfloat.org/apfloat_java/applet/pi.html

It is a Java applet that can calculate pi to as many decimal places as you want. I am interested in seeing what you get.

You need to have the Java Runtime Environment installed though, so go here to get it if you don't have it already.
http://www.java.com/en/

It took several tweaks to overclock my computer so that this applet didn't crash my computer. If you arn't overclocking then you probabbly shouldn't worry too much about your computer crashing with this.


builderFactory = org.apfloat.internal.IntBuilderFactory
maxMemoryBlockSize = 201326592
cacheL1Size = 8192
cacheL2Size = 262144
cacheBurst = 32
memoryTreshold = 201326592
sharedMemoryTreshold = 786432
blockSize = 134217728
numberOfProcessors = 8
Calculating pi to 20000000 radix-10 digits
Using up to 8 parallel operations for calculation
Using the Chudnovsky brothers' binary splitting algorithm
100% complete, elapsed time 110.39 seconds
Final value took 22.78 seconds


That's right, 20,000,000 decimal places.

So try it!

When one person suffers from a delusion it is called insanity.
When many people suffer from a delusion it is called religion.

Edited by - wasssup1990 on Jun 01 2010 05:04:31 AM

codingplanet
Mad Scientist

United Kingdom
195 Posts

Posted - Jun 01 2010 :  08:39:35 AM  Show Profile  Visit codingplanet's Homepage  Reply with Quote
This was run on an i7 I presume. At what speed? I haven't come across any multi-threaded pi benchmarks up to yet (except HyperPi which just runs many instances of SuperPi).

It take my i7 just under 8 minutes to calculate 32 Million digits in a single thread using SuperPi @ 4.6GHz.
Go to Top of Page

wasssup1990
Nobel Prize Winner

A Land Down Under
2261 Posts

Posted - Jun 01 2010 :  09:10:32 AM  Show Profile  Visit wasssup1990's Homepage  Reply with Quote
That's right I have an i7-920 overlocked to 3790MHz (Spread Spectrum since near lab equipment). QPI Bus Speed 200MHz, 19 (not 20) CPU freq. multiplier with "Turbo Mode". Voltages are obviously ramped up and speed step is turned off. Memory speed 1602MHz.

What model is you CPU? I'd be surprised if you got 4.6GHz with a i7-920 on air cooling only. I have got my CPU up to 4GHz but it is too unreliable. My CPU is supposed to run at a stock speed of 2.67GHz!

Test conditions:
Ambient Temp: 20.5C
High Air Flow computer case.

When one person suffers from a delusion it is called insanity.
When many people suffer from a delusion it is called religion.
Go to Top of Page

wasssup1990
Nobel Prize Winner

A Land Down Under
2261 Posts

Posted - Jun 01 2010 :  09:25:25 AM  Show Profile  Visit wasssup1990's Homepage  Reply with Quote
Same test conditions but now only 1 thread and 32,000,000 digits.

builderFactory = org.apfloat.internal.IntBuilderFactory
maxMemoryBlockSize = 201326592
cacheL1Size = 8192
cacheL2Size = 262144
cacheBurst = 32
memoryTreshold = 201326592
sharedMemoryTreshold = 786432
blockSize = 134217728
numberOfProcessors = 1
Calculating pi to 32000000 radix-10 digits
Using the Chudnovsky brothers' binary splitting algorithm
100% complete, elapsed time 607.298 seconds
Final value took 69.527 seconds


Now 8 threads.
builderFactory = org.apfloat.internal.IntBuilderFactory
maxMemoryBlockSize = 201326592
cacheL1Size = 8192
cacheL2Size = 262144
cacheBurst = 32
memoryTreshold = 201326592
sharedMemoryTreshold = 786432
blockSize = 134217728
numberOfProcessors = 8
Calculating pi to 32000000 radix-10 digits
Using up to 8 parallel operations for calculation
Using the Chudnovsky brothers' binary splitting algorithm
100% complete, elapsed time 176.13 seconds
Final value took 27.98 seconds

When one person suffers from a delusion it is called insanity.
When many people suffer from a delusion it is called religion.

Edited by - wasssup1990 on Jun 01 2010 09:31:44 AM
Go to Top of Page

codingplanet
Mad Scientist

United Kingdom
195 Posts

Posted - Jun 04 2010 :  05:42:12 AM  Show Profile  Visit codingplanet's Homepage  Reply with Quote
I have an i7 920 too. The 4.6GHz was on air yes. Although I had only 2 cores enabled and HT disabled because of the heat.

Scaling isn't too good on the 32M scores you posted. Less than 3.5 :/
Go to Top of Page

wasssup1990
Nobel Prize Winner

A Land Down Under
2261 Posts

Posted - Jun 04 2010 :  08:46:08 AM  Show Profile  Visit wasssup1990's Homepage  Reply with Quote
Yeah what do you think it was caused by? Perhaps the algorithm being used does not work great on multicore. Or maybe the JVM needs improvement.

When one person suffers from a delusion it is called insanity.
When many people suffer from a delusion it is called religion.
Go to Top of Page

codingplanet
Mad Scientist

United Kingdom
195 Posts

Posted - Jun 04 2010 :  08:56:12 AM  Show Profile  Visit codingplanet's Homepage  Reply with Quote
I couldn't say really. Could be either of the two things that you mentioned.
Go to Top of Page

wasssup1990
Nobel Prize Winner

A Land Down Under
2261 Posts

Posted - Jun 04 2010 :  12:11:51 PM  Show Profile  Visit wasssup1990's Homepage  Reply with Quote
Yeah I just thought it was all very interesting.

I'm developing some programs in my spare time... well what little spare time I have. My exams are coming.

Do you remember that I was playing around with programming a physics simulator? Well I was doing that in C++ and while it worked well, especially with multi core, I wanted to start fresh with Java instead. I quite like Java and the idea of it running on a virtual machine. It's a self educating thing, plus I enjoy it. I know I can use other third party simulators and graphics engines but they just don't impress me enough with their lack of freedom to do exactly what I want, how I want. I have created a class which creates .bmp images from raw rgb24 data in a 2D array and I am now working on the physics simulator which will be developed in 2D space and graphics for now and then expanded into 3D space. I am not using standard variables like "doubles" because they seriously lack the precision I require. I am using "Apfloat" which you can find easily. It allows finite length decimal precision all the way to infinitive precision but not supporting calculations that produce irrational numbers with infinitive precision obviously.

Here's my sample of how to calculate the distance between two or more positions in 2D space. It is withing a Java utility class that I wrote.


    private static final int irrationalPrecision = 100;

    //Will calculate the distance, in order, between all Particles in the arg.
    public static Apfloat distance(Particle... args) {
        // return sqrt((b.x-a.x)^2 + (b.y-a.y)^2)
        Apfloat sumOfDistances = new Apfloat(0, Apfloat.INFINITE);
        for (int i = 0; i < args.length - 1; i++) {
            sumOfDistances = sumOfDistances.add(ApfloatMath.sqrt((ApfloatMath.pow((args[i + 1].x.subtract(args[i].x)), 2).add(ApfloatMath.pow((args[i + 1].x.subtract(args[i].x)), 2))).precision(irrationalPrecision)));
        }
        return sumOfDistances;
    }


As you can see to calculate sqrt((b.x-a.x)^2 + (b.y-a.y)^2) is much more complicated than simply writing Math.sqrt((b.x-a.x)*(b.x-a.x) + (b.y-a.y)*(b.y-a.y)) if I was to use standard "double" data types.

When one person suffers from a delusion it is called insanity.
When many people suffer from a delusion it is called religion.
Go to Top of Page

codingplanet
Mad Scientist

United Kingdom
195 Posts

Posted - Jun 04 2010 :  2:06:46 PM  Show Profile  Visit codingplanet's Homepage  Reply with Quote
I played around with infinite precision maths once. It was back in the days when I was dealing with C++. I wrote a dirty pi calculator as I remember now. I think it was the Chudnovsky algorithm that I used then, but I can't be sure.

I couldn't say I'm really into partical physics (if that's waht you call it). But I'm sure it does come in very useful :)
Go to Top of Page

wasssup1990
Nobel Prize Winner

A Land Down Under
2261 Posts

Posted - Jun 04 2010 :  8:59:38 PM  Show Profile  Visit wasssup1990's Homepage  Reply with Quote
Well for me I don't know if it will be very useful but it is very interesting, especially seeing those particles in action. Hopefully running through a number of computer simulations will crack a problem which will allow some massive breakthrough. That's the idea.

What programming language do you primarily use now?

When one person suffers from a delusion it is called insanity.
When many people suffer from a delusion it is called religion.
Go to Top of Page

codingplanet
Mad Scientist

United Kingdom
195 Posts

Posted - Jun 05 2010 :  06:22:10 AM  Show Profile  Visit codingplanet's Homepage  Reply with Quote
I haven't done any real programming in a while. And more recently I have been using PHP for web stuff. The language that I am (or was, been about a year now) most comfortable with was VB.Net.
Go to Top of Page

wasssup1990
Nobel Prize Winner

A Land Down Under
2261 Posts

Posted - Jun 05 2010 :  10:33:25 AM  Show Profile  Visit wasssup1990's Homepage  Reply with Quote
Yeah VB using the .net framework and the old plain VB6 just doesn't cut it for me now. I'll probably never use it again. Java seems very nice and isn't attached to a specific operating system. Write code once, compile, and then you can run your program on any machine that has the JVM installed. Easy, and flexible. Hey that gave me an idea, my phone can run Java apps. Ha! My physics simulator definitely won't run on that unless the JVM creates a huge page file or whatever the phone equivalent is. I'll try it anyway but I don't think it'll work.

When one person suffers from a delusion it is called insanity.
When many people suffer from a delusion it is called religion.
Go to Top of Page

codingplanet
Mad Scientist

United Kingdom
195 Posts

Posted - Jun 05 2010 :  11:18:57 AM  Show Profile  Visit codingplanet's Homepage  Reply with Quote
True, VB does lack power. That's why I started using C++. I suppose the OS independent nature of Java is a big plus.
Go to Top of Page

wasssup1990
Nobel Prize Winner

A Land Down Under
2261 Posts

Posted - Jun 05 2010 :  11:43:49 AM  Show Profile  Visit wasssup1990's Homepage  Reply with Quote
C++ is fast but in my experience with Java and C++ I'm am more compatible with Java, I have no problem with C++, just that it is a pain cross platforming;

When one person suffers from a delusion it is called insanity.
When many people suffer from a delusion it is called religion.
Go to Top of Page

codingplanet
Mad Scientist

United Kingdom
195 Posts

Posted - Jun 05 2010 :  11:54:04 AM  Show Profile  Visit codingplanet's Homepage  Reply with Quote
Was the semi-colon intentional? :D
Go to Top of Page

wasssup1990
Nobel Prize Winner

A Land Down Under
2261 Posts

Posted - Jun 05 2010 :  12:07:50 PM  Show Profile  Visit wasssup1990's Homepage  Reply with Quote
Hahaha! Oh man. No it wasn't.

When one person suffers from a delusion it is called insanity.
When many people suffer from a delusion it is called religion.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Aaron's Homepage Forum © 1995-2020 AARONCAKE.NET Go To Top Of Page
This page was generated in 0.14 seconds. Snitz Forums 2000