# External hardware resources for running long and computationally intensive simulations

I've written code for an obstructed random walker simulation and I want to run long simulations (6 hours or more on my computer). I don't want to run this simulation on my computer because I will want to run multiple simulations simultaneously and I don't want to have to worry about not having access to my computer's hardware resources, overheating, etc.

Ideally, I'd like to run the simulation on a supercomputer, but I assume that would be expensive. Are there any companies/tools that would take my code/program run simulations and return the results to me?

My source code is in C# (which is obviously part of the reason these simulations take so long).

• If you do this sort of thing a lot, I'd suggest putting in some time to learn C. It'll not only let you write faster simulations, but it will compile on pretty much any computer system you get access to (to be fair, some conditional preprocessing may be required). That way you won't have to deal with the compatibility issues Bill's answer mentions. – David Z Feb 21 '12 at 5:23
• Thanks David, I know C and often use it for physics simulations. I wrote this particular simulation in C# because I am more comfortable with graphics libraries and UI development in that language. I am considering porting the necessary parts of the code base to C but that would be annoying. – Ami Feb 21 '12 at 5:31
• Ah, OK... to be honest I thought it rather strange that you would write a computationally intensive program in C# when you know C! Anyway, basically the point is that C# seems to be a far less than ideal language for scientific computation. I'm not sure what about C annoys you (if it's the lack of memory management, I can agree), but I think it's really worth it for this type of project. You can always keep the graphical part in C# and use sockets or something to pass data back and forth. – David Z Feb 21 '12 at 7:19
• I agree with David completely. From the other side, we have resources, how could I contact you? – Open the way Feb 22 '12 at 15:22

Most supercomputing resources in the US are free to use for those associated with a US-based academic or research organization. You must make an application which is reviewed in some way (depending on the center or program that you apply to). For example, the US National Science Foundation funds the XSEDE project which federates a number of large-scale resource providers to allocate time on their supercomputers to the national research community. If you're not in the US, there are similar programs in the UK, EU, Australia, and China that I am aware of.

One problem in your case is your use of C#. No supercomputing resource provider that I know of supports it. The NSF did fund a project to buy and provide time on Microsoft's Azure cloud platform, but I do not know how time is allocated since it's not part of XSEDE.

• C# programs are conceivably portable to supercomputers via Mono, but I agree that it would probably be easier to just rewrite the computational routines in C. – Aron Ahmadia Feb 21 '12 at 8:24
• Agreed. I didn't mean that it wasn't possible, just that I didn't know of anywhere that officially supported C#. – Bill Barth Feb 21 '12 at 13:00

You could consider using the Amazon web services. There is a free tier of usage which might work for you depending the computational resources required for your application. And if you need something more, stuff really isn't that expensive. There is a bit of a learning curve to get going on these resources.

• Interesting idea! Unfortunately, Amazon's free tier instances are really not suitable for doing any kind of real computations. The Cluster Compute and GPU-enabled Cluster instances are \$1.30 and \$2.10 an hour respectively. You can get this for much cheaper with spot requests, but it will never be free. – Aron Ahmadia Feb 21 '12 at 8:21
• Agreed, but still much cheaper if you just need a few one off computations and really don't want to move away from C#. Also, I wasn't sure the computational cost of his application given that running on his person computer was an option. – Jeremy Kozdon Feb 21 '12 at 16:36

Another option is to use PiCloud (http://www.picloud.com). PiCloud runs on top of Amazon Web Services. You get 20 free (c1) core hours, it's really easy to offload long-running computation, and you don't have to manage any servers.

If your C# program works with mono, you can use the public mono environment, "/picloud/mono".

As a note, most supercomputers today deal with CPU requirements on the order of hundreds of thousands of CPU hours. I don't know what you need but if you want to run "multiple" 6-hour jobs at the same time, the simplest method may simply be to buy a \$800 quad-core desktop without monitor and run things on there. Or find someone who has such a desktop to give away.

I do not know whether you are in an academic research group or just a curious scientist. In the former, I would search for another research group, with similar interests and access to supercomputing resources and propose them a collaboration.