mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Software

Reply
 
Thread Tools
Old 2011-01-06, 00:50   #1
dimkadimon
 
Jan 2011

22 Posts
Default Prime95 Questions

Hello fellow prime seekers. I am new to Prime95 and I was hoping that I could get some help here. I have the following questions:

1. How can I upload my benchmark results to the website?

2. I have a quad-core machine, but it seems that I can only run the advanced primality test on a single core? Is it possible to run it on multiple cores?

3. How can I accurately measure the running time of the advanced primality test? Currently it doesn't report the running time, only whether the number was prime or not.

Thank you for your help.
dimkadimon is offline   Reply With Quote
Old 2011-01-06, 04:20   #2
Mini-Geek
Account Deleted
 
Mini-Geek's Avatar
 
"Tim Sorbera"
Aug 2006
San Antonio, TX USA

17·251 Posts
Default

Quote:
Originally Posted by dimkadimon View Post
1. How can I upload my benchmark results to the website?
I think that if Prime95 is set up to communicate with PrimeNet when you run the benchmark, it will automatically upload the results when it's done. You can log in at http://www.mersenne.org/report_benchmarks/ to see if the website has any of your benchmarks. If Prime95 is slow in communicating, do Advanced > Manual Communication and check "Send new expected completion dates to server".
Quote:
Originally Posted by dimkadimon View Post
2. I have a quad-core machine, but it seems that I can only run the advanced primality test on a single core? Is it possible to run it on multiple cores?
It runs on a single worker window. To set the worker to use more than one core, go to Test > Worker Windows and set CPUs to use.
Quote:
Originally Posted by dimkadimon View Post
3. How can I accurately measure the running time of the advanced primality test? Currently it doesn't report the running time, only whether the number was prime or not.
Occasional timestamps are written to results.txt, a timestamp to the minute is shown on each screen output, (screen output interval configurable in Options > Preferences, "Iterations between screen outputs") and you can look at the number of iterations and average time per iteration and multiply appropriately. It's basically only really a problem for very small numbers, where minutes are the whole test and the iteration time is about 0.000 or 0.001 sec per iter. Prime95 isn't really tuned for small numbers anyway.
Mini-Geek is offline   Reply With Quote
Old 2011-01-06, 05:27   #3
dimkadimon
 
Jan 2011

22 Posts
Default

Thank you heaps!

Quote:
Originally Posted by Mini-Geek View Post
I think that if Prime95 is set up to communicate with PrimeNet when you run the benchmark, it will automatically upload the results when it's done. You can log in at http://www.mersenne.org/report_benchmarks/ to see if the website has any of your benchmarks. If Prime95 is slow in communicating, do Advanced > Manual Communication and check "Send new expected completion dates to server".
I tried Manual Communication and got the following:

CURL library error: couldn't connect to host

Quote:
Originally Posted by Mini-Geek View Post
It runs on a single worker window. To set the worker to use more than one core, go to Test > Worker Windows and set CPUs to use.
It seems that multiple cores are used only for the LL test and not for the other tests. Is this correct? By the way I am using Prime95 version 26.4.

In the CPU affinity question there are 3 options: 1-8=specific CPU, 99=any CPU, 100=smart assignment. If I know my CPU should I use 1-8, or is 100 still the safest way to go?
dimkadimon is offline   Reply With Quote
Old 2011-01-06, 06:16   #4
cheesehead
 
cheesehead's Avatar
 
"Richard B. Woods"
Aug 2002
Wisconsin USA

769210 Posts
Default

Quote:
Originally Posted by dimkadimon View Post
I tried Manual Communication and got the following:

CURL library error: couldn't connect to host
I get that a lot, but when I simply re-try Manual Communication immediately, it succeeds on 99% of the second tries.
cheesehead is offline   Reply With Quote
Old 2011-01-06, 07:20   #5
Uncwilly
6809 > 6502
 
Uncwilly's Avatar
 
"""""""""""""""""""
Aug 2003
101×103 Posts

33·5·71 Posts
Default

Quote:
Originally Posted by dimkadimon View Post
It seems that multiple cores are used only for the LL test and not for the other tests. Is this correct? By the way I am using Prime95 version 26.4.

In the CPU affinity question there are 3 options: 1-8=specific CPU, 99=any CPU, 100=smart assignment. If I know my CPU should I use 1-8, or is 100 still the safest way to go?
Under the "Test" option select "Worker Windows". Post what you actually see there, like the attached. There you can chose the number of workers and what they do.

The "1-8=specific" means that you can chose CPU/core #1, 2, 3, 4, 5, 6, 7, or 8. 100 is safe to start with, there are some cases where you may chose to change it later.
Attached Thumbnails
Click image for larger version

Name:	worker.jpg
Views:	243
Size:	79.1 KB
ID:	6032  
Uncwilly is offline   Reply With Quote
Old 2011-01-06, 12:48   #6
Mini-Geek
Account Deleted
 
Mini-Geek's Avatar
 
"Tim Sorbera"
Aug 2006
San Antonio, TX USA

17×251 Posts
Default

Quote:
Originally Posted by dimkadimon View Post
It seems that multiple cores are used only for the LL test and not for the other tests. Is this correct? By the way I am using Prime95 version 26.4.
Partially. Prime95 can only use one core for TF, and the GCD that happens after each P-1 stage. Prime95 can use any number of cores for everything else, which is everything done through FFT: LL (whether set through Advanced > Test or any other way), P-1 stage 1 and 2, ECM stage 1 and 2, and PRP.
Quote:
Originally Posted by dimkadimon View Post
In the CPU affinity question there are 3 options: 1-8=specific CPU, 99=any CPU, 100=smart assignment. If I know my CPU should I use 1-8, or is 100 still the safest way to go?
Quote:
Originally Posted by Uncwilly View Post
Under the "Test" option select "Worker Windows". Post what you actually see there, like the attached. There you can chose the number of workers and what they do.

The "1-8=specific" means that you can chose CPU/core #1, 2, 3, 4, 5, 6, 7, or 8. 100 is safe to start with, there are some cases where you may chose to change it later.
Note that you might want to set the affinity too, but what I meant is the actual number of threads to use, "CPUs to use (multithreading):", which in Uncwilly's picture is grayed out. It is grayed out whenever the number of worker windows is already at the number of virtual cores your CPU has, because at that time there's no benefit to making any of the workers multithreaded. You have to reduce the number of workers first.

Last fiddled with by Mini-Geek on 2011-01-06 at 12:48
Mini-Geek is offline   Reply With Quote
Old 2011-01-06, 13:11   #7
tichy
 
Nov 2010

10011002 Posts
Default

Quote:
Originally Posted by Mini-Geek View Post
Prime95 can use any number of cores for everything else, which is everything done through FFT: LL (whether set through Advanced > Test or any other way), P-1 stage 1 and 2, ECM stage 1 and 2, and PRP.
I'd like to add that it the benchmark should be executed beforehand to see what number of cores used for e.g. LL gives best timings - not always more cores is better throughput:
Quote:
Compare your results to other computers at http://www.mersenne.org/report_benchmarks
Intel(R) Xeon(TM) CPU 3.20GHz
CPU speed: 3191.29 MHz, 2 hyperthreaded cores
CPU features: RDTSC, CMOV, Prefetch, MMX, SSE, SSE2
L1 cache size: 16 KB
L2 cache size: 2 MB
L1 cache line size: 64 bytes
L2 cache line size: 64 bytes
TLBS: 64
Prime95 64-bit version 25.11, RdtscTiming=1
Best time for 768K FFT length: 35.031 ms.
// snip
Best time for 8192K FFT length: 493.619 ms.
Timing FFTs using 2 threads on 1 physical CPUs.
Best time for 768K FFT length: 23.501 ms.

// snip
Best time for 8192K FFT length: 324.386 ms.
Timing FFTs using 4 threads on 2 physical CPUs.
Best time for 768K FFT length: 27.303 ms.
// snip
Best time for 8192K FFT length: 446.017 ms.
tichy is offline   Reply With Quote
Old 2011-01-07, 00:15   #8
dimkadimon
 
Jan 2011

48 Posts
Default

Quote:
Originally Posted by tichy View Post
I'd like to add that it the benchmark should be executed beforehand to see what number of cores used for e.g. LL gives best timings - not always more cores is better throughput:
Good idea. Turns out that 2 cores works the best for me. Here are my results:

Code:
Intel(R) Core(TM) i7 CPU         930  @ 2.80GHz
CPU speed: 2833.73 MHz, 4 hyperthreaded cores
CPU features: RDTSC, CMOV, Prefetch, MMX, SSE, SSE2, SSE4
L1 cache size: 32 KB
L2 cache size: 256 KB, L3 cache size: 8 MB
L1 cache line size: 64 bytes
L2 cache line size: 64 bytes

[Work thread Jan 7 09:54] Timing FFTs using 4 threads on 2 physical CPUs.            
[Work thread Jan 7 09:54] Timing 47 iterations of 768K FFT length.  Best time: 2.901 ms., avg time: 2.980 ms.
[Work thread Jan 7 09:54] Timing 40 iterations of 896K FFT length.  Best time: 3.545 ms., avg time: 3.570 ms.
[Work thread Jan 7 09:54] Timing 35 iterations of 1024K FFT length.  Best time: 4.034 ms., avg time: 4.140 ms.
[Work thread Jan 7 09:54] Timing 28 iterations of 1280K FFT length.  Best time: 4.835 ms., avg time: 4.875 ms.
[Work thread Jan 7 09:54] Timing 23 iterations of 1536K FFT length.  Best time: 5.946 ms., avg time: 6.030 ms.
[Work thread Jan 7 09:54] Timing 20 iterations of 1792K FFT length.  Best time: 7.734 ms., avg time: 7.775 ms.
[Work thread Jan 7 09:54] Timing 17 iterations of 2048K FFT length.  Best time: 9.311 ms., avg time: 9.335 ms.
[Work thread Jan 7 09:55] Timing 14 iterations of 2560K FFT length.  Best time: 10.882 ms., avg time: 10.941 ms.
[Work thread Jan 7 09:55] Timing 11 iterations of 3072K FFT length.  Best time: 14.367 ms., avg time: 14.392 ms.
[Work thread Jan 7 09:55] Timing 10 iterations of 3584K FFT length.  Best time: 16.655 ms., avg time: 16.737 ms.
[Work thread Jan 7 09:55] Timing 10 iterations of 4096K FFT length.  Best time: 19.697 ms., avg time: 21.520 ms.
[Work thread Jan 7 09:55] Timing 10 iterations of 5120K FFT length.  Best time: 25.262 ms., avg time: 25.325 ms.
[Work thread Jan 7 09:55] Timing 10 iterations of 6144K FFT length.  Best time: 32.081 ms., avg time: 32.435 ms.
[Work thread Jan 7 09:55] Timing 10 iterations of 7168K FFT length.  Best time: 45.641 ms., avg time: 47.401 ms.
[Work thread Jan 7 09:55] Timing 10 iterations of 8192K FFT length.  Best time: 46.616 ms., avg time: 48.491 ms.
I think thats pretty good no?
dimkadimon is offline   Reply With Quote
Old 2011-01-07, 00:43   #9
dimkadimon
 
Jan 2011

22 Posts
Default

Quote:
Originally Posted by Mini-Geek View Post
Partially. Prime95 can only use one core for TF, and the GCD that happens after each P-1 stage. Prime95 can use any number of cores for everything else, which is everything done through FFT: LL (whether set through Advanced > Test or any other way), P-1 stage 1 and 2, ECM stage 1 and 2, and PRP.
Thanks. It makes much more sense now.
dimkadimon is offline   Reply With Quote
Old 2011-01-07, 22:43   #10
cheesehead
 
cheesehead's Avatar
 
"Richard B. Woods"
Aug 2002
Wisconsin USA

170148 Posts
Default

An editorial on programming:

Quote:
In the CPU affinity question there are 3 options: 1-8=specific CPU, 99=any CPU, 100=smart assignment.
Any coding scheme that uses numbers to denote two or more different types (three: specific CPU #, option for any CPU, option for smart assignment, in this case) of meaning runs the risk of a future Y2K-like situation.

When the year 1999 seemed, in the 1950, 1960s, and 1970s to be so far in the future as not to need any consideration of when "99" would refer to the current year, the code "99" was used for all sorts of purposes other than denoting the year 1999. IBM specified a dataset expiration date field with the format "yyddd", where yy = last two digits of calendar year, and ddd = day of year, BUT it also specified that the special value "99365" was to mean "never expires". That was fine until December 31, 1999, at which time every IBM data set with "99365" expired, whether it was intended to or not.

"99=any CPU, 100=smart assignment" is fine until we get computers with 99 or more CPUs, but then ...

This is also an example of a violation of one of my Laws of Programming: "A bit cannot serve two masters" (adapted from a Biblical parable). Since numeric "99" or "100" could conceivably denote an individual CPU number at some time, using nonnumeric codes for nonnumeric purposes is sounder programming. The strings "99" and "100" should denote something that is of the same basic type of entity as "9" or "10" -- a specific CPU number. Observing that Law of Programming of mine keeps a programmer from creating such problems. We're long past the days when space was cramped, and doubling up on meanings for a bit (or byte, or string) was excusable in the short run.

To denote "any CPU", use something like the character string "any" or "AC" or "anyCPU" or "ANYCPU" ... but not an all-numeric string!

For "smart assignment", use a nonnumeric string like "SA" or "smart" or something like that ... but not an all-numeric string!

Last fiddled with by cheesehead on 2011-01-07 at 22:47
cheesehead is offline   Reply With Quote
Old 2011-01-13, 14:38   #11
James Heinrich
 
James Heinrich's Avatar
 
"James Heinrich"
May 2004
ex-Northern Ontario

1101001000102 Posts
Default

Quote:
Originally Posted by cheesehead View Post
To denote "any CPU", use something like the character string "any" or "AC" or "anyCPU" or "ANYCPU" ... but not an all-numeric string!
Alpha strings work well where feasible (as in an ini file). Occasionally you need to store a pseudo-value in a numeric-only field (e.g. a database), in which case you may be able to get nearly the same effect by designating certain negative values as magic values, such as -1=ANY; -2=SMART. CPU#-2 is (currently?) just as invalid as CPU#AC (which could potentially be confused with CPU#172 ) and retains compatibility with a (signed) integer database field, without the issue of conflicting with actual values in a couple years when 128-core CPUs are running Prime95.
James Heinrich is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Prime95 - suggest using B2 bound = GMP-ECM default and other questions Raman PrimeNet 34 2020-07-14 22:25
gmp-ecm questions yoyo GMP-ECM 34 2009-03-20 18:06
More questions about prime95 hj47 Software 18 2008-12-28 20:22
Questions about RAM and Prime95 Matthias C. Noc Software 2 2004-03-01 08:16
DNS questions Prime95 PrimeNet 2 2003-04-12 01:54

All times are UTC. The time now is 05:46.

Tue May 18 05:46:49 UTC 2021 up 40 days, 27 mins, 0 users, load averages: 1.63, 1.87, 1.94

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.