June 16, 2006

Threading a calculation–heavy program

Threading a calculation–heavy program is unlikely to make it run faster/more efficiently. Discuss.

- 5 comments by 1 or more people Not publicly viewable

  1. It depends what you intend to thread. If you're using something like pthreads then on a single workstation then you are relying on the cpu being underutilised and that you can make use of spare resources which will vary with each system. Presumably at some point the results will have to be collated so that may require joining threads in which case the bottleneck will be thread doing the most work since everything else will have to wait on that. You may also need to consider how much switching will be done since there will be a performance hit if the system has to switch between many threads. Many threads doing very little is probably not a good use of resources. If a thread doing a long calculation is continually interrupted so that other threads run then it hamper its progress. You will also have to ensure code is thread safe which may increase the complexity of the program or development time. I guess these are some of the issues to think about when designing threaded programs.

    16 Jun 2006, 18:05

  2. I was hoping for a cheap speed up using

    #pragma omp parallel for

    when gomp in gcc 4.2 comes out (OpenMP) Programming threading "by hand" looks horrible.

    17 Jun 2006, 12:14

  3. got

    learn more and fast

    08 Aug 2006, 02:40

  4. Have you tried the Intel compiler? Its available “free as in beer” with some restrictions.

    I’ve dabbled with it and on my dual core system at least, the best I have got is to break even when going from one thread to two.

    I haven’t pinned it down yet, but suspect its a caching issue where the cores are not getting their data fast enough.

    I think I have ruled out thread locking to update my results…

    12 Oct 2006, 17:58

  5. julie

    learn more and fast

    14 Feb 2007, 13:21


Add a comment

You are not allowed to comment on this entry as it has restricted commenting permissions.

Trackbacks

June 2006

Mo Tu We Th Fr Sa Su
May |  Today  | Jul
         1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30      

Search this blog

Tags

Most recent comments

  • LK Bennett has seen the last of me. What a shame for them, as this was the first pair that I bought … by Tania on this entry
  • Connect laptop to desktop, boot laptop, connect to the internet using USB modem Go to the network co… by on this entry
  • I have a short question. I too have a desktop on which I want to install Gentoo, but no internet con… by mcbluegreen on this entry
  • Hi all! In response to all the complains regarding customers services…Don't bother calling them.They… by Susan on this entry
  • I have just written a very nice complaint letter about my shoes to the customer services department … by Monica on this entry

Blog archive

Loading…
Not signed in
Sign in

Powered by BlogBuilder
© MMXIV