mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Factoring (https://www.mersenneforum.org/forumdisplay.php?f=19)
-   -   GGNFS won't compile? (https://www.mersenneforum.org/showthread.php?t=20468)

pakaran 2015-09-05 07:41

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 [URL="http://www.starreloaders.com/edhall/AliWin/AliqueitLinstall.html"]here[/URL], 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$
[/CODE]

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 2015-09-05 07:42

To be clear, I'm using Debian Sketch x64 on a Core 2 laptop.

R.D. Silverman 2015-09-05 12:39

[QUOTE=pakaran;409637]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 [URL="http://www.starreloaders.com/edhall/AliWin/AliqueitLinstall.html"]here[/URL], 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$
[/CODE]

I feel like I'm likely missing something incredibly obvious.

[/QUOTE]

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,
[/QUOTE]

Not true. msieve has no NFS siever.

VBCurtis 2015-09-05 15:21

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.

LaurV 2015-09-05 16:02

[QUOTE=VBCurtis;409677]
Yafu and factmsieve will call msieve and lasieve4 to do those steps, so you do need both programs.
[/QUOTE]
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=yafu.ini]ggnfs_dir=..\ggnfs\
ecm_path=..\gmp_ecm\ecm.exe
[/QUOTE]

Batalov 2015-09-05 16:13

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: [URL="http://sourceforge.net/p/ggnfs/code/HEAD/tree/trunk/src/experimental/lasieve4_64/"]lasieve4_64/[/URL]
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' [URL="http://sourceforge.net/p/ggnfs/code/HEAD/tree/trunk/contrib/remdups/"]remdups[/URL], 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.

pakaran 2015-09-05 17:22

[QUOTE=Batalov;409681]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: [URL="http://sourceforge.net/p/ggnfs/code/HEAD/tree/trunk/src/experimental/lasieve4_64/"]lasieve4_64/[/URL]
A permission to use this updated code was obtained from authors.
The GGNFS main trunk is preserved exactly how Chris Monico wrote it.
[/QUOTE]

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.

pakaran 2015-09-05 17:30

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[/CODE]

Batalov 2015-09-05 18:22

[QUOTE=pakaran;409686]
[CODE]nathan@pakaran:~/Aliquot/ggnfs-master/src/experimental/lasieve4_64/athlon64$ make liblasieve.a
m4 -D[COLOR=DarkRed]n_i_bits=0[/COLOR] ls-defs.asm mpqs_td.asm > mpqs_td.s
gcc -c mpqs_td.s
...
[/CODE][/QUOTE]
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 -- [URL="http://gilchrist.ca/jeff/factoring/nfs_beginners_guide.html"]from Jeff's site[/URL].

pakaran 2015-09-05 18:35

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?

Batalov 2015-09-05 19:03

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][B]Note for 64-bit installation:[/B] (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 [URL="https://sites.google.com/site/bbuhrow/lasieve4_64.7z?attredirects=0"]here[/URL]. [/QUOTE]


All times are UTC. The time now is 13:57.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.