linking MKL BLAS with gfortran

linking MKL BLAS with gfortran

If you use gfortran, you may have noticed that the g77-compiled blas library supplied in typical linux distros isn't compatible with gfortran. I ran some tests successfully with
gfortran -O2 -march=nocona -L/opt/intel/mkl/8.0/lib/em64t *.f -lmkl_em64t -lguide -lpthread
As expected, setenv OMP_NUM_THREADS=2 invokes parallel execution, where mkl so chooses. Mkl performance was the same, linked with ifort or with gfortran.
lapack would have a problem, due to the run-time library differences between gfortran and ifort.

1 post / 0 new
For more complete information about compiler optimizations, see our Optimization Notice.