At PRACEdays in Barcelona, HPCwire had the opportunity to interview Dr. Erik Lindahl, Stockholm University biophysics professor and chair of the PRACE Scientific Steering Committee about the goals of PRACE, the evolution of PRACEdays, and the latest bioscience and computing trends. Part one of that interview, available here, takes a in-depth look at how PRACE is enabling European HPC research. In part two, below, Lindahl offers his perspective on some of the trends making the biggest impact on HPC today, including the momentum for mixed-precision and the potential for AI synergies.
HPCwire: What excites you most about the field of bioinformatics right now?
Erik Lindahl: When it comes to bioinformatics in general that’s very much dominated by sequencing today, which is an amazing technology but it’s also one of the fields where it’s been hardest to use supercomputers because people are very much dependent on lots of scripts and things that aren’t really that paralyzed yet. When it comes to structural biology where I’m working, there’s an amazing generation of techniques that can determine the structures of small molecules that we have in our bodies — proteins, DNA, RNA — that are basically the work horses for everything. Almost anything in your body that does anything is a protein. We’ve been able to determine structures of proteins for decades, but historically we’ve always seen these as small rigid molecules because by the time you determine a crystal of something you’re going to determine at 100 Kelvin, they don’t move.
The challenge with all these molecules is they would not work unless they actually moved because this ion channel is literally like a door or window in your cell. It will have to open hundreds or thousands of times per second to let through an ion, and that’s when you get a nerve signal. But with traditional techniques we’ve tried to study, you only get the still images you never get the movie. Both we and other groups have worked for years on simulating these channels. It’s just the last five years or so that computers are now fast enough that we can reach these biological timescales and actually see these channels opening and closing on a computer. And I get super excited because suddenly we can start to use these as computational microscopes that actually go beyond what we see in the lab because in the lab you get either the open or the closed states but in the computer we see the opening and closing. Then you can start to understand what happens if something went wrong, so if there was a small mutation of this channel that causes disease. Can you start to understand how should you design a drug to not just get a drug to bind but actually get the drug to say prevent the channel from closing so easily? So I’m very much on the research side here and my interest is understanding fundamental biology, but there are amazing applications opening just in the next few years. Give this 10 years and I think the majority of drugs are going to be designed this way.
HPCwire: Where does GROMACS fit into your research?
Lindahl: GROMACS is a product that started in the mid 1990s and that’s a product to simulate the motion of molecules, in particular bio-molecules. Molecular simulation is in principle a very easy problem but then it gets very hard. The idea of this is that everything in life including biology is really deterministic, so if you know all of the positions of atoms, and we know that these obey the normal laws of physics, you can actually calculate the forces on atoms for instance that two charges repel each other if they have the same sign; the attract each other if they have different signs.
So in principle these equations are not that difficult. The only problem is you have many of them and not just many, you have billions of equations that you need to solve. Just solving these equations is not going to be enough because when you calculate on all these forces you can move the atom say during a femtosecond, so you’re going to need to repeat this billions of times to get to the relevant timescales that would be milliseconds or something. So GROMACS started out as a code we developed as students [at the University of Groningen]. At the time I still remember when we were proud that we could run on over 20 cores. But over the years of course we’ve had to push this to hundreds of cores and thousands of cores and then tens of thousands of cores and for the last few years, hundreds of thousands of cores in some cases.
Initially this was just meant as our own research tool and we’re very happy that this has gone on in the field. While we lead the product the wonderful thing is that we’re having dozens of wonderful students and professors help develop this so this is turned into a community project where we jointly try to make the simulations more advanced. What is happening now is we’re trying to connect a whole range of experimental techniques. Twenty years ago we [as a field] were pretty happy to just sit in front of our computers but what’s happened in the last decade is that’s not sufficient anymore, you need to do both experiments and simulations and you need to constantly couple the simulations to the experiments and to me this has been like doing a second PhD. It’s wonderful; I’m very much a beginner in it but it’s revolutionizing everything we know about science.
HPCwire: So it’s more interdisciplinary…
Lindahl: First, it’s making it more interdisciplinary but the other thing is that when simulations first appeared, they were kind of tier two in science in the sense that you first determined the structure and then you also tried to simulate it a bit basically to confirm your ideas. This was when simulations were difficult, we didn’t necessarily always trust them, there were errors in many of these programs, there were errors in our models; we couldn’t simulate far enough to actually make biological predictions.
But what’s changed the last few years is the simulations have become so powerful that we not just we but even experimentalists tend to trust them. I wouldn’t say that they replace experiments, in some cases they do, but they have increasingly become a complement used very early in the pipeline, so nowadays we frequently use simulations and computational methods while we are determining the structure and that of course is taking a bit of a leap of faith on the experimental side which has forced us to be way more strict about the quality control in these programs.
My focus is more on the software side but one of the reasons why I love this field is how software and hardware develop together. The hardware is pointless without software that can use it, but the software is just as futile an exercise unless we have faster computers all the time.
HPCwire: Hardware, software and wet lab.
Lindahl: If we didn’t have the wet lab we wouldn’t have any biological knowledge at all and we couldn’t test our ideas.
HPCwire: You are also well-known for retooling GROMACS to take advantage of the increased performance of single-precision.
Lindahl: When I was a student in the late 1990s we were sitting down and trying to get these programs faster and as we were fairly proud these codes were fast and if you could get your codes to a couple of percent faster you were really happy – and then at some point we noticed that there were these new gaming instructions in modern CPUs. They were only published for gaming; they had very low accuracy and the idea is that there were a couple of operations in particular when you’re drawing shadows. It turns out when you’re drawing shadows, calculating distances are very important and you calculate distance by calculating inverse square roots.
I don’t remember exactly how I noticed, but at the time we spent about 85 percent of the time in our code calculating inverse square roots – that’s the bottleneck in all of these codes. At this point it dawned upon me if we can use these inverse square roots we could probably double the performance of these programs. The only problem is these instructions are meant for games; you typically don’t need 16 digits of accuracy in a game. So the hardest part was we had to move everything over to get by with single-precision. Of course changing to single-precision is easy but changing to single-precision and still maintaining your accuracy that’s hard. There are quite a few algorithms that you need to redo the way you sum things or change the order in which you do operations and in some cases even come up with a different algorithm so that you don’t need to rely on brute-force double-precision.
So this actually worked. It probably took us a year, and I don’t even want to remember the number of nights I spent coding assembly because that was the only way to access instructions at the time, but we doubled our performance by using single-precision for these instructions. This kept us very happy for about a decade and then in the early 2000s or so everybody started using GPUs and it was the same story all over again — initially GPUs were only targeting games at the time.
We were lucky. We had already done the strength reduction, we could code everything in single-precision. It was fairly easy for us to just switch over and use all the same algorithms on the GPUs. And of course since then GPUs have become better at double-precision but there is still a factor two difference and I think we are seeing that in all modern processors, not just based on the floating point. It’s because double-precision data also takes twice as much space. We’re heading into all this big data and artificial intelligence area and since data is becoming more important than the compute in many ways. If you can save a factor of two when it comes to storing your data, that is increasingly important. So I think that single-precision is here to stay — give us 5 to 10 years and I think we’re increasingly going to see the double-precision is a niche.
HPCwire: Will computational scientists be willing to make the trade-off between compute power and time to solution?
Lindahl: I think they will have to because I think we’ve seen this development a couple of times. There are certain aspects to double-precision that are important particularly to the national labs on the largest supercomputers, but most chip design is driven by the mass-market and the consumer market doesn’t really need double-precision that much so I think it will still be around but I suspect that it’s going to cost you more and more if you absolutely need double-precision. At some point I suspect that we’re going to be in situations similar to the vector machines we had in the 1990s. There were certainly some codes that only worked on a vector machine and there were centers that kept buying the vector machines because they were so dependent on the code that absolutely needed a vector machine. Then the vendors stopped producing these machines and it doesn’t matter how important your code is if you can’t buy such a machine and of course there are today there are no vector codes. We probably won’t have exactly the same development here, but this is an important momento mori. It doesn’t matter how important your code is or the amazing science you can do with it; if there is no computer that can run it it is no longer a useful code.
HPCwire: What potential do you see to bring AI into traditional modeling and simulation workflows?
Lindahl: I think there are two parts maybe even three. With AI the data is the most valuable part, but if you look at traditional computing applications we have huge amounts of data; this is what’s produced in all these simulations. I think there’s tremendous potential immediately to start using artificial intelligence and analyze all of the data produced in simulations – not just in life sciences, but fluid dynamics, everything that you see presented here. Give this two or three years and I bet that suddenly we will say, why didn’t we do this three years ago because the programs are already available. There are amazing algorithms to mine the data and find important events, but that’s kind of the low hanging fruit.
The harder part, I think, will force us to completely revisit how we do modeling and this is where we have a problem. We are frequently good at what we do because we’ve been doing it for 25 years. That’s good in many ways but it’s also very dangerous because the natural instinct is of course to apply the stuff you know to a problem. The difference with AI is just as I mentioned that computers developed to have new instructions, new architectures, accelerators you can use in new ways. The latest processors have roughly an order of magnitude more power when used for machine learning than for traditional calculations. Now this is even worse because you don’t even have single-precision, you have half-precision, and somewhere there, most traditional scientists, and I’ve done this too, start to say sorry half-precision is too little, I can’t get by with that. And that is true, you can’t do molecular simulation with half-precision you would lose too much. But I keep looking — if it’s a factor of 10 more powerful, I think maybe we should even forget about trying simulate all of the motions of atoms. Can we find other ways to mine experimental data? If you have a protein that moves from one state to another, rather than simulating how each atom moves, maybe we can use machine learning to predict how the protein would move. That’s of course a bit of blasphemy as a scientist in my own field we’re not supposed to do it this way. But I think we will gradually be forced to or rather the same thing there, that if you accept a bit a blasphemy suddenly you will realize that computers today — if they are a factor of 10 faster in a decade they might be a factor of 100 or 1,000 faster if you accept to do this in new ways and when that happens I think we will all need to move over.
HPCwire: Who is doing early work in this direction?
Lindahl: One of the works I am most impressed with is where researchers have started to use deep learning to solve a problem for which you would historically always use expensive quantum chemistry codes. In quantum chemistry, you have processions of atoms and then you solve extremely expensive equations to tell what is the energy and this means that given a set of coordinates for your atoms you should predict what an energy is. This is used lots in material science, occasionally life sciences too. It’s extremely costly; it’s orders of magnitudes more costly than the problems I work with, and you can’t even imagine doing this as a function of time in milliseconds, but what people have done is they have trained machine learning, deep learning networks to do this, so given a set of coordinates what should the energy be.
Here you’ve combined the traditional way of doing simulations because you are going to need to create a training set with millions of small simulations that given these coordinates this is what the energy should be. Then you train your network to predict energies based on coordinates, and then you can start feeding this network a new set of coordinates but instead of taking 24 hours you get the network in a millisecond – and then you get what is the atom.
There are of course cases where it’s not as good as quantum chemistry, but in a few examples they do surprisingly well. [Here’s an example of this research published earlier this year in the journal Chemical Science.] Particularly if you are in industry, the advantage of being able to do things in less than a second I think they frequently outweigh the added accuracy you would get in 24 hours. Here again we see this marriage that you can’t train this network unless people have access to these very large resources to create the training data but once you’ve trained the machine learning algorithms this becomes something that you can apply directly in industry.