Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi...

50
ni.com

Transcript of Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi...

Page 1: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

ni.com

Page 2: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

ni.com

Heterogeneous Computing and Real-Time Math for

Plasma Control

Dr. Stefano ConcezziVice-President

Scientific Research & Lead User ProgramNational Instruments

Page 3: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

3ni.com

Today’s Engineering Challenges

• Minimizing power consumption

• Managing global operations

• Getting increasingly complex products to market faster

• Maximizing operational efficiency

• Adapting to evolving application requirements

• Protecting investments

• Doing more with less

• Integrating code and systems

Page 4: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

4ni.com

The Impact of Great Engineering

Averting catastrophic damage

Improving quality of life

Saving time, effort, and money

ni.com

Page 5: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

5ni.com

National Instruments—Our Stability

• Non-GAAP Revenue: $262 M in Q1 2012

• Global Operations: Approximately 6,300 employees; operations in more than 40 countries

• Broad customer base: More than 35,000 companies served annually

• Diversity: No industry >15% of revenue

• Culture: Ranked among top 25 companies to work for worldwide by the Great Places to Work Institute

• Strong Cash Position: Cash and short-term investments of $377M as of March 31, 2012

Non

-GA

AP

Reven

ue* in

Millio

ns

Long-Term Track Record of Growth and Profitability

*A reconciliation of GAAP to non-GAAP results is available at investor.ni.com

Page 6: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

7ni.com

Processor Landscape for Real-time Computation

Pro

ble

m S

ize

Cycle Time (Maximum Allowed)

10 ms

100 ms

1 ms 1 s

Page 7: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

8ni.com

FPG

A

Processor Landscape for Real-time Computation

Pro

ble

m S

ize

Cycle Time (Maximum Allowed)

10 ms

100 ms

1 ms 1 s

CPUCPU

GPURT-GPU

‘latency’ barrier

‘cache’ cap

Page 8: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

9ni.com

2007 2008 2009 2010 2011 2012

Size and Complexity / Cycle Time

Real-Time HPC Trend

Tokamak (PCA)1M x 1K FFT

ELT M1

ELT M4Tokamak (GS) DNA Seq

Quantum Simulation

1 x 1M+ FFT

Page 9: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

11

ni.com

2007 2008 2009 2010 2011 2012

Size and Complexity / Cycle Time

Real-Time HPC Trend

Tokamak (PCA)1M x 1K FFT

ELT M1

ELT M4Tokamak (GS)

1 x 1M+ FFT

DNA Seq

Quantum Simulation

Page 10: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

12

ni.com

2007 2008 2009 2010 2011 2012

Size and Complexity / Cycle Time

Real-Time HPC Trend

Tokamak (PCA)1M x 1K FFT

ELT M1

ELT M4Tokamak (GS) DNA Seq

Quantum Simulation

1 ms

1 x 1M+ FFT

CPU ROLE• Solve G.S. PDE 5-8x/ms• Grid size = 32 x 64

Page 11: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

13

ni.com

Tokamak – Shape Control

Rj

ZRRRR o

2

21

Shape Reconstruction

Tomography

Soft X-Rays

MagneticSensors

BolometricSensors

Grad-ShafranovSolver

ControllerPID, MIMO

Target Shape

Page 12: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

14

ni.com

ASDEX Tokamak Upgrade - Results

• Grad-Shafranov Solver using LabVIEW Real-Time on multi-core processors and LabVIEW FPGA for data acquisition

• 0.1 ms loop time for the PDE solver

• Red line shows offline equilibrium constrcution

• Blue line is real-time construction

• Diagnostics for halo currents and real-time bolometer measurements using LabVIEW RT*Dr. L Giannone et al, IPP Max Planck

Page 13: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

15

ni.com

Example -Plasma Diagnostics & Control with NI LabVIEW RT

• Max Planck Institute• Plasma control in nuclear fusion Tokamak with LabVIEW

on an eight-core real-time system

“…with LabVIEW, we obtained a 20X processing speed-up on an octal-core processor machine over a single-core processor…”

Louis GiannoneLead Project ResearcherMax Planck Institute

Page 14: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

16

ni.com

ITER Fast Plant Control System

• Prototype jointly developed with CIEMAT and UPM (Spain)

• NI PXIe based system with timing and synchronization, and FPGA-based DAQ modules

• Interface with EPICS IOC

Page 15: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

17

ni.com

Summary

• Heterogeneous systems with FPGAs, multi-core processors needed

• COTS tools available for domain experts

• ASDEX upgrade achieved stringent loop times using LabVIEW platform

• Working with ITER for control and diagnostic needs

Page 16: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

18

ni.com

APPENDIX

Page 17: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

20

ni.com

Real-Time HPC

“Traditional HPC with a curfew.”

• Processing involves live (sensor) data• System response impacts the real-world in realistic time

• Design accounts for physical limitations• Implementations meet/exceed exceptional time constraints – often at or below 1 ms

• Demands parallel, heterogeneous processing

Page 18: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

21

ni.com

Processor Landscape for Real-time Computation

Pro

ble

m S

ize

Cycle Time (Maximum Allowed)

10 ms

100 ms

1 ms 1 s

PurposeReconfigurable I/O

Strengths• Low latency• In the data stream • 1D processing

FPGA

Page 19: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

22

ni.com

Processor Landscape for Real-time Computation

Pro

ble

m S

ize

Cycle Time (Maximum Allowed)

10 ms

100 ms

1 ms 1 s

FPG

A

Page 20: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

23

ni.com

FPG

A

Processor Landscape for Real-time Computation

Pro

ble

m S

ize

Cycle Time (Maximum Allowed)

10 ms

100 ms

1 ms 1 s

CPU

PurposeGeneral Processing

Strengths• Everywhere • Abundant tools• Multiple cores

CPU

Page 21: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

24

ni.com

FPG

A

Processor Landscape for Real-time Computation

Pro

ble

m S

ize

Cycle Time (Maximum Allowed)

10 ms

100 ms

1 ms 1 s

CPUCPU

‘latency’ barrier

Page 22: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

25

ni.com

FPG

A

Processor Landscape for Real-time Computation

Pro

ble

m S

ize

Cycle Time (Maximum Allowed)

10 ms

100 ms

1 ms 1 s

CPUCPU barrier performance limitations

Page 23: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

26

ni.com

FPG

A

Processor Landscape for Real-time Computation

Pro

ble

m S

ize

Cycle Time (Maximum Allowed)

10 ms

100 ms

1 ms 1 s

CPUCPU

PurposeAccelerator

Strengths• Low cost • Maturing tools• Many cores

GPU

Page 24: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

27

ni.com

FPG

A

Processor Landscape for Real-time Computation

Pro

ble

m S

ize

Cycle Time (Maximum Allowed)

10 ms

100 ms

1 ms 1 s

CPUCPU

GPUPurposeRT Accelerator

Strengths• Reduces jitter • Increase data size• Improve speed

RT-GPU

Page 25: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

28

ni.com

FPG

A

Processor Landscape for Real-time Computation

Pro

ble

m S

ize

Cycle Time (Maximum Allowed)

10 ms

100 ms

1 ms 1 s

CPUCPU

GPURT-GPU

‘bus’ overhead

Page 26: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

29

ni.com

Processor Landscape for Real-time Computation

Pro

ble

m S

ize

Cycle Time (Maximum Allowed)

10 ms

100 ms

1 ms 1 s

FPG

A

CPUCPU

GPUGPURT-GPU

overhead performance limitations

Page 27: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

30

ni.com

FPG

A

Processor Landscape for Real-time Computation

Pro

ble

m S

ize

Cycle Time (Maximum Allowed)

10 ms

100 ms

1 ms 1 s

CPUCPU

GPURT-GPU

Page 28: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

31

ni.com

FPG

A

Processor Landscape for Real-time Computation

Pro

ble

m S

ize

Cycle Time (Maximum Allowed)

10 ms

100 ms

1 ms 1 s

CPUCPU

GPURT-GPU

‘cache’ cap

Page 29: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

32

ni.com

FPG

A

Processor Landscape for Real-time Computation

Pro

ble

m S

ize

Cycle Time (Maximum Allowed)

10 ms

100 ms

1 ms 1 s

CPUCPU

GPURT-GPU

Page 30: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

33

ni.com

2007 2008 2009 2010 2011 2012

Size and Complexity / Cycle Time

Real-Time HPC Trend

Tokamak (PCA)1M x 1K FFT

ELT M1

ELT M4Tokamak (GS) DNA Seq

AHE

Quantum Simulation

1 x 1M+ FFT

Page 31: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

34

ni.com

2007 2008 2009 2010 2011 2012

Size and Complexity / Cycle Time

Real-Time HPC Trend

Tokamak (PCA)1M x 1K FFT

ELT M1

ELT M4Tokamak (GS)

1 x 1M+ FFT

DNA Seq

AHE

Quantum Simulation

Page 32: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

35

ni.com

2007 2008 2009 2010 2011 2012

Size and Complexity / Cycle Time

Real-Time HPC Trend

Tokamak (PCA)1M x 1K FFT

ELT M1

ELT M4Tokamak (GS)

1 x 1M+ FFT

DNA Seq

AHE

Quantum Simulation

Page 33: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

36

ni.com

2007 2008 2009 2010 2011 2012

Size and Complexity / Cycle Time

Real-Time HPC Trend

Tokamak (PCA)1M x 1K FFT

ELT M1

ELT M4Tokamak (GS) DNA Seq

AHE

Quantum Simulation

1 ms

1 ms

1 s10 ms

1 ms1 ms

20 ms

1 x 1M+ FFT

Page 34: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

37

ni.com

2007 2008 2009 2010 2011 2012

Size and Complexity / Cycle Time

Real-Time HPC Trend

Tokamak (PCA)1M x 1K FFT

ELT M1

ELT M4Tokamak (GS) DNA Seq

AHE

Quantum Simulation

1 ms

1 x 1M+ FFT

FPGA ROLE• Compute centroids (10x10 pixel regions) • Reduced data by 100x.

Page 35: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

38

ni.com

2007 2008 2009 2010 2011 2012

Size and Complexity / Cycle Time

Real-Time HPC Trend

Tokamak (PCA)1M x 1K FFT

ELT M1

ELT M4Tokamak (GS) DNA Seq

AHE

Quantum Simulation

1 ms

1 x 1M+ FFT

CPU ROLE• Solve G.S. PDE 5-8x/ms• Grid size = 32 x 64

Page 36: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

39

ni.com

2007 2008 2009 2010 2011 2012

Size and Complexity / Cycle Time

Real-Time HPC Trend

Tokamak (PCA)1M x 1K FFT

ELT M1

ELT M4Tokamak (GS) DNA Seq

AHE

Quantum Simulation

1 x 1M+ FFT

GPU ROLE• Offload dense kernels• 10-25x speed-up

Page 37: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

40

ni.com

Toolkits for Real-Time Computation

• Multicore Analysis & Sparse Matrix Toolkit (MASMT)

• GPU Analysis Toolkit

Page 38: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

41

ni.com

MASMT

• Easy to use – similar to AAL• Support double and single precision• Windows (32/64-bit) & RT ETS• Thread control*

* - Windows only

Page 39: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

42

ni.com

MASMT

• Easy to use – similar to AAL• Support double and single precision• Windows (32/64-bit) & RT ETS• Thread control*• Linear Algebra

* - Windows only

Page 40: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

43

ni.com

MASMT

• Easy to use – similar to AAL• Support double and single precision• Windows (32/64-bit) & RT ETS• Thread control• Linear Algebra• Signal Processing

Page 41: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

44

ni.com

MASMT

• Easy to use – similar to AAL• Support double and single precision• Windows (32/64-bit) & RT ETS• Thread control• Linear Algebra & Signal Processing• Sparse Matrix Support

Page 42: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

45

ni.com

Toolkits for Real-Time Computation

• Multi-core Analysis & Sparse Matrix Toolkit (MASMT)

• GPU Analysis Toolkit

Page 43: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

46

ni.com

GPU Analysis Toolkit

• Set of CUDA™ Function Interfaces• Device Management

o CUDA Runtime APIo CUDA Driver API

• Linear Algebra (CUBLAS)• FFT (CUFFT)

Page 44: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

47

ni.com

GPU Analysis Toolkit

• Set of CUDA Function Interfaces• SDK for Custom Functions

• User-defined CUDA libraries• Compute APIs

o OpenCL™o OpenACC®

• Accelerator targetso Xeon Phi™

Page 45: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

48

ni.com

GPU Analysis Toolkit

• Set of CUDA Function Interfaces• SDK for Custom Functions• Designed for LabVIEW Platform

Page 46: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

49

ni.com

GPU Analysis Toolkit

• Set of CUDA Function Interfaces• SDK for Custom Functions• Designed for LabVIEW Platform

Page 47: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

50

ni.com

GPU Analysis Toolkit

• Set of CUDA Function Interfaces• SDK for Custom Functions• Designed for LabVIEW Platform

Page 48: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

51

ni.com

GPU Analysis Toolkit

• Set of CUDA Function Interfaces• SDK for Custom Functions• Designed for LabVIEW Platform

• What it can’t do• Define and deploy a GPU function using G source code• Perform GPU computations under

o LabVIEW RT OSo Linux/Mac

Page 49: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

52

ni.com

GPU Analysis Toolkit

• Set of CUDA Function Interfaces• SDK for Custom Functions• Designed for LabVIEW Platform

• What it can’t do• Define and deploy a GPU function using G source code• Perform GPU computations under

o LabVIEW RT OSo Linux/Mac

• Why is RT-GPU feasible??

Page 50: Ni.com. Heterogeneous Computing and Real-Time Math for Plasma Control Dr. Stefano Concezzi Vice-President Scientific Research & Lead User Program National.

53

ni.com

Why is RT-GPU feasible?

• Reliable execution despite suboptimal configurations