- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Hi,
My first post on the forum!
I'm working with an older code written i Fortran at uni. The program consists of several subroutines and I would like to rewrite parts (subroutines) of the code so it runs faster (parallel). My knowledge of Fortran is limited/"ok". The first routine I like to look into is MT:
description:
“Matrix multiplication
B = AA*B*A (AA is the transpose of A)
B = Full, symmetric matrix
A = Unit matrix with an n by n submatrix (argument A) on the diagonal”
For code, please see attachment.
The subroutine is often called like this:
do J = 1,10,3
CALL MT(UM,FS,WE,12,3,J,PU,ER)
continue
Then UM(3,3), FS(12,12) and WE(3)
Is there any way I can use MKL to rewrite the code? Using dgemm? Or maybe use openmp?
Any clues?
Thanks,
Lars
링크가 복사됨
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
The problem is rather small so I would not expect MKL to be of much help. As you show the possibility of executing 2 or 4 of them in parallel, there may be some scope for threading.
Inside MT, it may help to give loop count directives or to assure that the compiler can take advantage of such information through interprocedural analysis. Just in case, you would examine vec-report to assure that the inner loops have vectorized (with the proviso that the loops are rather short and probably do better with minimal unroll).
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Tim Prince wrote:
The problem is rather small so I would not expect MKL to be of much help. As you show the possibility of executing 2 or 4 of them in parallel, there may be some scope for threading.
Inside MT, it may help to give loop count directives or to assure that the compiler can take advantage of such information through interprocedural analysis. Just in case, you would examine vec-report to assure that the inner loops have vectorized (with the proviso that the loops are rather short and probably do better with minimal unroll).
Thanks for the answer Tim, but as I wrote, my Fortran knowledge is limited. Are you able to make an example?
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
mecej4 wrote:
I do not understand the problem description. If A is n X n and B is m X m, the matrix pairs (AT, B) and (B, A) are not suitable for multiplication when m is not equal to n. Please explain.
Mecej4,
For each step J, B is a subset of B : AT(3,3) * B(3,12) and then B(12,3)*A(3,3)
