How to Prepare Weather and Climate Models for Future HPC Hardware - - PowerPoint PPT Presentation

how to prepare weather and climate models for future hpc
SMART_READER_LITE
LIVE PREVIEW

How to Prepare Weather and Climate Models for Future HPC Hardware - - PowerPoint PPT Presentation

How to Prepare Weather and Climate Models for Future HPC Hardware Peter Dben European Weather Centre (ECMWF) The European Weather Centre (ECMWF) www.ecmwf.int Independent, intergovernmental organisation supported by 34 states.


slide-1
SLIDE 1

How to Prepare Weather and Climate Models for Future HPC Hardware

Peter Düben

European Weather Centre (ECMWF)

slide-2
SLIDE 2

The European Weather Centre (ECMWF)

www.ecmwf.int

◮ Independent, intergovernmental organisation supported by 34 states. ◮ Research institute and 24/7 operational weather service. ◮ Weather forecasts cover time frames from medium-range, to monthly and seasonal. ◮ Based in the UK, ≈ 350 member of staff from 30 different countries.

Peter Düben Page 2

slide-3
SLIDE 3

Predicting weather and climate: Why is it so hard?

Earth seen from Apollo 17 (NASA 1972)

Peter Düben Page 3

slide-4
SLIDE 4

Predicting weather and climate: Why is it so hard?

Bauer et al. Nature 2015 Peter Düben Page 3

slide-5
SLIDE 5

Predicting weather and climate: Why is it so hard?

Bauer et al. Nature 2015

The Earth System is complex, chaotic and huge, and we do not have sufficient resolution to resolve all important processes.

Peter Düben Page 3

slide-6
SLIDE 6

Predicting weather and climate: Why is it so hard?

Clouds in a global weather simulation at 1 km resolution (Figure courtesy of Nils Wedi)

Peter Düben Page 3

slide-7
SLIDE 7

High Performance Computing in Earth System Modelling

Weather and climate models are high performance computing applications.

Peter Düben Page 4

slide-8
SLIDE 8

High Performance Computing in Earth System Modelling

Weather and climate models are high performance computing applications. Forecast quality depends on resolution and model complexity.

Peter Düben Page 4

slide-9
SLIDE 9

High Performance Computing in Earth System Modelling

Weather and climate models are high performance computing applications. Forecast quality depends on resolution and model complexity. Resolution depends on the performance of state-of-the-art supercomputers.

Peter Düben Page 4

slide-10
SLIDE 10

High Performance Computing in Earth System Modelling

Weather and climate models are high performance computing applications. Forecast quality depends on resolution and model complexity. Resolution depends on the performance of state-of-the-art supercomputers.

◮ Individual processors will not be faster.

→ Parallelisation (> 106 parallel processing units).

◮ Parallelisation and performance will be essential for future model development. ◮ We fail to operate close to peak performance. ◮ Power consumption will be a big problem.

Peter Düben Page 4

slide-11
SLIDE 11

High Performance Computing in Earth System Modelling

Weather and climate models are high performance computing applications. Forecast quality depends on resolution and model complexity. Resolution depends on the performance of state-of-the-art supercomputers.

◮ Individual processors will not be faster.

→ Parallelisation (> 106 parallel processing units).

◮ Parallelisation and performance will be essential for future model development. ◮ We fail to operate close to peak performance. ◮ Power consumption will be a big problem.

The free lunch is over.

Peter Düben Page 4

slide-12
SLIDE 12

ECMWF’s scalability project towards exascale supercomputing

Challenges for HPC in Earth System modelling:

◮ Huge code with O(107) lines of code.

→ Difficult to port.

◮ Data intensive.

→ Difficult to reach peak performance.

◮ Global scale interactions and fast waves.

→ Difficult to parallelise.

◮ Operational deadlines.

→ Difficult to reduce power.

Bauer et al. Nature 2015 Peter Düben Page 5

slide-13
SLIDE 13

ECMWF’s scalability project towards exascale supercomputing

A community effort to takle the challenges:

◮ Define and encapsulate the fundamental algorithmic building blocks – ’Weather &

Climate Dwarfs’ – to port to accelerators and to allow co-design.

◮ Introduce domain specific languages. ◮ Develop new algorithms for use in extreme scale (elliptic solver, spatial discretisation,

time stepping methods,...).

Peter Düben Page 6

slide-14
SLIDE 14

The ESCAPE project to test GPUs and other accelerators

Figure courtesy Peter Bauer Peter Düben Page 7

slide-15
SLIDE 15

The transform dwarf on GPUs

◮ At ECMWF we work with a spectral model that describes model fields via global

basis functions.

◮ We need to transform fields between spectral and gridpoint space during every

timestep.

◮ The transformations represent a significant fraction of the computing cost and the

relativ cost is increasing with resolution.

Peter Düben Page 8

slide-16
SLIDE 16

The transform dwarf on GPUs

◮ At ECMWF we work with a spectral model that describes model fields via global

basis functions.

◮ We need to transform fields between spectral and gridpoint space during every

timestep.

◮ The transformations represent a significant fraction of the computing cost and the

relativ cost is increasing with resolution. Can we use GPUs to speed up the transform dwarf?

Peter Düben Page 8

slide-17
SLIDE 17

The transform dwarf on GPUs

Figure courtesy Alan Gray and Peter Messmer Peter Düben Page 9

slide-18
SLIDE 18

The transform dwarf on GPUs

Figure courtesy Alan Gray and Peter Messmer Peter Düben Page 9

slide-19
SLIDE 19

To speed-up weather forecasts using low numerical precision

The weather and climate community is using double precision as default since decades.

Peter Düben Page 10

slide-20
SLIDE 20

To speed-up weather forecasts using low numerical precision

The weather and climate community is using double precision as default since decades. Reduce numerical precision → lower power, higher performance. → higher resolution or increased complexity. → more accurate predictions of future weather and climate.

Peter Düben Page 10

slide-21
SLIDE 21

To speed-up weather forecasts using low numerical precision

The weather and climate community is using double precision as default since decades. Reduce numerical precision → lower power, higher performance. → higher resolution or increased complexity. → more accurate predictions of future weather and climate. Temperature in Munich: double precision (64 bits): 14.561192512512207◦C single precision (32 bits): 14.5611925◦C half precision (16 bits): 14.5625◦C

Peter Düben Page 10

slide-22
SLIDE 22

How can we trade precision against computing cost?

◮ double → single → half.

Peter Düben Page 11

slide-23
SLIDE 23

How can we trade precision against computing cost?

◮ double → single → half. ◮ Reduction of precision in data storage.

Peter Düben Page 11

slide-24
SLIDE 24

How can we trade precision against computing cost?

◮ double → single → half. ◮ Reduction of precision in data storage. ◮ Field Programmable Gate Arrays (FPGAs).

Peter Düben Page 11

slide-25
SLIDE 25

How can we trade precision against computing cost?

◮ double → single → half. ◮ Reduction of precision in data storage. ◮ Field Programmable Gate Arrays (FPGAs). ◮ Future perspective: Flexible precision hardware, probabilistic CMOS, pruned

hardware, hardware with frequent hardware faults,...

Peter Düben Page 11

slide-26
SLIDE 26

How do we treat uncertainties in weather forecasts?

13 13.5 14 14.5 15 15.5 16 16.5 2 4 6 8 10

temperature time in days

forecast How do we know if we are wrong?

Peter Düben Page 12

slide-27
SLIDE 27

How do we treat uncertainties in weather forecasts?

13 13.5 14 14.5 15 15.5 16 16.5 2 4 6 8 10

temperature time in days

weather forecast How do we know if we are wrong?

Peter Düben Page 12

slide-28
SLIDE 28

How do we treat uncertainties in weather forecasts?

13 13.5 14 14.5 15 15.5 16 16.5 2 4 6 8 10

temperature time in days

weather ensemble forecast The ensemble spread holds information about forecast uncertainty.

Peter Düben Page 12

slide-29
SLIDE 29

How do we treat uncertainties in weather forecasts?

Peter Düben Page 13

slide-30
SLIDE 30

How do we treat uncertainties in weather forecasts?

Will a simulation with reduced precision change the ensemble spread?

Peter Düben Page 13

slide-31
SLIDE 31

Reduced precision in an atmosphere model

◮ We calculate weather forecasts with a spectral dynamical core (full 3D dynamics on

the globe but no physics).

◮ Floating point precision is reduced to 8 bits in the significand using an emulator in

almost the entire model.

◮ We estimate energy savings in cooperation with computer scientists (the groups of

Krishna Palem - Rice University, Christian Enz - EPFL and John Augustine - IITM). Resolution Number of bits Normalised Forecast error in significand Energy Demand Z500 at day 2 235 km 52 1.0 2.3 315 km 52 0.47 4.5 235 km 8 0.29 2.5

Peter Düben Page 14

slide-32
SLIDE 32

Reduced precision in an atmosphere model

◮ We calculate weather forecasts with a spectral dynamical core (full 3D dynamics on

the globe but no physics).

◮ Floating point precision is reduced to 8 bits in the significand using an emulator in

almost the entire model.

◮ We estimate energy savings in cooperation with computer scientists (the groups of

Krishna Palem - Rice University, Christian Enz - EPFL and John Augustine - IITM). Resolution Number of bits Normalised Forecast error in significand Energy Demand Z500 at day 2 235 km 52 1.0 2.3 315 km 52 0.47 4.5 235 km 8 0.29 2.5 We should reduce precision to allow simulations at higher resolution. The IEEE floating point standard is not ideal.

Peter Düben Page 14

slide-33
SLIDE 33

Reduced precision in an atmosphere model

◮ We calculate weather forecasts with a spectral dynamical core (full 3D dynamics on

the globe but no physics).

◮ Floating point precision is reduced to 8 bits in the significand using an emulator in

almost the entire model.

◮ We estimate energy savings in cooperation with computer scientists (the groups of

Krishna Palem - Rice University, Christian Enz - EPFL and John Augustine - IITM). Resolution Number of bits Normalised Forecast error in significand Energy Demand Z500 at day 2 235 km 52 1.0 2.3 315 km 52 0.47 4.5 235 km 8 0.29 2.5 We should reduce precision to allow simulations at higher resolution. The IEEE floating point standard is not ideal. Studies with real hardware (FPGAs) confirm this result.

Düben et al. MWR 2015; Düben et al. DATE 2015; Düben et al. JAMES 2015; Russel, Düben et al. FCCM 2015. Peter Düben Page 14

slide-34
SLIDE 34

ECMWF’s weather forecast model in single precision

Single precision Double precision Analysis Reference Surface temperature in ◦C

◮ Forecast quality in double and single precision is almost identical. ◮ 40% speed-up. ◮ Benefit for global simulations at 1.0 km resolution.

Düben and Palmer MWR 2014; Vᡠna, Düben et al. MWR 2017 Peter Düben Page 15

slide-35
SLIDE 35

Deep learning for weather forecasts?

Can Neural Networks (NNs) be used for global weather predictions?

Peter Düben Page 16

slide-36
SLIDE 36

Deep learning for weather forecasts?

Can Neural Networks (NNs) be used for global weather predictions? We perform tests with a toy model for atmospheric dynamics called Lorenz’95.

0.01 0.02 0.03 0.04 0.05 0.06

  • 40
  • 30
  • 20
  • 10

10 20 30 40

PDF(Xi) Xi Low resolution model Low resolution NN Truth

  • 0.4
  • 0.2

0.2 0.4 0.6 0.8 1

  • 3
  • 2
  • 1

1 2 3 4

correlation in space for Xi i Low resolution model Low resolution NN Truth

1 2 3 4 5 6 0.2 0.4 0.6 0.8 1

mean absolute error time in model time units

Low resolution model High resolution model Low resolution NNs High resolution NNs

Peter Düben Page 16

slide-37
SLIDE 37

Deep learning for weather forecasts?

Can Neural Networks (NNs) be used for global weather predictions? We perform tests with a toy model for atmospheric dynamics called Lorenz’95.

0.01 0.02 0.03 0.04 0.05 0.06

  • 40
  • 30
  • 20
  • 10

10 20 30 40

PDF(Xi) Xi Low resolution model Low resolution NN Truth

  • 0.4
  • 0.2

0.2 0.4 0.6 0.8 1

  • 3
  • 2
  • 1

1 2 3 4

correlation in space for Xi i Low resolution model Low resolution NN Truth

1 2 3 4 5 6 0.2 0.4 0.6 0.8 1

mean absolute error time in model time units

Low resolution model High resolution model Low resolution NNs High resolution NNs

Model dynamics are reasonable but forecast error with NNs is higher compared to dynamical models.

Peter Düben Page 16

slide-38
SLIDE 38

Deep learning for weather forecasts?

Can Neural Networks (NNs) be used for global weather predictions? We perform tests with a toy model for atmospheric dynamics called Lorenz’95.

0.01 0.02 0.03 0.04 0.05 0.06

  • 40
  • 30
  • 20
  • 10

10 20 30 40

PDF(Xi) Xi Low resolution model Low resolution NN Truth

  • 0.4
  • 0.2

0.2 0.4 0.6 0.8 1

  • 3
  • 2
  • 1

1 2 3 4

correlation in space for Xi i Low resolution model Low resolution NN Truth

1 2 3 4 5 6 0.2 0.4 0.6 0.8 1

mean absolute error time in model time units

Low resolution model High resolution model Low resolution NNs High resolution NNs

Model dynamics are reasonable but forecast error with NNs is higher compared to dynamical models. There are also only ≈ 40 years of satellite observations.

Peter Düben Page 16

slide-39
SLIDE 39

Deep learning for weather forecasts?

Can Neural Networks (NNs) be used for global weather predictions? We perform tests with a toy model for atmospheric dynamics called Lorenz’95.

0.01 0.02 0.03 0.04 0.05 0.06

  • 40
  • 30
  • 20
  • 10

10 20 30 40

PDF(Xi) Xi Low resolution model Low resolution NN Truth

  • 0.4
  • 0.2

0.2 0.4 0.6 0.8 1

  • 3
  • 2
  • 1

1 2 3 4

correlation in space for Xi i Low resolution model Low resolution NN Truth

1 2 3 4 5 6 0.2 0.4 0.6 0.8 1

mean absolute error time in model time units

Low resolution model High resolution model Low resolution NNs High resolution NNs

Model dynamics are reasonable but forecast error with NNs is higher compared to dynamical models. There are also only ≈ 40 years of satellite observations. Google will not make us unemployed but NNs may work well for local predictions.

Peter Düben Page 16

slide-40
SLIDE 40

Deep learning for weather forecasts?

NNs can still be useful for global weather forecasting.

Peter Düben Page 17

slide-41
SLIDE 41

Deep learning for weather forecasts?

NNs can still be useful for global weather forecasting. NNs can replace existing model components to speed-up simulations.

Peter Düben Page 17

slide-42
SLIDE 42

Deep learning for weather forecasts?

NNs can still be useful for global weather forecasting. NNs can replace existing model components to speed-up simulations. NNs were used to replace the radiation scheme in ECMWF weather forecasts in the past. (Chevallier et al. 2000)

Peter Düben Page 17

slide-43
SLIDE 43

Deep learning for weather forecasts?

NNs can still be useful for global weather forecasting. NNs can replace existing model components to speed-up simulations. NNs were used to replace the radiation scheme in ECMWF weather forecasts in the past. (Chevallier et al. 2000) Resources that are saved can be re-invested to improve forecasts.

Peter Düben Page 17

slide-44
SLIDE 44

Deep learning for weather forecasts?

NNs can still be useful for global weather forecasting. NNs can replace existing model components to speed-up simulations. NNs were used to replace the radiation scheme in ECMWF weather forecasts in the past. (Chevallier et al. 2000) Resources that are saved can be re-invested to improve forecasts. We will now repeat this exercise.

Peter Düben Page 17

slide-45
SLIDE 45

Conclusions

◮ The Earth System is complex, chaotic and huge, and we do not have sufficient

resolution to resolve all important processes. Therefore, weather and climate predictions are difficult.

◮ Earth System modelling is an HPC application. ◮ We make a lot of efforts to make the most of state-of-the-art and future

supercomputing hardware (dwarfs, domain specific languages, scalable algorithms,...).

◮ We achieve promising results with the new generation of GPUs. ◮ A reduction in precision can improve efficiency within our models. ◮ Neural Networks may help to improve efficiency for existing model components in the

future.

Peter Düben Page 18