Building GMP 6.0 for Ivy Bridge

Victor Shoup shoup at cs.nyu.edu
Thu Oct 1 02:52:19 UTC 2015


Answering my own question, here...
Digging around through the source code and googling a bit,
I figured out the following option to pass to configure.


   --build=coreisbr-unknown-linux-gnu


Seems to work...all tests pass and I get some speedups.

So the question is: why didn't configure figure this out by itself?


On Sep 30, 2015, at 9:00 PM, Victor Shoup wrote:

> Hi!
> 
> I'm building GMP on an Ivy Bridge based machine
> running Cent OS.  My compiler is GCC v4.9.2.
> I'd like to make sure I get the best possible build
> for this machine.
> 
> According to lscpu:
> 
> Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz
> 
> which is Ivy Bridge, AFAIK.
> 
> According to lsb_release -a:
> 
> LSB Version:	:core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
> Distributor ID:	CentOS
> Description:	CentOS Linux release 7.1.1503 (Core) 
> Release:	7.1.1503
> Codename:	Core
> 
> Now, I've built GMP successfully, but looking at config.log,
> there is nothing there to suggest that it knows what kind of machine
> this is.  I see this, for example in config.log:
> 
> 
> ## ----------- ##
> ## Core tests. ##
> ## ----------- ##
> 
> configure:3040: checking build system type
> configure:3054: result: x86_64-unknown-linux-gnu
> configure:3074: checking host system type
> configure:3087: result: x86_64-unknown-linux-gnu
> 
> And the output of config.guess is:
> 
> x86_64-unknown-linux-gnu
> 
> So, does anyone know:
> 
> (1) how can I tell if GMP is actually using the code that is
>    specialized for Ivy Bridge?
> 
> (2) if my current build is not properly specialized, can I expect
>    a significant speedup (e.g., for very large muls) if I get it 
>    built properly specialized?
> 
> (3) how do I go about building it properly specialized?
> 
> Thanks for your help!
> -Victor
> 
> 
> _______________________________________________
> gmp-discuss mailing list
> gmp-discuss at gmplib.org
> https://gmplib.org/mailman/listinfo/gmp-discuss



More information about the gmp-discuss mailing list