C# HPC - MPI and OpenMP [closed]
Asked Answered
B

2

6

I'm looking for some guidance with C# and parallel programming. I know that MPI .NET exists, and OpenMP is not supported. My question then: is there some other library (TPL?) or feature that can accomplish the functionality that OpenMP provides? I'll be working (hopefully!) with the latest release of mono (C# .NET 4.0). The code will be running on a Cray XT6M, so utilizing resources one each board and on a node will be important. Thanks for your time!

Brut answered 26/1, 2012 at 21:24 Comment(6)
.NET 4 do support parallel programming. u don't like microsoft's way of dealing with parallel tasks ?!Tinatinamou
Yea... when you have 1248 cores simply invoking a couple of threads won't cut it. Thanks for trying though.Brut
Well, in fairness part of the question was asking about OpenMP, and there are several threading options within C#. For the distributed memory stuff, though, I don't know -- MPI.NET looks like it was abandoned in late 2008, and I'm not sure what other options exist at a similar middleware level. Almost certainly nothing that would be tuned for the Seastar+ interconnect.Hiett
I could have been more specific about the hardware/question. I didn't know MPI .NET was abandoned in 2008 though. Going to be an interesting project!Brut
take a look at ZeroMQ or any of the AMQP protocols that support C#Atterbury
I thought I updated this, yikes! I went with C and combinations of OMP and MPI. Converted a couple of Fortran programs to C and compared speeds. The level of performance expected of such a system/program really benefits from the level of control those languages give you.Brut
C
6

You could have a look at Dryad, a parallel programming approach by Microsoft, where C# is actually a first class citizen. Apparently Microsoft uses it for Bing and training the body tracking algorithms for Kinect [2]. It uses more coarse grained data parallelism than OpenMP. It is more like processes with pipes than threads with shared memory.

I fear that setting it up on a Mono/Linux/Cray system will probably be difficult to say the least. That said C# is not your typical HPC language. It will generally be very tough to run C# efficiently at this scale / type of system. I would recommend to evaluate porting your software to a "first class" HPC language, e.g. C, Fortran.

Also as a note: OpenMP does not scale over a full Cray XT6M machine (or any HPC cluster for that matter), you can use this form of parallelism (shared memory). To communicate between nodes you need another form of parallelism, typically MPI. You can also use MPI within a node.

Cataclinal answered 10/8, 2012 at 9:20 Comment(2)
Thanks, this looks interesting. I completed the project in C using hybrid MPI/OMP. Looking back C# might be able to run in such an environment, and may have advantages as Dryad and similar projects move forward, but the control and speed of C or Fortran is just too important to pass up in an HPC program.Brut
I didn't actually realize the age of this question. I'm glad you were able to compelte the project!Cataclinal
P
2

C# is a wonderful language for many things, but on its own, it's not going to take full advantage of that Cray. The developers at Microsoft optimize the libraries for a dozen cores or less, likely, and the developers at Xamarin worry more about cell phones. You want MPI or another parallel programming language underneath you. You can do that with C# and several other languages (python is popular in the HPC world, too), but the key is sitting atop the right libraries. TPL won't cut it at that scale of parallelism.

Pseudaxis answered 3/3, 2013 at 1:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.