[hu6@maya-usr1 ~]$ module load intel/mkl/64/11.1/2013_sp1.3.174
cblas_dgemm(CblasColMajor, CblasNoTrans, CblasNoTrans, m, n, k, 1.0, A, m, B, k, 0.0, C, m);
[araim1@maya-usr1 matrix-multply]$ make clean rm -f *.o matrix-multiply [araim1@maya-usr1 matrix-multply]$ make icc -O3 -std=c99 -mkl -c matrix-multiply.c -o matrix-multiply.o icc -O3 -std=c99 -mkl matrix-multiply.o -o matrix-multiply [araim1@maya-usr1 matrix-multply]$ ./matrix-multiply Matrix A (3 x 5) is: 1.0000 0.7290 0.5314 0.3874 0.2824 0.9000 0.6561 0.4783 0.3487 0.2542 0.8100 0.5905 0.4305 0.3138 0.2288 Matrix B (5 x 4) is: 1.0000 0.5905 0.3487 0.2059 0.9000 0.5314 0.3138 0.1853 0.8100 0.4783 0.2824 0.1668 0.7290 0.4305 0.2542 0.1501 0.6561 0.3874 0.2288 0.1351 Matrix C (3 x 4) = AB is: 2.5543 1.5083 0.8906 0.5259 2.2989 1.3575 0.8016 0.4733 2.0690 1.2217 0.7214 0.4260 [araim1@maya-usr1 matrix-multply]$
int info = LAPACKE_dgesvd(CblasColMajor, 'A', 'A', m, n, A, m, S, U, m, VT, n, superb);
[araim1@maya-usr1 svd]$ make icc -O3 -std=c99 -mkl -c -o matrix-svd.o matrix-svd.c icc -O3 -std=c99 -mkl matrix-svd.o -o matrix-svd [araim1@maya-usr1 svd]$ ./matrix-svd Matrix A (3 x 4) is: 1.0000 0.5000 0.3333 0.2500 0.5000 0.3333 0.2500 0.2000 0.3333 0.2500 0.2000 0.1667 Matrix U (3 x 3) is: -0.8199 0.5563 0.1349 -0.4662 -0.5123 -0.7213 -0.3322 -0.6543 0.6794 Vector S (3 x 1) is: 1.4519 0.1433 0.0042 Matrix VT (4 x 4) is: -0.8015 -0.4466 -0.3143 -0.2435 0.5729 -0.3919 -0.5127 -0.5053 0.1692 -0.7398 0.1245 0.6392 -0.0263 0.3157 -0.7892 0.5261 [araim1@maya-usr1 svd]$