mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > Factoring

Reply
 
Thread Tools
Old 2015-09-05, 07:41   #1
pakaran
 
pakaran's Avatar
 
Aug 2002

3718 Posts
Default GGNFS won't compile?

Hello. Please let me know if this is the wrong place for this question -- it didn't seem aliquot specific.

I've been trying to set up aliquot processing following the guide here, and everything works fine except compiling ggnfs.

It fails with the following error:

Code:
gnfs-lasieve4e.c:3740:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (j = 1, pv = Ar[0]; j <= g_poldeg[s]; j++) {
                                   ^
make -C asm
make[4]: Entering directory '/home/nathan/Aliquot/ggnfs-master/src/lasieve4/ppc32'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/home/nathan/Aliquot/ggnfs-master/src/lasieve4/ppc32'
gcc -DNDEBUG -O3 -funroll-loops -finline-functions -ftracer -fomit-frame-pointer -W -Wall -march=k8 -pipe -DGGNFS_HOST_GENERIC -DMALLOC_REPORTING -DGMP_BUG -Os -I.. -I../../include -I/usr/local/include -L. -L/usr/local/lib -o ../../bin/gnfs-lasieve4I15e gnfs-lasieve4eI15.o ../if.o input-poly.o redu2.o recurrence6.o ../fbgen.o real-poly-aux.o primgen32.o lasieve-prepn.o mpqs.o libgmp-aux.a asm/liblasieve.a asm/liblasieveI15.a prho.o -lgmp-aux -lgmp -lm
gcc: error: asm/liblasieveI15.a: No such file or directory
Makefile:61: recipe for target '../../bin/gnfs-lasieve4I15e' failed
make[3]: *** [../../bin/gnfs-lasieve4I15e] Error 1
rm lasieve-prepn.o prho.o asm/liblasieve.a asm/liblasieveI13.a gnfs-lasieve4eI14.o real-poly-aux.o recurrence6.o mpqs.o primgen32.o asm/liblasieveI14.a redu2.o gnfs-lasieve4eI12.o input-poly.o gnfs-lasieve4eI13.o gnfs-lasieve4eI15.o asm/liblasieveI12.a
make[3]: Leaving directory '/home/nathan/Aliquot/ggnfs-master/src/lasieve4'
Makefile:131: recipe for target 'latsiever' failed
make[2]: *** [latsiever] Error 2
make[2]: Leaving directory '/home/nathan/Aliquot/ggnfs-master/src'
Makefile:88: recipe for target 'common' failed
make[1]: *** [common] Error 2
make[1]: Leaving directory '/home/nathan/Aliquot/ggnfs-master'
Makefile:61: recipe for target 'x86_64' failed
make: *** [x86_64] Error 2
nathan@pakaran:~/Aliquot/ggnfs-master$
I feel like I'm likely missing something incredibly obvious.

I've seen a few other pages stating that you "don't really need ggnfs", and that it's for historical purposes only, but I'm unclear what to use instead. is factMsieve.pl a drop-in replacement? The only copy of this file I've found is from 2004, and ironically enough bundled with ggnfs.
pakaran is offline   Reply With Quote
Old 2015-09-05, 07:42   #2
pakaran
 
pakaran's Avatar
 
Aug 2002

3×83 Posts
Default

To be clear, I'm using Debian Sketch x64 on a Core 2 laptop.
pakaran is offline   Reply With Quote
Old 2015-09-05, 12:39   #3
R.D. Silverman
 
R.D. Silverman's Avatar
 
Nov 2003

164448 Posts
Default

Quote:
Originally Posted by pakaran View Post
Hello. Please let me know if this is the wrong place for this question -- it didn't seem aliquot specific.

I've been trying to set up aliquot processing following the guide here, and everything works fine except compiling ggnfs.

It fails with the following error:

Code:
gnfs-lasieve4e.c:3740:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (j = 1, pv = Ar[0]; j <= g_poldeg[s]; j++) {
                                   ^
make -C asm
make[4]: Entering directory '/home/nathan/Aliquot/ggnfs-master/src/lasieve4/ppc32'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/home/nathan/Aliquot/ggnfs-master/src/lasieve4/ppc32'
gcc -DNDEBUG -O3 -funroll-loops -finline-functions -ftracer -fomit-frame-pointer -W -Wall -march=k8 -pipe -DGGNFS_HOST_GENERIC -DMALLOC_REPORTING -DGMP_BUG -Os -I.. -I../../include -I/usr/local/include -L. -L/usr/local/lib -o ../../bin/gnfs-lasieve4I15e gnfs-lasieve4eI15.o ../if.o input-poly.o redu2.o recurrence6.o ../fbgen.o real-poly-aux.o primgen32.o lasieve-prepn.o mpqs.o libgmp-aux.a asm/liblasieve.a asm/liblasieveI15.a prho.o -lgmp-aux -lgmp -lm
gcc: error: asm/liblasieveI15.a: No such file or directory
Makefile:61: recipe for target '../../bin/gnfs-lasieve4I15e' failed
make[3]: *** [../../bin/gnfs-lasieve4I15e] Error 1
rm lasieve-prepn.o prho.o asm/liblasieve.a asm/liblasieveI13.a gnfs-lasieve4eI14.o real-poly-aux.o recurrence6.o mpqs.o primgen32.o asm/liblasieveI14.a redu2.o gnfs-lasieve4eI12.o input-poly.o gnfs-lasieve4eI13.o gnfs-lasieve4eI15.o asm/liblasieveI12.a
make[3]: Leaving directory '/home/nathan/Aliquot/ggnfs-master/src/lasieve4'
Makefile:131: recipe for target 'latsiever' failed
make[2]: *** [latsiever] Error 2
make[2]: Leaving directory '/home/nathan/Aliquot/ggnfs-master/src'
Makefile:88: recipe for target 'common' failed
make[1]: *** [common] Error 2
make[1]: Leaving directory '/home/nathan/Aliquot/ggnfs-master'
Makefile:61: recipe for target 'x86_64' failed
make: *** [x86_64] Error 2
nathan@pakaran:~/Aliquot/ggnfs-master$
I feel like I'm likely missing something incredibly obvious.
Welcome to the club.

You are missing a library file......

Quote:
I've seen a few other pages stating that you "don't really need ggnfs", and that it's for historical purposes only,
Not true. msieve has no NFS siever.
R.D. Silverman is offline   Reply With Quote
Old 2015-09-05, 15:21   #4
VBCurtis
 
VBCurtis's Avatar
 
"Curtis"
Feb 2005
Riverside, CA

22·7·132 Posts
Default

factmsieve.py (or the older perl script, substantially the same script) is just a script to call the relevant programs to run the steps of an NFS factorization. Yafu also serves this purpose.

For numbers lacking a special form, there are 3 stages:
1. Polynomial selection, run best by msieve.
2. Sieving for relations, run best by lasieve4 (included with GGNFS)
3. Linear algebra, run best by msieve.

Yafu and factmsieve will call msieve and lasieve4 to do those steps, so you do need both programs.

CADO-NFS is an alternative suite for all steps, and is under somewhat-active development. You may be interested to have a look at their page, perhaps try their software, though I think the above list is still faster overall.
VBCurtis is online now   Reply With Quote
Old 2015-09-05, 16:02   #5
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
Jun 2011
Thailand

222318 Posts
Default

Quote:
Originally Posted by VBCurtis View Post
Yafu and factmsieve will call msieve and lasieve4 to do those steps, so you do need both programs.
True for lasieve, you need to have a folder where you drop the files in ggnfs (lasieve included) and modify the yafu.ini paths accordingly. False for msieve, yafu has msieve "built in", you don't need it separate. What you would need more for yafu is the gmp-ecm if you have more cores and run ecm (otherwise yafu has its own ecm but is slower and single core). Also, modify the yafu ini accordingly to point to ecm path.
Quote:
Originally Posted by yafu.ini
ggnfs_dir=..\ggnfs\
ecm_path=..\gmp_ecm\ecm.exe

Last fiddled with by LaurV on 2015-09-05 at 16:05
LaurV is offline   Reply With Quote
Old 2015-09-05, 16:13   #6
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

41×229 Posts
Default

More strictly speaking, the updated siever code that one wants to use is not even in the main tree.
It is in the experimental/ subfolder: lasieve4_64/
A permission to use this updated code was obtained from authors.
The GGNFS main trunk is preserved exactly how Chris Monico wrote it.

Another useful tool, Greg Childers' remdups, is in the contrib/ folder.

Everything else is a nice tool to build, try and compare with later tools - but only for educational reasons. Bear in mind that this was a revolutionary effort ...10 years ago, in 2005. Now, the year is 2015.
Batalov is offline   Reply With Quote
Old 2015-09-05, 17:22   #7
pakaran
 
pakaran's Avatar
 
Aug 2002

111110012 Posts
Default

Quote:
Originally Posted by Batalov View Post
More strictly speaking, the updated siever code that one wants to use is not even in the main tree.
It is in the experimental/ subfolder: lasieve4_64/
A permission to use this updated code was obtained from authors.
The GGNFS main trunk is preserved exactly how Chris Monico wrote it.
So can I just put those files where the makefile expects and rename them (or edit it), or do I need to do something more complicated?

I googled "liblasieveI15" and didn't find anywhere to download the file. Meanwhile, running locate on liblasieveI15 (and yes, I used a capital i rather than a small L) finds only some VB project files.

EDIT: Never mind, I think I figured it out. Trying to build now. I'm using the "athlon64" architecture rather than x64, since I think my core2 is one or two generations later than the Athlon64. If it segfaults I'll change that.

Last fiddled with by pakaran on 2015-09-05 at 17:26
pakaran is offline   Reply With Quote
Old 2015-09-05, 17:30   #8
pakaran
 
pakaran's Avatar
 
Aug 2002

3×83 Posts
Default

Thanks for being patient with me. I'm now getting a different error:

Code:
nathan@pakaran:~/Aliquot/ggnfs-master/src/experimental/lasieve4_64/athlon64$ make liblasieve.a 
m4  -Dn_i_bits=0 ls-defs.asm mpqs_td.asm > mpqs_td.s
gcc -c mpqs_td.s
mpqs_td.s: Assembler messages:
mpqs_td.s:249: Error: incorrect register `%r9' used with `w' suffix
mpqs_td.s:280: Error: incorrect register `%r9' used with `w' suffix
mpqs_td.s:283: Error: incorrect register `%rsi' used with `w' suffix
mpqs_td.s:313: Error: incorrect register `%r9' used with `w' suffix
Makefile:56: recipe for target 'mpqs_td.o' failed
make: *** [mpqs_td.o] Error 1
rm mpqs_td.s
pakaran is offline   Reply With Quote
Old 2015-09-05, 18:22   #9
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

41×229 Posts
Default

Quote:
Originally Posted by pakaran View Post
Code:
nathan@pakaran:~/Aliquot/ggnfs-master/src/experimental/lasieve4_64/athlon64$ make liblasieve.a 
m4  -Dn_i_bits=0 ls-defs.asm mpqs_td.asm > mpqs_td.s
gcc -c mpqs_td.s
...
I am not sure how the above definition was set to 0. It could be the problem.
You can just as well use precompiled binaries for all components -- from Jeff's site.
Batalov is offline   Reply With Quote
Old 2015-09-05, 18:35   #10
pakaran
 
pakaran's Avatar
 
Aug 2002

3·83 Posts
Default

I'm afraid I'm still confused. How do I use these binaries to compile ggnfs, since it's expecting a .a file? Or should I just set aliqueit to run everything through yafu?
pakaran is offline   Reply With Quote
Old 2015-09-05, 19:03   #11
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

41·229 Posts
Default

Are you building a 32-bit set of binaries?

If not, then have you paid attention to the note on the site that you referred to in your original post in the 2nd line?
It says there "(optional)", which is actually wrong. Unless you deliberately want to run your calculations two times slower than you can with the proper binaries - you want to use these binaries:
Quote:
Note for 64-bit installation: (optional) The gnfs-lasieve* files compiled above will work fine, but bsquared (Mersenne forum ID) has optimized a set that may run better than the ones just created. They can be retrived from here.
Batalov is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compile v26 on Windows Brain Software 1 2010-11-24 00:34
Anyone want to compile an OS X ecm for yoyo? jasong GMP-ECM 1 2009-03-14 11:22
help to compile.... em99010pepe Programming 8 2006-12-06 17:11
src2414 how to compile 64 bit in Linux Unregistered Software 1 2005-08-22 13:19
How to Compile mprime Under Linux Blaise Pascal Software 12 2005-01-13 14:40

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

Wed Apr 14 21:07:00 UTC 2021 up 6 days, 15:47, 0 users, load averages: 2.25, 2.45, 2.44

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.