GNU Scientific Library (GSL) partially ported to NVIDIA GPUs: cuSL

Recently, we embarked in the adventure of porting a “Monte Carlo radiative transfer in curved spacetimes” code from multi-threaded CPUs to GPUs. This work is important for three reasons:

  1. It is fun!
  2. It is important because most general relativistic radiative transfer procedures currently available neglect inverse Compton scattering, which is particularly important to the group since we want to understand the nonthermal emission of active galactic nuclei
  3. Radiative transfer can be slow; on the other hand, it can usually be made massively parallel with a couple of algorithmic improvements

These are some of the reasons why we decided to port a radiative transfer code to GPUs. We have reasons to believe that we can achieve speed-ups of a factor of ~100 times compared to a parallel, OpenMP (CPU) version of the code when using a modern GPU such as a GTX 1080 Ti. This can be a game-changer to allow faster modelling of the radiation from accreting black holes.

We are collaborating with colleagues from the computer science department at the university (Alfredo Goldmann and Matheus Tavares Bernardino). This is work in progress and we have some exciting preliminary results, which we unfortunately cannot publicly share yet. We hope to soon have a paper reporting these results and share the GPU-accelerated black hole radiative transfer code on Github.

In the meantime, we have one software deliverable from this project which may be useful for other researchers: we partially ported some functions of the GNU Scientific Library (GSL) to CUDA. More specifically, we ported the following functions:

  • gsl_ran_dir_3d: generate random vectors in the 3D space
  • gsl_sf_bessel_K0_scaled_e, gsl_sf_bessel_K1_scaled_e, gsl_sf_bessel_Kn: different sorts of “exotic” Bessel functions
  • gsl_ran_chisq: generate random numbers drawn from the chi-square distribution
  • cheb_eval_e: Chebyshev polynomial
  • gsl_sf_lnfact_e, gsl_sf_fact_e: factorial
  • gsl_ran_gamma_double: Gamma distribution
  • gsl_sf_psi_int_e: Digamma (Psi) function
  • gsl_poly_eval: polynomial evaluation

We called this GSL CUDA-port cuSL. It is publicly available on Github. Hopefully, this may be useful to other researchers that are doing mathematical physics computations using CUDA and NVIDIA GPUs.

Chocolate, raclette and black holes

(with contributions by Ivan Almeida)

The Saas-Fee course is a yearly series of lectures usually held in the ski resort of Saas-Fee, Switzerland. This year, the 48th edition of the Saas-Fee course was held between 28th January and 3rd February, and was devoted to black holes. More specifically, the main subjects were black hole formation and growth. Four members of the group – Fábio, Gustavo, Ivan and Raniere – attended the event and presented their current work in the form of panels.

With about 130 participants coming from all over the world, the school was a valuable place to exchange experiences and ideas. The lectures, which were presented by professors Neil Cornish (Montana State University), Tiziana Di Mattteo (Carnegie Mellon University) and Andrew King (University of Leicester), focused on different aspects of black holes, including both theory and observations.

Professor Cornish covered theoretical and instrumental topics on mergers of compact objects as well as gravitational waves emerging from these events. He finished by including what we may expect in the next couple of years with the improvement of our current detectors’ capabilities and the addition of new gravitational wave detectors – both ground-based as well as the space-based LISA.

Professor Di Matteo’s lectures focused on the cosmological history of black holes, covering subjects like primordial black holes – and their possible origins -, first quasars and the current cosmological state of supermassive black holes in the center of galaxies.

Professor King presented a theoretical overview on accretion flows around black holes and black hole feedback, covering the formation and necessity for accretion flows, the black hole influence on its surroundings as well as a few open questions on the subject.

All lectures were very good, just like the chocolate and the cheese.

Saas-Fee is a little village in the Swiss Alps – a truly amazing view.