Choice Overload In Parallel Programming
scott3778 writes to recommend a post by Timothy Mattson over at Intel's Research Blog. He argues, convincingly, that the most important paper for programming language designers to read today is one written by two social psychology professors in 2000. This is the well-known academic study, "When Choice is Demotivating: Can One Desire too Much of a Good Thing?" "And then we show them the parallel programming environments they can work with: MPI, OpenMP, Ct, HPF, TBB, Erlang, Shmemm, Portals, ZPL, BSP, CHARM++, Cilk, Co-array Fortran, PVM, Pthreads, windows threads, Tstreams, GA, Java, UPC, Titanium, Parlog, NESL,Split-C... and the list goes on and on. If we aren't careful, the result could very well be a 'choice overload' experience with software vendors running away in frustration."
http://www.columbia.edu/~ss957/whenchoice.html
Those who would give up essential liberty to purchase a little temporary safety, deserve neither liberty nor safety.
Ok, there's a lot of different concurrency packages...but there's a lot of different programming languages, too. I could think of at least two dozen, and you probably could too. That make it hard for you to sit down and write code? No? Just like most code gets written in C or Java or any of a small handful of scripting languages, there's a few standout parallel programming packages (pthreads, MPI, Java's built-in). Cilk? Who uses Cilk? If you want to write threaded code in C, you probably use pthreads, because that's what everyone else uses and has experience with. Not much of a choice overload. Unless you're researching concurrency packages, you don't need to know about most of the stuff on that list.
F# is an implementation of ocaml on .net, so it benefits from microsoft's fast multithreaded garbage collector. Also you get lots of libraries and documentation for free. I've switched most of my preliminary programming to F#, to be reimplemneted in C# or C++ depending on what's needed. The reimplementation's always between 4 and 10 times as big (in terms of lines of code).
It's useless in cases where you don't have shared memory (though, really, most "general-purpose" solutions are going to be useless in this case).
It's implementation is, essentialy, compiler magic. This automatically rules it out in a lot of cases where you need precise control of what your code is doing. If, for example, you need logic to spin for a few cycles while a DMA operation completes (so as to not interrupt/stall something else - and yes, people do actually optimize to that level on some platforms) you can't really add that to OMP unless your compiler vendor is willing to make the change for you. With a library based solution you can grab the code and hack your little change into the scheduler without relying on third parties who may or may not be willing to accomodate you.
That said, it's certianly not useless. I mean, it's damn amazing when it comes to quickly hacking some parallelism into a loop that wasn't really designed with multi-threading in mind.
Craft Beer Programming T-shirts
Just use pthreads and forget that other nonsense.
I am not sure you understand the problem, it is *not* how to write a multithreaded program. It is how to write "normal" code, say a for loop, that will automatically be executed in parallel if multiple cores are present.
Parallel programming has many facets. Libraries like OpenMP can not be compared to Windows threads, for example: the former is a mechanism for doing task/data parallelism at language level, the latter offers the primitives for making threads. PThreads is a thread API similar to win32 threads. I don't see how there is an overload of choices, really.