Re: [AMBER-Developers] SSE-based compile flags for intel

From: Ross Walker <ross.rosswalker.co.uk>
Date: Sun, 18 Mar 2012 10:00:18 -0700

Hi Dave,

I think this is mostly historical divergence.

Ideally we should have:

old compilers = -fast

new compilers = -ipo -xhost

The issue is that -fast enables -ipo by default and this caused compiler
crashes when trying to link pmemd. Thus pmemd was switched back to -ip -O3
-xP

I am not sure when it got changed to -xP though. For new compilers (11 and
newer?) you just specify -xhost and it will use the optimum vector
parameters for the host you are compiling on. This means it won't run on
different chip versions so causes problems with people with heterogeneous
clusters but maybe we shouldn't worry about that and let them figure it for
themselves?

Otherwise we have to specify all of the SSE vectorization options and the
problem is that Intel keeps changing the options as well as the syntax with
every compiler.

For the pre 11 compilers I think one uses the -xAAA options. Here -x means
create vector code only. -ax also means generate generic x86 code. Thus -axP
will make an executable that always works but it will only run fast on chip
versions that support the 'P' vectorization options. Once can try to add
them all which is what is in sander and is probably what SHOULD be in pmemd.
So for intel <11 it should probably be:

-ip -O3 -axSTPW

I 'think' this will work with all ifort versions from 9 to 10 and should be
optimum performance (although a massive executable) on most Intel and AMD
chips exluding the latest Sandybridge chips but I think one should probably
use ifort v12 for those anyway which would then use -xhost since from 11
onwards it changed to /QhostBLAH in which case we should just use -xhost and
let the compiler figure it automatically.

All the best
Ross

> -----Original Message-----
> From: case [mailto:case.biomaps.rutgers.edu]
> Sent: Sunday, March 18, 2012 5:51 AM
> To: amber-developers.ambermd.org
> Subject: [AMBER-Developers] SSE-based compile flags for intel
>
> Does anyone understand why we use the flags we do for Intel compilers?
>
> For sander, we have -ip -O3 -axSTPW; for pmemd, it is -ipo -O3 -no-
> prec-div
> -xP. Is there a good reason for the difference?
>
> For me, with intel compiler 10.1, pmemd with the default install
> creates
> an unusable executable ("Fatal Error: This program was not built to run
> on the processor in your system. The allowed processors are: Intel(R)
> Pentium(R) 4 and compatible Intel processors with Streaming SIMD
> Extensions 3 (SSE3) instruction support.)
>
> Rather oddly(?), pmemd.amoeba, which seems to be compiled with the same
> options, is OK. (Code for pmemd.amoeba has changed very little from
> Amber
> 11).
>
> If I change -xP to -axP, pmemd is fine for ifort 10.1.
>
> So: why are sander optimizations different than pmemd? Are we
> somewhere near
> optimal? Do users really need to learn the ins and outs of SSE_TYPES?
> What
> is the best thing to do for pmemd on ifort 10? (e.g. would changing -
> xP to
> -axP do harm on ifort 11 or 12?)
>
> ...thx...dac
>
>
> _______________________________________________
> AMBER-Developers mailing list
> AMBER-Developers.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber-developers


_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Sun Mar 18 2012 - 10:30:03 PDT
Custom Search