Doing a summer internship might feel like skipping a well-deserved vacation after a long year at uni, but fortunately most supervisors are pretty flexible about giving us students some days off. Last week I flew back to Manchester for a couple of days for my graduation ceremony, and even though I did feel slightly silly asking for time off only a week after getting to Jülich, everyone was very understanding. And it was definitely worth it! My family came over from Helsinki, and we were all in awe of the mysterious British robes and hoods everyone was wearing. Did ancient British students have three Simpsons-like fingers, or what is the story behind those sleeves?
After returning, I quickly got back to work. Three blog posts in, and I finally have something to say about my project! My supervisor and his colleagues here at JSC have developed C++ code that performs simulations of electron motion in graphene. You can read their paper here, since I don’t want to bore anyone by rambling about Hybrid Monte Carlo simulations and all that. The important idea is this: we have C++ code that generates descriptions of where electrons are in a graphene lattice at a given time, and how they are interacting. All of that information can be stored into a matrix (essentially a grid of numbers).
But the thing about computing, is that every branch of science has their own preferred programming language that they like to use to analyse data. It’s kind of a like a mother-tongue; speaking anything else seems to take a lot of effort for some people. Without trying to offend anyone (there are plenty of exceptions!), the stereotypical conversation goes something like:
Paula the Physicist: Python is great! It’s easy to read and write, so I can make nice plots of my data really quickly, and move it around in different files.
Matt the Mathematician: Oh no, Matlab is much better! You can write everything in vector-form, so that it’s very intuitive to read. I mean who doesn’t love to read things like V = 1/12*pi*(D.^2).*H?
Chloe the Computer scientist: What, Matlab? Python? Properly compiled languages are sooo much faster. C, C++ or Fortran are much better.
Fortunately, the eternal debate creates lots of small projects for us summer students. This week I’ve worked out how to save the matrix created by the C++ code we already have, so that it can be imported into Matlab. The idea is then to pass that data on to Matt, who will be happy that we are speaking his language, as it were. Now that we have this starting point, the critical question in High Performance Computing is whether we can do it faster. If you run a program on a small data set, a 10% speed increase does not matter much; it only makes you wait maybe a fraction of a second less. However, if you run the same program in parallel, using many computers and much more data, that 10% increase can become a 90% increase, and that fraction of a second can turn the code from something that would take weeks to execute to something that can be done in hours. More work for the rest of the summer then!