Powering novel approaches to modelling earthquake behaviours
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.
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.
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.
A code that runs an order of magnitude faster, allowing Louis to tackle larger problems.
"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 firstname.lastname@example.org.