Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
bench_mkl_lapack [2016/10/21 11:56] – [Benchmarks] adminbench_mkl_lapack [2016/10/21 12:35] (Version actuelle) – [Compile with LAPACK (and OpenBLAS)] admin
Ligne 1: Ligne 1:
 ====== MKL vs LAPACK ====== ====== MKL vs LAPACK ======
  
-We strongly encourage the use of MKL instead of Lapack because+We strongly encourage the use of Intel MKL instead of Lapack (with vanilla Blas) because
 MKL is more efficient and optimized for the CPU architecture. MKL is more efficient and optimized for the CPU architecture.
  
 +<note>The default BLAS is not parallel. It uses only 1 core</note>
 ===== Benchmarks ===== ===== Benchmarks =====
  
Ligne 58: Ligne 58:
  
 </file> </file>
 +
 +==== Compile with LAPACK (and BLAS) ====
 +
 +<code bash>
 +$ module load gcc
 +$ gfortran -O2 randomsys.f90 -o randomsys_lapack.exe -lblas -llapack 
 +</code>
 +
 +
 +
 +==== Compile with Intel MKL ====
 +
 +<code bash>
 +$ module load intel/14.0.2
 +$ ifort -O2 -mkl randomsys.f90 -o randomsys_mkl.exe  
 +</code>
 +
 +
 +
 +==== Results ====
 +
 +|N|LAPACK|MKL (1 core) | MKL (16 core) |
 +|4000|14s|6s|2s|
 +|6000|41s|12s|4s|
 +|8000|1m27s|25s|5s|
 +|10000|**2mn46s**|**45s**|**8s**|
 +
 +<note tip>For MKL, use ''OMP_NUM_THREADS'' env variable to select the number of threads to use</note>
  • bench_mkl_lapack.1477050965.txt.gz
  • Dernière modification : 2016/10/21 11:56
  • de admin