-
-
Notifications
You must be signed in to change notification settings - Fork 52
Tips, Examples, and Troubleshooting
bbuhrow edited this page Jun 19, 2026
·
2 revisions
A canonical factor() test case (uses many of YAFU's algorithms):
yafu "factor(2056802480868100646375721251575555494408897387375737955882170045672576386016591560879707933101909539325829251496440620798637813)"A neat ECM example:
yafu "ecm(140870298550359924914704160737419905257747544866892632000062896476968602578482966342704)"yafu "factor(rsa(200))" -threads 8 -vyafu "factor(<n>)" -pretest 40yafu "factor(<n>)" -plan deep -threads 8 -vJust call siqs again with the same input — YAFU reads siqs.dat (or whatever you set with qssave) and continues.
yafu "siqs(<same n as before>)" -threads 4# Resume sieving
yafu "nfs(<n>)" -v -R -ns
# Or resume in-progress linear algebra
yafu "nfs(<n>)" -v -R -ncryafu "nfs(<n>)" -np 10000,20000 -v -threads 4yafu "nfs(<n>)" -nt poly1.job,poly2.job,poly3.jobYAFU sieves each in turn, reports which is fastest, then exits.
nohup yafu ... > nohup.out&"# in.bat contains one number per line
yafu "factor(@)" -batchfile in.bat -threads 8Lines are removed from in.bat as they complete, so the file acts as a work queue.
| CPU generation | Flags |
|---|---|
| Sandy Bridge → Haswell |
USE_SSE41=1 USE_AVX2=1 USE_BMI2=1 (BMI2 from Haswell on) |
| Skylake-X / Cascade Lake | add SKYLAKEX=1
|
| Ice Lake / Tiger Lake / newer | add ICELAKE=1
|
If your CPU has AVX-512, YAFU will also pick AVX-ECM as the default ECM backend (built into the project).
See Building YAFU for the full build recipe.
-
SIQS savefiles get overwritten when you start a different input. Back up
siqs.datif you're switching jobs and want to come back. -
NFS savefiles get overwritten the same way. Set
-oand-jobper project, or work in separate directories. -
-nc2starts the linear algebra from scratch. To resume an in-progress LA, use-ncr. -
tune_info=lines inyafu.iniare written by thetune()function. You don't need to add them by hand. They're per-CPU, so if you run YAFU on a different machine you'll want to re-tune. -
GGNFS binaries are required for NFS. YAFU ships them under
factor/lasieve5_64/bin/, but you have to point at them withggnfs_dir=. -
APR-CL hard limit is 6021 digits. Above that,
aprcl()falls back to BPSW. - SQUFOF is capped at 62-bit inputs.
- Active user community: mersenneforum.org.
- Linux-build help thread: http://www.mersenneforum.org/forumdisplay.php?f=96.
- Read
docfile.txtandyafu.iniin the repo — both are kept up to date by the maintainer and have detail this wiki may abbreviate. - Inside YAFU itself: type
helpfor everything, orhelp <function>for one thing.
Bug reports and feature requests live on the GitHub issues page. If you build a faster binary for a particular CPU than the one shipped, the maintainer would like to hear about it.