2
$\begingroup$

I am looking at building/buying myself a workstation for scientific computing. I will be doing molecular dynamics simulations that are memory intensive (data on a large number of particles and a million time steps or more) and require multiple instances of the same code running (to generate an ensemble). I am new to computing but my guess is I will be using C++ and learn to utilize the best memory handling practices. In terms of ensemble averaging, it appears to me I could either just run the code N times or maybe run N instances of the codes in simultaneously on N processors. At this point I don't have access to HPC resources and I am only trying to get a simple desktop (maybe 2 or 4 cores) but I want to learn to make this code parallel.

At this point I know very little about the code itself to make a more specific assessment of my needs. However, my question is what might be the very essential features I should keep in mind while buying a workstation. For example, things to keep in mind if eventually I want to transition to HPC, things to keep in mind if some amount of parallel processing needs to be done (or just having 2 or more cores in enough) etc.

$\endgroup$
5
  • 4
    $\begingroup$ I can almost garentee we will need more information to give relevant answers. Do you have any idea what packages/libraries you will use? Or will you be rolling all of your own code (not recommended to say the least)? I recently spent close to 2 months speccing out a rackmount server for my own grad school career, and at the end of that time still ended up guessing on a lot of my requirements. Knowing what you need comes with experience with your code. $\endgroup$ Commented Jan 29, 2013 at 2:25
  • $\begingroup$ I fear you are asking for the silver bullet, ... Maybe the only general advice is to have an extra gpu dedicated to computation only. $\endgroup$
    – Stefano M
    Commented Jan 29, 2013 at 8:01
  • 2
    $\begingroup$ Sankaran, perhaps you could rephrase the question to ask about what features of a new computer are the most relevant? As Godric mentioned, specifying the exact type of computations you are interested in doing and what type of software development you will be doing will be a help. Another really important question is whether you have access to HPC resources, because I usually recommend that people match hardware with their big machine whenever they can. $\endgroup$ Commented Jan 29, 2013 at 11:26
  • 2
    $\begingroup$ In addition to the points Godric Seer and @AronAhmadia made, I'm also concerned that answers to your question in its current form (which reads like a request for a shopping recommendation) will have a rather short half life, as hardware evolves quickly. Maybe it would be better to turn the question around: What are the computational bottlenecks and possibilities for parallelization in molecular dynamics (SIMD vs. multithread, memory bandwidth etc.)? The answers would tell you where to put your money. $\endgroup$ Commented Jan 29, 2013 at 12:58
  • $\begingroup$ Thanks Godric, Stefano, Aron, and Christian. I have tried to make the question more specific. Of course I do realize that this is a question with no specific answer. My only goal is to buy myself a decent starting machine so I can explore, something that will let eventually get the basics needed to transition to HPC. $\endgroup$
    – Sankaran
    Commented Jan 29, 2013 at 19:00

3 Answers 3

2
$\begingroup$

There are quite a few unknowns in your question, so I'll try to make this answer as broad as possible.

By the sound of it, you're considering writing your own MD code. Writing an MD code is easy, but writing a good, i.e. efficient and correct, MD code is very, very difficult, not to mention time-consuming. Unless you're studying some special case of physics or geometry which can not be handled by existing MD codes/libraries, or you are a Computer Scientist looking at some new algorithmic challenges, I would advise you first try to use existing software packages.

If your MD requirements are relatively standard, i.e. no special potential functions or interactions, then I would strongly recommend using one of the most popular Open-Source software packages such as NAMD or GROMACS.

If you have any exotic requirements, you could look at MD libraries such as MMTK (in Python), OpenMM (in C), or mdcore (in C, note tat this is my own code). These allow you to do most of the nuts and bolts bits of MD simulations, but also let you access and manipulate the particle data directly.

With the exception of MMTK, all of these codes/libraries can use GPUs. If you're looking to run long simulations efficiently, then GPUs are definitely the way to go, especially in terms of their bang/buck ratio. GPUs can also be used to run relatively large simulations as most models currently have several gigabytes of memory on board. We regularly use NAMD's STMV setup as a benchmark, which consists of more than one million particles. Also, if you have a machine with multiple GPUs, you can run several simulations in parallel, one on each GPU.

In summary, I would not recommend writing your own code unless that is the ultimate goal of your research. Stick to existing packages and/or libraries, depending on your needs, and keep in mind that GPUs are currently the most efficient workhorses for MD simulations.

$\endgroup$
1
$\begingroup$

Here are three architectures you could evaluate against your needs. Considering them may help you formulate your needs more concretely. If you, as Pedro suggest, base your work on an existing software package (and I think you should) compatibility with that package will help narrow down the alternatives.

  1. You could consider something from the Intel Xeon Phi family, which you can slot into a PC cabinet and which sets you back about $2700.
  2. Go with a GPU-based program
  3. Run things initially on virtual machines in the cloud. Easy to scale up and get a feel for just how much parallellism you actually need. (won't go down well with licensing of some software packages)
$\endgroup$
0
$\begingroup$

In the simplest case, you can simulate an HPC environment using a computer with 2 or more cores. You can run both OpenMP and/or MPI in such an environment.

Typically, if you're doing large calculations on an HPC, you might use more than one compute node. This means there are two 'computers', communicating across a network. This imposes some constraints compared to a single multithreaded compute node:

  • OpenMP is no longer sufficient for parallelization, at least on its own. MPI becomes the de facto standard
  • the network speed becomes a huge bottleneck for computation

Now this doesn't mean that you can't run HPC code if you only have a single 2-core PC. You can. And the easiest way is to use MPI for parallelizing your code, rather than OpenMP, or pthreads and so on. However, if you can get access to two or more multicore PCs, with a fast network between them (at least Gigabit), then this will give you a better feel for what is possible.

So much for multicore processing using MPI. Another thing to think about is GPGPU. Clusters nowadays often make GPUs available to you, which you can use for linear algebra, using libraries such as gnumpy in python, or similar. If you want to be able to experiment with GPGPU, you will probably want to either:

  • get a computer with a GPU that can run CUDA code, ie an nVidia GPU
  • get a computer that can run OpenCL. In fact, Intel processors since last year (Ivy bridge onwards) contain an OpenCL-compliant GPU. AMD processors also contain OpenCL-compliant GPUs.

So, in summary:

  • the simplest system to experiment with MPI would be a dual-core CPU
  • for more realistic experimentation, you want two networked multi-core PCs
  • you might also consider obtaining either a CUDA or OpenCL compliant GPU, or making sure that your CPU contains an OpenCL-compliant GPU.
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.