mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > Msieve

Reply
 
Thread Tools
Old 2013-08-17, 19:00   #1
Brian Gladman
 
Brian Gladman's Avatar
 
May 2008
Worcester, United Kingdom

72·11 Posts
Default Windows x64 CUDA Build

I have finally been able to work on the Visual Studio 2012 x64 build of msieve with GPU support. I have uploaded this to the msieve repository so anyone who is brave enough to build from source using Visual Studio 2012 will be able to try it out. I have also sent Jeff Gilchrist a set of binaries that I hope he will upload to his factoring binaries page shortly.

Although I have not disabled the win32 GPU build, only the x64 build has been tested. Users of the win32 build are going to be largely on their own as I no longer undertake win32 development and might therefore have little to offer if help is needed.

best regards,

Brian
Brian Gladman is offline   Reply With Quote
Old 2013-08-17, 19:06   #2
wombatman
I moo ablest echo power!
 
wombatman's Avatar
 
May 2013

22·463 Posts
Default

Excellent! Once I get my CUDA issues worked out, I'll definitely try it out.
wombatman is offline   Reply With Quote
Old 2013-08-23, 09:29   #3
JP12
 
Aug 2013

3 Posts
Default Crash on Algebra stage

Quote:
Originally Posted by Brian Gladman View Post
I have finally been able to work on the Visual Studio 2012 x64 build of msieve with GPU support. I have uploaded this to the msieve repository so anyone who is brave enough to build from source using Visual Studio 2012 will be able to try it out. I have also sent Jeff Gilchrist a set of binaries that I hope he will upload to his factoring binaries page shortly.

Although I have not disabled the win32 GPU build, only the x64 build has been tested. Users of the win32 build are going to be largely on their own as I no longer undertake win32 development and might therefore have little to offer if help is needed.

best regards,

Brian
I built with VS2012 the SVN 945, compiled without a glitch.
Set factsieve.py with USE_CUDA = True, and start factoring this number:
2881039827457895971881627053137530734638790825166127496066674320241571446494762386620442953820735453

Crashes after last line:
Found 5065278 relations, 123.7% of the estimated minimum (4095000).
-> msieve -s example\mynum.dat -l example\mynum.log -i example\mynum.ini -nf example\mynum.fb -t 8 -nc1
-> Running matrix solving step ...
-> msieve -s example\mynum.dat -l example\mynum.log -i example\mynum.ini -nf example\mynum.fb -t 8 -nc2

I can send compiled binaries, but too big to attach here (1263KB zipped).

Regards,

Jose
JP12 is offline   Reply With Quote
Old 2013-08-26, 11:33   #4
Brian Gladman
 
Brian Gladman's Avatar
 
May 2008
Worcester, United Kingdom

72×11 Posts
Default

Quote:
Originally Posted by JP12 View Post
I built with VS2012 the SVN 945, compiled without a glitch.
Set factsieve.py with USE_CUDA = True, and start factoring this number:
2881039827457895971881627053137530734638790825166127496066674320241571446494762386620442953820735453

Crashes after last line:
Found 5065278 relations, 123.7% of the estimated minimum (4095000).
-> msieve -s example\mynum.dat -l example\mynum.log -i example\mynum.ini -nf example\mynum.fb -t 8 -nc1
-> Running matrix solving step ...
-> msieve -s example\mynum.dat -l example\mynum.log -i example\mynum.ini -nf example\mynum.fb -t 8 -nc2

I can send compiled binaries, but too big to attach here (1263KB zipped).

Regards,

Jose
Hi Jose

I tried your number but I didn't get a crash. However, I didn't get a result either since it seems to go into an infinite loop at the nc2 stage:

Found 5117117 relations, 125.0% of the estimated minimum (4095000).
-> msieve -s ..\..\..\..\ggnfs\tests\mtest\mtest.dat -l ..\..\..\..\ggnfs\tests\mtest\mtest.log -i ..\..\..\..\ggnfs\tes
ts\mtest\mtest.ini -nf ..\..\..\..\ggnfs\tests\mtest\mtest.fb -t 8 -nc1
-> Running matrix solving step ...
-> msieve -s ..\..\..\..\ggnfs\tests\mtest\mtest.dat -l ..\..\..\..\ggnfs\tests\mtest\mtest.log -i ..\..\..\..\ggnfs\tes
ts\mtest\mtest.ini -nf ..\..\..\..\ggnfs\tests\mtest\mtest.fb -t 8 -nc2
linear algebra completed 3577949 of 158541 dimensions (2256.8%, ETA 630h22m)
received signal 2; shutting down
Signal caught. Terminating...

Why it completes 3577949 when it only seeks 158541 dimensions seems odd.

Maybe Jason can shed light on what may be happening here.

Brian
Brian Gladman is offline   Reply With Quote
Old 2013-08-27, 00:01   #5
jasonp
Tribal Bullet
 
jasonp's Avatar
 
Oct 2004

32×5×79 Posts
Default

fivemack has had crash problems with later SVN versions; could you see if the problem goes away if you replace the common/lanczos directory with the version from SVN923?
jasonp is offline   Reply With Quote
Old 2013-08-27, 08:23   #6
Brian Gladman
 
Brian Gladman's Avatar
 
May 2008
Worcester, United Kingdom

72×11 Posts
Default

Quote:
Originally Posted by jasonp View Post
fivemack has had crash problems with later SVN versions; could you see if the problem goes away if you replace the common/lanczos directory with the version from SVN923?
Yes, that works perfectly for this number.

Brian
Brian Gladman is offline   Reply With Quote
Old 2013-08-27, 10:37   #7
Brian Gladman
 
Brian Gladman's Avatar
 
May 2008
Worcester, United Kingdom

72·11 Posts
Default

Quote:
Originally Posted by Brian Gladman View Post
Yes, that works perfectly for this number.

Brian
It is the changes to lanczos_matmul0.c after SVN927 that introduced this problem.
Brian Gladman is offline   Reply With Quote
Old 2013-08-27, 11:24   #8
jasonp
Tribal Bullet
 
jasonp's Avatar
 
Oct 2004

32·5·79 Posts
Default

I don't see how; the only changes in that neighborhood were in SVN938, which just moved some initialization upwards, and SVN939 which moved structure freeing upwards. I'm starting to think it's actually a buffer overrun somewhere, unless you see something in that code that I don't.
jasonp is offline   Reply With Quote
Old 2013-08-27, 11:48   #9
Brian Gladman
 
Brian Gladman's Avatar
 
May 2008
Worcester, United Kingdom

10000110112 Posts
Default

Quote:
Originally Posted by jasonp View Post
I don't see how; the only changes in that neighborhood were in SVN938, which just moved some initialization upwards, and SVN939 which moved structure freeing upwards. I'm starting to think it's actually a buffer overrun somewhere, unless you see something in that code that I don't.
I couldn't see how either :-(

But the only change I need to make to the current SVN version to get it to work is to revert the changes in this file alone. As you say, this change must be triggering some issue elsewhere.

Since the error turns up in the nc2 stage, what files do I need to delete (or keep) in order to rerun only the nc2 and subsequent stages?

Last fiddled with by Brian Gladman on 2013-08-27 at 12:27 Reason: ask a question
Brian Gladman is offline   Reply With Quote
Old 2013-08-29, 20:24   #10
JP12
 
Aug 2013

3 Posts
Default lanczos_matmul0.c

Quote:
Originally Posted by Brian Gladman View Post
It is the changes to lanczos_matmul0.c after SVN927 that introduced this problem.
I think so. Why has the following code moved out of the else block?
Code:
		if (p->num_threads > 1) {
		threadpool_drain(p->threadpool, 1);
		threadpool_free(p->threadpool);
	}
	matrix_thread_free(p, p->num_threads - 1);
	free(p->tasks);
Can this explain the problem?
Jose
JP12 is offline   Reply With Quote
Old 2013-08-30, 10:52   #11
jasonp
Tribal Bullet
 
jasonp's Avatar
 
Oct 2004

32×5×79 Posts
Default

No; this is a structure that was built with multithreading in mind, but is needed for single-thread runs as well, so it always has to get cleaned up. Plus the code you quote only runs when shutting down, which would not explain why the linear algebra itself fails early on.

My current guess is that there is a buffer overflow early on, which happens to stomp on memory that is used by the multithreading, because the current SVN allocates multithreading memory in a different place now. But I don't have the time to diagnose it.
jasonp is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
New build help Prime95 Hardware 147 2018-11-10 00:58
I'm trying to speedup AES MSIEVE factoring using CUDA build but... loopdemack Msieve 11 2016-01-18 13:44
32-bit CUDA build? f1pokerspeed Msieve 2 2013-12-30 01:14
Windows build for GPU CUDA code Brian Gladman GMP-ECM 13 2013-05-13 15:00
Windows 7 Windows Update & Prime95 issue!!! Unregistered Information & Answers 14 2010-04-10 21:47

All times are UTC. The time now is 11:07.


Tue Jan 31 11:07:09 UTC 2023 up 166 days, 8:35, 0 users, load averages: 0.54, 0.87, 0.95

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, 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.

≠ ± ∓ ÷ × · − √ ‰ ⊗ ⊕ ⊖ ⊘ ⊙ ≤ ≥ ≦ ≧ ≨ ≩ ≺ ≻ ≼ ≽ ⊏ ⊐ ⊑ ⊒ ² ³ °
∠ ∟ ° ≅ ~ ‖ ⟂ ⫛
≡ ≜ ≈ ∝ ∞ ≪ ≫ ⌊⌋ ⌈⌉ ∘ ∏ ∐ ∑ ∧ ∨ ∩ ∪ ⨀ ⊕ ⊗ 𝖕 𝖖 𝖗 ⊲ ⊳
∅ ∖ ∁ ↦ ↣ ∩ ∪ ⊆ ⊂ ⊄ ⊊ ⊇ ⊃ ⊅ ⊋ ⊖ ∈ ∉ ∋ ∌ ℕ ℤ ℚ ℝ ℂ ℵ ℶ ℷ ℸ 𝓟
¬ ∨ ∧ ⊕ → ← ⇒ ⇐ ⇔ ∀ ∃ ∄ ∴ ∵ ⊤ ⊥ ⊢ ⊨ ⫤ ⊣ … ⋯ ⋮ ⋰ ⋱
∫ ∬ ∭ ∮ ∯ ∰ ∇ ∆ δ ∂ ℱ ℒ ℓ
𝛢𝛼 𝛣𝛽 𝛤𝛾 𝛥𝛿 𝛦𝜀𝜖 𝛧𝜁 𝛨𝜂 𝛩𝜃𝜗 𝛪𝜄 𝛫𝜅 𝛬𝜆 𝛭𝜇 𝛮𝜈 𝛯𝜉 𝛰𝜊 𝛱𝜋 𝛲𝜌 𝛴𝜎𝜍 𝛵𝜏 𝛶𝜐 𝛷𝜙𝜑 𝛸𝜒 𝛹𝜓 𝛺𝜔