Checkpoint Report:

Molecular Dynamics Simulations on a GPU

Main Project Page

So far, I've been able to make reasonable progress on my project. Presently, I do not plan on making any changes to my original goals. Although I've fallen a little behind my proposed schedule, I do not expect it to be an issue as far as meeting my goals go. I'll just have to be dilligent over the next week to not fall any further behind. I was hoping to have a full demo done in time for this report, but it looks like that will need another day of work. One minor detail I hadn't thought about is that I need values for $\sigma$ and $\epsilon$ to use with Lennard-Jones.

Most of my time lost has been related to just getting started with OpenCL. To a certain extent, I've sacrified progress on the project itself to better understand the platform. It's definitely a little bit more clunky than CUDA is, but I've still been able to find answers to simple questions without much trouble. Working closely through the tutorials was definitely a valuable use of my time to fully understand setting up the kernel. Since this includes reading and compiling the kernel code at runtime, it's a little more involved than CUDA. Also, at the suggestion of a tutorial, I'm using VBOs to hold some of the data.

My only significant frustration so far was spending a long time looking for a small bug that seems to be a problem with Nvidia's libraries. So, it's a little bit too early still to have any interesting results to share. On the bright side, it turned out to make the most sense to just do everything in 3D right away. It really didn't add any difficulty and would have just been tedious to add later. OpenCL kernels handle operations on float3 and float4 very nicely.

Now that I'm past these initial roadbumps, I don't envision any other significant obstacles, as I can shift my focus to just implementing the simulations. While unexpected things can always pop up, I plan on being able to achieve my initial goals. If there are no new issues, I expect to be able to attempt all of my "nice to have" goals too.

As far as the parallelism competion goes, I'm probably not going to be able to do a live demo. Instead, I'll either record a simulation and/or show timing data. Since a large part of my project is comparing the effectiveness of organizing the compuation, I expect to have some interesting results to show. One I have these results, it will be important to analyze them to give a likely explanation. Hopefully, I'll have the opportunity to run on the GTX 680s soon too.

So Far

Week What We Plan To Do What We Actually Did
Apr 1-7 Research the basic principles and methods for MD. <-- This.
Apr 8-14 Choose specific algorithms. Put together a MWE of an OpenCL/OpenGL program that just does random particle motion. Tentatively chose algorithms. Set up OpenCL on my computer. Worked through some OpenCL tutorials and borrowed heavily for "starter code."
Apr 15-21 Implement the calculation of potentials based on Lennard-Jones. Use a really dumb assignment scheme to run the kernel just to verify that things are working. Start to implement a basic MD simulation. Wasted a large amount of time hunting a bug that seems to be Nvidia's fault.

Remaining

Week What We Plan To Do What We Actually Did
Apr 22-28 Finish the simple implementation and add new kernel assignment strategies. Compare the atom, force, and spatial approach to decomposition[1].  
Apr 29-May 5 Fine tune performance and compare results for a variety of inputs. Determine whether I know QM well enough to try Hartree-Fock.  
May 6-11 Work on "Extras." This depends on whether I think I can pull off Hartree-Fock.