![]() |
![]() |
#1 |
Mar 2013
7 Posts |
![]()
I just happen to gain some interest in NFS and tried to compile "experimental lasieve4_64" for Windows, and I think I did it successfully.
The lasieve4 source code that I use as starting point is http://ggnfs.svn.sourceforge.net/vie...l/lasieve4_64/ Some notes for reproducing: 1) mingw-w64-bin-x86_64-20130104.7z from http://www.drangon.org/mingw/ 2) MSYS-20111123.zip from http://sourceforge.net/projects/ming...0%2832-bit%29/ 3) http://www.mpir.org/mpir-2.6.0.tar.bz2 4) My modified lasieve4_64 attached. 5) The build instruction is just like as in INSTALL file, except that I have renamed "athlon64" directory to "asm" so you do not need to create a link from asm to athlon64. Summary of my changes: 1) In asm files, replace ".type foo,@function" with ".def foo; .scl 2; .type 32; .endef" 2) Insert __attribute__((sysv_abi)) at function prototypes of assembly routines. This may be the trick that a lot of people do not know. 3) Search for "long" in all C files, replace with "long long" if 64 bits are needed, else replace with "int" 4) For all fopen() calls, insert "b" (for binary) into the flags field. Some nasty crlf translation is happening without the binary flag, causing factor base save file corruption. My opinion is that file I/O API should not deal with crlf as special case, hence all fopen gets the binary flag. 5) Fixes in if.c, aligned malloc handling. 6) gmp.h -> mpir.h (optional, you may rename mpir.h to gmp.h instead) 7) There are parts that I have detected possible problems if compiled (for example, long is 32bit in Windows), but that part of the code is not compiled due to #ifdef. I have put in #error at those places just to make sure. My compiled versions: 1) core2 (up to SSSE3) 2) westmere (up to SSE4.2) 3) ivybridge (up to AVX) Ops, just found out that there is size restriction on attachments, so I put the Windows binaries here temporarily: http://storenow.net/my/?f=090e5e09e1...1a5d2a17528e8f SHA1 (of lasieve4_win.zip): E6A40FE889C93016ED3496642AD2DFA29F102FC8 |
![]() |
![]() |
![]() |
#2 |
Jan 2013
109 Posts |
![]()
Does this version have ASM routines for 64-bit Windows?
|
![]() |
![]() |
![]() |
#3 |
Mar 2013
7 Posts |
![]()
Yes, the assembly routines are included without changes.
__attribute__((sysv_abi)) makes gcc generate code that calls assembly routine using the Linux calling convention. |
![]() |
![]() |
![]() |
#4 |
Tribal Bullet
Oct 2004
32·5·79 Posts |
![]()
If you can express your changes in patch form, please coordinate with frmky (Greg) to massively increase the throughput of NFS@Home :)
|
![]() |
![]() |
![]() |
#5 |
"Carlos Pinho"
Oct 2011
Milton Keynes, UK
512910 Posts |
![]() |
![]() |
![]() |
![]() |
#6 |
Just call me Henry
"David"
Sep 2007
Liverpool (GMT/BST)
37×163 Posts |
![]()
I have just tested these and the speed is comparable to the binaries I compiled in http://mersenneforum.org/showthread.php?t=17963
Well done for getting this working. Several have tried and failed. I can now use windows pretty much exclusively which is very helpful. |
![]() |
![]() |
![]() |
#7 |
"6800 descendent"
Feb 2005
Colorado
2·32·41 Posts |
![]()
On my i7 Nehalem system, these binaries are much faster than the ones Henry mentioned (almost twice as fast).
![]() |
![]() |
![]() |
![]() |
#8 |
Just call me Henry
"David"
Sep 2007
Liverpool (GMT/BST)
10111100011112 Posts |
![]()
I have discovered a problem with these binaries.
If you provide them with a command line like: gnfs-lasieve4I11e.exe -v -a nfs.job -f 605000 -c 2500 -o rels2.dat -n 2 then you get output like Code:
Ignoring 8 trailing command line args Warning: lowering FB_bound to 4294967295. FBsize 0+0 (deg 4), 92937+0 (deg 1) gnfs-lasieve4I11e.exe -v -f 605000 -c 2500 -o rels2.dat -n 2 -a nfs.job then it runs properly. It seems to be breaking from the while loop early. I can't see in the source why. Myself I can just use this correctly. yafu unfortunately uses the problem form. |
![]() |
![]() |
![]() |
#9 | |
"Ben"
Feb 2007
7×13×41 Posts |
![]() Quote:
If so, change the sprintf on line 576 of nfs_sieving.c from Code:
sprintf(syscmd,"%s%s -%c %s -f %u -c %u -o %s -n %d", thread_data->job.sievername, VFLAG>0?" -v":"", *side, fobj->nfs_obj.job_infile, thread_data->job.startq, thread_data->job.qrange, thread_data->outfilename, thread_data->tindex); Code:
sprintf(syscmd,"%s%s -f %u -c %u -o %s -n %d -%c %s ", thread_data->job.sievername, VFLAG>0?" -v":"", thread_data->job.startq, thread_data->job.qrange, thread_data->outfilename, thread_data->tindex, *side, fobj->nfs_obj.job_infile); |
|
![]() |
![]() |
![]() |
#10 |
Just call me Henry
"David"
Sep 2007
Liverpool (GMT/BST)
178F16 Posts |
![]()
Theoretically I probably could. I have had huge problems in the past compiling things in windows. I can't be bothered fiddling to compile all the necessary components(ecm msieve mpir etc).
Currently I am using factmsieve.pl which is just about sufficient for my needs. It is worth sorting this anyway. I will just use the old script until then. |
![]() |
![]() |
![]() |
#11 |
Basketry That Evening!
"Bunslow the Bold"
Jun 2011
40<A<43 -89<O<-88
1C3516 Posts |
![]() |
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Unofficial experimental beta build | wombatman | YAFU | 22 | 2016-02-19 18:59 |
About self-compiled Prime95 | tyeken8 | Software | 14 | 2009-05-27 11:02 |
new experimental banners for GIMPS | ixfd64 | Lounge | 14 | 2007-12-17 01:22 |
How I get a compiled version of GMP-ECM? | MatWur-S530113 | GMP-ECM | 12 | 2007-10-22 20:33 |
compiled msieve on PS3 | bigmic | Msieve | 2 | 2007-03-29 20:06 |