mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > Msieve

Reply
 
Thread Tools
Old 2011-01-17, 14:44   #1
xilman
Bamboozled!
 
xilman's Avatar
 
"π’‰Ίπ’ŒŒπ’‡·π’†·π’€­"
May 2003
Down not across

10,243 Posts
Default Msieve & ggnfs on MacOS

After some fiddling around, I persuaded msieve and ggnfs to build on a MacBook Pro running Snow Leopard. The siever, though, is much slower than what I'm used to. The Mac has a Core-2 duo running at 2.53GHz; two threads sieving a C178 SNFS are taking around 0.06 seconds per relation. Another machine, a Phenom-II, runs at close to ten times that speed, albeit clocked at 1.5 times the Mac. Clock for clock, the Mac is at least five times slower and I'm wondering why.

The performance measurements summarized above were made running a build made on a 32-bit kernel and running on the same. Rebooting into 64-bit kernel may have improved the speed slightly (at most by 25%).

Rebuilding ("make nocona") under a 64-bit kernel made no difference, not that I expected it to.

The athlon64 siever in src/experimental needs some tweaking to get it to compile but the assembler chokes on the .asm files.

Does anyone have any ideas how to build a decent siever under MacOS?

Paul
xilman is offline   Reply With Quote
Old 2011-01-17, 15:48   #2
rogue
 
rogue's Avatar
 
"Mark"
Apr 2003
Between here and the

24×32×41 Posts
Default

Quote:
Originally Posted by xilman View Post
After some fiddling around, I persuaded msieve and ggnfs to build on a MacBook Pro running Snow Leopard. The siever, though, is much slower than what I'm used to. The Mac has a Core-2 duo running at 2.53GHz; two threads sieving a C178 SNFS are taking around 0.06 seconds per relation. Another machine, a Phenom-II, runs at close to ten times that speed, albeit clocked at 1.5 times the Mac. Clock for clock, the Mac is at least five times slower and I'm wondering why.

The performance measurements summarized above were made running a build made on a 32-bit kernel and running on the same. Rebooting into 64-bit kernel may have improved the speed slightly (at most by 25%).

Rebuilding ("make nocona") under a 64-bit kernel made no difference, not that I expected it to.

The athlon64 siever in src/experimental needs some tweaking to get it to compile but the assembler chokes on the .asm files.

Does anyone have any ideas how to build a decent siever under MacOS?

Paul
I haven't built either on MacIntel, but I think that jasonp has. Hopefully he will see this and respond.
rogue is offline   Reply With Quote
Old 2011-01-17, 16:30   #3
fivemack
(loop (#_fork))
 
fivemack's Avatar
 
Feb 2006
Cambridge, England

2·11·172 Posts
Default

I run msieve on Intel Mac a fair amount, and it runs at much the same speed on a Xeon 5520 Mac Pro and on an i5/750 iMac as it does on my Linux i7/920; so it's not some horrible sloth associated only with Mac.

Is the Mac performance of 32-bit no-assembler ggnfs notably worse than the Linux performance of the same?
fivemack is offline   Reply With Quote
Old 2011-01-17, 18:05   #4
jasonp
Tribal Bullet
 
jasonp's Avatar
 
Oct 2004

3,529 Posts
Default

Msieve should have no problems building on an x86 or PPC Mac; in fact I think there are only two code blocks that are Mac-specific, and compiling on an x86 Mac will re-use all the 64-bit x86 assembler in the code.

I never tried building GGNFS on this platform, though I remember a protracted effort years ago on the GGNFS mailing list to get it to work on a PPC Mac. It's possible nobody has ever tried compiling the stock GGNFS siever on an x86 Mac, though frmky has managed to build the siever code of the NFS@Home client on a Mac, and perhaps can weigh in.

It's possible that the code is looking for a #define that turns on lots of goodies, which happens not to be present on MacOS...
jasonp is offline   Reply With Quote
Old 2011-01-18, 05:17   #5
frmky
 
frmky's Avatar
 
Jul 2003
So Cal

111111101112 Posts
Default

After much pulling of hair, I simply turned off all ASM stuff and built a 32-bit C-only version. I figured that was better than nothing. I don't think it was 1/10 the speed, though...
frmky is offline   Reply With Quote
Old 2011-01-19, 03:52   #6
jyb
 
jyb's Avatar
 
Aug 2005
Seattle, WA

1,567 Posts
Default

With some very minor editing of the makefiles, I built the sievers for MacOS x86_64 many months ago and have been using them to decent effect. I can't say if they are as fast as other people's seivers, since these are the only ones I use. But if someone gives me a .poly file and a range to sieve, I'll tell you exactly what speed I get on some specific processors/clock speeds and we can compare.
jyb is online now   Reply With Quote
Old 2012-02-19, 05:21   #7
RichD
 
RichD's Avatar
 
Sep 2008
Kansas

3·1,031 Posts
Default

Is there anymore discussion with this since I have a few Snow Leopard, Lion and Mountain Lion systems in the works? It could be useful.
RichD is offline   Reply With Quote
Old 2012-02-21, 01:03   #8
jyb
 
jyb's Avatar
 
Aug 2005
Seattle, WA

1,567 Posts
Default

Quote:
Originally Posted by RichD View Post
Is there anymore discussion with this since I have a few Snow Leopard, Lion and Mountain Lion systems in the works? It could be useful.
After much hacking around, I managed to port the Linux assembly version over to MacOS X recently. I've sent a copy to frmky so he can evaluate it for use with NFS@Home. I haven't heard back from him yet. I've been using it myself quite a bit, and it's *much* faster than the non-assembly stock version (no surprise there).

I can easily send people the binaries. The source presents more of a challenge; I lack the creds to put it in the ggnfs repository, and in any case I believe the repository should probably be restructured a bit. The src/experimental/lasieve4_64/athlon64 directory implicitly assumes that it's targeting Linux (or at least an OS which uses an ELF ABI). I could create a MacOSX directory and put my changes there, but then the athlon64 directory should probably be renamed Linux, since it's the OS more than the processor arch which is at issue.

In any case, I can tar up and send people my source changes, and they'll be able to build themselves, but at some point somebody with the access may want to integrate this stuff for real.
jyb is online now   Reply With Quote
Old 2017-05-20, 00:12   #9
Geitda
 
Geitda's Avatar
 
Mar 2017

1002 Posts
Default

Where might one find (relatively) recent macOS builds of the lattice sievers for use with factmsieve.py? msieve itself builds fine straight from source, but the sievers in the experimental folder of ggnfs, as jyb above mentioned 5 years ago, don't build immediately on macOS. If anyone has the needed patches I'd be happy to give building it a shot.
Geitda is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Factorizing with MSIEVE, GGNFS & Factmsieve.py Romuald Msieve 24 2015-11-09 20:16
Python Driver for GGNFS and MSIEVE Brian Gladman Msieve 740 2014-06-02 07:52
Infinite loop for ggnfs or msieve Greebley Aliquot Sequences 4 2013-02-06 19:28
YAFU on MacOS X cgy606 YAFU 2 2012-02-21 04:32
Error running GGNFS+msieve+factmsieve.py D. B. Staple Factoring 6 2011-06-12 22:23

All times are UTC. The time now is 13:56.

Wed Sep 23 13:56:39 UTC 2020 up 13 days, 11:07, 1 user, load averages: 2.15, 1.65, 1.52

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.