Slashdot Mirror


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."

33 of 288 comments (clear)

  1. Fortran by confused+one · · Score: 3, Funny

    Because I'm sick (in the head) I say we go with the Fortran option!

    'twas my second language; after BASIC. Ahhh, the fond memories...

    1. Re:Fortran by Anonymous Coward · · Score: 4, Insightful

      Uh, most good parallel programming frameworks are cross-language. MPI has APIs in C, Fortran, and C++ (I believe) ... so does OpenMP. Also, most supercomputing programs are either written in C or Fortran. So, YES!, choose Fortran (and MPI) for all of your supercomputing needs. Or write it in C. Or write subroutines/functions in both languages and compile away (the newest version of Fortran will be fully C-compatible).

      The main differences between these parallel programming frameworks are ... the actual implementation of parallel programming! Is it distributed (MPI) or shared (OpenMP)? Does it have elegant syntax for accessing variables across processors (Co-Array) or just function based? Because there is no one true way to write a parallel program (it really depends on the algorithm), there will always be multiple frameworks to choose from. O well! The people who write parallel programs are typically smart enough to deal with excessive choices. (No comment on others).

    2. Re:Fortran by try_anything · · Score: 3, Insightful

      Because there is no one true way to write a parallel program (it really depends on the algorithm), there will always be multiple frameworks to choose from. O well! The people who write parallel programs are typically smart enough to deal with excessive choices. (No comment on others).

      You're right; there's nothing more tragic than watching a programmer butcher his well-written program in a futile attempt to make it fit the only concurrency model he knows. Closely associating a language with a single, well-designed concurrency framework would at best do the same thing for it that Rails did for Ruby: bring it a flurry of popularity in the short run and damage its reputation in the long run as people doggedly apply the framework to unsuitable problems and blame the language for the results.

      On the other hand, at some point we're all supposed to face up to the end of the free lunch, and a fad for an exotic kind of concurrency might be a clumsy, spasmodic step in the right direction.
    3. Re:Fortran by TeknoHog · · Score: 3, Interesting

      I say we go with Fortran, because it supports array programming natively without any of this bolt-on stuff like OpenMP.

      --
      Escher was the first MC and Giger invented the HR department.
  2. link to the paper by skywire · · Score: 5, Informative
    --
    Those who would give up essential liberty to purchase a little temporary safety, deserve neither liberty nor safety.
    1. Re:link to the paper by SurturZ · · Score: 3, Interesting

      Someone told me once there was a study where people also are more likely to choose something out of a group if it is clearly superior to another item in the group.

      I found this true for myself once, I was looking to buy a DVD and had the usual overload of choices. I noticed that there was a copy of "LXG movie only" for $30, but also a copy of "LXG with special features" for $20. This triggered me buying the LXG with special features. In hindsight, it was the fact that I "knew" I was getting a "bargain" that tipped me over the edge. No doubt it was a deliberate marketing ploy.

      A bit sexist to say this, but women seem to be especially targetted by "discount marketing" of this sort. Mainly with shoes :-)

  3. Don't worry.... by Anonymous Coward · · Score: 5, Funny

    Microsoft will come along and tell you what your choice will be.

    1. Re:Don't worry.... by tomhudson · · Score: 5, Insightful
      > "Microsoft will come along and tell you what your choice will be."

      And they'll change it every three years, so as to make more money off of certifications, software sales, and save money by not having to fix bugs in that "old, obsolete" stuff that was so "shiney new" stuff so recently.

      If Microsoft wants to tell me what to do, they'd better be ready to sign a check with 6 figures to the left of the decimal point ...

  4. Why pick just one? by Anonymous Coward · · Score: 4, Funny

    Write concurrently in two languages, then you're sure to make full use of available CPU cores.

  5. It's drivel by Harmonious+Botch · · Score: 3, Insightful

    This whole idea of 'choice overload' is so much drivel, IMHO. And, no, I'm not trying to flame here.

    Have you ever known anybody to say: "There are just too many girls to choose from, I guess I'll go hide in the basement."?
    Or: "There are ten thousand restaurants in this city. I just can't cope. I'm going to stop eating."?

    A better label for the whole subject would be: " How a small minority of people fail to learn tree-pruning techniques, and dissolve in panic." Then we all could say: "Yep, sounds like my ex-girlfriend. Been there, done that. Next?"

    1. Re:It's drivel by nycguy · · Score: 5, Insightful

      Actually, both of your analogies are poor. The problem with "choice overload" in the software context is that with so many platforms to choose from, no one platform builds the critical mass to be useful for a broad range of problems, and developers are almost certain to build systems and components that do not interoperate because they are built in separate frameworks. In software, there's a benefit to having everyone chose the same platform to build on.

      On the other hand, I don't know about the benefit of everyone chosing the same girl or the same restaurant, though--unless you like gang-bangs, long lines, etc.

    2. Re:It's drivel by Anonymous+Brave+Guy · · Score: 3, Insightful

      Have you ever known anybody to say: "There are just too many girls to choose from, I guess I'll go hide in the basement."?

      Have you never heard the expression "too much love will kill you"? Never been in (or seen) a situation where someone is torn between a relationship with one person and with another, when they genuinely care for both?

      The results of such a dilemma are usually very unpleasant for the losing party, and all too often don't work out for the others either because there's that nagging doubt about whether the eventual choice was the right one. People can put off making that choice for a long time, just to avoid the sadness and doubts. And that's (usually) just with two alternatives.

      Now, clearly a choice between programming libraries isn't going to have the same kind of emotional effect on a normal person. (I'd suggest that if it does for you, then you need to reevaluate your priorities in life!) But the basic situation is still the same: analysis paralysis, where you're so afraid of making the wrong choice that you don't commit to any approach at all.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
  6. intel is part of the problem (sort of) by Grond · · Score: 4, Interesting

    Quoth the blogger: "With hundreds of languages and API's out there, is anyone really dumb enough to think "yet another one" will fix our parallel programming problems?"

    Yet Intel touts its Threading Building Blocks library as just such a fix to many parallel programming problems. Now, TBB is a very nice product, and in many ways it is superior to a lot of existing libraries, APIs, and languages, but one gets the sense that maybe the left hand doesn't know what the right hand is doing at Intel.

    I might also draw an analogy to the open source world, where there are often dozens of solutions to both simple/mundane problems (text editors, media players, command line shells, etc) and more complex ones (window managers, Linux distributions, etc). I wonder if the free and open source software world wouldn't also benefit from a "culling of the herd," so to speak.

    1. Re:intel is part of the problem (sort of) by Arabani · · Score: 3, Insightful

      Yet Intel touts its Threading Building Blocks library as just such a fix to many parallel programming problems. Now, TBB is a very nice product, and in many ways it is superior to a lot of existing libraries, APIs, and languages, but one gets the sense that maybe the left hand doesn't know what the right hand is doing at Intel. Do note that this is from the blog of a single developer at Intel. It's really just his own opinion of the situation, and nothing more. There's a big difference between what one guy thinks and says, and what the marketing department decides to do.
  7. good lord. by russellh · · Score: 4, Insightful

    and I say that as an atheist.

    Ok, first: he writes as if all choices are equivalent. One jam might as well be the same as another, they just differ by taste. It's not like I walk into the store already invested raspberries. It's not as if Java programmers are going to decide that the Fortran parallel library is better, so why not just switch to Fortran.

    Second, I doubt explicit parallel programming is going to be mainstream anytime soon. No, make that ever. Ever! Parallel programming will only happen in the mainstream when it is handled implicitly by the language, like a dataflow language. Asking normal programmers to deal with parallel programming is trouble when basic logic eludes most of them.

    Third, all you people, including the author of TFA, who think that more than one or two standards is bad thing ("the great thing about standards is there are so many to choose from!") it's time to wake up: the world is not about to consolidate. The future is going to require C3PO and R2D2: there will be so many fricking languages and standards that your translator is going to require AI and legs to come along with you. For every one thing that fades away, eventually, probably 10 or 100 replace it. The future is a big mess.

    --
    must... stay... awake...
  8. Choices are Good by ChaoticCoyote · · Score: 4, Insightful

    Choice is good if it provides different tools for different tasks. The list provided is somewhat silly, since several of the technologies address completely different issues and applications. There's a reason Sears sell thirty different shapes of hammers -- all nails are not the same.

    After considerable deliberation and experimentation, I've shosen OpenMP for most task-parallel applications. The syntax is simple, it operates across C, C++, and Fortran, and it is supported by most major compilers on Linux, Windows, and Sun. The only quirk has been problematic support in GCC 4.2, but that will likely be cleared up within a few months. For cluster work, I tend to use MPI, because it has a long history and good support. I'm sure other tools have good versatility in environments different from those I frequent.

  9. Bullshit by n+dot+l · · Score: 4, Insightful

    They created two displays of gourmet jams. One display had 24 jars. The other had 6.

    The larger display was better at getting people's attention. But the number of choices overwhelmed them and they just walked away with out deciding to purchase a jam. Er. Sorry, in my experience programmers tackle parallel programming because it's somewhere in the requirements of their program that they do so, not because it sounds cool. It's not like multi-threading is a random fad or anything. The only way this would have been a relevant comparison is if the group of people had been pre-screened to those who definitely intend to buy a Jam of some sort.

    On top of that, if this really is something that affects programmers then why the hell aren't we all rendered utterly useless by the number of programming languages? Or all the possible ways one could format code? Etc.

    But hey, the guy's writing in a "research" blog and, as in academia, when you don't have anything real to contribute you can cite something completely unrelated and pretend it has relevance.

    Honestly, this sounds vaguely like "there's too much to choose from, so everyone just use Intel Thread Building Blocks, K? You can't possibly do better so just use our stuff because we cover all cases..."
  10. Re:Hmm by Frumious+Wombat · · Score: 3, Interesting

    It's designed for shared memory boxes. This is great if you own an E25K, not so great if you've chained together a couple thousand itaniums.

    --
    the more accurate the calculations became, the more the concepts tended to vanish into thin air. R. S. Mulliken
  11. libraries, books, standardization, ... by bcrowell · · Score: 4, Interesting

    I've been gradually trying to learn more about functional programming, partly because I think fp techniques and ways of thinking come in handy even if you're programming in a procedurally oriented language, and partly because fp seems like a paradigm that is likely to get more and more useful as we get machines with more and more cores. Okay, fp!=parallel, but, e.g., one of the big selling points of Erlang is supposed to be that it lends itself to completely transparent use of parallel processors.

    The choice overload does seem like kind of an issue to me. For as long as I continue to keep programming comfortably in the procedural languages I'm comfy with (e.g., perl), I'm never going to really wrap my mind around the radically different ways of thinking that you get in a more fp world. I'm been thinking for a long time that it would be fun to do a coding project in ocaml ... or haskell ... or lisp ... or erlang ... or -- you get the idea.

    The trouble is, it's really not clear what to hitch my wagon to. Ocaml seems to have a very high quality implementation, but its garbage collector isn't multithreaded, the only book you can buy is in French (it's nice that you can download the English version for free, but I'd prefer to buy something bound), and the availability of libraries (and documentation for them) isn't quite as wonderful as I've gotten used to with perl. Lisp could be cool, but I hate the fact that it's not standardized, and I'm not convinced that eschewing arbitrary syntax really carries more pros than cons. Haskell? Maybe, but it sounds like putting on a hair shirt. The list goes on. I really feel like a deer in the headlights.

  12. Silly... by ed.markovich · · Score: 4, Insightful

    That's just silly. There are two types of programmers that could be making choices like this, and neither one of them would suffer from too much choice.

    The first kind is a programmer just trying to paralelize existing code. In that case, the choice of threading platforms is pretty much obvious. Existing Windows code? Use windows threads. C/C++ on Unix? Pthreads probably. Java code? Java threads... Probably not even 2 seconds worth of thought will go into considering the alternatives (and that's probably fine)

    The other type of programmer is one who's actively looking to develop high performance paralelized software. I am talking about cases where performance is the primary objective and it drives the choice of programming language and platform. In these cases, the nuance of the different thread models might matter but the programmer of this type would be happy (rather than scared) to investigate all the options. After all, if he didn't care, he'd just go with the default choices like the first programmer.

  13. Re:Hmm by Bill,+Shooter+of+Bul · · Score: 3, Insightful

    The other choices are whats wrong with Open MP. The market needs to shake out the pretenders, before more people will make the correct choices. Thats the basic idea of this story.

    Having said that, I'm praying for Fortran 95 to take over. Its the only Malt Liquor I drink.

    --
    Well.. maybe. Or Maybe not. But Definitely not sort of.
  14. Video on the paradox of choice by grumbel · · Score: 3, Insightful

    A nice video about the The Paradox of Choice is available at Google Video. It is an interesting topic, but I don't think it applies all that much to parallel programming. The issue isn't that there are to many languages, but simply that there are a bunch of very well established languages that provide you little to no help with writing parallel programs properly, so everybody just continues to write their programs the way they did the last 20 years and thus takes little or no advantage of the available multiprocessor systems. And I doubt that just reducing the choice would help much at all about that right now, since we really still don't know how to write parallel programs on a large scale (i.e. in a way that everybody can and does it), so some more research and experimentation is needed.

  15. I am confused by LWATCDR · · Score: 4, Insightful

    Okay this list seems to be of several different technologies some of which over lap but several are used for very different tasks. You can not replace MPI with Pthreads.
    I don't see the problem. Just as we have many different programing languages these different interfaces all have different niches.

    --
    See my blog http://ilovecookes.blogspot.com/ for light hearted technical information.
  16. Ahh politics by Rufus211 · · Score: 3, Insightful

    It's kind of amusing looking at the languages he lists. MPI and OpenMP are by far the most-used environments, but pthreads and java should probably be next not at the end of the list. Ct, intel's new parallel language, hasn't even been formally announced yet let along there being any released documentation / code for it. CUDA however, Nvidia's competing parallel language, isn't even mentioned though it's been released for months now.

  17. Chose not to decide. by SoupIsGood+Food · · Score: 3, Insightful

    Part of the problem is that there isn't a good solution yet, so there's a lot of effort being put into trying to find a way for a bad solution to be more comfortable.

    Old-school iterative languages are a clumsy fit. They're night impossible to debug, and ones that let you do clever things at the hardware level will bring the whole project down in screaming flames when someone tries to get clever. So new libraries for old languages seldom fill the bill.

    New-hotness functional languages are insane. It's very, very, very difficult for seasoned programmers to get their heads around it, and impossible for n00bz who don't have heavy math backgrounds. Compounding the issue is that the syntax tends to be on the wrong side of horrible with little or no syntactic sugar to make the medicine go down. So re-imagining the paradigm is a bit like picturing a five dimensional sphere - great fun, if you're smart enough to do it. No-one is smart enough to do it.

    We're probably looking at a problem space that is best tackled by something that doesn't exist yet - an elegant, easily understood tool that simply makes sense, like objects or everything-is-a-file or scripting languages or regex. We're seeing so many different approaches to MPP because programmers are trying to figure out what that tool is. Once someone hits on it, the field will shake itself out.

    Since we haven't hit on it, too much choice is a good thing - it means people will take the initiative to do something on their own that works better, rather than trying to get something suboptimal to work because it's the "standard".

  18. Amen. by Blob+Pet · · Score: 3, Insightful

    And I say that as an agnostic.

    This guy must be missing the point of having different programming languages and environments - parallel or not. He lists ZPL, which is, first and foremost in my opinion, a really cool array-based language. There are certain things you're going to want to do in ZPL as opposed to non-array based languages, such as image processing (which lends itself really well to parallel processing IMHO). For things that don't require non-multi-dimensional array processing, you wouldn't want to use ZPL.

    --
    "...today consumers have been conditioned to think of beer when they see a bullfrog..."
  19. Re:No, it describes Analysis Paralysis by timeOday · · Score: 4, Insightful
    Meh. This is a good example of social sciences run amok. You do some interesting little study, but then try to apply it to everything in the world. Here are some reasons why the analogy between parallel programming languages and choosing a flavor of jam (yeah, that's what the study was about) might not hold:
    • Jams are functionally equivalent; the choice is inconsequential. This is far from the case with programming languages, which have meaningful differences.
    • Programming languages solve important problems, so a choice will be made. You can't just give up on the whole idea and walk away as with specialty jams.
    • There are so many different aspects of a language, you can have a great number of them, yet they can all be very different from each other.
    • Significant resources are devoted to developing and choosing parallel languages. This greatly increases the number of choices that can be evaluated. Consider how much time you spend shopping for the right car vs. a jar of jam.
    Now would be a terrible time to stop developing parallel languages, because the problem is just now coming to the forefront with the limits of single-core performance pushing back and multi-cores taking over. I'm suspect the parallel programing paradigm of the next 40 years hasn't been invented yet, and I'm almost certain it hasn't yet been popularized. So I say, let a hundred flowers bloom.
  20. Re:2-4 cores -- why bother? by thatskinnyguy · · Score: 3, Funny

    On the other hand, I heard that maybe 16 processors is an upper limit for the shared memory multi-threaded model because of all of the cache synchronization issues, and to go beyond that, you will need to go to clusters with communication between local processor memory. Beowulf Cluster on one processor die. How badass would that be? And by badass, I mean, totally 1337. And by "be", I mean be.
    --
    The game.
  21. The problem with parallel programming by 12357bd · · Score: 3, Interesting

    is not an excess of choice, is an excess of improvisation.

    Long story short... now that hardware speed is not easily doubled every few years, the industry has found a 'simple' way to keep pushing the weel, duplicate cores!. Well, it turns out that after decades of ignoring the parallel programming demand from academics now they are trying to push the 'somewath parallel' mess thay are producing.

    The problem is 'duplicated cores' != 'parallel programming', that's the problem.

    --
    What's in a sig?
  22. Re:Revenge of OO by AHumbleOpinion · · Score: 4, Informative

    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.

  23. Re:Spell checkers don't need all that many cycles. by Timothy+Brownawell · · Score: 3, Interesting

    Seriously, why would any developer waste time and money multi-threading something as inherantly serial as an event loop that doesn't come anywhere near saturating even a single core? Responsiveness. If my GUI program will occasionally do things that take a second or two, those things should be done in a second thread so the interface doesn't freeze up.

    What does a web browser need more than one core for? Because when I open some huge page (something like a big slashdot discussion) in a second tab, it freezes for a few seconds trying to render it. That sort of thing should go in an extra thread to prevent this.
  24. What "free lunch", though? by Anonymous+Brave+Guy · · Score: 4, Interesting

    I always find it amusing (in a sad kind of way) how people talk about Herb Sutter's "call to action" over this. It's not that I've got anything against Herb himself: he's a decent writer, an excellent speaker, and a guy who can use the word "expert" legitimately in areas like C++. But it's also not like he's the first guy to notice that modern desktop computer architectures have been heading for parallelisation rather than increased speed for several years now.

    Despite being right in the thick of this culture shift myself — I'm sure I'm not the only one here who has been talking about this for a while, and is just seeing management catch up — I don't think this is going to be that big of a deal for most people. The harsh reality, for the buzzword-wielding consultants rubbing their hands with glee at a new programming approach they can hype up, is that most people just don't need all this.

    Your average desktop PC is more than powerful enough for most things that most people do with it: Internet communications, writing documents, working with databases, shop floor software, and the like. As long as the operating system is reasonably smart about scheduling, the guys writing these common types of applications don't really have to know anything about multithreading, locking, message passing, and all that jazz. Similarly, your average mobile device has more than enough juice to dial another phone, write a quick e-mail, or capture a digital photo.

    At the other end of the spectrum, serious servers (database, communications, whatever) have been dealing with parallel processing of many requests since forever. High-end systems doing serious maths (the guys modelling weather systems, say) have also been using massive parallelisation on their supercomputers for zillions of years now.

    There is a gap between these different areas, which we might traditionally have called the "workstation" market: the guys doing moderate number crunching for CAD, scientific visualisation, simulations, and the like. Many modern games also fall into this classification. This market is ripe for a parallel processing revolution, because historically it hasn't followed this approach very much because the hardware wouldn't really take advantage of it, yet the extra power is genuinely useful. But I don't think this represents some huge proportion of the software development industry as a whole. The guys working in these areas tend to be pretty smart, and will no doubt adopt useful practices and conventions fairly quickly now that the hardware has reached the point that they are useful.

    As to what those conventions are, I just don't buy the whole "choice overload" theory. There are relatively few basic models for parallel processing: for example, you can have no shared state and communicate only through message passing, or you can have shared state. In the latter case, you then have the question of how to make sure that the sharing is safe, which leads to lock-based or lock-free approaches. Funky toys like transactional memory run at a slightly higher level than this, but they are ultimately constructed from the same building blocks, and again there are only a small number of approaches at this level to consider.

    I'm not familiar with all of those libraries mentioned in the story, but I'll bet that those three classifications (no shared state, shared state with explicit locking, shared state without explicit locks) probably cover the models used by most if not all of them. If you understand the trade-offs in those, you can produce a sensible design, and then the toolkit or framework you use to code it up is mostly just an implementation detail. Given that the trade-offs are pretty obvious and will often steer projects clearly in one direction, I don't think there's really that much to choose at all.

    --
    If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
  25. Parallel programming is just plain hard by pcause · · Score: 3, Insightful

    The overload is just a symptom if the real problem and that is that parallel programming is just plain hard. We've had these issues for over a decade and we haven't seen a step function in use of parallel programming. It is difficult for most people to think of many things happening at the same time and to design and debug this class of program. We tend to start by thinking of a task in serial steps and then look for ways to add a little parallelism.

    The folks who are low level systems programmers (OS and networks) tend to be folks who have an aptitude for thinking about parallelism and designing with parallelism in mind. There are a group of people in the scientific space who make use of parallelism, but then again they are Phd mathematicians and physicists. After that it drops off rapidly.

    Maybe it has something to do with he way we are educated. perhaps it is a more fundamental issue of brain wiring. After all, we c perform complex physical tasks in parallel, but maybe only a small segment of the population is wired to think about programming problems in parallel.

    The chip guys are throwing more cores at us and we can't create the software to fully utilize the hardware due to this issue. Perhaps it is time to take a step back and to stop trying to solve the problem by throwing more and different programming packages at the problem and examine why folks have so much trouble in this area.