program main
use mkl95_precision
use mkl95_lapack
implicit none
integer i,info
integer ipiv(3)
real*8 ::a(3,3),b(3,1),X(3,1)
a=0
b=1
forall( i=1:3)
a(i,i)=1
end forall
print *,'Matrix A is:'
do i=1,3
print *,a(i,:)
end do
print *,'Matrix B is:'
print *,b
call getrf(a,ipiv,info)
call getrs(a,ipiv,b,'N',info)
print *,'Solution X is:'
print *,b
end program
捕获.PNG (7.34 KB, 下载次数: 245)
QQ截图20171206171653.png (12.8 KB, 下载次数: 236)
fcode 发表于 2017-12-6 17:17
奇怪,我这里是正常的。得到的结果也是正确的
欢迎光临 Fortran Coder (http://bbs.fcode.cn/) | Powered by Discuz! X3.2 |