Louis Davis has been working with NeSI Research Software Engineer Alexander Pletzer and Application Support Analyst Callum Walley to improve his code efficiency and tackle larger problems. (Abstract image by Gerd Altmann, Pixabay )

Powering novel approaches to modelling earthquake behaviours

"Not only does the simulation work complete quickly now, but I’ve learnt a lot about the HPCs and sophisticated computational tools which will be necessary for future developments."
The below case study shares some of the technical details and outcomes of the scientific and HPC-focused programming support provided to a research project through NeSI’s Consultancy Service.
This service supports projects across a range of domains, with an aim to lift researchers’ productivity, efficiency, and skills in research computing. If you are interested to learn more or apply for Consultancy support, visit our Consultancy Service page.

 

Research background

Louis Davis is a Master’s student at the University of Otago who is developing a new type of statistical model to apply to earthquake data. His project, a Master’s thesis co-supervised by Professor Boris Baeumer and Associate Professor Ting Wang, aims to model earthquake behaviour using a novel temporal Hawkes Process.

 

Project challenges

To fit Louis’ model to data, he needed to maximise a maximum likelihood function numerically. At the heart of it, there was a numerically heavy kernel integral calculation. The code, written in Matlab, takes four days to simulate 10,000 points and fit parameters for one set of initial values. To check the consistency of the estimator and fit data, one would need to use many more initial values and re-run the simulation hundreds of times.

 

What was done

NeSI Research Software Engineer Alex Pletzer and NeSI Application Support Analyst Callum Walley introduced additional levels of parallelism. At the coarsest level, Louis can now break his code into multiple job scripts, which can be submitted simultaneously. This reduces the turnaround time since each job now requests fewer resources and can be executed concurrently with other jobs. Secondly, some time consuming parts of the code have been translated from Matlab to C++. These can now run threaded fashion using OpenMP, yielding a 5-6x speedup.

Graph showing performance on NeSI Milan nodes.
Attribution: 
The figure shows the speedup from low level parallelisation for a moderately large case, depending on the number of threads.

 

Main outcomes

A code that runs an order of magnitude faster, allowing Louis to tackle larger problems.

 

Researcher feedback

"The consultancy has allowed my work to actually happen. Prior to the help received there was little to no chance of having a reasonable time to completion. Not only does the simulation work complete quickly now, but I’ve learnt a lot about the HPCs and sophisticated computational tools which will be necessary for future developments."

Louis Davis, Mathematics & Statistics, University of Otago

 


Do you have a research project that could benefit from working with NeSI Research Software Engineers or our Data Science Engineer? Learn more about what kind of support they can offer and get in touch by emailing support@nesi.org.nz.

 

Next Case Study

Scaling up the analysis of simulations on nanowire stability

"This has helped me to scale up my research capabilities not only with this work, but also with future endeavours too."
Subject: