mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > YAFU

Reply
 
Thread Tools
Old 2018-06-08, 00:50   #23
richs
 
richs's Avatar
 
"Rich"
Aug 2002
Benicia, California

48116 Posts
Default

Victor, would you post the Windows executable file? Thanks!
richs is offline   Reply With Quote
Old 2018-06-08, 15:52   #24
VictordeHolland
 
VictordeHolland's Avatar
 
"Victor de Hollander"
Aug 2011
the Netherlands

2×587 Posts
Default

Quote:
Originally Posted by richs View Post
Victor, would you post the Windows executable file? Thanks!
Sure, I'll do that when I get home tonight. It is compiled on a Core2Duo E6850 Windows10 , so only SSE2. If I've got the time I'll see if I can recompile on a i7 3770 so that SSE4.1 also works (I don't have any AVX2 toys).
VictordeHolland is offline   Reply With Quote
Old 2018-06-08, 21:02   #25
VictordeHolland
 
VictordeHolland's Avatar
 
"Victor de Hollander"
Aug 2011
the Netherlands

2×587 Posts
Default

Here you go
YAFU r373 (wip branch)

Win64 compiled on a C2D (SSE2).
Attached Files
File Type: 7z YAFU-r373-wip-win64-core2.7z (1.09 MB, 171 views)
VictordeHolland is offline   Reply With Quote
Old 2018-06-09, 01:11   #26
VictordeHolland
 
VictordeHolland's Avatar
 
"Victor de Hollander"
Aug 2011
the Netherlands

2·587 Posts
Default

Step 1: Install and setup msys2

1). Go to http://www.msys2.org and download the msys2-x86_64-20xxxx.exe installer and run it. Let it install in C:\msys64 (or a other short path so you don't hit the 256 character limit). Chose to "Run MSYS2 now" at the end of installation.

2). Update package database and core system packages with:
Code:
pacman -Syu
I also had to restart MSYS2 and run it again to get the latest versions.
Code:
pacman -Su
3). In MSYS2 terminal get basic stuff, like autoconfig, make, m4, autoconf, libtool, wget. Just install all of them in one go with:
Code:
pacman -S base-devel
~50MB (300MB installed)

4). Get some basic compile stuff (its is part of the msys2-devel package), I would just install all of them it is again about ~50MB (300MB installed)
Code:
pacman -S msys2-devel
5). Get the mingw toolchain (quite big, something like 130MB, 700MB+ installed)
Code:
pacman -S mingw-w64-x86_64-toolchain
exit MSYS2

6). Now start mingw64.exe
7). Check that you have the correct GCC version with
Code:
gcc -v
You should get something like:
Code:
 Target: x86_64-w64-mingw32
...
...
Thread model: posix
 gcc version 7.3.0 (Rev2, Built by MSYS2 project)
Step 2: create projects folders and download snapshots/zips

1). Create the following empty directories:
msys64/home/factoring/GMP-6.1.2
msys64/home/factoring/GMP-ECM
msys64/home/factoring/msieve
msys64/home/factoring/YAFU

2). Download and eExtract the tar/gz/bz2/zips to their respective folders (7zip can handle them all)
Download GMP-6.1.2
Download GMP-ECM 7.0.4
Downloaded snapshot of msieve
Downloaded snapshot of YAFU

Step 3: install GMP-6.1.2

1.) Navigate to /home/factoring/GMP6.1.2
Code:
cd /home/factoring/GMP6.1.2
2). Configure (--enable-static is optional)
Code:
./configure --enable-static
3). Run make, make check, make install
Code:
make
Code:
make check
Code:
make install

Step 4: install GMP-ECM
1). Change dir to GMP-ECM
2).
Code:
autoreconf -i
3).
Code:
./configure
optional: add compileflags e.g. CFLAGS="-O3 -march=nehalem -mtune=nehalem"
4). Run make, make check, make install
Code:
make
Code:
make check
Code:
make install
VictordeHolland is offline   Reply With Quote
Old 2018-06-09, 14:53   #27
henryzz
Just call me Henry
 
henryzz's Avatar
 
"David"
Sep 2007
Cambridge (GMT/BST)

10110011001002 Posts
Default

Given the advent of the linux subsystem for windows would it not make sense to cross compile using that instead?
henryzz is offline   Reply With Quote
Old 2018-06-09, 17:09   #28
VictordeHolland
 
VictordeHolland's Avatar
 
"Victor de Hollander"
Aug 2011
the Netherlands

2·587 Posts
Default

Quote:
Originally Posted by henryzz View Post
Given the advent of the linux subsystem for windows would it not make sense to cross compile using that instead?
Maybe, I haven't tried it yet.

Some things I found in a couple of minutes:
- the Linux subsystem (I installed Ubuntu from the store) gets installed very deep in:
C:\users\<username>\AppData\Local\Packages\CanonicalGroup........\
and I have no idea where it places the filesystem folders (bin etc home lib usr var etc )?
and you still would have to install mingw (as the gcc compiler for Windows executables) I think.

- You can't copy paste text from Windows into the Ubuntu-linuxsubsystem (which you can with the MSYS2 terminal)

- If you install the mingw toolchain with the package manager (pacman) in MSYS2 you can start a new terminal with mingw64.exe it will automatically select the mingw gcc/g++ compiler as default (you can check it with "gcc -v" and "g++ -v"). It is also a quite new version (7.3.0).

With Ubuntu-Linux-Subsystem after
apt-get install build-essential
apt-get install mingw-w64
you get:

gcc -v
Target: x86_64-linux-gnu
gcc version 5.4.0 20160609

and (I had to lookup the full name of the mingw gcc before I could check!)

x86_64-w64-mingw32-gcc -v
Target: x86_64-w64-mingw32
gcc version 5.3.1 20160211 (GCC)
VictordeHolland is offline   Reply With Quote
Old 2018-06-10, 20:55   #29
Till
 
Till's Avatar
 
"Tilman Neumann"
Jan 2016
Germany

41710 Posts
Default

Very nice guide.


Just one point: gmp-6.1.2 is already included in mingw-w64-x86_64-toolchain. If there is no particular reason to install it explicitely, you could save step 3.

Till is offline   Reply With Quote
Old 2018-06-11, 11:17   #30
kar_bon
 
kar_bon's Avatar
 
Mar 2006
Germany

2×3×52×19 Posts
Default

The WIN-exe for YAFU 1.35 beta from post# 25 crashes here (WIN 7 64bit, i7-2600):

running:
Code:
factor(48202395317126317959846339946962077929419264021859989059557078165565552082529)
- finds a C26 at pm1
- starts SIQS on the C52
- starts re-factorization on C26 and crashes after fac: trivial ECM

Code:
Composite result found, starting re-factorization
fac: factoring 10025238874798413268464641
fac: using pretesting plan: normal
fac: no tune info: using qs/gnfs crossover of 95 digits
div: primes less than 10000
fmt: 1000000 iterations
rho: x^2 + 3, starting 1000 iterations on C26
rho: x^2 + 2, starting 1000 iterations on C26
rho: x^2 + 1, starting 1000 iterations on C26
fac: trivial ECM work to do... skipping to sieve method
[...crash here...]

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

2·587 Posts
Default

Quote:
Originally Posted by kar_bon View Post
The WIN-exe for YAFU 1.35 beta from post# 25 crashes

Code:
Composite result found, starting re-factorization
fac: factoring 10025238874798413268464641
fac: using pretesting plan: normal
fac: no tune info: using qs/gnfs crossover of 95 digits
div: primes less than 10000
fmt: 1000000 iterations
rho: x^2 + 3, starting 1000 iterations on C26
rho: x^2 + 2, starting 1000 iterations on C26
rho: x^2 + 1, starting 1000 iterations on C26
fac: trivial ECM work to do... skipping to sieve method
[...crash here...]
I'm seeing the same thing here, in 1.34.5 the C26 is handled by smallmpqs. In the r373 wip branch it switches to
Code:
scheduler: switching to sieve method
and then crashed (both on Ubuntu and Windows). The terminal on Ubuntu states: illegal instruction, core dumped


smallmpqs on the C26 does work on both the Ubuntu and Windows [r373 wip version]
Code:
>> smallmpqs(10025238874798413268464641)

***factors found***

P13 = 3785515259549
P13 = 2648315536309

ans = 1
VictordeHolland is offline   Reply With Quote
Old 2018-06-11, 14:04   #32
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

2·17·97 Posts
Default

Yes I discovered this just before I left on vacation. I'm not able to fix it right now ... hopefully in the next few days.
bsquared is offline   Reply With Quote
Old 2018-06-21, 20:42   #33
bsquared
 
bsquared's Avatar
 
"Ben"
Feb 2007

2×17×97 Posts
Default

With the newly-posted r375 I don't see any crashes (tested on linux with sse2, sse41, avx2 and on mingw64/windows with sse2 and sse41). Let me know if this doesn't work for you.
bsquared 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 09:13.

Wed Oct 28 09:13:26 UTC 2020 up 48 days, 6:24, 2 users, load averages: 1.61, 1.76, 1.66

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.