1.

®

Revision 1.1

Copyright© 2011, XLsoft K.K. All rights reserved.

1® Cluster Studio XE 2012

Compiler
C/C++ FortranLibrary:

® MKL

MPI:

® MPIC++

::

® TBB
® IPP

Analyzer

Copyright© 2011, XLsoft K.K. All rights reserved.

2

icc

®Cicpc

® C++

ifort

® Fortran

mpiiccmpicc

mpiicpc

mpic++, mpicxx® C++

mpiifort

mpif77,mpif90® Fortran® C++<Install dir>
: <VTune Install dir> = /opt/intel/vtune_amplifier_xe/

Copyright© 2011, XLsoft K.K. All rights reserved.

3® Cluster Studio XE 2012

Copyright© 2011, XLsoft K.K. All rights reserved.

4® C++ Fortran•–––––––••
•
•
•

(PGO)
(GAP)
()

Sandy Bridge-EP
OpenMP 3.1x86 x86_64
GCC (WindowsVisual Studio)
C/C++
FortranCopyright© 2011, XLsoft K.K. All rights reserved.

5® Fortran•• Co-array Fortran12.1

Fortran 2008 (ISO/IEC 1539-2:2004 )• Fortran IV/77/90/95/2003(Fortran 2008)– ISO 1539-1980
ISO/IEC 1539:1991
ISO/IEC 1539-1:1997
ISO/IEC1539-1:2004
ANSI X3.0-1966
ANSI X3.9-1978
ANSI X3.198-1992
ANSI X3J3/96-007– ISO/IEC 1539-2:2004

Copyright© 2011, XLsoft K.K. All rights reserved.

6® C++••••®
• C/C++ C99(C++1112.1

C++11 (ISO/IEC 14882:2011)
IEEE 754-2008(Cilk Plus)※)– ISO/IEC 9899:1990
ISO/IEC 9899:1999※
ISO/IEC 14882:1998)– ISO/IEC 14882:2011※128bitlong double

Copyright© 2011, XLsoft K.K. All rights reserved.

7

– x86_64®

®

source <composer Install dir>/bin/compilervars.sh intel64
source <icc Install dir>/bin/iccvars.sh intel64
source <ifort Install dir>/bin/ifortvars.sh intel64– x86_64®

MPIsource <Intel MPI Install dir>/bin64/mpivars.sh–® VTune Amplifier XEsource <VTune Install dir>/amplxe-vars.sh–® Trace Analyzer/Collector
source <TA/TC Install dir>/bin/itacvars.sh
composer
Cicc

ifort.sh.csh

Copyright© 2011, XLsoft K.K. All rights reserved.

8•

•

C:
icc [C++:
icpc [
Fortran: ifort [] <] <] <MPI(C:mpiicc [C++:mpiicpc [Fortran: mpiifort [※ <※ [>>>)] <] <] <>>>>] <> []:
icc -O3 -xAVX -ipo main.c func1.c func2.c obj_c.o
icpc main.cpp func1.cpp func2.cpp obj_cpp.o
ifort -O3 -xSSE4.2 prog.f90 sub.f -o my_prog_name.out※obj_c.o.c

obj_cpp.cpp

Copyright© 2011, XLsoft K.K. All rights reserved.

9(Linux()

mpiicc -parallel <)>mpiicc -openmp <OpenMP:

mpiicc -O3 <(SandyBridge)>>

mpiicc -xAVX <mpiicc -ipo <>>mpiicc -vec_report3 <® Trace Collector

mpiicc -trace -g <※icc ifort, mpiicpc, mpiifort
mpiicc, mpiicpc, mpifort>® Trace Analyzer/ Collector:
mpiicc -O3 -xAVX -ipo [-openmp] [-parallel] <※ mpiicc(-trace>>)

Copyright© 2011, XLsoft K.K. All rights reserved.

10(Linux)-O0-O1, -O2, -O3(3)-x, -ax, -m-ipo-openmp

OpenMP-parallel-prof_gen, -prof_use(Profile Guided Optimization PGO )-guide-vec_report<Number>(-par_report<Number>-fast

1,2,3,4,5(1,2,3))-ipo -O3 -no-prec-div -static -xHOST-fp-model <model>(modelstrict, precise, fast

Copyright© 2011, XLsoft K.K. All rights reserved.

)

11

(Linux)-prec-div-static-intel, -shared-intel®

-mkl[=lib]® MKL:-mkl=cluster((=libstatic))

parallel® MKL
libsequential® MKLcluster
® MKL
® MKL

Copyright© 2011, XLsoft K.K. All rights reserved.

12• OpenMP*- export KMP_AFFINITY=• physical(• compact(• scatter(-)))

Copyright© 2011, XLsoft K.K. All rights reserved.

13® Composer XE 2011

•

1.
2.
3.
4.
5.

http://jp.xlsoft.com/documents/intel/compiler/qr_guide_jp.pdf

(IPO)
(PGO)
(GAP)
® VTune™ Amplifier XE

Copyright© 2011, XLsoft K.K. All rights reserved.

14

: -O3High-Level Optimization: HLO•––-x, -ax

-O0
-O1
-O2
-O3

Copyright© 2011, XLsoft K.K. All rights reserved.

15

: -ipoInter Procedural Optimization: IPO
•
––IPO

IPO
file1.cfile2.cfile3.cfile4.c

Copyright© 2011, XLsoft K.K. All rights reserved.

file1.cfile3.cfile4.cfile2.c16

: -parallel Parallelizer•––•– -par_report[n]n0,1,2,3

int_sin.cpp(74): (col. 4) remark:.
int_sin.cpp(92): (col. 6) remark:
.

:
:

•
– -par-threshold[n] n0 100

int_sin.c(92): (col. 6) remark:

Copyright© 2011, XLsoft K.K. All rights reserved.

.

17

: -m, -x, -ax Vectorizer
SIMD Single Instruction Multiple Data•for ( i=0; i<MAX; i++ )c[i]c[i] = a[i]a[i] + b[i];b[i];-no-vec-xAVX Intel AVX
11×MAXSIMD

1× MAX/88A+B

A8+B8A7+B7A6+B6A5+B5A4+B4A3+B3A2+B2

A1+
B1CC8C7C6C5C4C3C2C1※ AVX floatCopyright© 2011, XLsoft K.K. All rights reserved.

18

-m, -x, -ax-x<code><code>=Host,AVX,SSE4. SSE4.2
2,SSE4.1,SSE3_ATOM,SS: -xAVX
SE3,SSE3,SSE2
SSE-ax<code><code>=AVX,SSE4.2,SSE
4.1,SSSE3,SSE3,SSE2-m<code><code>=ia32, sse2, sse3,ssse3, sse4.1

AVX
AVX SSE4.2 SSE4.1 SSSE3 SSE3 SSE2

AFX: -axAVXSSE

SSE4.2

AVX SSE4.2 SSE4.1 SSSE3 SSE3 SSE2

ia32 sse2: -mSSE4.1

SSE4.1 SSSE3 SSE3 SSE2 SSE

Copyright© 2011, XLsoft K.K. All rights reserved.

19

-ax
•

: -axAVX,SSE4.2,SSE3
 AVX
 SSE4.2
 SSE4.1
 SSE2:AVX: SSE4.2: SSE3:Copyright© 2011, XLsoft K.K. All rights reserved.

20

: -guide
Guided Auto Parallelization: GAP•-guide-par-guide-vec-guide-data-trans–––•gap_vec.c(8): remark #30536: (LOOP))-fargument-noalias(8[["matrix_mul_matrix"]]"restrict"
8[] "restrict"

Copyright© 2011, XLsoft K.K. All rights reserved.

21

: -fp-model••

precisestrict
float t0, t1, t2
t0 = 4.0f + 0.1f + t1 + t2

-fp-model fastt0 = 4.1f + t1 + t2
-fp-model precise
t0 = (4.1f + t1) + t2
-fp-model strict
t0 = (((4.0f + 0.1f) + t1) + t2)

Copyright© 2011, XLsoft K.K. All rights reserved.

22

Copyright© 2011, XLsoft K.K. All rights reserved.

23