mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > YAFU

Reply
 
Thread Tools
Old 2017-10-20, 04:50   #12
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
Jun 2011
Thailand

2·3·1,471 Posts
Default

It is not an error on your side. Last versions of yafu indeed waste a lot of time with poly selection, especially on machines with many cores/threads. I use 20 threads on a 10 core machine, because I get about 13% more relations when sieving, but this is always a pain in the keyboard when poly is done, and I have to be careful and watch it close, otherwise (about) 17-18-19 threads will finish, and the remaining look stuck (do nothing for hours). That is just an example.
LaurV is online now   Reply With Quote
Old 2017-10-20, 16:37   #13
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

2·33·61 Posts
Default

Quote:
Originally Posted by Jayder View Post
I've reverted to yafu 1.33 since so much time is wasted on poly select due to the bug with 1.34. If anybody would be so kind as to help me with the problems outlined in my post above, I'd be very grateful. Could someone perhaps try following the instructions themselves to see if it is an error on my side or if it is something else? It's curious that no one in this thread has posted to say they have successfully compiled it. Of course msieve is compilable, but it would seem that we're missing something.

I know you guys are busy, and I don't want to be one of those nags. Whether or not you have time to help, thank you.
Building on windows can be a pain, I know. The first post was my best attempt at step-by-step in getting it done. Although it should not be taken verbatim (e.g., the exact gmp/ecm versions and paths will likely be different). That said, it looks like you are hung up on the MSIEVE_SVN_VERSION macro? You could try installing a svn client in your msys environment. Or you could try commenting out lines in msieve source that refer to that macro.
bsquared is offline   Reply With Quote
Old 2017-11-11, 16:12   #14
Till
 
Till's Avatar
 
"Tilman Neumann"
Jan 2016
Germany

3×139 Posts
Default

Hi Ben,
I tried to set up a usable C(++) environment using your guide but faced two issues in some of the first steps:
* Step 1, 1): The option "seh exceptions" has not been offered by the installer
* Step 1, 2): Running the msys installer I get the error message "Cannot download repository.txt [0]".

Trying some alternatives I found msys2, and it looks quite good! Is it a viable alternative for Yafu?

You can install msys2 including mingw-w64 and the latest gmp in a few instructions:
* Go to http://www.msys2.org/
* Click on the "...x64..." button
* Run installer
* Run msys2
* Update complete msys2 system using: pacman -Syu
(may ask to close window and run the command again)
* Install mingw-w64 using: pacman -S mingw-w64-x86_64-toolchain
Till is offline   Reply With Quote
Old 2017-11-12, 15:19   #15
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

2×33×61 Posts
Default

Quote:
Originally Posted by Till View Post
Hi Ben,
I tried to set up a usable C(++) environment using your guide but faced two issues in some of the first steps:
* Step 1, 1): The option "seh exceptions" has not been offered by the installer
* Step 1, 2): Running the msys installer I get the error message "Cannot download repository.txt [0]".

Trying some alternatives I found msys2, and it looks quite good! Is it a viable alternative for Yafu?

You can install msys2 including mingw-w64 and the latest gmp in a few instructions:
* Go to http://www.msys2.org/
* Click on the "...x64..." button
* Run installer
* Run msys2
* Update complete msys2 system using: pacman -Syu
(may ask to close window and run the command again)
* Install mingw-w64 using: pacman -S mingw-w64-x86_64-toolchain
Yes this is a great way to shortcut many of the steps in getting a good build environment set up. When I put together the first post it wasn't working for me; I'll have to go re-try now.
bsquared is offline   Reply With Quote
Old 2018-05-12, 10:43   #16
VictordeHolland
 
VictordeHolland's Avatar
 
"Victor de Hollander"
Aug 2011
the Netherlands

117410 Posts
Default

Thanks for the tips. I ended up using Msys2 (msys64) since it has easier installing and supports a package manager (pacman) .

GMP-6.1.2 compiled succesfully
GMP-ECM from latest SVN compiled succesfully (I think)
Msieve from SVN repo seems to compile alright after I changed the links in the makefile to the libs.

But with YAFU I'm a bit stuck. If I use the makefile.mingw and change the lines which point to GMP and ecm it compiles with a lot of warnings (no errors though). If I start the resulting .exe from the commandprompt (cmd.exe) it shows the lines with machine info and GMP version, but if I try anything ( tune, factor(nnnn), nfs(nnnn) ) with it it crashes.
If I start it from the msys terminal "./yafu64-mingw.exe" I don't see any messages, but it does seem to work (if I type factor(nnnn) the factors and log are in factor.log. Anybody know why? Tips or advice?

Msieve seems to work from the cmd.exe, I just tried it with the factmsieve0.86.py script and RSA100 and a C81 with QS also works.
VictordeHolland is offline   Reply With Quote
Old 2018-05-25, 21:07   #17
Till
 
Till's Avatar
 
"Tilman Neumann"
Jan 2016
Germany

3×139 Posts
Default

Quote:
Originally Posted by VictordeHolland View Post
Thanks for the tips. I ended up using Msys2 (msys64) since it has easier installing and supports a package manager (pacman) .

GMP-6.1.2 compiled succesfully
GMP-ECM from latest SVN compiled succesfully (I think)
Msieve from SVN repo seems to compile alright after I changed the links in the makefile to the libs.

But with YAFU I'm a bit stuck. If I use the makefile.mingw and change the lines which point to GMP and ecm it compiles with a lot of warnings (no errors though). If I start the resulting .exe from the commandprompt (cmd.exe) it shows the lines with machine info and GMP version, but if I try anything ( tune, factor(nnnn), nfs(nnnn) ) with it it crashes.
If I start it from the msys terminal "./yafu64-mingw.exe" I don't see any messages, but it does seem to work (if I type factor(nnnn) the factors and log are in factor.log. Anybody know why? Tips or advice?

Msieve seems to work from the cmd.exe, I just tried it with the factmsieve0.86.py script and RSA100 and a C81 with QS also works.

make is not installed by default, try running

pacman -S make
Till is offline   Reply With Quote
Old 2018-05-25, 21:57   #18
VictordeHolland
 
VictordeHolland's Avatar
 
"Victor de Hollander"
Aug 2011
the Netherlands

2·587 Posts
Default

Quote:
Originally Posted by Till View Post
make is not installed by default, try running

pacman -S make
I already have "make". The problem is the compiled executable has some sort of dependancy on mingw/msys2 and/or the screen output is not working as intented.
VictordeHolland is offline   Reply With Quote
Old 2018-06-04, 16:14   #19
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

CDE16 Posts
Default

I've installed the msys2 environment (massively easier than the previous msys) and I'm seeing what you're seeing. Part of a solution is to build statically (need to add -static somewhere to CFLAGS in the makefile), which seems to allow it to run in a windows cmd.exe window. However some factoring functions aren't working correctly so I need to revisit the codepath for MINGW builds to figure out why.
bsquared is offline   Reply With Quote
Old 2018-06-04, 21:35   #20
VictordeHolland
 
VictordeHolland's Avatar
 
"Victor de Hollander"
Aug 2011
the Netherlands

22268 Posts
Default

Thanks for taking the time to investigate it. Pls let me know if you have found a way to circumvent the issues or updated the code so I can try a recompile.
VictordeHolland is offline   Reply With Quote
Old 2018-06-06, 17:09   #21
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

2×33×61 Posts
Default

Ok, I've updated the code. I was able to build in msys2 and everything seems to run ok in either the msys2 shell or windows native cmd shell. pipes or redirects may still act strange, but not sure how many people use that functionality with yafu.

Here is a quick version of what I did:
got gmp-6.1.2
got gmp-ecm 7.0.4
downloaded snapshot of msieve
downloaded snapshot of yafu
configured gmp (./configure --prefix=[optional install loc])
make
make install
configured ecm (./configure --prefix=[optional install loc] --with-gmp=[optional installed loc])
make
make install
built msieve (make all ECM=1 NO_ZLIB=1), maybe requires makefile modification to point to your gmp/ecm library paths
built yafu (make -f Makefile.mingw x86_64 NFS=1 [USE_AVX2=1] [USE_SSE41=1] ), maybe requires makefile modification to point to your gmp/ecm/msieve library paths

all using mingw32-make.

Let me know if you encounter errors or weirdness when running.

Last fiddled with by bsquared on 2018-06-06 at 17:11
bsquared is offline   Reply With Quote
Old 2018-06-08, 00:37   #22
VictordeHolland
 
VictordeHolland's Avatar
 
"Victor de Hollander"
Aug 2011
the Netherlands

2·587 Posts
Thumbs up

Quote:
Originally Posted by bsquared View Post
downloaded snapshot of yafu
...
built yafu (make -f Makefile.mingw x86_64 NFS=1)


Hurray!


Code:
Target: x86_64-w64-mingw32
Thread model: posix
gcc version 7.3.0 (Rev2, Built by MSYS2 project)

The "YAFU r373 WIP" executable works in:
+ Powershell
+ cmd.exe
+ Msys2 terminal
+ and it opens in a own commandprompt if you doubleclick it!

It is even possible to copy the executable and run it on a different windozz computer (I only needed to put a copy of libwinpthread-1.dll in the same folder). Before your changes that would probably only be possible if it was build in Visual Studio!
Attached Thumbnails
Click image for larger version

Name:	YAFU-r373-PS_cmd.png
Views:	99
Size:	188.0 KB
ID:	18479   Click image for larger version

Name:	YAFU-r373-Msys_direct.png
Views:	126
Size:	182.8 KB
ID:	18480  
VictordeHolland is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Guide to compiling YAFU Mr. Odd YAFU 4 2017-04-24 15:40
Compiling YAFU under MinGW wombatman YAFU 10 2016-01-21 19:48
Need help compiling YAFU from SVN. Stargate38 YAFU 14 2016-01-20 21:46
compiling svn 427 for Windows 64 bit. skan NFSNET Discussion 7 2012-04-18 10:30
Compiling ECM 5.0.3 for windows BotXXX Factoring 25 2005-09-13 12:24

All times are UTC. The time now is 06:03.

Tue Oct 20 06:03:24 UTC 2020 up 40 days, 3:14, 0 users, load averages: 2.18, 1.88, 1.57

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, 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.