mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   YAFU (https://www.mersenneforum.org/forumdisplay.php?f=96)
-   -   YAFU 2.0 (https://www.mersenneforum.org/showthread.php?t=26681)

James Heinrich 2022-05-04 18:54

[QUOTE=bsquared;605251]I will likely rely heavily on users to tell me when things are broken.[/QUOTE]I'm also not a JSON expert, I just find it a very useful, widely-supported, easy-to-craft, interchange format. :smile:

I found another mistake in my example: entries are comma-separated (and whitespace is ignored) but you can't have a null entry, specifically the last entry should not have a trailing comma.
Maybe you could make [c]"yafu-version":"2.3.xyz"[/c] the last entry.

One other potential thing to watch for is the [i]possible[/i] need to [url=https://stackoverflow.com/questions/983451]escape special characters[/url] that might appear in the [c]input-argument-string[/c] or elsewhere, perhaps you might run into a [c]"[/c] in the argument string for example?

bsquared 2022-05-05 14:53

I'm liking this quite a bit, hopefully it can be useful!

[CODE]
{
"input-expression":"factor(2^523-1)",
"input-decimal":"27459190640522438859927603196325572869077741200573221637577853836742172733590624208490238562645818219909185245565923432148487951998866575250296113164460228607",
"input-argument-string":"factor(2^523-1) -v -threads 32 -snfs_xover 70 -plan light ",
"factors-prime":["160188778313202118610543685368878688932828701136501444932217468039063","171417691861249198128317096534322116476165056718630345094896620367860006486977101859504089"],
"pm1-curves" : {"150000":1,"3750000":1},
"ecm-curves" : {"2000":256,"11000":256,"50000":256,"250000":256},
"ecm-levels" : {"t15":117.64,"t20":47.95,"t25":6.49,"t30":0.68,"t35":0.06},
"runtime" : {"total":1729.3813, "ecm":3.6256, "pm1":1.1629, "pp1":0.0000, "siqs":0.0000, "nfs-total":1720.8274, "nfs-poly":0.0000, "nfs-sieve":989.4496, "nfs-filter":405.3591, "nfs-la":175.4860, "nfs-sqrt":52.9520},
"time-start" : "2022-05-05 09:20:43",
"time-end" : "2022-05-05 09:49:33",
"info":{"compiler":"INTEL 2021","ECM-version":"7.0.4","GMP-version":"6.2.0","yafu-version":"2.08"}
}
[/CODE]

James Heinrich 2022-05-05 15:17

[QUOTE=bsquared;605289]I'm liking this quite a bit, hopefully it can be useful![/QUOTE]Looking great so far!

One thing from my example I don't see in your output (yet) is [c]ecm-levels.sum[/c]. It can be calculated by the user of course, but easier (for us) if you can include it in the output.

Aillas 2022-05-06 09:22

Hi,

to validate your JSON output, you can use the following website:
[URL="https://jsonlint.com/"]jsonlint.com[/URL]
or
[URL="https://jsonformatter.curiousconcept.com/"]jsonformatter[/URL]

=> ex: No comma at the end of the last line...

Enjoy.

BudgieJane 2022-05-11 20:28

[QUOTE=James Heinrich;604810]Just a suggestion that would be (very) useful to me, perhaps others: output results in JSON format. I'm thinking something along the lines of:[code]{
"input-expression":"2^123/17",
"input-decimal:"625519056839960410778262146014279800",
"factors-prime":["2","2","2","3","3","5","5","7","11","13","31","41","61","151","241","331","1321"],
"factors-composite":["281406274007041"],
"ecm-curves":{"2000":30, "11000":74, "50000":216, "250000":432},
"ecm-levels":{"t15":38.02, "t20":11.32, "t25":1.06, "t30":0.07, "sum":25.34},
"time-start":"2022-04-25 16:25:34",
"time-end":"2022-04-25 18:34:56",
"runtime":{"total":7762.123, "ecm":762.456, "pm1":16.95, "siqs":7654.32}
}[/code](most of the above is made up for demonstration purposes)
The idea being to make a consistent, easily-parsable output format that can contain all the relevant information in one place. Undoubtedly there are some other values that can/should be included, the beauty is they can be added (or be missing) without breaking any parsing.
Obviously this output is only sane when an assignment is completed and can't be output during runtime as is done to factor.log but it would be an additional output.[/QUOTE]

I would find it very useful, too.

BudgieJane 2022-05-16 19:15

I've just had a strange occurrence when factoring the C85 remnant of 225[SUP]90[/SUP]+8[SUP]90[/SUP]. Yafu finds the PRP14 and PRP15 factors in the ECM step, and then it carries on for a bit longer, until it suddenly stops running.

The log file has this:
[QUOTE]05/16/22 19:55:21, ****************************
05/16/22 19:55:21, Starting factorization of 6527241453816375542948001004083718646817094158516423588057982342841754799177671410161
05/16/22 19:55:21, using pretesting plan: normal
05/16/22 19:55:21, using tune info for qs/gnfs crossover
05/16/22 19:55:21, ****************************
05/16/22 19:55:21, rho: x^2 + 3, starting 1000 iterations on C85
05/16/22 19:55:21, rho: x^2 + 2, starting 1000 iterations on C85
05/16/22 19:55:21, rho: x^2 + 1, starting 1000 iterations on C85
05/16/22 19:55:22, pm1: starting B1 = 150K, B2 = gmp-ecm default on C85
05/16/22 19:55:22, current ECM pretesting depth: 0.00
05/16/22 19:55:22, scheduled 30 curves at B1=2000 toward target pretesting depth of 26.15
05/16/22 19:55:22, ecm: commencing 32 curves using AVX-ECM method on 6527241453816375542948001004083718646817094158516423588057982342841754799177671410161, B1=2k, B2=200k
05/16/22 19:55:22, ecm: finished 0 curves using AVX-ECM method on C85 input, B1=2k, B2=200k
05/16/22 19:55:22, prp15 = 340173882495361 (curve=3 stg=2 B1=2000 B2=200000 sigma=946092225 thread=0 vecpos=3)
05/16/22 19:55:22, prp14 = 26837982613801 (curve=6 stg=2 B1=2000 B2=200000 sigma=2888843093 thread=0 vecpos=6)
05/16/22 19:55:22, current ECM pretesting depth: 0.00
05/16/22 19:55:22, scheduled 30 curves at B1=2000 toward target pretesting depth of 17.54
05/16/22 19:55:22, ecm: commencing 32 curves using AVX-ECM method on 714955224866063780799923493058663443052770449650856853001, B1=2k, B2=200k
[/QUOTE]

Another file (the app's output, redirected) has this
[QUOTE]...
ecm: found prp15 factor = 340173882495361

ecm: found prp14 factor = 26837982613801
fac: setting target pretesting digits to 17.54
fac: estimated sum of completed work is t0.00
fac: work done at B1=2000: 0 curves, max work = 30 curves
fac: 30 more curves at B1=2000 needed to get to t17.54
process id is 21132
commencing parallel ecm on 714955224866063780799923493058663443052770449650856853001 with 4 threads
Mersenne input 2^282 - 1 determined to be faster by REDC
ECM has been configured with DIGITBITS = 52, VECLEN = 8, GMP_LIMB_BITS = 64
Choosing MAXBITS = 416, NWORDS = 4, NBLOCKS = 1 based on input size 189
configuring avx-ecm with 4 threads
Input has 189 bits, using 4 threads (8 curves/thread)
Processing in batches of 100000000 primes
Using 416-bit mul/sqr core
Initialization took 0.0055 seconds.
found 18061 primes in range [0 : 201000]
ecm: 32/32 curves on C57 @ B1=2000, B2=100*B1
[/QUOTE]

and that was all I got (I was running the program as a system call from another program, so I suppose any error message may well have been destroyed by that program recovering gracefully from the error).

Any suggestions will be warmly welcomed.

bsquared 2022-05-16 19:23

There is a fix for this in the latest source. Looks like I will need to make another windows executable.

BudgieJane 2022-05-16 20:08

[QUOTE=bsquared;605946]There is a fix for this in the latest source. Looks like I will need to make another windows executable.[/QUOTE]

That would be nice. Thank you.

thyrex 2022-05-28 10:40

[B]bsquared[/B], is current version from [url]https://github.com/bbuhrow/yafu[/url] (both yafu-x64.exe) don't work on Windows 10 Pro 21H2 ?

[QUOTE]This version of yafu-x64.exe is not compatible with the version of Windows running on this computer. Check your system information, and then contact software developer.[/QUOTE]

Stargate38 2022-05-30 00:04

Is your OS and/or CPU 32-bit or 64-bit? If it's 32-bit, no 64-bit exe will work on it.

thyrex 2022-05-30 20:14

64-bit.

But I see "unsupported 16-bit application" in header of dialog error window. And size of .exe is around 125Kb only

File with 2.07 version has size above 2Mb


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

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