GWSynth
Andrew Pastrello
Sydney, New South Wales
- 0 Collaborators
Synthesizes audio from gravitational waveforms produced by binary black hole inspiral-merger-ringdown simulations. The ODE solver stage of the simulation has been modified to use the Parareal parallel-in-time integration method implemented in DPC++ with Intel oneAPI. ...learn more
Project status: Under Development
Overview / Usage
This project provides a simple interface to synthesize audio from gravitational waveforms produced by binary black hole inspiral-merger-ringdown (IMR) simulations using a modified version of the Effective-one-body-numerical-relativity version 2 higher modes (EOBNRv2HM) approximant included in LALSuite. The serial ODE solver stage of the simulation has been modified to use the Parareal parallel-in-time integration method, implemented in oneAPI.
The purpose of this project is to speed up the the generation of these waveforms for use in real-time audio software. The time reversed waveforms greatly resemble electronic kick drum and bass samples used in modern music production. The ultimate goal of the project is to develop a plug-in that can be used within a digital audio workstation to produce IMR waveforms for different input parameters with low latency. As well as being a useful tool for music production, it will increase education of gravitational wave astronomy among the public.
Further improvements and optimizations to the library will be to support approximants with additional features such as spin, precession, and tides. Noise spectra from the gravitational wave background will also be added to allow the production of additional drums sounds such as snare drums and cymbals.
Methodology / Approach
The existing code was profiled to determine the bottlenecks, and the time integration section was chosen for parallelisation. This was achieved by using Intel oneAPI and DPC++ to implement the Parareal parallel-in-time integration method.
Development experience with oneAPI
The good:
Implementation of the Parareal kernel itself in DPC was quite straightforward, especially with the USM features. Most of the development time was spent modifying the existing code, and resolving incompatibilities between LALSuite, which is written in C99, and DPC.
The bad:
There were also some difficult to resolve bugs where the kernel would compile and run, but silently produce incorrect results when using some math functions from the std namespace. This was resolved by using the version provided in the sycl namespace, but was time consuming to debug as there were no errors or warnings from the compiler.
The ugly:
The code would not compile for the GPUs on devcloud without the -ffast-math flag due to a missing complex multiplication function __muldc3(). This was easy to solve by searching for the error message, but seems to be a compiler bug.
Fun lessons learned:
It was fun to learn more about gravitational wave astronomy and I learned a lot from modifying a production scientific code. The restrictions placed on DPC++ kernels can be frustrating at times, especially when modifying an existing code, but they are good practice for high performance code anyway, so it was a useful exercise in scientific programming. The experience I gained with ODE solving will also be invaluable in the future.
Technologies Used
oneAPI, DPC++, LALSuite