Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

c++ / c# parallel programming

Options
  • 01-03-2008 2:45pm
    #1
    Registered Users Posts: 4,276 ✭✭✭


    Howdy,

    Do a lot of modelling in work with c# and c++. We've had guys come in from intel to tell us all about the wonders of their new compilers and how it would be of great use to us to speed up our analyitics.

    Does anyone else know of any decent frameworks or compilers designed for parallel programming ? Wanna take a gander into the world of it.


Comments

  • Closed Accounts Posts: 1,444 ✭✭✭Cantab.


    There's no such thing as automatic parallelisation I'm afraid... Sure the compiler can pick out bits here and there, but real parallelisation forces a re-design of your code.

    Using an Intel compiler gave me a 15% speed improvement (over gcc) in a verterbi-search type task.

    I'm considering parallelising my code but I haven't decided whether to use an FPGA, GPU or multi-core processors for this task.


  • Registered Users Posts: 4,276 ✭✭✭damnyanks


    Sorry what I really meant was are there any nice tools or add on's for either language to help develop parallel programs ? Sun were saying that sun studio is quite helpful but no idea how


  • Closed Accounts Posts: 7,563 ✭✭✭leeroybrown


    Most modern (C, C++, Fortran) compilers have some form of auto-parallelisation based on OpenMP threads. I'm sure Sun Studio will do something similar. Your milage will vary greatly when using these. Sometimes a code will naturally have a load of loops over arrays that will easily parallelise. The rest of the time there will be some but not necessarily any major performance win.

    If you want real performance gains in parallel then the typical things to do are to look at re-factoring and adding OpenMP directives to your code to increase thread parallel performance in the main processor intensive tasks, or for larger scale parallelism to look at message passing approaches (mainly MPI).

    The traditional domain of techniques such as these is scientific computing (HPC). The compiler technology and user tools for multi-core systems haven't made huge progress yet so it's just a case of life getting more awkward for the programmer at the moment.


  • Closed Accounts Posts: 1,444 ✭✭✭Cantab.


    damnyanks wrote: »
    Sorry what I really meant was are there any nice tools or add on's for either language to help develop parallel programs ? Sun were saying that sun studio is quite helpful but no idea how

    Looks like Intel do make some great tools. Plugs straight in to Visual Studio.

    http://www.intel.com/cd/software/products/asmo-na/eng/294797.htm

    I think these tools are designed for their x2, x4 and x8 core processors.

    I don't know how well they'd work on distributed processors where each processor has its own memory.


  • Registered Users Posts: 515 ✭✭✭NeverSayDie


    In terms of the C#, Microsoft have a framework called ParallelFX/Task Parallel Library (I think TPL is a component of the ParallelFX framework), that seems to be aimed at facilitating concurrency in .NET code. Haven't used it myself, I think they're in the "community preview" stage at this point. This MSDN stuff should have more info;
    http://msdn2.microsoft.com/en-gb/concurrency/default.aspx
    http://msdn2.microsoft.com/en-ie/magazine/cc163340(en-us).aspx


  • Advertisement
  • Registered Users Posts: 5,618 ✭✭✭Civilian_Target


    It also sort-of depends on the applications you have in mind.

    There's parallel programming in the "I have x cores" sense (x < 20), which is probably just most simply dealt with by some sensible use of threads. And then there's parallel programming in the sense that "I have 100 machines vector processors in a mesh array" which demands a pretty different approach using structured parallel programming languages like MPI.

    What's your target here?


  • Closed Accounts Posts: 81 ✭✭dzy


    There is also PLINQ - LINQ for parallel programming. I'm not sure if its in the latest release of .NET or whether its still being worked on.


Advertisement