大家好,我想利用pardiso计算Ax=B问题求x,想计算A是4*4矩阵,16个元素都是6.25, x=(1,1,1,1)T,然后用mkl_dcsrsymv计算得到B=(25,25,25,25)T,但是为什么将A和B带入pardiso,得到的x是(0,0,0,4)T呢?代码如下谢谢大家!!
program mkl
implicit none
integer, parameter :: n = 4
real(kind=8) :: x(n), y(n),A(n)
integer(kind=4) ::i(5),j(10)
real(kind=8) ::csr(10)
character(len=1) :: uplo = 'u'
integer(kind=8) :: ipt(64)
integer(kind=8) :: idum(n)
integer(kind=4) :: maxfct, mnum, mtype, phase, nrhs, error, msglvl
integer(kind=4) :: iparm(64)
x=(/1,1,1,1/)
i=(/1,5,8,10,11/)
j=(/1,2,3,4,2,3,4,3,4,4/)
csr=(/6.25,6.25,6.25,6.25,6.25,6.25,6.25,6.25,6.25,6.25/)
call mkl_dcsrsymv( uplo, n, csr, i, j, x, y )
ipt = 0
maxfct = 1
mnum = 1
mtype = -2
phase = 13
nrhs = 1
msglvl = 0
error = 0
iparm = 0
idum=0
call pardiso(ipt, maxfct, mnum, mtype, phase, n, csr, i, j, idum, nrhs, iparm, msglvl,y, A, error)
end program mkl