Fantastic Examples of using OpenCL & Parallelization to Produce Faster Code
The Berkeley Open Infrastructure for Network Computing or BOINC is an open source system that allows you to donate the idle time on your computer “to cure diseases, study global warming, discover pulsars, and do many other types of scientific research.” The purpose of BOINC is to help researchers leverage the power of personal computers to make scientific discoveries. BOINC powers applications like Einstein@Home and Poem@Home.
Einstein@Home is a volunteer distributed computing project using idle time on computers provided by more than 300,000 volunteers worldwide for astrophysical data analysis. Each week, more than 100,000 computers contribute to Einstein@Home’s sustained computing power of about 1 PFLOP. The Einstein@Home team says “Thanks to OpenCL, one of the project’s data analysis applications now runs up to 20 times as fast as before.” The analysis now also uses AMD/ATI GPUs, harnesses their enormous parallel processing power, and paves the way for more exciting discoveries with Einstein@Home.
Einstein@Home searches for signals from stellar remnants, called neutron stars, which are formed in energetic supernova explosions, that end the life of massive stars. Neutron stars are one of the most extreme objects in space. They are about 20 kilometers in diameter, but up to twice as massive as our Sun. They mainly consist of tightly packed neutrons and are so dense that a single tea spoon of their matter would weigh as much as all humans on our planet. Their surface gravity is 100 billion times as strong as that of the Earth, their magnetic fields up to ten trillion times as strong as that of our home planet. Many of them rotate very fast, astronomers have identified some that spin more than a few hundred times in a single second. In total, about 2000 neutron stars have been found so far, but scientists expect ten times as many detectable neutron stars in the Milky Way.
New neutron stars are observed over a wide range of the electromagnetic spectrum, but the majority is found by their radio emission. Astronomers detect them as pulsating celestial sources, so called radio pulsars, emitting cones of radiation from their magnetic poles. Because the magnetic axis is usually not aligned with their rotation axis, the radiation cones sweep around like the beams of a lighthouse. If one of them points towards the Earth, a pulsating radio source can be observed in the sky.
Einstein@Home searches for unknown neutron stars by means of their radio pulsations as well as their emission of high-energy gamma-rays and gravitational wave emission. Computers from volunteers all over the world sign up their computers with Einstein@Home and analyze data from the large radio telescopes, the Fermi gamma-ray satellite, and the interferometric gravitational wave detectors LIGO and Virgo. In all three searches, the analysis is split up into small work units consisting of instrumental data to analyze, a computer program and computing instructions, sent to the volunteer’s computer over the internet. The program runs when the computer would be otherwise unused, and the analysis results are sent back over the internet to the project servers. So far, Einstein@Home has discovered more than 40 previously unknown pulsars in data from the Arecibo and Parkes radio telescopes, but many more remain to be found!
OpenCL now helped to speed up the radio pulsar search code by a factor by up to 20. An OpenCL-based version of the program running on AMD/ATI GPUs has been released. It harnesses the enormous parallel processing power provided by the GPUs to accelerate the analysis of radio data. More than 25,000 computers with AMD/ATI GPUs have contributed work with their CPUs to Einstein@Home recently. Their GPUs will provide additional vast computing resources. More radio pulsar discoveries aided by OpenCL and AMD/ATI GPUs are just a matter of time. Einstein@Home is a World Year of Physics 2005 and International Year of Astronomy 2009 project, supported by the American Physical Society, NSF, and the Max Planck Society and is based on the BOINC software framework. Learn more about Einstein@Home here.
Poem@Home simulates systems of proteins and organic nano-crystals. The maximum speedup the Poem@Home team could get compared to our single core machine was 130 for a system of 30.000 atoms. This speedup was demonstrated on page 35 of this paper.
Poem@Home implements a novel approach to simulate proteins, which are the nanoscale machinery of all the known cellular life. Amazingly, these large biomolecules with up to 100,000 atoms fold into unique three-dimensional shapes in which they function. These functions include all cellular chemistry (metabolism), energy conversion (photosynthesis) and transport (oxygen transport), signal processing in the brain (neurons), immune response and many others, often with an efficiency unmatched by any man-made process. Protein malfunction is often related to diseases and thousands disease-related proteins have been identified to date, many with still unknown structure. The Poem@Home simulation uses a forcefield implementation, which evaluates all interactions with all atoms between each other. By parallelizing this evaluation, we could obtain speedups of two magnitudes for very big systems of 30.000 atoms. This allowed the Poem@Home team to cut the time needed for a single simulation from 4 days to about 2 hours, comparing a simulation on a Radeon HD5850 with a single CPU. Learn more about Poem@Home here.