The Auditory Project – an investigation into modelling the human ear using HPC
Posted: 14 Nov 2014 | 15:12
The Auditory pilot project investigated the use of HPC to enable faster run times for computational models of the human cochlea. It was a collaboration between EPCC and Dr Michael Newton of the University of Edinburgh’s Acoustics and Audio group.
We began with an existing cochlea model code written in Matlab, which took many hours to run on a single processor. Our initial profiling of the Matlab code showed that almost the entire runtime (see Figure 1) was taken up by this solver and thus any attempts to parallelise the code would require a C/C++ replacement to be found.
Figure 1: Performance of original Matlab code showing that the ODE solver dominates the runtime.
This project was particularly challenging as there is no direct replacement for the ordinary differential equation (ODE) solver used by the Matlab code. The code supplied by Dr Newton uses a Matlab built-in function to solve an expression of the form f(t,y) = M(t,y)y’, where M is a mass matrix. Whilst solvers for ordinary differential equations of the form f(t,y) = y’ are relatively commonplace, the number of options is greatly reduced in our case, where a non-zero right-hand side with a time and space dependent mass matrix is present.
We found just two possible replacement solvers, PETSc and SUNDIALS. We focused our efforts on PETSc as it allows for parallel computations using MPI. After identifying a selection of suitable replacement ODE solvers, much of our subsequent work on the project involved ensuring that we could obtain comparable results from Matlab and PETSc.
For these experiments we opted to use a simple problem consisting of just two equations. The Van der Pol problem was chosen as it has a very similar mathematical form to that of the cochlea model and therefore should give us an idea of the performance we could potentially expect.
PETSc has a variety of different solvers for use with ODE type systems. We tested all the possible solvers and found that the choice of solver and solver tolerance could have a significant impact on how well the PETSc and Matlab results agreed. Overall we found that the Rosenbrock-W or rosw solver gave the best performance and agreement with the Matlab code. We also found that the choice of solver tolerance had a significant impact on the runtime (see Table 1).
|Tolerance used||PETSc rosw runtine (seconds)||Matlab ODE15s runtime(seconds)|
For tolerances of 1.0E-09 or greater PETSc was significantly faster than Matlab, suggesting that PETSc could be a suitable replacement solver.
However, the Van der Pol problem consists of just two equations. Any cochlea model would contain hundreds or thousands of equations, each of which would need to be converted into a form that PETSc could interpret. Converting these equations into something that can be handled by PETSc was found to be entirely non-trivial and indeed the problem ultimately proved intractable.
Future work will focus on exploring Finite Difference Time Domain Techniques (FTSD) to solve the cochlear equations. This will essentially involve re-writing the equations into a new form, which will avoid the need for an ODE solver and should therefore increase the opportunities for optimisation and parallelisation.
Find out more
Acknowledgements: The Auditory pilot project gratefully acknowledges the support of the College of Humanities & Social Sciences Challenge Investment Fund (University of Edinburgh).