Fortran Coder

标题: IMSL程序能编译,无法运行。求帮助! [打印本页]

作者: 168371286    时间: 2017-9-20 13:34
标题: IMSL程序能编译,无法运行。求帮助!
各位大神,我这个程序能够编译成功。但是,一运行程序就出现这个情况:
[Fortran] 纯文本查看 复制代码
Program main
Include 'link_fnl_shared.h' !//必须要写
use lin_sol_gen_int
use rand_gen_int
use error_option_packet
Implicit None
!// This is Example 1 for Lin_sol_gen
Integer,Parameter :: n = 32
Real( kind(1e0) ),Parameter :: one = 1e0
Real( kind(1e0) ) :: err
Real( kind(1e0) ) :: A(n,n), b(n,n), x(n,n), res(n,n), y(n*n)
!// Generate a random matrix
Call rand_gen(y)
A=reshape( y,[n,n] )
!// Genarate random right-hand sides
Call rand_gen(y)
b=reshape( y,[n,n] )
!// Compute the solution matrix of Ax = b
Call lin_sol_gen( A,b,x )
!// Check the result for small residuals
res=b - matmul( A,x )
err=maxval( abs(res) )/sum( abs(A)+abs(b) )
If (err<=sqrt( epsilon(one)) ) then
Print*, 'Example 1 for Lin_sol_gen is correct.'
End If
End Program

untitled.png (11.14 KB, 下载次数: 180)

untitled.png

作者: fcode    时间: 2017-9-21 03:06
我这里一切正常的。检查一下你的IMSL是否安装合适?版本与您的主机是否匹配?

PhoXo1.png (63.65 KB, 下载次数: 211)

PhoXo1.png





欢迎光临 Fortran Coder (http://bbs.fcode.cn/) Powered by Discuz! X3.2