mersenneforum.org  

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

Reply
 
Thread Tools
Old 2021-01-02, 22:37   #320
lycorn
 
lycorn's Avatar
 
Sep 2002
Oeiras, Portugal

144810 Posts
Default

Quote:
Originally Posted by Prime95 View Post
Those N freed temporaries will be needed again if another pooled modular inverse is required which is why prime95 won't let other threads reserve that memory.
Thanks for the explanation. If I got it right, there are chunks of memory that are actually free, and perceived as such by Task Manager, but that are "set aside" by Prime95 on a just in case basis. Does that explain the difference between the amount of memory allowed to be used and the amount reported by TM (10 GB and 7.5 GB respectively)?

If I remember correctly, nordi´s problem was that the program was using more than its allowed share of memory, and the system would eventually crash under some circumstances. Now the opposite is apparently happening: the program is using less memory than it might do. I personally never had that problem with build 3. The program would use exactly the maximum amount of memory allowed (at least that was the indication in TM).

Last fiddled with by lycorn on 2021-01-02 at 22:42
lycorn is offline   Reply With Quote
Old 2021-01-02, 23:04   #321
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

163048 Posts
Default

Quote:
Originally Posted by lycorn View Post
Thanks for the explanation. If I got it right, there are chunks of memory that are actually free, and perceived as such by Task Manager, but that are "set aside" by Prime95 on a just in case basis. Does that explain the difference between the amount of memory allowed to be used and the amount reported by TM (10 GB and 7.5 GB respectively)?
Yes, the 2.5GB would be needed if each worker in stage 2 ECM needed to do another pooled modular inverse at the same time.

Quote:
If I remember correctly, nordi´s problem was that the program was using more than its allowed share of memory, and the system would eventually crash under some circumstances. Now the opposite is apparently happening: the program is using less memory than it might do. I personally never had that problem with build 3. The program would use exactly the maximum amount of memory allowed (at least that was the indication in TM).
Yes, I was unable to replicate nordi's case where prime95 was allocating 100GB rather than 50GB maximum nordi had set. This change (I can't call it a fix) should at least prevent the crash he was seeing, because it is unlikely that every ECM stage 2 will be doing a pooled modular inverse at the same time.
Prime95 is online now   Reply With Quote
Old 2021-01-03, 01:07   #322
petrw1
1976 Toyota Corona years forever!
 
petrw1's Avatar
 
"Wayne"
Nov 2006
Saskatchewan, Canada

22×17×67 Posts
Default 2080Ti GPU slowed about 3% after 30.4 Upgrade

Any ideas how/why this might have happened?

Running mfaktc.
petrw1 is online now   Reply With Quote
Old 2021-01-03, 01:15   #323
masser
 
masser's Avatar
 
Jul 2003
wear a mask

155310 Posts
Default

Quote:
Originally Posted by petrw1 View Post
Any ideas how/why this might have happened?

Running mfaktc.
Heat? Could Cpu/Ram/Mobo running hotter now lead to GPU throttling itself a little?
masser is offline   Reply With Quote
Old 2021-01-03, 01:19   #324
James Heinrich
 
James Heinrich's Avatar
 
"James Heinrich"
May 2004
ex-Northern Ontario

3,271 Posts
Default

I would suspect more along the lines of either CPU or RAM being more heavily utilized in v30.4 causing a small amount of extra delay in what little off-GPU resources mfaktc needs to use.
James Heinrich is online now   Reply With Quote
Old 2021-01-03, 02:06   #325
petrw1
1976 Toyota Corona years forever!
 
petrw1's Avatar
 
"Wayne"
Nov 2006
Saskatchewan, Canada

455610 Posts
Default You seem to be both correct

GPU-Z had the GPU running a couple degrees hotter than usual (85C).
And some Therm throttling.
I blew out the dust and opened the side door.

It's running 83C now and a little faster but still not quite what it was before 30.4
Maybe 1% down (that's pretty close).
petrw1 is online now   Reply With Quote
Old 2021-01-03, 05:51   #326
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

1CC416 Posts
Default

Woohoo!

I've conquered nordi's memory problem even though I may not fully understand it. I was able to replicate on my 8-core Skylake box. The problem is with ECM on tiny numbers. Prime95 is not properly estimating the space consumed allocating a gwnum. In 30.4b4 the estimate was 640 bytes. Careful examination of the code shows that 680 bytes plus any malloc overhead is required. My testing seems to indicate malloc overhead is much worse in Linux than Windows.

Furthermore, the (up to) 250MB prime pairing bit array was not included in prime95's memory reservation system.

To fix nordi's issue, I've limited prime95 to 100000 temporaries per worker. This should have no impact on performance. Prime95 was allocating over 1M temporaries to reduce modular inverses which are lightning fast on M1277.

In implementing the fix, I noticed a bug in resuming an ECM run in stage 2 when there is less memory available. This could well explain petrw1's missed factor when prime95 did a restart with new memory settings.
Prime95 is online now   Reply With Quote
Old 2021-01-03, 14:46   #327
PhilF
 
PhilF's Avatar
 
Feb 2005
Colorado

3·197 Posts
Default

Does GmpEcmHook=1 still work for running stage 2 on GMP-ECM?

Is it still worthwhile to do so on exponents such as M1277?
PhilF is offline   Reply With Quote
Old 2021-01-03, 17:09   #328
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

163048 Posts
Default

Quote:
Originally Posted by PhilF View Post
Does GmpEcmHook=1 still work for running stage 2 on GMP-ECM?
It ought to.

Quote:
Is it still worthwhile to do so on exponents such as M1277?
Most definitely.
Prime95 is online now   Reply With Quote
Old 2021-01-03, 18:20   #329
axn
 
axn's Avatar
 
Jun 2003

4,861 Posts
Default

Quote:
Originally Posted by Prime95 View Post
In implementing the fix, I noticed a bug in resuming an ECM run in stage 2 when there is less memory available. This could well explain petrw1's missed factor when prime95 did a restart with new memory settings.
Does the bug affect P-1 as well? Because that was a P-1.
axn is offline   Reply With Quote
Old 2021-01-03, 19:27   #330
Prime95
P90 years forever!
 
Prime95's Avatar
 
Aug 2002
Yeehaw, FL

22×7×263 Posts
Default

Quote:
Originally Posted by axn View Post
Does the bug affect P-1 as well? Because that was a P-1.
Yes. Until the next build is ready, avoid restarting P-1 or ECM in stage 2 with less memory.
Prime95 is online now   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Thinking of Joining GPU to 72 jschwar313 GPU to 72 3 2016-01-31 00:50
Thinking about lasieve5 Batalov Factoring 6 2011-12-27 22:40
Thinking about buying a panda jasong jasong 1 2008-11-11 09:43
Loud thinking on irregular primes devarajkandadai Math 4 2007-07-25 03:01
Question on unfactored numbers... WraithX GMP-ECM 1 2006-03-19 22:16

All times are UTC. The time now is 23:01.

Mon Mar 8 23:01:08 UTC 2021 up 95 days, 19:12, 0 users, load averages: 1.80, 1.49, 1.62

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.