- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there any way that matmul functions act like gemm subroutine in mkl blas package ? i write a long code and i used matmul a lot, i want to change them to gemm but a lot of changes should be done. is there any short way?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Recent versions of ifort include an option /Qopt-matmul which changes MATMUL to call an internal MKL function, same as ?gemm. It's on by default at -O3. You didn't say whether your matrices are large enough to benefit from this; for small ones, setting -O3 while setting /Qopt-matmul- may proved more efficient.
gfortran has a similiar option -fexternal-blas which calls ?gemm, but object level compatitiblity is doubtful on Windows; and OpenMP library compatibility is unlikely.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thank you very much... my matrices are small ... the size is in range of 36*36 ... but the multipilication is in big loops over 9000 loops sometimes ... should i still use /Qopt-matmul?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Those are probably large enough to gain from the built-in threading implied by /Qopt-matmul, but you may want to compare

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page