REANNZ develops and supports a range of products and services to support the specialist needs of our members in the R&E and innovation community.
We operate NZ's national research and education network and seamlessly connect with 120+ networks globally to enable researchers to collaborate.
REANNZ is proud to support the specialist needs of our members from NZ's research, education and innovation community.
Find out more about who REANNZ is, what we do and the people that operate New Zealand’s national research and education network.
Working with a REANNZ Research Software Engineer helped Otago researcher Aimee Cody improve her time to results when modelling geomagnetic storms.
Extreme geomagnetic storms — driven primarily by coronal mass ejections or strong high‑speed solar wind streams — can significantly affect both natural systems and modern technological infrastructure, damaging transformers and causing blackouts. In 1989, a geomagnetic storm knocked out power to more than 6 million people in Quebec.
At the University of Otago, undergraduate student Aimee Cody and supervisor Prof. Ting Wang are exploring ways to better predict the onset of extreme geomagnetic storm events.
Geomagnetic data from the Eskdalemuir Magnetic Observatory, specifically weekly maximums of rates of change of the Earth’s magnetic field, can be a reliable quantifier of geomagnetic disturbance.
Statistically, models aimed at predicting such events often rely on maximising a likelihood function, which has a high-dimensional multi-modal likelihood surface and means estimation greatly relies on initialisation.
The researchers developed an R package for the estimation and inference in hidden Markov models and hidden semi-Markov models, dynamic stochastic models to capture regime-switching behavior within a system that is assumed to be driven by a latent Markov chain.
The researchers apply a generalised extreme value (GEV) observation distribution, generally used for ‘extreme’ observations such as maximums over some time increment. To overcome this they cycle through 50-500 initialisations to explore the parameter space and ensure that a set of maximum likelihood estimators are reached. However this creates a computational bottleneck, which would be impossible for a regular computer to run in a reasonable amount of time.
Aimee and Ting developed a package written in the R and C++ programming languages that estimates parameters from Hidden Markov models and Hidden semi-Markov models.
The execution time of their package can be very long. For instance, running a six-state model with 200 initial values takes more than two days for a complicated distribution and a sample size of about 5,000.
Aimee and Ting approached REANNZ to get help with parallelising their package to shorten that processing time.
Alexander Pletzer, a Research Software Engineer at REANNZ, helped Aimee adopt FAIR (Findable, Accessible, Interoperable and Reproducible) software development practices.
This involved:
The above plot shows the speedup achieved after parallelising a loop in the findmleHMMnostarting function, as the number of compute cores is increased. Note that one core is used by the manager, the remaining cores are consumed by the workers.
A reduced execution time, allowing for quicker turnaround time. A nearly 10x speedup was achieved using 10 CPU cores.
"I received a massive amount of support from REANNZ, they had the computational knowhow I was missing to massively increase the performance of my package, I learnt many valuable skills that will additionally help in the future. I am very satisfied with this collaboration and the outcome package of it."
— Aimee Cody, Department of Mathematics and Statistics, University of Otago
Find anything about our products, services, and more. Enter a query in the search input above.