I'm a fortran beginner and simply wanted to try if i get a matrix multiplication to work.
program testlapack
implicit none
COMPLEX, DIMENSION(2, 2) :: A, B, Output
A = reshape((/ 4, 0, 0, 2 /), shape(A))
B = reshape((/ 6, 0, 0, 3 /), shape(B))
Output = reshape((/ 1, 0, 0, 1 /), shape(Output))
call DGEMM('n','n',2,2,2,1.0,A,2,B,2,0.0,Output,2)
Write(*,*) Output
end program testlapack
I was expecting a simple A * B multiplication written into the Output-array. Instead, lapack is returning a 2x2 matrix with only zeros. The compilation with ifort -llpack yields no errors.
Where's my problem? Thanks