mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   YAFU (https://www.mersenneforum.org/forumdisplay.php?f=96)
-   -   yafu on linux (https://www.mersenneforum.org/showthread.php?t=17232)

swellman 2013-03-16 12:08

[QUOTE=EdH;333570]Are you using locally compiled gnfs binaries or the ones bsquared has available at [URL="https://sites.google.com/site/bbuhrow/lasieve4_64.7z?attredirects=0"]gnfs 64-bit binaries[/URL]?

For my linux 64-bit installations b[SUP]2[/SUP]'s gnfs binaries are considerably faster.[/QUOTE]

No I did not compile ggnfs myself - heard that's for trained professionals only! I followed your process as of last November. Believe I used b[SUP]2[/SUP]'s binaries.

I'll post my two examples later but not sure what info would be helpful in diagnosing the problem.

bsquared 2013-03-16 13:26

All YAFU does is call the external binaries, so this most likely isn't a YAFU issue. That said, we can try to figure out what's going on. Just to be sure, do you see the same issue if you just directly run the ggnfs lattice siever from a command line?

You said you booted into windows... is this a dual boot system or are you using some sort of virtualized linux? I would expect some minor slowdown if running on a virtualized OS, but not 5-6x. Unless maybe the virtualized OS was limited in the number of threads it can handle somehow.

Maybe something will come to light when you post some examples. Use -v

swellman 2013-03-16 14:19

Running some examples now, will post once the test sieving is done.

All my machines are dual boot Win64 and Ubuntu 12.04.

Understood about YAFU likely not the problem, wasn't sure where else to post this. Maybe I made an error while building all the components touched by YAFU while following EdH's invaluable instruction set.

I also note EdH made some changes to his instructions after I had finished setting up my machines with YAFU Linux64, so if nothing obvious pops up from my examples I will try to reinstall YAFU using the latest procedures.

EdH 2013-03-16 15:53

[QUOTE=swellman;333601]...

I also note EdH made some changes to his instructions after I had finished setting up my machines with YAFU Linux64, so if nothing obvious pops up from my examples I will try to reinstall YAFU using the latest procedures.[/QUOTE]
Most of my changes have been to try to keep up to date, so they now are designed to compile YAFU 1.34.5 based on the current revision of msieve. I have also made some changes to the ggnfs step, most notably to retrieve it from github, which seemed to have a more current version than sourceforge. I'm not sure when that change was made. However, for YAFU, you don't really need to acquire and compile ggnfs. All you need are the six binaries from b[SUP]2[/SUP]. (And, to remember to set the "Allow executing file as program" flag for each one on its Properties>Permissions tab.)

One extra note: The mention of needing to use -march=native (vs. -march=core2) still raises its head with the latest msieve revision for me. It manifests in YAFU nfs(), so if YAFU gives an "illegal instruction" break after you recompile everything, go back to msieve, make that change and try again.

Thanks for your kind words...

swellman 2013-03-16 19:34

Okay - after test sieving two examples on my older i7, Linux has sieving ETAs about 25% shorter than Win64. :redface: However, this was not my experience on my "8 headed monster", ie an Asus G55V. Linux64 ETA was 5-6x longer than Win64.

Unfortunately that machine is now in the middle of a big sieve job (using Win64) that I'm reluctant to interrupt to run my examples. I think the point is moot anyway. Once the job is completed in about two weeks, I will attempt to run the problem to ground using the strategies suggested above. Trying GGNFS command line to check performance is top on the list.

Worst case I will rebuild the machine using EdH's latest and YAFU 1.34.5.

And thanks for confirming - this isn't a YAFU problem or Linux characteristic, it's a problem with my environment.

swellman 2013-04-08 23:06

I seem to have solved my nfs performance problem with YAFU in Linux64 by replacing the ggnfs sievers with the gnfs-lasieve compile set by Dubslow as posted [URL="http://www.mersenneforum.org/showpost.php?p=336111&postcount=8"]here[/URL].

Thanks for all the help.

swellman 2013-04-20 21:15

Followup: the newer ggnfs sievers are 10-12% faster than the older "canonical" executables on my various machines (all Linux 64). YMMV.

bsquared 2013-04-23 14:41

Thanks for the info. I'll try to get an updated set of binaries on my website.

swellman 2013-04-23 15:49

I've hit a problem - this morning my copy of yafu/msieve was not happy with the nfs.dat produced by the new ggnfs siever(s). I got error -11 codes for every relation in the file, all 45 million of them.

I've likey got mixed versions of Yafu, msieve and ggnfs fighting with each other.

Will post some lines from the nfs.dat file later today.

swellman 2013-04-24 00:56

nfs.dat error with new ggnfs sievers
 
Running Yafu 1.33 on Linux64 with the [URL="http://www.mersenneforum.org/showpost.php?p=336111&postcount=8"]newer GGNFS sievers[/URL], I ran nfs() on a SNFS 185 composite. The new siever is lightning fast, 3-4 times faster than the old sievers in Win64, and almost 10x faster than the old sievers in Linux64 (on this particular machine). Unfortunately, the resulting nfs.dat file was rejected in filtering with over 45 million "error -11" messages.

Below is some test sieving using the new siever(s). Poly is given in post following this one due to length >10000 characters (sorry).

[code]
./yafu "nfs(1513117444296785895432643558378378489176745263182571800961094989424282097456739026545138032607472276383794488496483150999867897943105120794067875673715074132796535301)" -v -r -R -ns 7000000,7002000


04/23/13 19:53:18 v1.33 @ 8hm, System/Build Info:
Using GMP-ECM 6.3, Powered by GMP 5.0.1
detected Intel(R) Core(TM) i7-3610QM CPU @ 2.30GHz
detected L1 = 32768 bytes, L2 = 6291456 bytes, CL = 64 bytes
measured cpu frequency ~= 2294.773960
using 20 random witnesses for Rabin-Miller PRP checks

===============================================================
======= Welcome to YAFU (Yet Another Factoring Utility) =======
======= bbuhrow@gmail.com =======
======= Type help at any time, or quit to quit =======
===============================================================
cached 78498 primes. pmax = 999983


>> nfs: checking for job file - nfs: number in job file matches input
nfs: checking for data file
nfs: no data file found
nfs: commencing nfs on c166: 1513117444296785895432643558378378489176745263182571800961094989424282097456739026545138032607472276383794488496483150999867897943105120794067875673715074132796535301
nfs: found type: snfs
nfs: found size: 185
nfs: parsed lpbr = 29, lpba = 28, type = snfs, setting lpb = 29
nfs: guessing snfs difficulty 185 is roughly equal to gnfs difficulty 133
nfs: continuing with sieving at user specified special-q 7000000
nfs: commencing rational side lattice sieving over range: 7001750 - 7002000
nfs: commencing rational side lattice sieving over range: 7000500 - 7000750
nfs: commencing rational side lattice sieving over range: 7000250 - 7000500
nfs: commencing rational side lattice sieving over range: 7000750 - 7001000
nfs: commencing rational side lattice sieving over range: 7000000 - 7000250
nfs: commencing rational side lattice sieving over range: 7001000 - 7001250
nfs: commencing rational side lattice sieving over range: 7001250 - 7001500
nfs: commencing rational side lattice sieving over range: 7001500 - 7001750
total yield: 472, q=7001003 (0.04816 sec/rel)
total yield: 542, q=7000517 (0.04620 sec/rel)
total yield: 704, q=7002019 (0.04060 sec/rel)
total yield: 752, q=7001767 (0.04133 sec/rel)
total yield: 841, q=7000751 (0.04090 sec/rel)
total yield: 907, q=7001507 (0.03916 sec/rel)
total yield: 857, q=7000267 (0.04182 sec/rel)
total yield: 940, q=7001273 (0.03943 sec/rel)
found 6015 relations, need at least 44869960 (filtering ETA: 87h 40m), continuing with sieving ...


***factors found***


***co-factor***
C166 = 1513117444296785895432643558378378489176745263182571800961094989424282097456739026545138032607472276383794488496483150999867897943105120794067875673715074132796535301

ans = 1513117444296785895432643558378378489176745263182571800961094989424282097456739026545138032607472276383794488496483150999867897943105120794067875673715074132796535301
[/code]The first few lines of the resulting nfs.dat file (which was rejected by msieve) are shown below.

[code]-24417542,11735365:688B1A3,14D5F581,1DE1,397CFD,4508F,425B,3B1B,6ACFC3:B9E507F,92F,597B9,B07D,3D2D
-23526176,11842847:C43D4E9,357C55,FBCF5,D0A41,86B33,29183,4E35,6ACFC3:110D943,733D25D,5978B1,201D
5714908,174213:8E1227,1B65,E95,52313F,62DF7,2F531,27B9,207D,6ACFC3:292ACB,1169F9,95E99,1195F
-11120692,1611025:97A4547,12ED684B,3CA0D3,370D5,10673,91F3,8DB5,6ACFC3:1780C2B,B9B,A3D,1605EF,DE059
-21011382,6000139:14DE29E7,B30972F,425,1AB1,543C89,5D817,808F,6ACFC3:555CB21,2516F4D,70C8A9,EADF9
-8200438,20731:924827,71B92A1,977,3DAEB1,4159D,2027F,112EB,6ACFC3:11B765F,17D5,76519D,5294B
3631580,2374181:390CA25,13B6AFE7,62F,1297,2176F1,5B33F,4EA1F,5C89,6ACFC3:A93CED,EFD80B,193355,63D4F
-20765632,4967559:5446A11,1EE87F5,247EB5,199DA7,9090B,1E93B,5A4D,6ACFC3:D2BF98D,1BD6F,1449D,C5DB,31B1
8164130,690687:BF6A593,CDE4489,38DCEB,1E2947,1FF39,1B2ED,6ACFC3:1E25AF9,E388E63,853,78B
-11953072,9628927:73587C1,1CC70B9,65B,587129,511AAB,33222B,71C9,6ACFC3:2F3ECEB,C31,681A1,17071,564B
-24066172,5593277:2D6F90D,19EDDFB,431A0D,5257F,15175,8891,5855,2A55,6ACFC3:149F7D7,425,8082D,1D7EB,1C0D5
[/code]Fast performance, but Yafu/msieve won't digest it.


By redirecting Yafu to the old "canonical" ggnfs sievers (in the yafu.ini file), performance is pitiful and the resulting nfs.dat file is decidedly different.

[code]./yafu "nfs(1513117444296785895432643558378378489176745263182571800961094989424282097456739026545138032607472276383794488496483150999867897943105120794067875673715074132796535301)" -v -r -R -ns 7000000,7002000


04/23/13 20:09:37 v1.33 @ 8hm, System/Build Info:
Using GMP-ECM 6.3, Powered by GMP 5.0.1
detected Intel(R) Core(TM) i7-3610QM CPU @ 2.30GHz
detected L1 = 32768 bytes, L2 = 6291456 bytes, CL = 64 bytes
measured cpu frequency ~= 2294.767550
using 20 random witnesses for Rabin-Miller PRP checks

===============================================================
======= Welcome to YAFU (Yet Another Factoring Utility) =======
======= bbuhrow@gmail.com =======
======= Type help at any time, or quit to quit =======
===============================================================
cached 78498 primes. pmax = 999983


>> nfs: checking for job file - nfs: number in job file matches input
nfs: checking for data file
nfs: no data file found
nfs: commencing nfs on c166: 1513117444296785895432643558378378489176745263182571800961094989424282097456739026545138032607472276383794488496483150999867897943105120794067875673715074132796535301
nfs: found type: snfs
nfs: found size: 185
nfs: parsed lpbr = 29, lpba = 28, type = snfs, setting lpb = 29
nfs: guessing snfs difficulty 185 is roughly equal to gnfs difficulty 133
nfs: continuing with sieving at user specified special-q 7000000
nfs: commencing rational side lattice sieving over range: 7001750 - 7002000
nfs: commencing rational side lattice sieving over range: 7001250 - 7001500
nfs: commencing rational side lattice sieving over range: 7000750 - 7001000
nfs: commencing rational side lattice sieving over range: 7000500 - 7000750
nfs: commencing rational side lattice sieving over range: 7000250 - 7000500
nfs: commencing rational side lattice sieving over range: 7001500 - 7001750
nfs: commencing rational side lattice sieving over range: 7001000 - 7001250
nfs: commencing rational side lattice sieving over range: 7000000 - 7000250
Warning: Ignoring input line:
Warning: Ignoring input line:
Warning: Ignoring input line:
size: 185

Warning: Ignoring input line:
size: 185

Warning: Ignoring input line:
Warning: Ignoring input line:
size: 185

Warning: Ignoring input line:
size: 185

size: 185
Warning: lowering FB_bound to 7000499.

Warning: lowering FB_bound to 7001249.
Warning: lowering FB_bound to 7000749.
Warning: Ignoring input line:
size: 185
size: 185
Warning: lowering FB_bound to 7001749.


size: 185
Warning: lowering FB_bound to 6999999.

Warning: lowering FB_bound to 7000999.
Warning: lowering FB_bound to 7001499.
Warning: lowering FB_bound to 7000249.
total yield: 139, q=7001003 (0.22910 sec/rel)
total yield: 30, q=7000517 (1.10955 sec/rel)
total yield: 53, q=7002019 (0.75355 sec/rel))
total yield: 211, q=7001767 (0.19746 sec/rel)
total yield: 53, q=7000751 (0.83221 sec/rel))
total yield: 60, q=7001273 (0.81584 sec/rel)
total yield: 61, q=7001507 (0.82885 sec/rel))
total yield: 259, q=7000267 (0.20154 sec/rel)
found 866 relations, need at least 44869960 (filtering ETA: 859h 3m), continuing with sieving ...


***factors found***


***co-factor***
C166 = 1513117444296785895432643558378378489176745263182571800961094989424282097456739026545138032607472276383794488496483150999867897943105120794067875673715074132796535301

ans = 1513117444296785895432643558378378489176745263182571800961094989424282097456739026545138032607472276383794488496483150999867897943105120794067875673715074132796535301
[/code]with beginning of nfs.dat looking like this

[code]-24417542,11735365:688b1a3,14d5f581,3B1B,425B,4508F,397CFD,1DE1,17,1D,3B3,6ACFC3:b9e507f,3D2D,B07D,597B9,1F,B5,92F
-11120692,1611025:97a4547,12ed684b,8DB5,91F3,10673,370D5,3CA0D3,13,59,6ACFC3:1780c2b,DE059,1605EF,47,A3D,B9B
3631580,2374181:390ca25,13b6afe7,5C89,4EA1F,5B33F,2176F1,1297,B,62F,6ACFC3:a93ced,efd80b,63D4F,193355
-8447442,12254597:413bab9,999013,C773,14C5F,331DB,B3131,128555,8B,2AB,6ACFC3:366B,BEE7,1195F,946B1,66DBCD,5,3D
-23687746,865971:23c9993,9ec885,9E2D,2CC9B,119A4D,3,3,3,3,107,AE5,B51,1981,6ACFC3:1fdf5b1,b8664b,28C8B,5,29,29,14B,6CD
[/code]Are the new ggnfs sievers meant to be used with Yafu 1.34 only? I assumed that the structure of the nfs.dat file is constant across recent versions of ggnfs, msieve and yafu, but maybe that's completely wrong.

It would be nice to salvage the sieving work done to date, if that's possible. But it's not the end of the world if there is no easy remedy.

Thanks for any insights.

swellman 2013-04-24 01:17

poly used in all commands of last post (truncated for length)

[code]
n: 1513117444296785895432643558378378489176745263182571800961094989424282097456739026545138032607472276383794488496483150999867897943105120794067875673715074132796535301
# 7^275+6^275, difficulty: 185.92, anorm: 1.00e+024, rnorm: 3.02e+052
# scaled difficulty: 190.67, suggest sieving rational side
# size = 5.234e-019, alpha = 0.000, combined = 1.939e-011, rroots = 0
type: snfs
size: 185
skew: 1.0000
c4: 1
c3: -1
c2: 1
c1: -1
c0: 1
Y1: -6285195213566005335561053533150026217291776
Y0: 30226801971775055948247051683954096612865741943
m: 1047844878754861238080502824495137256106103967115193452132392636984938590203726237554326842369062740644831328692836668702305585017817161430515822496741801104279905624
rlim: 13610694
alim: 10477861
lpbr: 29
lpba: 28
mfbr: 58
mfba: 56
rlambda: 2.6
alambda: 2.6[/code]


All times are UTC. The time now is 23:28.

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