Re: [gentoo-user] which -march flag to pick for Intel Core 2 Duo in make.conf?

2007-05-30 Thread Dan Farrell
On Fri, 25 May 2007 14:26:32 -0400
Denis [EMAIL PROTECTED] wrote:

 On 5/25/07, Andreas Claesson [EMAIL PROTECTED] wrote:
  Since you (Denis) are doing a lot of mathematical calculations you
  will probably benefit from running in 64bit mode.
 
 I often need to run Monte Carlo simulations (in C) which involve a lot
 of array storage and array scanning/searching operations...  I wonder
 what the speed-up would be for those simulations if run under a 64-bit
 mode.  Are there any requirements on how the simulations should be
 programmed in order to take advantage of the 64-bit arch, or is that
 automatically done by the GCC compiler and the kernel?

Would you mind telling us what kind of performance difference you
experience?
-- 
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] which -march flag to pick for Intel Core 2 Duo in make.conf?

2007-05-27 Thread Randy Barlow

Denis wrote:

I often need to run Monte Carlo simulations (in C) which involve a lot
of array storage and array scanning/searching operations...  I wonder
what the speed-up would be for those simulations if run under a 64-bit
mode.  Are there any requirements on how the simulations should be
programmed in order to take advantage of the 64-bit arch, or is that
automatically done by the GCC compiler and the kernel?


Just use the -m64 flag when you compile using gcc.

R
--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] which -march flag to pick for Intel Core 2 Duo in make.conf?

2007-05-25 Thread Randy Barlow

On Thu, May 24, 2007 12:38 pm, Denis wrote:
 My aim is to build a fast, stable system for my
 computations, which ultimately brought me to another major decision:
 32-bit or 64-bit...  I run simulations which I write in C and
 numerical computations which I run in Mathematica (which has just
 released the 64-bit version).  Would a 64-bit system significantly
 benefit these applications?

If you are using a lot of memory in your computations, then the 64-bit
environment will be much friendlier to you :)  Also, if I understand
correctly, you will get higher precision on floating point calculations
(someone correct me if I am wrong here!)  I also believe that the 64 bit
processors are able to perform more instructions per second on average
when executing 64 bit code vs. 32 bit code if I am not mistaken...

-- 
Randy Barlow
http://www.electronsweatshop.com
Oh me of little faith...
-- 
[EMAIL PROTECTED] mailing list



RE: [gentoo-user] which -march flag to pick for Intel Core 2 Duo in make.conf?

2007-05-25 Thread burlingk


 -Original Message-
 From: Randy Barlow [mailto:[EMAIL PROTECTED] 
 Sent: Friday, May 25, 2007 4:23 PM
 To: gentoo-user@lists.gentoo.org
 Subject: Re: [gentoo-user] which -march flag to pick for 
 Intel Core 2 Duo in make.conf?
 
Snip

 If you are using a lot of memory in your computations, then 
 the 64-bit environment will be much friendlier to you :)  
 Also, if I understand correctly, you will get higher 
 precision on floating point calculations (someone correct me 
 if I am wrong here!)  I also believe that the 64 bit 
 processors are able to perform more instructions per second 
 on average when executing 64 bit code vs. 32 bit code if I am 
 not mistaken...

I am not sure, but that makes sense.  If nothing else, things executed
directly usually run more smoothly than those who are run through
emulation.  64bit code on 64bit processor good...
^_^
--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] which -march flag to pick for Intel Core 2 Duo in make.conf?

2007-05-25 Thread Andreas Claesson

On 5/25/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


 -Original Message-
 From: Randy Barlow [mailto:[EMAIL PROTECTED]

Snip

 If you are using a lot of memory in your computations, then
 the 64-bit environment will be much friendlier to you :)
 Also, if I understand correctly, you will get higher
 precision on floating point calculations (someone correct me
 if I am wrong here!)  I also believe that the 64 bit
 processors are able to perform more instructions per second
 on average when executing 64 bit code vs. 32 bit code if I am
 not mistaken...

I am not sure, but that makes sense.  If nothing else, things executed
directly usually run more smoothly than those who are run through
emulation.  64bit code on 64bit processor good...


There is no emulation involved when running 32bit code in either core2
nor amd64 processors. The difference when running in 32bit mode is
that some instructions are unavailable, you have a smaller number of
registers, and the registers are only 32bit.

More registers speed up most kind of code, 64bit registers speed up
64bit calculations, and the extra instructions are good for array
calculations and similar (more sse instructions for example).

The only bad thing with 64bit code is that the programs get bigger,
which may effect memory performance negatively. But if you have a lot
of memory then you will benefit from not needing any special
addressing modes.

Since you (Denis) are doing a lot of mathematical calculations you
will probably benefit from running in 64bit mode.
--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] which -march flag to pick for Intel Core 2 Duo in make.conf?

2007-05-25 Thread Denis

On 5/25/07, Andreas Claesson [EMAIL PROTECTED] wrote:

Since you (Denis) are doing a lot of mathematical calculations you
will probably benefit from running in 64bit mode.


I often need to run Monte Carlo simulations (in C) which involve a lot
of array storage and array scanning/searching operations...  I wonder
what the speed-up would be for those simulations if run under a 64-bit
mode.  Are there any requirements on how the simulations should be
programmed in order to take advantage of the 64-bit arch, or is that
automatically done by the GCC compiler and the kernel?
--
[EMAIL PROTECTED] mailing list



[gentoo-user] which -march flag to pick for Intel Core 2 Duo in make.conf?

2007-05-24 Thread Denis

Are these any options in the kernel and in the gcc to optimize for
Intel's Core 2 Duo chips?  When I set up my gentoo box for the Pentium
Processor Extreme Edition (dual core prescott), I just used
-march=prescott in make.conf

Which -march flag would be the most relevant gcc optimization for
Intel Core 2 Duo?

And is there explicit support in the latest gentoo kernel for Core 2
Duo, or does it go under Pentium 4 family?

Thanks
--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] which -march flag to pick for Intel Core 2 Duo in make.conf?

2007-05-24 Thread Ryan Sims

On 5/24/07, Denis [EMAIL PROTECTED] wrote:

Are these any options in the kernel and in the gcc to optimize for
Intel's Core 2 Duo chips?  When I set up my gentoo box for the Pentium
Processor Extreme Edition (dual core prescott), I just used
-march=prescott in make.conf

Which -march flag would be the most relevant gcc optimization for
Intel Core 2 Duo?

And is there explicit support in the latest gentoo kernel for Core 2
Duo, or does it go under Pentium 4 family?



Google is your friend:
http://www.google.com/search?q=core+2+duo+cflags
http://gentoo-wiki.com/Safe_Cflags#Intel_Core_2_Duo.2FQuad_.2F_Xeon_51xx.2F53xx



--
Ryan W Sims
--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] which -march flag to pick for Intel Core 2 Duo in make.conf?

2007-05-24 Thread Mark Shields

On 5/24/07, Denis [EMAIL PROTECTED] wrote:


Are these any options in the kernel and in the gcc to optimize for
Intel's Core 2 Duo chips?  When I set up my gentoo box for the Pentium
Processor Extreme Edition (dual core prescott), I just used
-march=prescott in make.conf

Which -march flag would be the most relevant gcc optimization for
Intel Core 2 Duo?

And is there explicit support in the latest gentoo kernel for Core 2
Duo, or does it go under Pentium 4 family?

Thanks
--
[EMAIL PROTECTED] mailing list



A gentoo forum thread[1] states to use -march=nocona for Core 2 Duo, and
-march=prescott for Core  Solo/Duo.

[1] http://forums.gentoo.org/viewtopic-p-3602555.html


--
- Mark Shields


Re: [gentoo-user] which -march flag to pick for Intel Core 2 Duo in make.conf?

2007-05-24 Thread Denis

After reading some docs, the impression I get is that the 'nocona'
flag is for building a 64-bit system...  For a 32-bit system, it seems
like 'prescott' would be the choice, wouldn't it?

This from the GCC website about 4.2.0 release changes:

IA-32/x86-64

   * -mtune=generic can now be used to generate code running well on
common x86 chips. This includes AMD Athlon, AMD Opteron, Intel
Pentium-M, Intel Pentium 4 and Intel Core 2.
   * -mtune=native and -march=native will produce code optimized for
the host architecture as detected using the cpuid instruction.
   * Added a new command line option -fstackrealign and and
__attribute__ ((force_align_arg_pointer)) to realign the stack at
runtime. This allows functions compiled with a vector-aligned stack to
be invoked from legacy objects that keep only word-alignment.

We don't have gcc-4.2.0 in our portage available for installation yet,
do we?  Anyone know when?
--
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] which -march flag to pick for Intel Core 2 Duo in make.conf?

2007-05-24 Thread Neil Bothwick
On Thu, 24 May 2007 11:13:30 -0400, Denis wrote:

 After reading some docs, the impression I get is that the 'nocona'
 flag is for building a 64-bit system...  For a 32-bit system, it seems
 like 'prescott' would be the choice, wouldn't it?

Yes.


 We don't have gcc-4.2.0 in our portage available for installation yet,
 do we?  Anyone know when?

When the devs consider it suitable for at least the testing branch or
when you do echo =sys-devel/gcc-4.2* /etc/portage/package.mask,
whichever comes sooner.

Bear in mind that GCC is almost certainly masked for good reason. It's
not like you're using a binary distro and only need a compiler for a few
packages. Feel free to try it in the knowledge that if it breaks your
system, you get to keep the pieces.


-- 
Neil Bothwick

Sects, sects, sects, is that all you monks think about?


signature.asc
Description: PGP signature


Re: [gentoo-user] which -march flag to pick for Intel Core 2 Duo in make.conf?

2007-05-24 Thread Graham Murray
Neil Bothwick [EMAIL PROTECTED] writes:

 When the devs consider it suitable for at least the testing branch or
 when you do echo =sys-devel/gcc-4.2* /etc/portage/package.mask,
 whichever comes sooner.

Even that will not work (yet) as gcc-4.2 is not actually masked it is
not keyworded.
-- 
[EMAIL PROTECTED] mailing list



Re: [gentoo-user] which -march flag to pick for Intel Core 2 Duo in make.conf?

2007-05-24 Thread Denis

On 5/24/07, Neil Bothwick [EMAIL PROTECTED] wrote:

Bear in mind that GCC is almost certainly masked for good reason. It's
not like you're using a binary distro and only need a compiler for a few
packages. Feel free to try it in the knowledge that if it breaks your
system, you get to keep the pieces.


Ain't it the truth!  No, I wasn't asking with the anxiety to hurry
things up - I was asking more about an estimated release time, whether
it will be a month, 2 months, 3 months, etc.

I'm not really looking to experiment with the cutting-edge releases
right now.  My aim is to build a fast, stable system for my
computations, which ultimately brought me to another major decision:
32-bit or 64-bit...  I run simulations which I write in C and
numerical computations which I run in Mathematica (which has just
released the 64-bit version).  Would a 64-bit system significantly
benefit these applications?
--
[EMAIL PROTECTED] mailing list