31
Retour d’expérience Xeon PHI ――― Février 2012 Practice HPC 07/05/2014 © ANEO Tous droits réservés > aneo the other solution HPCLib & Excel : An efficient way to compute with Xeon Phi Damien Dubuc

HPCLib & Excel : An efficient way to compute with Xeon PHI

  • Upload
    aneo

  • View
    600

  • Download
    4

Embed Size (px)

Citation preview

Page 1: HPCLib & Excel : An efficient way to compute with Xeon PHI

Retour d’expérience Xeon PHI

―――

Février 2012

Practice HPC

07/05/2014 © ANEO – Tous droits réservés

>

aneothe other solution

HPCLib & Excel :

An efficient way to

compute with Xeon Phi

Damien Dubuc

Page 2: HPCLib & Excel : An efficient way to compute with Xeon PHI

HPCLib & Excel :

An efficient way to compute

with Xeon PHI

Damien DUBUC

HPC software Expert

―――

April 2014

Practice HPC

07/05/2014 © ANEO – Tous droits réservés 2

Page 3: HPCLib & Excel : An efficient way to compute with Xeon PHI

Summary

What are our roles ?

HPCLib history with Xeon Phi

General library concepts and architectures

C# and Excel use cases

Performance measures

Q&A

07/05/2014 © ANEO – All rights reserved 3

Summary

Page 4: HPCLib & Excel : An efficient way to compute with Xeon PHI

Summary

Summary

What are our roles ?

HPCLib history with Xeon Phi

General library concepts and architectures

C# and Excel use cases

Performance measures

Q&A

07/05/2014 © ANEO – All rights reserved 4

Page 5: HPCLib & Excel : An efficient way to compute with Xeon PHI

OUR SECTORS

OU

R P

RA

CT

ICE

SWhat is our Role ?

07/05/2014 © ANEO – All rights reserved 5

Advanced Computing Technologies : HPClib ™

BUSINESS PERFORMANCE

INFORMATION SYSTEMS

INDUSTRIAL SYSTEMS

The Information System practice

intervenes in the

governance, building and exploitation

of companies’ information systems.

The Industrial Systems practice

is specialized in the industrial sector

and includes all of ANEO’s consulting

services.

The Business Performance practice

comprises consulting offers in

organization and operational

excellence.

Page 6: HPCLib & Excel : An efficient way to compute with Xeon PHI

What are our roles ?

HPC expert in all steps

5/7/2014 © ANEO – All rights reserved 6

Advanced Computing Technologies : HPClib ™

Presentation

Proposal

Concepts

Convict

o deal with client projects.

o analyze and find bottlenecks in all algorithms.

o revisit the algorithms

o find the most adapted technologies.

o (re-) organize the project to use the new technology

o optimize the algorithm locally

o change, Parallelize the whole client algorithm

o search the maximum benefit of the chosen technology

o validate the numerical precision

o validate the optimization

o help a client to have a self-sufficient team

Page 7: HPCLib & Excel : An efficient way to compute with Xeon PHI

Feedback with the Xeon PHI product

projects

5/7/2014 © ANEO – All rights reserved 7

Advanced Computing Technologies : HPClib ™

4 experiences of Xeon PHI with our clients

1 project of financial model and calibration.

2 projects of financial risk calculation.

1 project of automation.

2 experiences at ANEO

HPCLib linear algebra library.

Benchmark architectures

Page 8: HPCLib & Excel : An efficient way to compute with Xeon PHI

Summary

Summary

What are our roles ?

HPCLib history with Xeon Phi

General library concepts and architectures

C# and Excel use cases

Performance measures

Q&A

07/05/2014 © ANEO – All rights reserved 8

Page 9: HPCLib & Excel : An efficient way to compute with Xeon PHI

HPCLib history with Xeon PHI

Our Xeon PHI Intel product

5/7/2014 © ANEO – All rights reserved 9

Advanced Computing Technologies : HPClib ™

Entity Caracteristic

Processor 60 cores 1.053 GHz / 240 Threads

Gflops (max) To 1 TeraFlops

RAM 8 Go with a bandWidht 320 GB/s

Slot of KNC PCIe x16 Gen 2

Memory Cache 32 KB de L1 et 512 KB L2 (per core)

Operating System Linux

Instructions X86 512 bits

TDP 225 W

Host OS Red Hat Entreprise Linux 6.x et Suse Linux 12+

Page 10: HPCLib & Excel : An efficient way to compute with Xeon PHI

HPCLib history with Xeon PHI

5/7/2014 © ANEO – All rights reserved 10

Advanced Computing Technologies : HPClib ™

Source Code

CPU CPU PHIPHI

CPUPHI

Compute

Results Results Results ResultsResults

PHI ComputeComputePHI

Compute

PHI

ComputeCompute

CPU executionHeterogeneous

executionAsynchronous

executionKNC execution

Sequential Parallel Native

Page 11: HPCLib & Excel : An efficient way to compute with Xeon PHI

Summary

Summary

What are our roles ?

HPCLib history with Xeon Phi

General library concepts and architectures

C# and Excel use cases

Performance measures

Q&A

07/05/2014 © ANEO – All rights reserved 11

Page 12: HPCLib & Excel : An efficient way to compute with Xeon PHI

Windows C# Framework

General library concepts and architectures

Design

5/7/2014 © ANEO – All rights reserved 12

Advanced Computing Technologies : HPClib ™

Intel Compiler

HPCLib (low level)

Intel / GCC / Windows Compiler

HPCLib ( C++ wrapper)

HPCLib c# (High Level)

HPCLib Excel Addin

Driver

Operating system

Page 13: HPCLib & Excel : An efficient way to compute with Xeon PHI

HPCLib .Net

HPCLib

General library concepts and architectures

Design

5/7/2014 © ANEO – All rights reserved 13

Advanced Computing Technologies : HPClib ™

Calculation

Interface

Solver

Container

Mathematical

function

C# Excel

UserC/C++

WrapperH

A

R

D

w

A

R

E

OPEN CL

CUDANVidia

GPUAMD

C/C++CPU

C/C++Xeon PHI

User

?

Page 14: HPCLib & Excel : An efficient way to compute with Xeon PHI

Precision (Long, Int, Float, Double)

General library concepts and architectures

Usage

To use a container :

07/05/2014 © ANEO – Tous droits réservés 14

Advanced Computing Technologies : HPClib ™

Type of object (Vector, Matrix,…)

Architecture

How to use ?

To use an algorithm :

float

MIC

Hpclib::hpcMatrix < , >( ,ROWS COLS )

float

MIC

hpclib::SVD < , >( ,Arg1 Arg2 )

Architecture :

Architecture :

Precision :

Precision :

Page 15: HPCLib & Excel : An efficient way to compute with Xeon PHI

General library concepts and architectures

HPCLib Example

5/7/2014 © ANEO – All rights reserved 15

Advanced Computing Technologies : HPClib ™

Simple presentation of HPCLib with C++

Page 16: HPCLib & Excel : An efficient way to compute with Xeon PHI

5/7/2014 © ANEO – All rights reserved 16

General library concepts and architectures

General design

Advanced Computing Technologies : HPClib ™

Linear aglebra, transposed, FFT,

RNG, AES…

Vectors, sparse vectors, matrices, sparse matrices,

tridiagonal matrices…

CPU, XEON PHI, GPU

User

Containers

Hardware

Mathematical

functions

Resolution

algorithms

Client

CG-Stab, bi-CG-Stab,

SVD, RRLSQR…

Page 17: HPCLib & Excel : An efficient way to compute with Xeon PHI

General library concepts and architectures

Mathematical functions

07/05/2014 © ANEO – All rights reserved 17

Advanced Computing Technologies : HPClib ™

HPClib contains classic mathematical functions as well as complex programmed

functions:

Add, subtract, multiplication...

Standards of norm 1 and 2 of vectors

Audit functions of the matrix invertibility

Matrix transpositions

Fourier transformation (1D, 2D, 3D)

Fourier inversion (1D, 2D, 3D) on matrices

Matrix multiplication, solid and sparse

HPCLib comprises different random number generation and encryption algorithms

Random number generation (sobols, stddev, …)

File and data flows encryption (AES 128, 256 bits)

Page 18: HPCLib & Excel : An efficient way to compute with Xeon PHI

General library concepts and architectures

Resolution algorithms

07/05/2014 © ANEO – All rights reserved 18

Advanced Computing Technologies : HPClib ™

HPClib contains complex and programmed resolution algorithms:

Conjugate gradient

For all matrices

Bi-Conjugate gradient stable

For all matrices

Singular Value Decomposition

For solid and sparse matrices

GmRes

For all matrices

Rrlsqr

For all matrices

Matrix resolution by block (ADI method)

Diagonal matrix resolution by block

Page 19: HPCLib & Excel : An efficient way to compute with Xeon PHI

General library concepts and architectures

Values containers

07/05/2014 © ANEO – All rights reserved 19

Advanced Computing Technologies : HPClib ™

HPClib contains numerical containers generally used for intensive computing:

Vectors, sparse vectors, Solid matrices, sparse matrices, Tri-diagonal matrices, Matrices with

sparse vectors

• The R&D team continuously strives to enrich the algorithm bank of HPClib

Page 20: HPCLib & Excel : An efficient way to compute with Xeon PHI

General library concepts and architectures

Technical characteristics

07/05/2014 © ANEO – All rights reserved 20

Advanced Computing Technologies : HPClib ™

All algorithms and containers are implemented on CPU, Xeon PHI and GPU

HPClib is written in C++ language. Consequently, the library can be used with any

language able to import a C/C++ library

Mathematical libraries can integrate HPCLib. (MKL, Blas)

HPClib is usable under Windows and Linux

Daily non-regression testing taken from concrete client cases

Black-Scholes

Monte-Carlo

Cryptography

Page 21: HPCLib & Excel : An efficient way to compute with Xeon PHI

Summary

Summary

What are our roles ?

HPCLib history with Xeon Phi

General library concepts and architectures

C# and Excel use cases

Performance measures

Q&A

07/05/2014 © ANEO – All rights reserved 21

Page 22: HPCLib & Excel : An efficient way to compute with Xeon PHI

Simple usage of HPCLib on C#

5/7/2014 © ANEO – All rights reserved 22

C# and Excel use cases

HPCLib & Excel

Advanced Computing Technologies : HPClib ™

Page 23: HPCLib & Excel : An efficient way to compute with Xeon PHI

Simple usage of HPCLib on C#

5/7/2014 © ANEO – All rights reserved 23

C# and Excel use cases

HPCLib & Excel ; Formula

Advanced Computing Technologies : HPClib ™

How to build a HPC formula :

Format is :

Example :

Or :

= CPU (Array1[HPCVector result]) = Array1[Vector A] + Array1[Vector B]

How to call an algorithm

= ARCHITECTURE ( Result_ARRAY ) = Matrix/Vector formula

= MIC (G11:G13) = C5:E7 * G2:G4

= MIC (P43:P45) = SVD (C10:E45; L10:L45; P43:P45)

Page 24: HPCLib & Excel : An efficient way to compute with Xeon PHI

Simple usage of HPCLib on Excel

5/7/2014 © ANEO – All rights reserved 24

C# and Excel use cases

HPCLib & Excel

Advanced Computing Technologies : HPClib ™

Page 25: HPCLib & Excel : An efficient way to compute with Xeon PHI

HPCLib on Excel : Metal plate metrology example

5/7/2014 © ANEO – All rights reserved 25

C# and Excel use cases

HPCLib & Excel

Advanced Computing Technologies : HPClib ™

Page 26: HPCLib & Excel : An efficient way to compute with Xeon PHI

Simple usage of HPCLib on Excel

5/7/2014 © ANEO – All rights reserved 26

C# and Excel use cases

HPCLib & Excel

Advanced Computing Technologies : HPClib ™

Coord (X)

Coord (Y)

0 0,520000 0,541000 0,562000

0,3 0,604000 0,625000 0,646000

0,5 0,660000 0,681000 0,600000

0,68 0,710400 0,731400 0,762800

1,17 0,847600 0,868600 0,889600

2,22 0,841360 0,980000 0,843600

0,30 0,15

Page 27: HPCLib & Excel : An efficient way to compute with Xeon PHI

Summary

Summary

What are our roles ?

HPCLib history with Xeon Phi

General library concepts and architectures

C# and Excel use cases

Performance measures

Q&A

07/05/2014 © ANEO – All rights reserved 27

Page 28: HPCLib & Excel : An efficient way to compute with Xeon PHI

Performance Measures

07/05/2014 © ANEO – All rights reserved 28

Advanced Computing Technologies : HPClib ™

Page 29: HPCLib & Excel : An efficient way to compute with Xeon PHI

Summary

Summary

What are our roles ?

HPCLib history with Xeon Phi

General library concepts and architectures

C# and Excel use cases

Performance measures

Q&A

07/05/2014 © ANEO – All rights reserved 29

Page 30: HPCLib & Excel : An efficient way to compute with Xeon PHI

Q&A

Why HPCLib?

An algorithm bank, simple to use and allowing a quick response to client’s needs.

The HPClib memory is managed internally and adapted to mathematical models.

The cost of implementation of new functionalities is low.

New technological architectures are easy to integrate.

We’re using the HPCLib library to ensure the operational feasibility of a project

Why do it on windows and Excel ? : Compose all formulas from Excel and the performance of the architectures

07/05/2014 © ANEO – All rights reserved 30

Advanced Computing Technologies : HPClib ™

Very Close to be an open source project !!!

Page 31: HPCLib & Excel : An efficient way to compute with Xeon PHI

Q&A

07/05/2014 © ANEO – All rights reserved 31

Advanced Computing Technologies : HPClib ™

Questions ?

Are you shy ?

[email protected]