There are many benefits in porting code to GPUs


Professor and Principal Investigator Nathalie Reuter and fellow researchers at the University of Bergen (UiB) will invest in using GPUs in the future.

Calculations done by a PhD Candidate at the Department of Chemistry, Reza Talandashti, show that simulations on GPU actually can be as much as 100 times cheaper compared to CPU hours.

Supercomputer Betzy.

How porting code to GPUs can lower costs and reduce a project´s environmental footprint

Today GPUs (Graphics Processing Units) are integrated into clusters and supercomputers to accelerate computing in fields related to HPC (High-performance computing), ML (Machine Learning) and data analytics. This offers a unique opportunity for researchers to address complex scientific problems that would be barely possible in conventional HPC systems with only CPUs (Central Processing Units). The particularity of GPUs lies in their designed architectures, which make them highly suitable for handling massive data parallelism. This offers the advantage of exploring several research fields’ boundaries and advancing science. 

Moreover, using GPUs reduces CPU-hour costs while accomplishing much work within a reasonable timeframe. Below, you can read about how Reuter’s project significantly reduces computing costs when using GPUs.

However, transitioning from traditional to modern HPC systems presents some apparent challenges for users. These challenges include building software with GPU support, porting and accelerating applications. The GPU team within the NRIS organisation plays an active role in facilitating this transition, particularly about the European supercomputer LUMI, currently ranked the third most powerful supercomputer in the world. 

Superior when it comes to resource usage, time and price

Working within the field of Bioscience, Nathalie Reuter and her team study proteins and how to better understand protein properties. The project titled “How do soluble proteins bind to cell membranes?” ultimately aims at uncovering the properties of a class of proteins which perform their function on the surface of cell membranes. One of the tools of the project is molecular simulations, and here they need to use High-Performance Computing (HPC) for extensive and complicated calculations.

To conduct their simulations, they need a lot of CPUs over an extended time period. It takes much less computational resources when using GPUs, considerably less time, and is cheaper in monetary terms. It is also more environmentally friendly since the energy usage is significantly lower, explains PhD candidate Reza Talandashti. It takes 15 days on 1024 CPU cores (8 nodes) to produce one microsecond of simulated time. By using two GPUs and four CPU cores, it takes eight days to complete the same simulation. This is a huge drop in resource consumption. 

— As for how much we "save" by using GPU vs CPU, it varies slightly depending on the type of calculation we run, but it can be so extreme that a simulation on GPU is 100 times cheaper in CPU hours, says Reuter.

The code is already ported

Even though a lot of work goes into the phase where they prepare for running calculations, Reuter and her team are lucky because they did not have to port the code to GPU. The code is already ported and ready to use on AMD or NVIDIA GPUs, making the running of the jobs fairly easy, even if it has taken Reza a lot of time to test, benchmark, and check the best architecture.

Since running on GPUs is less expensive compared to CPU calculations, the researchers also get more freedom to run more simulations and to do more trials and errors.

— Our project revolves around protein-membrane systems subject to complex enhanced sampling calculations. With the availability of GPUs, I can explore various parameters in the calculations and assess their impact on the results, says Reza. — We are lucky to be able to use NAMD, which is already ported.  

However, most scientists are not so lucky and find it challenging to port the code or obtain funding. 

The GPU Team in NRIS

For calculations on Betzy, Reuter and Reza have relied on experience from collaborators and on the Betzy documentation available in the NRIS documentation on the sigma2 website. In addition, Hicham Agueny in the NRIS GPU Team has significantly assisted in configuring simulations for LUMI-G.  

— We met via Zoom and engaged in multiple email discussions to ensure the optimal setup of the system, explains Reza.

The NRIS GPU team has a broad scope: it spans from code development with GPU accelerators to dissemination of GPU-related activities. They are engaged in developing comprehensive documentation to guide our users in harnessing GPU technologies across diverse fields in HPC and ML. 

— The GPU team strongly believes in the necessity of high-performance hardware in achieving scientific breakthroughs. This is particularly the case in the emerging field of Artificial Intelligence, where for example, the development of AlphaFold heavily relies on GPUs, says Hicham.— Therefore, we assist users throughout their ambitious endeavours, and our mission aligns with that of the NRIS organisation to enhance excellent research. 

The GPU team also collaborates with other teams within and outside NRIS to offer training courses in various topics related to GPUs. In this context, they are actively involved in a training workshop that brings together experts from different entities within Europe.

Here you find an overview of NRIS GPU documentation provided by the team.