回 帖 发 新 帖 刷新版面

主题:IMSL FORTRAN 7.0 调用问题

环境如下(32位):
Windows 7 Professional、Microsoft Visual Studio 2008 Professional 英文版、Intel Visual Fortran Complier 11.1.062、VNI IMSL Fortran Numerical Library Version 7.0

在Fortran中使用 IMSL Fortran Library 7.0 User Guide Math Library.pdf中的案例:
[color=FF0000]INCLUDE 'link_fnl_shared.h' [/color] !这是我添加的,否则不能编译
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.
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
编译运行后,结果如下:
OMP: Warning #2: Cannot open message catalog "2052\libiomp5ui.dll":
OMP: System error #126: 找不到指定的模块。
OMP: Info #3: Default messages will be used.
Example 1 for LIN_SOL_GEN is correct.

当然不只这个案例是这样的,Chapter 1: Linear Systems 中的案例大多都会出现:
OMP: Warning #2: Cannot open message catalog "2052\libiomp5ui.dll":
OMP: System error #126: 找不到指定的模块。
OMP: Info #3: Default messages will be used.
但是最后的输出结果都对!

不知这样是否正常?如果不正常,该如何解决?

回复列表 (共3个回复)

沙发

OpenMP的动态库找不到,将OpenMP改成静态链接试试吧。
运行结果错倒是错不了,只不过无法并行计算而已。

板凳

[quote]OpenMP的动态库找不到,将OpenMP改成静态链接试试吧。
运行结果错倒是错不了,只不过无法并行计算而已。[/quote]
你错了,只要在2052之类的目录,都是相关的语言包,这个问题在有些版本是存在的(因为intel压根就没出过中文即2052的)

3 楼

[quote][quote]OpenMP的动态库找不到,将OpenMP改成静态链接试试吧。
运行结果错倒是错不了,只不过无法并行计算而已。[/quote]你错了,只要在2052之类的目录,都是相关的语言包,这个问题在有些版本是存在的(因为intel压根就没出过中文即2052的)[/quote]确实是我太不细心了,是不能加载OpenMP的Message库,并行还是OK的。

我来回复

您尚未登录,请登录后再回复。点此登录或注册