ner_tags: O O O O O B-Software O O O B-Software O O O O O O O O O O O O O B-Software O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B-Software O O O O O O O O O O B-Software O O O O O O O O O O O O O O O O O O O B-Software O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B-Software O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B-Software O O O O O O O O B-Software O O O O O O O O O B-Software O O O O O O B-Wavelength O O O O O O O B-Software O B-Software O O O O B-URL O O O O O O O O O O O O O O O O O O O O O O O O O O O O B-Wavelength O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B-Wavelength O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B-Software O O O O O O O O O O O O O O O O O O O O O O O O O O O O B-Software O O O O O O O O O O O O O O O
tokens: times of the suboperations in chi2Image (left-hand panel) and chi2Profile (right-hand panel). Each vertical bar represents the smallest time across 20 calls of chi2* for a 4096 2 image. The CPU version is run with the optimal configuration of threads for this image size. CPU to GPU (Host to Device) copy operations are coloured in tones of blue. On the GPU, chi2Profile dramatically reduces the time spent in copying with respect to chi2Image and, even accounting for the extra-time needed to create the image, it manages to be 1.5 times faster than chi2Image . The important point of Fig. 7 is that all compute-intensive operations are faster on the GPU compared to the CPU, in particular the Fourier transform and the creation of the image. But the data transfers partly reduce this advantage, either because they are not needed at all on the CPU (for example the copy of read-only data like observations) or because the PCI express bus has a much reduced bandwidth and higher latency compared to accesses to the main CPU memory. For a large image, copying to the device actually takes longer than the FFT, that is why chi2Image is nearly 20 ms, or 50 per cent, slower than chi2Profile on the GPU, and that does not even account for the time needed to create the image on the CPU, which in this example takes another 20 ms. On the CPU, chi2Profile is only about 15 per cent faster than chi2Image . 7 CONCLUSIONS In this paper we have presented GALARIO, a GPU accelerated library for analysing radio interferometer observations. Distributed under the open source GNU LGPLv3, GALARIO is actively developed at http://github.com/mtazzari/galario and can be easily installed on machines with different configurations. Unlike single dishes, which directly measure the brightness of a source over a continuous region of the sky, radio interferometers measure its Fourier transform, sampling it at discrete locations and producing a collection of complex visibilities. The computational effort required to compare a model prediction to an observational data set of complex visibilities has increased dramatically in the last years due to the improved angular resolution and data rate of modern radio interferometers, which require larger matrix sizes and involve hundreds of thousands of visibility points. The process of computing synthetic visibilities from a model brightness involves several time-consuming matrix operations such as Fourier transforms, quadrant swaps, and interpolations. These operations have to be performed once for every likelihood evaluation, and the likelihood is called thousands or even a million times in the normal workflow required to fit a model to the data. In this context, GALARIO leverages the computing power of modern GPUs to accelerate the computation of the synthetic visibilities, thus reducing the overall execution time of the likelihood. For ease of use, GALARIO offers dedicated functions that produce directly the weighted χ 2 of the model for the