Search code examples
c#visual-studio-2010multicorecompilation

How to compile C# for multiple processor machines? (With VS 2010 or csc.exe)


Greetings!

I've searched for compiler (csc.exe) options at MSDN and I found an answer here, at Stackoverflow, about compiling with multiple processors. But my problem is about compiling for multiple processors, as follows.

The university where I'm graduating has a 11 machine cluster (which has 6 quad-cores and 5 four-core bi-processed machines). It runs under linux, but I can install MONO there. And instead of compiling with multiple processors or cores, I want to compile for multiple processors machine. So:

  • Is there any particular detail on how to do it or the CLR on that system should handle the execution to spread it across the cores?
  • If there's a way to do this, how can I do it with VS2010 or with csc.exe command line compiler?

Thanks in advance and I'm sorry if this question makes no sense. I really don't know how to handle multiple cores, as I'm a mere physicist, not a computer scientist! :)


Solution

  • Since it is a cluster, you have to rely on some form of a message-passing parallelism, no compiler will transform your code automatically. At least, a good old MPI is supported: http://osl.iu.edu/research/mpi.net/