Note that there are some explanatory texts on larger screens.

plurals
  1. POEigen3 matrix multiplication performance dependent of the processor?
    text
    copied!<p>I have been working with computer matrix multiplications on last months and I have made some tests using openMP and eigen3.</p> <p>The tests were made on the follow machines:</p> <p>Computer 1:</p> <p><strong>Intel Core i7-3610QM CPU @ 2,30GHz / 6 GB ddr3</strong></p> <p>Computer 2:</p> <p><strong>Six-Core AMD Opteron(tm) Processor 2435 2.60 GHz (2 processors) / 16 GB</strong></p> <p>For the openMP the follow matrix-matrix multiplication algorithm was used:</p> <pre><code>void matrix4openmp(void) { int j; #pragma omp parallel for for (j=0;j&lt;N; j+=2){ double v1[N],v2[N]; int i,k; for (i=0;i&lt;N; i++){ v1[i]=b[i][j]; v2[i]=b[i][j+1]; } for (i=0; i&lt;N;i+=2){ register double s00,s01,s10,s11; s00=s01=s10=s11=0.0; for (k=0;k&lt;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; } } </code></pre> <p>The results were the follow:</p> <p>_________________________Computer 1__________Computer 2</p> <p>Sequential________232,75600___________536,21400</p> <p>OpenMP____________2,75764____________7,62024</p> <p>Eigen3_____________3,35090____________1,92970</p> <p>*The time is in seconds. </p> <p>*The matrix sizes were 2700 x 2500 and 2500 x 2700. </p> <p>*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: <a href="http://pastebin.com/Pc9AKAE8" rel="nofollow noreferrer">http://pastebin.com/Pc9AKAE8</a>.</p> <p>*SSE2 instructions were activated for the eigen3 tests.</p> <p>*OpenMP uses the default cores, this' all the cores that windows detect including virtual ones.</p> <p>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.</p> <p>Any idea why I get this results and why eigen3 isn't so fast in the computer 1 as in computer 2?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload