Difference between revisions of "HPC Introduction"

From Tuflow
Jump to navigation Jump to search
Line 1: Line 1:
As of TUFLOW build 2017-09-AA, TUFLOW offers HPC (Heavily Parallelised Compute) as an alternate 2D Shallow Water Equation (SWE) solver to TUFLOW Classic. TUFLOW Classic has only ever had the capacity to run a simulation on a single CPU core. HPC provides parallelisation of the TUFLOW model allowing modellers to run a single TUFLOW model across multiple CPU cores or GPU graphics cards which utilise thousands of smaller CUDA* cores. This is shown to provide significantly quicker model run times for TUFLOW users.<br>
+
As of TUFLOW build 2017-09-AA, TUFLOW offers HPC (Heavily Parallelised Compute) as an alternate 2D Shallow Water Equation (SWE) solver to TUFLOW Classic. Whereas TUFLOW Classic is limited to running a simulation on a single CPU core, HPC provides parallelisation of the TUFLOW model allowing modellers to run a single TUFLOW model across multiple CPU cores or GPU graphics cards which utilise thousands of smaller CUDA* cores. This is shown to provide significantly quicker model run times for TUFLOW users.<br>
  
Parallelisation modelling breaks up the model into a number of pieces (equal to the number of cores the model is split across). Each piece of the model is run on a different processor with information across each piece of the model shared between processors at each timestep. Consider the image below, where each quadrant of cells is a piece of the model being run on a different processor. Information in the cells along the boundaries of these quadrants (adjacent to the red lines) need to share information with each other at each timestep to be able to solve the shallow water equation. This is achievable because TUFLOW HPC is an explicit finite volume solution which differs to TUFLOW Classic which is an implicit finite difference equation.<br>
+
'''Solution Scheme and Parallelisation'''<br>
  
[[File: Mesh Core Split.png |360px]]<br>
+
TUFLOW HPC is an explicit finite volume solution which differs to TUFLOW Classic which is an implicit finite difference equation. Time derivatives of cell averaged water depth, u-velocity and v-velocity are computed on a cell-by-cell basis and the model evolved using an explicit ODE solver. Calculation of the cell based derivatives are highly independent of each other making it possible to run this solution scheme across multiple processors or GPU cards. Parallelisation is done by breaking up the model into vertical ribbons. Each ribbon of the model is run on a different processor (or GPU card) with boundary information shared between processors at each timestep as illustrated in the image below.<br>
  
The explicit finite volume solution scheme utilised in HPC is mass conserving and requires numerical convergence to a high precision. This differs to TUFLOW Classic, which can continue to simulate a model with high volume error due to it being an implicit finite difference scheme. For HPC to achieve numerical convergence and mass conservation it is not possible to run with a fixed timestep as TUFLOW Classic is able to. HPC must change and adapt the timestep to the conditions within a given cell at a given point in time. This is typically controlled by the water velocity, depth and/or turbulence. The need for adaptive timestepping in HPC and the equations that control the necessary timestep for numerical convergence are described further on our <font color="blue"><tt> HPC Adaptive Timestep </tt></font> Wiki page.<br>
+
[[File: Mesh_Ribbon_Splitting.png |360px]]<br>
  
HPC cell discretisation is the same as TUFLOW Classic This has removed the “checkerboarding effect” observed at times in TUFLOW GPU result outputs. This means that the water levels (i.e. cell mass) is calculated at the cell centre, while velocity (i.e. momentum) is calculated at the cell mid-sides as shown in the figures below.<br>
+
'''Mass Conservation and Timestep''' <br>
  
[[File: HPC Cell Schematisation.png |360px]]<br>
+
The explicit finite volume solution scheme utilised in HPC is mass conserving by construction. This differs to TUFLOW Classic, which can continue to simulate a model with some volume error due to it being an implicit finite difference scheme. The stability of the explicit finite volume scheme used in TUFLOW HPC is linked to the time step, flow velocities, water depth, and eddy viscosity. The maximum timestep that can be used while maintaining model stability changes as the model evolves. While it is possible to choose a fixed timestep ahead of time (similarly to TUFLOW Classic) that will guarantee model stability from start to finish, shorter run times may be achieved through the use of adaptive time stepping where the solver continually modifies the timestep based on various stability criteria. This is explained in more detail in our <font color="blue"><tt> HPC Adaptive Timestep </tt></font> Wiki page.<br>
  
In general most of the functionality and features of TUFLOW Classic are available in HPC, with more of these features becoming available to HPC in due time.<br>
+
'''Cell Discretisation''' <br>
  
So what does this mean for modellers? By providing the ability to run models on Graphics Cards or across multiple CPU cores, we can achieve significantly greater model run times, increasing our modelling capabilities to be able to run continuous hydraulic models, with increased cell resolution, across larger extents and more scenarios (Monte Carlo, rainfall ensembles). If you would like to learn more about HPC’s run speeds and modelling benefits then please refer to our <font color="blue"><tt> Hardware Benchmarking </tt></font> wiki page.<br>
+
HPC cell discretisation is the same as in TUFLOW Classic, where the v velocities are defined on the horizontal mid-points between cell centres and the u-velocities on the vertical mid-points. This has removed the “checkerboarding effect” observed at times in previous TUFLOW GPU result outputs. <br>
  
&lowast; Cuda Cores are cores written to a specific language (CUDA) which is patented to Nvidia graphics cards. This means that TUFLOW is limited to running on CUDA enabled graphics cards only.<br>
+
'''Benefits of HPC''' <br>
 +
 
 +
In general most of the functionality and features of TUFLOW Classic are available in HPC, with more of these features becoming available to HPC in due time. To find out more about what TUFLOW Classic features aren’t included in the latest TUFLOW HPC build you can reference the <font color="blue"><tt>HPC Features</tt></font> Wiki Page or the <font color="blue"><tt>TUFLOW 2017-09 Release Notes</tt></font>.
 +
So what does this mean for modellers? By providing the ability to run models on Graphics Cards or across multiple CPU cores, we can achieve significantly shorter model run times, increasing our modelling capabilities to be able to run continuous hydraulic models, with increased cell resolution, across larger extents and more scenarios (Monte Carlo, rainfall ensembles). If you would like to learn more about HPC’s run times and modelling benefits then please refer to our <font color="blue"><tt>Hardware Benchmarking</tt></font> Wiki Page. <br>
 +
 
 +
&lowast; Cuda Cores are patented to Nvidia graphics cards. This means that TUFLOW is limited to running on CUDA enabled graphics cards only.

Revision as of 10:15, 15 March 2018

As of TUFLOW build 2017-09-AA, TUFLOW offers HPC (Heavily Parallelised Compute) as an alternate 2D Shallow Water Equation (SWE) solver to TUFLOW Classic. Whereas TUFLOW Classic is limited to running a simulation on a single CPU core, HPC provides parallelisation of the TUFLOW model allowing modellers to run a single TUFLOW model across multiple CPU cores or GPU graphics cards which utilise thousands of smaller CUDA* cores. This is shown to provide significantly quicker model run times for TUFLOW users.

Solution Scheme and Parallelisation

TUFLOW HPC is an explicit finite volume solution which differs to TUFLOW Classic which is an implicit finite difference equation. Time derivatives of cell averaged water depth, u-velocity and v-velocity are computed on a cell-by-cell basis and the model evolved using an explicit ODE solver. Calculation of the cell based derivatives are highly independent of each other making it possible to run this solution scheme across multiple processors or GPU cards. Parallelisation is done by breaking up the model into vertical ribbons. Each ribbon of the model is run on a different processor (or GPU card) with boundary information shared between processors at each timestep as illustrated in the image below.

Mesh Ribbon Splitting.png

Mass Conservation and Timestep

The explicit finite volume solution scheme utilised in HPC is mass conserving by construction. This differs to TUFLOW Classic, which can continue to simulate a model with some volume error due to it being an implicit finite difference scheme. The stability of the explicit finite volume scheme used in TUFLOW HPC is linked to the time step, flow velocities, water depth, and eddy viscosity. The maximum timestep that can be used while maintaining model stability changes as the model evolves. While it is possible to choose a fixed timestep ahead of time (similarly to TUFLOW Classic) that will guarantee model stability from start to finish, shorter run times may be achieved through the use of adaptive time stepping where the solver continually modifies the timestep based on various stability criteria. This is explained in more detail in our HPC Adaptive Timestep Wiki page.

Cell Discretisation

HPC cell discretisation is the same as in TUFLOW Classic, where the v velocities are defined on the horizontal mid-points between cell centres and the u-velocities on the vertical mid-points. This has removed the “checkerboarding effect” observed at times in previous TUFLOW GPU result outputs.

Benefits of HPC

In general most of the functionality and features of TUFLOW Classic are available in HPC, with more of these features becoming available to HPC in due time. To find out more about what TUFLOW Classic features aren’t included in the latest TUFLOW HPC build you can reference the HPC Features Wiki Page or the TUFLOW 2017-09 Release Notes. So what does this mean for modellers? By providing the ability to run models on Graphics Cards or across multiple CPU cores, we can achieve significantly shorter model run times, increasing our modelling capabilities to be able to run continuous hydraulic models, with increased cell resolution, across larger extents and more scenarios (Monte Carlo, rainfall ensembles). If you would like to learn more about HPC’s run times and modelling benefits then please refer to our Hardware Benchmarking Wiki Page.

∗ Cuda Cores are patented to Nvidia graphics cards. This means that TUFLOW is limited to running on CUDA enabled graphics cards only.