在MSYS2中使用BLAS,LAPACK和ARPACK [英] Using BLAS, LAPACK, and ARPACK with MSYS2
问题描述
我正在通过64位工具链使用MSYS2在Windows 10 64位上工作.在MSYS2终端中,用pacman -Ss
,
mingw64/mingw-w64-x86_64-openblas 0.2.20-2
mingw64/mingw-w64-x86_64-lapack 3.6.1-1
mingw64/mingw-w64-x86_64-arpack 3.5.0-1
我从英特尔MKL库示例中获取了一个示例fortran源文件;我将dgelsx.f
文件复制到了msys主目录中的文件夹中.我用
C:/msys64/home/k_chu/lapacktext/dgelsx.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory
编译(在mingw64
终端中)
gfortran dgelsx.f -o dgelsx -llapack -lblas
它编译时没有任何抱怨,但是当我尝试运行它时,我得到了错误
C:/msys64/home/k_chu/lapacktext/dgelsx.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory
为什么会这样?在开始工作之前,我还没有尝试过处理arpack
示例.另外,如果我能完成所有这些工作,是否可以将Microsoft Visual Studio中的arpack
库与Intel ifort
编译器一起使用?我尝试将/msys64/mingw64/bin
中的.dll
文件复制到我的MSV项目文件夹中,但是没有运气,与/msys64/mingw64/lib
中的.a
和.dll.a
文件相同.
请使用依赖项遍历( http://www. (.dependwalkerker.com )来定位.dll,程序无法在路径中找到该.dll.或使用-static-libgcc
或-static-libstdc++
进行编译,以避免在运行时产生依赖关系.
I am working on Windows 10 64-bit using MSYS2 with the 64-bit toolchain. In the MSYS2 terminal I found and installed the following packages after searching for them with pacman -Ss
,
mingw64/mingw-w64-x86_64-openblas 0.2.20-2
mingw64/mingw-w64-x86_64-lapack 3.6.1-1
mingw64/mingw-w64-x86_64-arpack 3.5.0-1
I took an example fortran source file from the Intel MKL library examples; I copied the dgelsx.f
file to a folder in my msys home directory. I compile (in the mingw64
terminal) with
gfortran dgelsx.f -o dgelsx -llapack -lblas
it compiles without any complaint, but when I attempt to run it, I get the error
C:/msys64/home/k_chu/lapacktext/dgelsx.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory
Why is this happening? I haven't attempted to deal with an arpack
example yet until I get this working. Also if I do get all of this working, will it be possible to use the arpack
libraries in Microsoft Visual Studio with the Intel ifort
compiler? I tried copying the .dll
files in /msys64/mingw64/bin
into my MSV project folder but no luck, same with the .a
and .dll.a
files in the /msys64/mingw64/lib
.
Please use dependency walker (http://www.dependencywalker.com) to locate the .dll, which the program cannot find on the path. Or compile with -static-libgcc
or -static-libstdc++
to avoid dependencies at runtime.
这篇关于在MSYS2中使用BLAS,LAPACK和ARPACK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!