Results 1 to 7 of 7

Thread: Open MP faster on dual core, slower on quad core

  1. #1
    Join Date
    Apr 2010
    Posts
    182

    Open MP faster on dual core, slower on quad core

    I am testing utilize of OpenMP to create utilize of multi-core processors. An illustration to compute and pi originates on the web works and runs faster than the solitary core equivalent. Additional than the code snippet beneath (from a routine to do matrix inversion) come into view to run and demonstrate% CPU usage on dual processors, additional than in fact takes longer to run than the solitary core processing equivalent.

  2. #2
    Join Date
    May 2008
    Posts
    816

    Re: Open MP faster on dual core, slower on quad core

    There is a lot of transparency in OpenMP. It determines to work slower unless the loop takes a considerable fraction of a second single threaded. In addition, if the task if memory bandwidth bound to a certain extent than compute or accumulation bound, it determines to run no faster parallelized, not considering of the API used. At least on the majority single-socket hardware. You have encompassed to be familiar with your system architecture here.

  3. #3
    Join Date
    Oct 2005
    Posts
    924

    Re: Open MP faster on dual core, slower on quad core

    In the most recent illustration, I not am able to imagine why parallel segment would be used, to a certain extent than parallel do, nor why the inner loop would be selected for OpenMP parallel. If threaded parallelism is compulsory without several consideration given to optimization, /Qparallel would be preferable, even although tranquil not often successful. As to the minimum tribulations size for effective OpenMP parallel, I encompass an illustration which achieves excellent threaded scaling on Core 2 Duo, when the non-threaded description takes merely 1 millisecond. Of course, this is an ideal case; the accumulation sharing is successful, as are the persistent threads left from a preceding parallel region. The Intel OpenMP run-time does demonstrate a reduced overhead, compared by means of the Microsoft and gnu libraries.

  4. #4
    Join Date
    Aug 2009
    Posts
    652

    Re: Open MP faster on dual core, slower on quad core

    The fundamental point, that OpenMP parallelism determine to not have encompassed an advantage for a straightforward inner loop of length 1000, does be relevant to the posted case. I am an OpenMP beginner, and I am experimenting by means of uncomplicated illustration on a quad-core CPU. When I parallelized a matrix-vector creation, I got a diminutive speed-up for 2 threads, additional than a slow-down for 4 threads. I would be extremely appreciative if someone cleared it out for me why there is a slow-down. When the code beneath is executed by means of matrix dimension of 18000, the elapsed time.

  5. #5
    Join Date
    Aug 2009
    Posts
    922

    Re: Open MP faster on dual core, slower on quad core

    The majority OpenMP compilers determine to go behind your code literally and not endeavor loop nest optimizations which be dissimilar from your requirement of the loop index used for parallelization, even when you decide compiler flags which might do so when parallelization is turned off. It might be motivating if you would tell us the consequence of thread placement (KMP_AFFINITY or GOMP_AFFINITY, for my 2 preferred compilers) as well as the consequence of switching the loops. It give the impression of being as if you are testing essentially how well threading be able to deal by means of DTLB misses, and you are practically up to full bus bandwidth limited presentation, by means of one thread. As you have not uncreative for accumulation locality, you gain presentation only when you spread your job across the entire cache.

  6. #6
    Join Date
    Nov 2005
    Posts
    2,483

    Re: Open MP faster on dual core, slower on quad core

    I consider that MKL does not attempt to thread. GEMV, in view of the fact that the "vector inner" part of the slogan essentially be supposed to come first. You be supposed to at least evaluate your presentation by means of what you get by means of standard BLAS SGEMV vectorized, by means of and without threading. A number of people similar to brag regarding maximizing OpenMP scaling even when it is gained at the expenditure of total presentation; for that purpose, you be able to sometimes leave out the vector inner part, as it is easiest to get superior scaling by making the solitary thread performance as bad as probable.

  7. #7
    Join Date
    Jan 2006
    Posts
    3,792

    Re: Open MP faster on dual core, slower on quad core

    You would necessitate locating an effective method to obstruct the operation so as to facilitate vectorization and preserve accumulation locality in every thread. Assuming you are using an Intel quad core, you might be capable to take advantage of the accumulation sharing connecting cores 0,2 and 1,3, and you positively necessitate to obstruct so that the 2 threads on the similar cache do not fight every additional. I be familiar with that MKL has matrix-matrix product parallelized additional than they did not do GEMV. I determine to evaluate my illustration by means of SGEMV and observe if it in addition slows down when I run it by means of 4 threads. Otherwise, I be familiar with it does not present any speed-up, I am sure on that.

Similar Threads

  1. Is the Toshiba Excite 10 LE quad core or dual core?
    By Sar-Had-Pawar in forum Portable Devices
    Replies: 3
    Last Post: 10-05-2012, 03:32 AM
  2. iMac- dual core vs. Quad core
    By Ryszard in forum Motherboard Processor & RAM
    Replies: 8
    Last Post: 26-09-2011, 10:31 PM
  3. Is Dual Core Optimizer needed after upgrading to Quad Core or 6 Core AMD?
    By Bhuvana21 in forum Motherboard Processor & RAM
    Replies: 4
    Last Post: 31-05-2011, 08:31 AM
  4. Replies: 6
    Last Post: 28-04-2011, 10:28 PM
  5. HP Laptop, Quad-core vs. Dual-core?
    By Gajalakshmi in forum Portable Devices
    Replies: 6
    Last Post: 27-09-2010, 07:22 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,711,405.58929 seconds with 17 queries