mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   FactorDB (https://www.mersenneforum.org/forumdisplay.php?f=94)
-   -   Factoring database (https://www.mersenneforum.org/showthread.php?t=11119)

yoyo 2011-11-20 11:26

[QUOTE=c10ck3r;279241]Alas, I do not speak this Pearl of yours. (JK) In all reality, I have heard of it but not yet studied into programming. I will download the Perl interpreter script when I return to my abode, but want to ask a (dumb) question first. Can I just copy and paste/retype your script into the interpreter, or are there variables that I will need to change to get it started (ie insert web addresses or sieve limits)? Thanks in advance![/QUOTE]

You can use it as it is. But use the source from the Link I posted. This is the latest version. Additional you need the yafu and gnfs binaries in the same folder.
yoyo

EdH 2011-11-21 16:14

Can anyone tell me why none of my linux machines (Fedora/Ubuntu/64/32) will run yoyo's script?

Fedora 64bit:
[code]
get composites
Factoring 86 digits: 19634094881183447516447349799866989773314811082595102595931788583144645019808006141481
sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `yafu factor(19634094881183447516447349799866989773314811082595102595931788583144645019808006141481)'
Error, no result found
[/code]Ubuntu 64bit:
[code]
get composites
Factoring 86 digits: 25158018663054383550239190590457044192297033453857701523977806430856979273243548783367
sh: Syntax error: "(" unexpected
Error, no result found
[/code]Ubuntu 32bit:
[code]
get composites
Factoring 87 digits: 885505124116357194013562918712135789681563077849327680823688997756370552371212853986737
sh: Syntax error: "(" unexpected
Error, no result found
[/code]I've tried using ./yafu and /fullpath/yafu and the results are the same. Thanks...

yoyo 2011-11-21 17:12

In the folder where you ave the script, the yafu binary and the gnfs binaries, please run the following commands:
[CODE]
ls -l
uname -a
file yafu
ldd yafu
[/CODE]

Afterwards change in the Perl script the line:
[CODE]
open(YAFU, "yafu factor($composite) |") or die "Couldn't start yafu!";
[/CODE]
to
[CODE]
open(YAFU, "yafu \"factor($composite)\" |") or die "Couldn't start yafu!";
[/CODE]
and try again.

yoyo

chris2be8 2011-11-21 18:14

Or even:
[CODE]
open(YAFU, "yafu \"factor($composite)\" |";) or die "Couldn't start yafu to factor $composite $!";
[/CODE]

The $! is a perl variable holding the latest error message. It's should say why the open failed. And you want the error message to say what perl though the composite was.

Chris K

EdH 2011-11-21 19:59

@yoyo: Thanks! The [B]\"[/B]'s did the trick on all machines, although I did need to add[B] ./[/B] to yafu as well.

If you still want the rest of the info, here are the results from a 32-bit machine:
[code]
$ [B]ls -l[/B]
total 1704
-rw-r--r-- 1 math01 math01 1882 2011-11-21 14:19 dbc.pl
-rwxr-xr-x 1 math01 math01 112528 2010-09-01 20:32 gnfs-lasieve4I11e
-rwxr-xr-x 1 math01 math01 112528 2010-09-01 20:32 gnfs-lasieve4I12e
-rwxr-xr-x 1 math01 math01 112528 2010-09-01 20:32 gnfs-lasieve4I13e
-rwxr-xr-x 1 math01 math01 112528 2010-09-01 20:32 gnfs-lasieve4I14e
-rwxr-xr-x 1 math01 math01 112528 2010-09-01 20:32 gnfs-lasieve4I15e
-rwxr-xr-x 1 math01 math01 112528 2010-09-01 20:32 gnfs-lasieve4I16e
-rwxr-xr-x 1 math01 math01 1048584 2010-12-22 16:30 yafu

$ [B]uname -a[/B]
Linux math01 2.6.38-12-generic #51-Ubuntu SMP Wed Sep 28 14:25:20 UTC 2011 i686 i686 i386 GNU/Linux

$ [B]file yafu[/B]
yafu: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.2.5, not stripped

$ [B]ldd yafu[/B]
linux-gate.so.1 => (0x00e00000)
libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0x008bb000)
libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0x00ec6000)
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0x00434000)
/lib/ld-linux.so.2 (0x00c37000)
[/code]@chris2be8: Your version produces an error:
[code]
syntax error at dbc.pl line 21, near ""./yafu \"factor($composite)\" |";"
Execution of dbc.pl aborted due to compilation errors.
[/code]I had to remove the first semicolon:
[code]
open(YAFU, "yafu \"factor($composite)\" |"[COLOR=Red];[/COLOR]) or die "Couldn't start yafu to factor $composite $!";
open(YAFU, "yafu \"factor($composite)\" |") or die "Couldn't start yafu to factor $composite $!";
[/code]Thanks everyone - sorry to not be able to fix these types of simple troubles on my own - maybe someday...

bsquared 2011-11-21 22:12

Thought I'd try out yoyo's script. After running it awhile (works great after the \" modification, thanks!) I saw this:

[QUOTE]starting SIQS on c87: 126360053777785233932653908376965069485887972007269581748724036414754447361485452471707
==== sieving in progress ( 4 threads): 64640 relations needed ====
==== Press ctrl-c to abort and save state ====
64934 rels found: 21234 full + 43700 from 685048 partial, (4268.10 rels/sec)
freed 58 duplicate relations
SIQS elapsed time = 176.2055 seconds.
Total factoring time = 283.6646 seconds

***factors found***
PRP33 = 471128813397393275028348800754439
*****
PRP54 = 268207017241379310344827862245551724137931034482776013
*****
ans = 1
===========================================================================
report factors
New factors added: 0
Factors already known: 2
Small factors: 0
Errors (does not divide): 0
===========================================================================
[/QUOTE]

Does that mean someone beat me to that particular c87?

pinhodecarlos 2011-11-21 22:16

[QUOTE=bsquared;279429]

Does that mean someone beat me to that particular c87?[/QUOTE]

I think so, I was running the script on a slow laptop and I had that message in 80% of factorizations...lol

LaurV 2011-11-22 01:59

To avoid that, change the line which is picking the number into something like

my $rand=int(rand(73))+69;

but use your own numbers instead of 73 and 69. On this example the script will pick a random composite between the 73rd and 142nd (=73+69) from the factorDB's list. You can also play with mindig and start values of the link. I have something like:

[CODE]
my $rand=int(rand(142))+13;
my $mindig=57;
my $contents = get("http://factorization.ath.cx/listtype.php?t=3&mindig=$mindig&perpage=1&start=$rand&download=1");
[/CODE]So the list starts with composites that have 57 digits at least, and from that list I pick one between the 142nd and 155th, so the "odds" that someone else would pick the same is very low. I do this only when some core is free and I have nothing else to do, and I want the factorization to finish fast. It is picking numbers between 85 and 95 digits, in average, depends what is on the list (with the 57 I try to avoid the cases when some guys intoxicate the DB with lots of small numbers as happened in the past). But you can go higher if you like and have the time and computing power.

With this method, only very seldom someone is beating me to the factors.

yoyo 2011-11-22 06:31

[QUOTE=bsquared;279429]
Does that mean someone beat me to that particular c87?[/QUOTE]

Don't know if this is the right conclusion. It onl means, that the found factors are already known by the factordb. But it doesn't mean that the factordb already knows that these factors are factors of this c87.

yoyo

bsquared 2011-11-22 15:16

[QUOTE=yoyo;279463]Don't know if this is the right conclusion. It onl means, that the found factors are already known by the factordb. But it doesn't mean that the factordb already knows that these factors are factors of this c87.

yoyo[/QUOTE]

True, but I think it would be extraordinarily unlikely that some random 30 digit prime was a factor of more than one number, unless someone was constructing composites that way. Since other people also see things like this frequently, I think its likely that multiple factorizations are proceeding at the same time on the same numbers. Introducing some randomness into what is chosen, like LaurV's solution, seems like a good idea.

yoyo 2011-11-22 15:37

To bring some more lights into the factoring ranges for these composites:
- Syd factorize automatic on his server composites < c70. So there is no need to run them with the script.
- My yafu Boinc server takes composites beginning with C80. It skips the first 1000 and takes random numbers between the 1000th and the 5500th.

Would be nice if we could reserve composites in factordb for some time (e.g. 2days, maybe depending on the length). Than we could tweak the scripts to do not fetch reserved numbers.

yoyo


All times are UTC. The time now is 22:54.

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