mersenneforum.org  

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

Reply
 
Thread Tools
Old 2015-01-22, 09:45   #1
tha
 
tha's Avatar
 
Dec 2002

81510 Posts
Default running mprime on 4 cores on 2 assignments?

Is there a way to force mprime so core 1&2 run on one assignment and core 3&4 on a second assignment?
tha is offline   Reply With Quote
Old 2015-01-22, 16:37   #2
kladner
 
kladner's Avatar
 
"Kieren"
Jul 2011
In My Own Galaxy!

2×3×1,693 Posts
Default

On an FX-8350 (8 cores), I set Number of Workers to 4, and CPUs to use to 2. When I tried this, assigning work to the odd-numbered cores resulted in the even numbers being assigned as helpers.

Intel may be different. Others will know about that.

(And oops. My experience is with P95. It's been a while since I ran Mprime, so I'm not sure of the procedures.)

Last fiddled with by kladner on 2015-01-22 at 16:39
kladner is offline   Reply With Quote
Old 2015-01-22, 16:50   #3
petrw1
1976 Toyota Corona years forever!
 
petrw1's Avatar
 
"Wayne"
Nov 2006
Saskatchewan, Canada

2·5·7·67 Posts
Default

You can use AFFINITYSCRAMBLE2 to pick your own cores.

Read all about it in undoc.txt

At least you can in Prime95...not sure if mprime is different
petrw1 is offline   Reply With Quote
Old 2015-01-22, 16:57   #4
Mark Rose
 
Mark Rose's Avatar
 
"/X\(‘-‘)/X\"
Jan 2013

2·5·293 Posts
Default

Quote:
Originally Posted by petrw1 View Post
You can use AFFINITYSCRAMBLE2 to pick your own cores.

Read all about it in undoc.txt

At least you can in Prime95...not sure if mprime is different
You can. The only difference is that Windows numbers the CPU cores differently from what I remember.
Mark Rose is offline   Reply With Quote
Old 2015-01-23, 00:30   #5
TObject
 
TObject's Avatar
 
Feb 2012

34·5 Posts
Cool

That is right.
Cores on Windows: Physical, Virtual, Physical, Virtual, Physical, Virtual, Physical, Virtual
Cores on Linux: Physical, Physical, Physical, Physical, Virtual, Virtual, Virtual, Virtual

Last fiddled with by TObject on 2015-01-23 at 00:33
TObject is offline   Reply With Quote
Old 2015-01-23, 08:11   #6
tha
 
tha's Avatar
 
Dec 2002

5×163 Posts
Default

These are my timings for a 4 core non hyperthreaded cpu:

Timings for 1792K FFT length (1 cpu, 1 worker): 33.98 ms. Throughput: 29.43 iter/sec.
Timings for 1792K FFT length (2 cpus, 2 workers): 41.41, 41.39 ms. Throughput: 48.31 iter/sec.
Timings for 1792K FFT length (3 cpus, 3 workers): 50.30, 49.11, 39.11 ms. Throughput: 65.81 iter/sec.
Timings for 1792K FFT length (4 cpus, 4 workers): 59.27, 60.37, 60.64, 59.51 ms. Throughput: 66.73 iter/sec.

There is little use for a fourth core as one can see.

I tried fiddling with all the info from undoc.txt but failed to get two cpus to work on a single assignment.

What I would like to try is a 4 cpus, 2 workers option, but I don't know if that can be done by mprime or prime95.
tha is offline   Reply With Quote
Old 2015-01-23, 10:07   #7
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
Jun 2011
Thailand

100101101101012 Posts
Default

Quote:
Originally Posted by tha View Post
These are my timings for a 4 core non hyperthreaded cpu:

Timings for 1792K FFT length (1 cpu, 1 worker): 33.98 ms. Throughput: 29.43 iter/sec.
Timings for 1792K FFT length (2 cpus, 2 workers): 41.41, 41.39 ms. Throughput: 48.31 iter/sec.
Timings for 1792K FFT length (3 cpus, 3 workers): 50.30, 49.11, 39.11 ms. Throughput: 65.81 iter/sec.
Timings for 1792K FFT length (4 cpus, 4 workers): 59.27, 60.37, 60.64, 59.51 ms. Throughput: 66.73 iter/sec.

There is little use for a fourth core as one can see.

I tried fiddling with all the info from undoc.txt but failed to get two cpus to work on a single assignment.

What I would like to try is a 4 cpus, 2 workers option, but I don't know if that can be done by mprime or prime95.
Yes, it can. Your 4th worker is memory bounded. You can go to Test menu, select 2 workers, in the "worker number" select "all", and in the "cpus to use" select 2. Then you'll have 2 workers, each using 2 threads. You can also do other tricks, like a single worker, using 4 "cpu"s (=threads, cores).
LaurV is offline   Reply With Quote
Old 2015-01-23, 19:38   #8
Dubslow
Basketry That Evening!
 
Dubslow's Avatar
 
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

3·29·83 Posts
Default

Quote:
Originally Posted by tha View Post
I tried fiddling with all the info from undoc.txt but failed to get two cpus to work on a single assignment.

What I would like to try is a 4 cpus, 2 workers option, but I don't know if that can be done by mprime or prime95.
The Prime95 GUI can do it, or with Mprime you can do it manually by setting the WorkerThreads and ThreadsPerTest variables in local.txt. (The Prime95 GUI is merely a frontend -- its effects is exactly to set these variables).

To get two workers going with two cores each, set it thusly:
Code:
WorkerThreads=2
ThreadsPerTest=2
At the bottom of the file you can set the individual affinities:
Code:
[Worker #1]
Affinity=0

[Worker #2]
Affinity=2
That sets one worker on core 0, the other one on core 2. You may additionally use the AffinityScramble2 option to define where the helper threads run:
Code:
AffinityScramble2=0123
This should mean (you can verify by searching for this option in undoc.txt) that the worker running on core 0 will have it's helper thread running on core 1, and the worker on core 2 will have its helper thread on core 3. (For example, on a GNU-Linux machine with 4 physical cores and 8 threads, i.e. cores 0-3 are physical and 4-7 are virtual, you can pair each virtual core to its physical partner with the setting AffinityScramble2=04152637.)

Last fiddled with by Dubslow on 2015-01-23 at 19:41
Dubslow is offline   Reply With Quote
Old 2015-01-23, 20:28   #9
tha
 
tha's Avatar
 
Dec 2002

5·163 Posts
Default

This worked, thanks for the help. I tried it on a Prime95 version first and than managed to do the same using the -m option with mprime.

The result was interesting. Using 4 cores with 4 workers it does 4 assignments in exactly 20 days. Using 4 cores with 2 workers and 2 cores per worker it does 2 assignments in exactly 10 days.

So the total throughput is the same.
tha is offline   Reply With Quote
Old 2015-01-23, 20:53   #10
Dubslow
Basketry That Evening!
 
Dubslow's Avatar
 
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88

160658 Posts
Default

Quote:
Originally Posted by tha View Post
The result was interesting. Using 4 cores with 4 workers it does 4 assignments in exactly 20 days. Using 4 cores with 2 workers and 2 cores per worker it does 2 assignments in exactly 10 days.

So the total throughput is the same.
I would interpret that as "the lost production due to choked memory bandwidth with 4 cores is about the same as the lost production due to multithreading overhead".
Dubslow is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I move work assignments to faster computer with fewer cores? jdmcs Software 9 2015-05-02 03:07
Another mprime is already running tshinozk Information & Answers 3 2013-12-10 16:26
Heat problems and running less workers than cores MacMagnus Information & Answers 10 2013-07-14 21:29
Running on 4 Cores Unregistered Information & Answers 9 2008-09-25 00:53
mprime is running but i dont see that mhnaras Linux 2 2007-10-21 15:58

All times are UTC. The time now is 19:58.


Sun Aug 1 19:58:57 UTC 2021 up 9 days, 14:27, 0 users, load averages: 1.66, 1.40, 1.36

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.