mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > YAFU

Reply
 
Thread Tools
Old 2020-09-04, 21:52   #12
James Heinrich
 
James Heinrich's Avatar
 
"James Heinrich"
May 2004
ex-Northern Ontario

3×13×83 Posts
Default

Quote:
Originally Posted by paulunderwood View Post
It looks like make is not finding gmp. Maybe you should set the paths correctly. Is gmp installed locally? You might need gmp-dev.
GMP was installed per Ed's guide, the GMP section. The source is in ../gmp/ relative to the yafu directory source directory I'm trying to compile. I redid the gmp section just in case I missed something the first time (but I don't think I did). Same result as above with makeing yafu.

You mention "set the paths correctly" -- can you be more specific as to where I should be setting them?

ls -l /usr/local/lib
Code:
total 59600
 3618442 Sep  3 15:45 libecm.a
     874 Sep  3 15:45 libecm.la
 1318856 Sep  4 17:47 libgmp.a
     913 Sep  4 17:47 libgmp.la
      16 Sep  4 17:47 libgmp.so -> libgmp.so.10.4.0
      16 Sep  4 17:47 libgmp.so.10 -> libgmp.so.10.4.0
  535137 Sep  4 17:47 libgmp.so.10.4.0
 1333084 Nov 23  2018 liblzma.a
     944 Nov 23  2018 liblzma.la
      16 Nov 23  2018 liblzma.so -> liblzma.so.5.2.4
      16 Nov 23  2018 liblzma.so.5 -> liblzma.so.5.2.4
  708676 Nov 23  2018 liblzma.so.5.2.4
      16 Aug 28  2014 libpari.so -> libpari.so.2.7.1
 5694955 Aug 28  2014 libpari.so.2.7.1
      16 Aug 28  2014 libpari.so.4 -> libpari.so.2.7.1
      22 Mar  1  2016 libwkhtmltox.so -> libwkhtmltox.so.0.13.0
      22 Mar  1  2016 libwkhtmltox.so.0 -> libwkhtmltox.so.0.13.0
      22 Mar  1  2016 libwkhtmltox.so.0.13 -> libwkhtmltox.so.0.13.0
47782840 Apr 12  2015 libwkhtmltox.so.0.13.0
    4096 May 13  2019 p7zip
    4096 Aug 28  2014 pari
    4096 Sep  4 17:47 pkgconfig

Last fiddled with by James Heinrich on 2020-09-04 at 21:52
James Heinrich is offline   Reply With Quote
Old 2020-09-04, 22:06   #13
paulunderwood
 
paulunderwood's Avatar
 
Sep 2002
Database er0rr

3,527 Posts
Default

In Makefile, try commenting out:

Code:
 
       INC += -I../gmp/include
        LIBS += -L../gmp/lib/linux/x86_64
and add in its place:

Code:
       INC += -I/usr/local/include
       LIBS += -L/usr/local/lib
Is gmp.h in /usr/local/include/ ?

Last fiddled with by paulunderwood on 2020-09-04 at 22:08
paulunderwood is offline   Reply With Quote
Old 2020-09-04, 22:15   #14
James Heinrich
 
James Heinrich's Avatar
 
"James Heinrich"
May 2004
ex-Northern Ontario

3·13·83 Posts
Default

Quote:
Originally Posted by paulunderwood View Post
Is gmp.h in /usr/local/include/ ?
Yes.
ls -l /usr/local/include
Code:
-rw-r--r--  8159 Sep  3 15:45 ecm.h
-rw-r--r-- 83978 Sep  4 17:47 gmp.h
drwxr-xr-x  4096 Nov 23  2018 lzma
-rw-r--r--  9817 Nov 23  2018 lzma.h
drwxr-xr-x  4096 Aug 28  2014 pari
drwxr-xr-x  4096 Mar  1  2016 wkhtmltox
Quote:
Originally Posted by paulunderwood View Post
In Makefile, try commenting out ... and add in its place
Oh my, I think that's done it!


At least, yafu "tune" is running right now! Thank you Paul!
James Heinrich is offline   Reply With Quote
Old 2020-09-04, 22:22   #15
paulunderwood
 
paulunderwood's Avatar
 
Sep 2002
Database er0rr

1101110001112 Posts
Default

My pleasure. I think the local include/link caught ecm too
paulunderwood is offline   Reply With Quote
Old 2020-09-05, 00:00   #16
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

3,527 Posts
Default

I do need to change something on my YAFU page. Thanks for pointing it out. Only the "wip" Makefile has the 7.0.3 reference:
Code:
 CC = gcc-7.3.0
The "trunk" version does not.

Glad to read that you are up and running.
EdH is offline   Reply With Quote
Old 2020-09-05, 00:36   #17
James Heinrich
 
James Heinrich's Avatar
 
"James Heinrich"
May 2004
ex-Northern Ontario

3×13×83 Posts
Default

Quote:
Originally Posted by EdH View Post
Glad to read that you are up and running.
Indeed, it appears that I am, thanks to your comprehensive guide, and some pointers from Paul & Chris.

I threw my pet number (I came across it last week in an automated too-big-to-factor-quickly report from mersenne.ca, I think it's a k from a composite factor, don't remember which exponent from one 350-bit 8of9 composite factor of M9532331) at my new yafu and it did its thing with ecm and nfs and came up with the answer for me:
Code:
>> factor(122516985909244517881828509074071415559791900903255048509694468186063012576476804164857444126360193)
fac: factoring 122516985909244517881828509074071415559791900903255048509694468186063012576476804164857444126360193
fac: using pretesting plan: normal
fac: no tune info: using qs/gnfs crossover of 95 digits
div: primes less than 10000
fmt: 1000000 iterations
rho: x^2 + 3, starting 1000 iterations on C98
rho: x^2 + 2, starting 1000 iterations on C98
rho: x^2 + 1, starting 1000 iterations on C98
nfs: searching for brent special forms...
nfs: searching for homogeneous cunningham special forms...
nfs: searching for XYYXF special forms...
nfs: couldn't find special form
pm1: starting B1 = 150K, B2 = gmp-ecm default on C98
ecm: 32/32 curves on C98, B1=2K, B2=gmp-ecm default
ecm: 80/80 curves on C98, B1=11K, B2=gmp-ecm default
ecm: 216/216 curves on C98, B1=50K, B2=gmp-ecm default, ETA: 1 sec
pm1: starting B1 = 3750K, B2 = gmp-ecm default on C98
ecm: 408/408 curves on C98, B1=250K, B2=gmp-ecm default, ETA: 3 sec
nfs: commencing nfs on c98: 40838995303081505960609503024690471853263966967751682836564822728687670858825601388285814708786731
...
linear algebra completed 190209 of 190470 dimensions (99.9%, ETA 0h 0m)
nfs: commencing msieve sqrt
NFS elapsed time = 2501.1627 seconds.
Total factoring time = 2658.3809 seconds
***factors found***
P1 = 3
P59 = 56778227132612889065677008632219351134855595667964207526657
P39 = 719272111256604635831656054993527440683
So I'm happy!
James Heinrich is offline   Reply With Quote
Old 2020-09-05, 02:05   #18
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

3,527 Posts
Default

Quote:
Originally Posted by James Heinrich View Post
. . .
So I'm happy!
Excellent! Glad I could be of help. (And, thanks for letting me know I needed to make an edit.)

Actually, I needed to make several edits today. The msieve source code has been updated to incorporate the GMP-6.2.0 change also, so I had to edit that note out of my instructions.
EdH is offline   Reply With Quote
Old 2020-09-09, 08:21   #19
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
Jun 2011
Thailand

216518 Posts
Default

Quote:
Originally Posted by James Heinrich View Post
***factors found***
P1 = 3
So I'm happy!
Haha!
LaurV is offline   Reply With Quote
Old 2020-11-12, 22:00   #20
James Heinrich
 
James Heinrich's Avatar
 
"James Heinrich"
May 2004
ex-Northern Ontario

CA516 Posts
Default

Revisiting this again, this time on my new CentOS-8 server, I thought I'd pass on a few notes and observations in case someone else as inexperienced as I am tries this:

Package names:
Before anything else I needed to run yum --enablerepo=extras install epel-release or I wouldn't be able to find any of these packages.
apt-get replaced with yum mostly works fine, but a few package names need translating:
g++ -> gcc-c++
zlib1g-dev -> zlib-devel
I also had to install xz since it wasn't installed by default.

With those minor changes everything went fine until I got to the ggnfs section, and found that Ben's archive is no longer downloadable from https://sites.google.com/site/bbuhrow/lasieve4_64.7z

I had previously downloaded these sievers on my old server so I copied them over.
The instructions also talk about how to build these from source, but the "apply the following patches" section was a bit intimidating (at least using vi, perhaps I should be using some tool to apply those patches?) so I skipped that.

I finally built yafu with make x86_64 NFS=1 USE_SSE41=1 USE_AVX2=1 since my CPU (Xeon(R) Gold 5120) apparently supports both SSE4.1 and AVX2 but about 5 seconds into yafu "tune" I get a segfault. I rebuilt it without AVX2 and it completed tune without error.

I threw my pet number at it and it found the factors I expected. On my previous 8-core Atom C2750 it took 2658 seconds, on my new 6-core (VM) Xeon Gold 5120 it took 1368 seconds.

Last fiddled with by James Heinrich on 2020-11-12 at 22:27
James Heinrich is offline   Reply With Quote
Old 2020-11-12, 22:08   #21
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

25·3·5·7 Posts
Default

Quote:
Originally Posted by James Heinrich View Post

With those minor changes everything went fine until I got to the ggnfs section, and found that Ben's archive is no longer downloadable from https://sites.google.com/site/bbuhrow/lasieve4_64.7z
Google forced me to migrate that page a while back, looks like the linked files didn't make it through that process. I'll see if I can fix it.

Quote:
Originally Posted by James Heinrich View Post
I finally built yafu with make x86_64 NFS=1 USE_SSE41=1 USE_AVX2=1 since my CPU (Xeon(R) Gold 5120) apparently supports both SSE4.1 and AVX2 but about 5 seconds into yafu "tune" I get a segfault. I rebuilt it without AVX2 and it completed tune without error.
If you are willing, try the AVX2 build again by adding USE_BMI2=1 on the make line and see if that helps.
bsquared is offline   Reply With Quote
Old 2020-11-12, 22:21   #22
James Heinrich
 
James Heinrich's Avatar
 
"James Heinrich"
May 2004
ex-Northern Ontario

62458 Posts
Default

Quote:
Originally Posted by bsquared View Post
If you are willing, try the AVX2 build again by adding USE_BMI2=1 on the make line and see if that helps.
Nope, still dies at the same point:
Code:
./yafu "tune"


Setting THREADS = 1 for tuning

starting SIQS on c60: 349594255864176572614071853194924838158088864370890996447417

==== sieving in progress (1 thread):    3568 relations needed ====
====           Press ctrl-c to abort and save state           ====
944 rels found: 353 full + 591 from 5250 partial, (1464.55 rels/sec)
Max specified relations found

sieve time = 0.0000, relation time = 0.0000, poly_time = 0.0000
trial division touched 558762 sieve locations out of 6085410816


elapsed time for ~10k relations of c60 = 7.4636 seconds.
extrapolated time for complete factorization = 11.8057 seconds

starting SIQS on c65: 34053408309992030649212497354061832056920539397279047809781589871

==== sieving in progress (1 thread):    6448 relations needed ====
====           Press ctrl-c to abort and save state           ====
Segmentation fault (core dumped)
James Heinrich is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Running YAFU via Aliqueit doesn't find yafu.ini EdH YAFU 8 2018-03-14 17:22
Adventures with 16f siever VBCurtis Factoring 6 2018-01-24 11:06
Building yafu on windows/linux 2147483647 YAFU 19 2016-12-09 07:59
The Adventures of a Donkey a1call Puzzles 9 2016-05-27 16:50
Building gcc 4.4.0 CRGreathouse Software 1 2009-07-07 22:25

All times are UTC. The time now is 20:58.

Fri Jan 15 20:58:32 UTC 2021 up 43 days, 17:09, 0 users, load averages: 3.29, 2.69, 2.35

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.