Fortran Coder

查看: 7463|回复: 1
打印 上一主题 下一主题

[数学库] IMSL程序能编译,无法运行。求帮助!

[复制链接]

2

帖子

1

主题

0

精华

新人

F 币
16 元
贡献
4 点
跳转到指定楼层
楼主
发表于 2017-9-20 13:34:27 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
各位大神,我这个程序能够编译成功。但是,一运行程序就出现这个情况:
[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, 下载次数: 177)

untitled.png
分享到:  微信微信
收藏收藏 点赞点赞 点踩点踩

1963

帖子

12

主题

5

精华

论坛跑堂

臭石头雪球

F 币
1357 元
贡献
574 点

美女勋章热心勋章星光勋章新人勋章贡献勋章管理勋章帅哥勋章爱心勋章规矩勋章元老勋章水王勋章

沙发
发表于 2017-9-21 03:06:32 | 只看该作者
我这里一切正常的。检查一下你的IMSL是否安装合适?版本与您的主机是否匹配?

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

PhoXo1.png
您需要登录后才可以回帖 登录 | 极速注册

本版积分规则

捐赠本站|Archiver|关于我们 About Us|小黑屋|Fcode ( 京ICP备18005632-2号 )

GMT+8, 2024-4-27 01:26

Powered by Tencent X3.4

© 2013-2024 Tencent

快速回复 返回顶部 返回列表