Fortran Coder

查看: 5852|回复: 2
打印 上一主题 下一主题

[数学库] fortran无法调用imsl

[复制链接]

17

帖子

6

主题

0

精华

入门

F 币
107 元
贡献
54 点
跳转到指定楼层
楼主
发表于 2020-10-12 08:38:17 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
环境和编译器用的是vs2019和ivf2020,imsl用的是2018;编译路径也都按网上说的填写好了,
前后一共出现过两种情况:
1.最开始时语句
[Fortran] 纯文本查看 复制代码
include 'link_fnl_shared.h'
编译没错,但语句
[Fortran] 纯文本查看 复制代码
use lin_sol_gen_int
use rand_gen_int
use error_option_packet
会提示平台不对,且有“模块计算机类型“X86”与目标计算机类型“x64”冲突”的警告。
按网上的提示稀里糊涂一顿骚操作之后出现下述情况2
2.现在的错误提示为can not open,如下面图片所示。

我的完整程序为:(即imsl手册中的第一个例子)
[Fortran] 纯文本查看 复制代码
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**2)
! Generate a random matrix.
call rand_gen(y)
A = reshape(y,(/n,n/))
! Generate 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 results for small residuals.[attach]2905[/attach]
res = b - matmul(A,x)
err = maxval(abs(res))/sum(abs(A)+abs(b))
if (err <= sqrt(epsilon(one))) then
write (*,*) 'Example 1 for LIN_SOL_GEN is correct.'
end if
end


ps:同样的配置和设置方法在其他电脑上就没问题,不知为何现在出现这么多问题,跪求大神相助!!

分享到:  微信微信
收藏收藏 点赞点赞 点踩点踩

954

帖子

0

主题

0

精华

大师

F 币
184 元
贡献
75 点

规矩勋章元老勋章新人勋章水王勋章热心勋章

QQ
沙发
发表于 2020-10-13 08:34:49 | 只看该作者
看本论坛视频教程
http://v.fcode.cn/video-use_library.html

17

帖子

6

主题

0

精华

入门

F 币
107 元
贡献
54 点
板凳
 楼主| 发表于 2020-10-13 18:33:06 | 只看该作者
感谢,把32位的imsl安装并添加路径以后,可以编译了,但是出现了这个问题:
请问该怎么解决呢?
您需要登录后才可以回帖 登录 | 极速注册

本版积分规则

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

GMT+8, 2024-4-20 22:33

Powered by Tencent X3.4

© 2013-2024 Tencent

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