mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > Msieve

Reply
 
Thread Tools
Old 2013-05-12, 06:33   #1
wombatman
I moo ablest echo power!
 
wombatman's Avatar
 
May 2013

1,741 Posts
Default MSieve 1.51 (GPU) compilation

Would anyone be willing to compile the msieve151_gpu program for an AMD Phenom II X4? The current 32-bit Windows build throws an error, that when disassembled in Visual Studio, is related to pshufb, which apparently requires SSSE3. The Phenom II X4 doesn't have it and thus can't operate msieve151_gpu, even with a GTX 570.
wombatman is offline   Reply With Quote
Old 2013-05-12, 19:34   #2
wombatman
I moo ablest echo power!
 
wombatman's Avatar
 
May 2013

6CD16 Posts
Default

Alternatively, if somebody is willing to help me with how to compile the CUDA-msieve from source on a Windows machine in Visual Studio 2010, I'd be more than willing to do it myself and share with everybody.
wombatman is offline   Reply With Quote
Old 2013-05-13, 13:45   #3
jasonp
Tribal Bullet
 
jasonp's Avatar
 
Oct 2004

67168 Posts
Default

If you have MinGW, you can change the machine optimization flags in the makefile and build with 'make all WIN=1 CUDA=1 NO_ZLIB=1'.

Otherwise I can post a differently-optimized binary this evening somewhere.

Last fiddled with by jasonp on 2013-05-13 at 13:45
jasonp is offline   Reply With Quote
Old 2013-05-13, 21:40   #4
wombatman
I moo ablest echo power!
 
wombatman's Avatar
 
May 2013

1,741 Posts
Default

Jason, if you feel like doing that tonight, that'd be wonderful. For my own edification, I will still download MinGW and compile it as you recommended with those flags. If it's successful and you haven't compiled it yourself yet, I'll be happy to share it with you with full details to be posted wherever is appropriate. Thanks again for your help.
wombatman is offline   Reply With Quote
Old 2013-05-14, 02:39   #5
wombatman
I moo ablest echo power!
 
wombatman's Avatar
 
May 2013

6CD16 Posts
Default

Code:
C:\Documents and Settings\Ben\Desktop\msieve151\msieve-1.51>mingw32-make all WIN
=1 CUDA=1 NO_ZLIB=1
process_begin: CreateProcess(NULL, svnversion ., ...) failed.
gcc -O3 -fomit-frame-pointer -march=core2 -D_FILE_OFFSET_BITS=64 -DNDEBUG -D_LAR
GEFILE64_SOURCE  -Wall -W -DMSIEVE_SVN_VERSION="\"unknown\"" -I. -Iinclude -Ignf
s -Ignfs/poly -Ignfs/poly/stage1 -I"$CUDA_PATHinclude/" -Ib40c -DHAVE_CUDA -DNO_
ZLIB -c -o common/cuda_xface.o common/cuda_xface.c
In file included from common/cuda_xface.c:15:0:
include/cuda_xface.h:21:18: fatal error: cuda.h: No such file or directory
compilation terminated.
Makefile:283: recipe for target 'common/cuda_xface.o' failed
mingw32-make: *** [common/cuda_xface.o] Error 1
This is what I get when I try to compile as you suggested. I checked the CUDA_PATH and made sure it was pointing to the correct directory. I also went ahead and made sure that cuda.h was actually in the include directory, and it is. Any idea what might be causing this?


Also tried compiling zlib (no errors from that), and get the following when compiling without the NO_ZLIB flag:

Code:
C:\Documents and Settings\Ben\Desktop\msieve151\msieve-1.51>mingw32-make all WIN
=1 CUDA=1
process_begin: CreateProcess(NULL, svnversion ., ...) failed.
gcc -O3 -fomit-frame-pointer -march=core2 -D_FILE_OFFSET_BITS=64 -DNDEBUG -D_LAR
GEFILE64_SOURCE  -Wall -W -DMSIEVE_SVN_VERSION="\"unknown\"" -I. -Iinclude -Ignf
s -Ignfs/poly -Ignfs/poly/stage1 -I"$CUDA_PATHinclude" -Ib40c -DHAVE_CUDA -c -o
common/polyroot.o common/polyroot.c
In file included from include/msieve.h:24:0,
                 from include/common.h:18,
                 from include/polyroot.h:18,
                 from common/polyroot.c:15:
include/util.h:46:19: fatal error: zlib.h: No such file or directory
compilation terminated.
Makefile:283: recipe for target 'common/polyroot.o' failed
mingw32-make: *** [common/polyroot.o] Error 1

Last fiddled with by wombatman on 2013-05-14 at 03:01 Reason: More info
wombatman is offline   Reply With Quote
Old 2013-05-14, 05:08   #6
wombatman
I moo ablest echo power!
 
wombatman's Avatar
 
May 2013

6CD16 Posts
Default

To eliminate one problem I found:

I changed
Code:
-march=core2
to
Code:
-march=barcelona
to match my Phenom II X4 955. However, I still see the same errors.


Edit: And to add another (probably related) problem:

Code:
C:\Documents and Settings\Ben\Desktop\msieve151\msieve-1.51>mingw32-make all WIN
=1
process_begin: CreateProcess(NULL, svnversion ., ...) failed.
rm -f libmsieve.a
process_begin: CreateProcess(NULL, rm -f libmsieve.a, ...) failed.
make (e=2): The system cannot find the file specified.
Makefile:267: recipe for target 'all' failed
mingw32-make: *** [all] Error 2
This occurs when I run the make with just WIN=1.

Last fiddled with by wombatman on 2013-05-14 at 05:58
wombatman is offline   Reply With Quote
Old 2013-05-14, 10:36   #7
jasonp
Tribal Bullet
 
jasonp's Avatar
 
Oct 2004

2×3×19×31 Posts
Default

It's possible you need to update your path to include the binary directory for Microsoft's compiler, since nvcc requires it. This isn't done automatically when Visual Studio is installed, you may need a special command prompt that has the compiler environment defined.

I couldn't get to it last night and today will be awful for me until the evening. Maybe somebody else who uses MinGW can help?
jasonp is offline   Reply With Quote
Old 2013-05-14, 13:49   #8
wombatman
I moo ablest echo power!
 
wombatman's Avatar
 
May 2013

110110011012 Posts
Default

Jason, no worries. Although I haven't gotten it fixed yet, I'm learning a good bit. For you and anyone else who might read this, I have the following specs:

AMD Phenom II X4 955 (Barcelona)
Windows XP SP3 (32-bit)
GTX 570

If I can provide any other useful information, please don't hesitate to ask.


As for the Microsoft compiler, I added the \bin paths for both VS and the Microsoft SDKs to the system path and still get the same error
Code:
C:\Documents and Settings\Ben\Desktop\msieve151\msieve-1.51>mingw32-make all WIN
=1
process_begin: CreateProcess(NULL, svnversion ., ...) failed.
rm -f libmsieve.a
process_begin: CreateProcess(NULL, rm -f libmsieve.a, ...) failed.
make (e=2): The system cannot find the file specified.
Makefile:267: recipe for target 'all' failed
mingw32-make: *** [all] Error 2

Last fiddled with by wombatman on 2013-05-14 at 13:51
wombatman is offline   Reply With Quote
Old 2013-05-14, 16:31   #9
jasonp
Tribal Bullet
 
jasonp's Avatar
 
Oct 2004

2·3·19·31 Posts
Default

You can try 'make -k all ...' to force make to keep going in the face of errors. I think the problem here is that my home rig has subversion as a Cygwin package, whereas yours does not have subversion at all.

I guess I'm the only one around here who compiles windows binaries without using Microsoft's tools.
jasonp is offline   Reply With Quote
Old 2013-05-14, 16:44   #10
wombatman
I moo ablest echo power!
 
wombatman's Avatar
 
May 2013

6CD16 Posts
Default

I'm at work now, but I'll try that when I get home. Funny enough, I tried installing subversion (with a Windows installer) and adding it to the Path. When I'm home, I'll add exactly what I've added, since it may not have been the correct directory.

Just wanted to say thanks for taking the time to address my questions, Jason. Your software is impressive, and it is getting even more so as I start to actually understand better what's going on.
wombatman is offline   Reply With Quote
Old 2013-05-15, 00:50   #11
wombatman
I moo ablest echo power!
 
wombatman's Avatar
 
May 2013

1,741 Posts
Default

Had a bit of a revelation concerning your latest instructions...I was trying to compile everything from a standard command line. So I hopped into MinGW's shell and ran the compile from there. It got much further, but I still hit a snag. The command was

Code:
 make all (-k) WIN=1 CUDA=1 NO_ZLIB=1
and I get (with or without the -k flag):

Code:
gcc -O3 -fomit-frame-pointer -march=barcelona -D_FILE_OFFSET_BITS=64 -DNDEBUG -D
_LARGEFILE64_SOURCE  -Wall -W -DMSIEVE_SVN_VERSION="\"1.51 GPU\"" -I. -Iinclude
-Ignfs -Ignfs/poly -Ignfs/poly/stage1 -I"C:\Program Files\NVIDIA GPU Computing T
oolkit\CUDA\v5.0\include" -Ib40c -DHAVE_CUDA -DNO_ZLIB demo.c -o msieve -Wl,--la
rge-address-aware \
                        libmsieve.a "C:\Program Files\NVIDIA GPU Computing Toolk
it\CUDA\v5.0\lib/win32/cuda.lib" -lgmp -lm -lpthread
libmsieve.a(stage1.no):stage1.c:(.text+0xdf4): undefined reference to `sieve_lat
tice_cpu'
collect2.exe: error: ld returned 1 exit status
make: *** [all] Error 1

On the plus side:

Code:
make all WIN=1 NO_ZLIB=1
produces a working program! I'm currently crunching the 100 digit example number from Jeff Gilchrist's tutorial to make sure that it fully functions.

Last fiddled with by wombatman on 2013-05-15 at 01:40
wombatman is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
L1-BITS values for gnfs siever compilation EdH Factoring 8 2016-12-06 14:39
GMP under win64 compilation paulunderwood Programming 1 2015-10-30 02:18
CUDA 64-bit compilation wombatman Msieve 1 2014-02-08 18:40
LLR compilation error nuggetprime Software 1 2008-08-29 15:17
Request for compilation fivemack Factoring 12 2008-06-13 06:07

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

Sat Feb 27 07:27:21 UTC 2021 up 86 days, 3:38, 0 users, load averages: 1.04, 1.40, 1.57

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.