Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9184649
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T19:06:20+00:00 2026-06-17T19:06:20+00:00

I have been working with computer matrix multiplications on last months and I have

  • 0

I have been working with computer matrix multiplications on last months and I have made some tests using openMP and eigen3.

The tests were made on the follow machines:

Computer 1:

Intel Core i7-3610QM CPU @ 2,30GHz / 6 GB ddr3

Computer 2:

Six-Core AMD Opteron(tm) Processor 2435 2.60 GHz (2 processors) / 16 GB

For the openMP the follow matrix-matrix multiplication algorithm was used:

void matrix4openmp(void)
{
    int j;

#pragma omp parallel for 
for (j=0;j<N; j+=2){
  double v1[N],v2[N];
    int i,k;
  for (i=0;i<N; i++){
     v1[i]=b[i][j];
     v2[i]=b[i][j+1];
  }

  for (i=0; i<N;i+=2){
     register double s00,s01,s10,s11;
     s00=s01=s10=s11=0.0;
     for (k=0;k<N;k++){
        s00 += a[i]  [k] * v1[k];
        s01 += a[i]  [k] * v2[k];
        s10 += a[i+1][k] * v1[k];
        s11 += a[i+1][k] * v2[k];
     }
     c[i]  [j]   =s00;
     c[i]  [j+1] =s01;
     c[i+1][j]   =s10;
     c[i+1][j+1]   =s11;
  }
}

The results were the follow:

_________________________Computer 1__________Computer 2

Sequential________232,75600___________536,21400

OpenMP____________2,75764____________7,62024

Eigen3_____________3,35090____________1,92970

*The time is in seconds.

*The matrix sizes were 2700 x 2500 and 2500 x 2700.

*The sequential algorithms isn’t the same of the OMP, it’s the most simple version of m-m multiplication and can be seen here: http://pastebin.com/Pc9AKAE8.

*SSE2 instructions were activated for the eigen3 tests.

*OpenMP uses the default cores, this’ all the cores that windows detect including virtual ones.

As you can see the OpenMP version is faster on the first computer (i7) than the eigen3 version. However for the computer 2 (2x Opteron) the performance of eigen3 complete beats the OpenMP version plus all the tests made in the computer 1.

Any idea why I get this results and why eigen3 isn’t so fast in the computer 1 as in computer 2?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T19:06:21+00:00Added an answer on June 17, 2026 at 7:06 pm

    Thanks for your answers.

    The huge difference between the sequential and the parallel versions is due to be different algorithms being used. The sequential version uses the usual naïve O(N^3) without any optimizations, whilst the parallel versions are optimized versions – using blocks. Using the same algorithm the sequential version times are about 10 (computer 1) and 50 (for computer 2) – sorry should have put these values in the first post.

    The difference between Eigen3 performance vs OpenMP performance in the first and second computer seems to be due the number of threads launched vs the number of physical processors available. We found that the performance of Eigen3 gets worse if the number of threads launched is bigger than the available number of physical processors and this is not the case for OpenMP

    In the tests the number of threads launched for both cases was equal to the number total processors (virtual + physical).

    In computer 1 the Eigen3 performance is worse because the number of total processors (virtual + physical – – due to hyperthreading) is greater than the number of physical processors.

    In computer 2 the Eigen3 performance is better because the total number of processors is the same as the number of the physical processors. If we use the double of number of physical processors for the number of threads the performance of Eigen3 also degrades and the openMP in fact improves a little.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been working on a django app on my local computer for some
I have IE8 installed on my computer and have been working on automating some
I have been working on this app for at least 3-4 months and just
I have been working with Zend for a few months now and am at
I have been studying computer vulnerabilities and have been working on this problem for
I have been working on the problem sets at Project Euler for some time
I've been using Joomla 1.6 locally on my computer. Everything's been working fine. I
I have a script that I've been using for a some time to easily
I have been using Netbeans for several months now and like it a lot.
I've been working for some time on my first website. I have the CSS

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.