在Windows和Visual Studio上使用ARPACK ++ [英] Using ARPACK++ on Windows with Visual Studio

查看:672
本文介绍了在Windows和Visual Studio上使用ARPACK ++的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的问题中进行解决对称,实矩阵的特征向量问题很快(我只需要前N个特征值和向量,其中第一个"是指具有最大(实)值的特征值和向量),我试图使ARPack ++在Windows上运行.我使用MSVS 2010进行开发.

in my quest to solve eigenvector problems of symmetric, real matrices quickly (I only need the first N eigenvalues and vectors, where "first" refers to the one with largest (real) value), I'm trying to get ARPack++ running on Windows. I use MSVS 2010 for development.

我目前在链接器地狱中.我也不是99岁的C ++专业人员,他不吃早餐.

I'm currently in linker hell. I'm also not a 99 years C++ professional who eats bits for breakfast.

首先,ARPACK ++是仅标头的库,这很好!它取决于ARPACK,并且ARPACK再次需要依赖于BLAS和LAPACK.幸运的是,对于Windows用户,可以使用.lib和.dll文件> 用于BLAS,LAPACK和ARPACK,并且ARPACK ++已已修补,使其可与现代编译器一起使用(并包含一些错误修复程序.)

First, ARPACK++ is a header-only library, that's good! It depends on ARPACK, and ARPACK again has required dependencies on BLAS and LAPACK. Luckily, for windows users, the .lib and .dll files are available for BLAS, LAPACK and ARPACK, and ARPACK++ has been patched such that it works with modern compilers (and includes some bug-fixes).

看起来,ARPACK ++将必需依赖项引入到 SuperLU 库中.这是因为,就我而言,我需要使用

As it seems, ARPACK++ introduces the required dependency to the SuperLU library. This is because, in my case I need to use the

ARluSymStdEig<ARFLOAT> prob(nev, matrix, which, ncv, tol,
                          maxit, resid, AutoShift);

class/CTOR,其名称中带有"lu",而且确实确实缺少符号. 我想尝试的下一件事是从那时(2000年代左右)开始获取SuperLU库,即SuperLU 2.0.可以直接使用MSVS2010进行编译(例如,与ARPACK相比,必须使用MinGW/MSys进行编译,除非您购买Intel的FORTRAN编译器).我包括了我创建的静态superlu2.lib,但似乎SuperLU本身具有刚刚声明但尚未实现的方法,特别是

class/CTOR, which has "lu" in its name, and I do indeed get missing symbols. The next thing I tried was to grab the SuperLU library from around that time (2000ish), which is SuperLU 2.0. This one can be compiled using MSVS2010 directly (compared to ARPACK for example which has to be compiled with MinGW/MSys, unless you pay for Intel's FORTRAN compilers). I included the static superlu2.lib I created, but it seems SuperLU itself has methods that are just declared but not implemented, particularly

void cusolve(int, int, complex*, complex*);
void clsolve(int, int, complex*, complex*);
void cmatvec(int, int, int, complex*, complex*, complex*);

cgstrs.c 中.现在我被卡住了,不知道如何继续:/看来SuperLU再次具有依赖项,但是没有提到它们.

in cgstrs.c. Now I'm stuck and don't know how to continue :/ It seems like SuperLU has dependencies again, but they're not mentioned.

推荐答案

事实证明,我忘了要做的就是不仅将SuperLU的"src"中的所有.c和.h文件都添加到VS项目中,还添加了ALSO从"cblas"目录添加文件.这样就解决了所有依赖性.

It turns out all I forgot to do was to add not only all .c and .h files from "src" of SuperLU to the VS project, but ALSO add the files from "cblas" directory. All dependencies are thus solved.

这篇关于在Windows和Visual Studio上使用ARPACK ++的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆