Hi,
I'm trying to use the library ARPACK in the intel visual fortran complier(VS2008). At first, compling of ARPACK using MinGW was successful and I got arpack_x64.dll and arpack_x64.lib (object file library) files. However, now I'm stuck in liking those files to my fortran project.
My ARPACK directory is 'D:\1_STUDY\ARPACK', and following is the procedure that I have made to link the library (actually I'm not sure this is correct).
(1) Linker>Input>Additional Dependencies : D:\1_STUDY\ARPACK\arpack_x64.lib
(2) Tools>Option>Intel(R) Visual Fortran>Compilers:
- Platform-->x64
- Add to Libraries: D:\1_STUDY\ARPACK\arpack_x64.lib
- Add to Includes: D:\1_STUDY\ARPACK\arpack_x64.dll
=============================================================================
<Main.f source code>
PROGRAM TEST
integer maxn
integer maxnev
integer maxncv
integer ldv
DOUBLE PRECISION A(2,2)
CHARACTER*1 BMAT
INTEGER n
CHARACTER*2 which ! Hermitian or non-Hermitian
INTEGER nev ! # of eigvalues to be computed
DOUBLE PRECISION tol ! tolerances
INTEGER IPARAM(11)
INTEGER ido ! reverse communication flag
INTEGER ncv ! # of Lanczos basis vectors to use
double precision, allocatable :: resid(:)
integer, allocatable :: workl(:),workd(:),v(:,:)
maxn = 256
maxnev = 10
maxncv = 25
ldv = maxn
allocate(resid(maxn),workl(maxncv*(maxncv+8)),v(ldv,maxncv)
& ,workd(3*maxn))
A = 0.D0
A(1,1) = 10.D0
A(1,2) = 11.D0
A(2,1) = 11.D0
A(2,2) = 20.D0
PRINT *, A
READ(*,*)
which = 'LM' ! eigvalues largest in magnitude
bmat = 'I' ! standard eigvalue problem
n=2 ! dimension of the problem
nev = 2 ! # of eigvalues to be computed
tol = 1.d-10
IPARAM(1) = 1 ! default exact-shift strategy
IPARAM(3) = 100 ! max. # of implicit restarts allowed
IPARAM(7) = 1 ! regular mode
ido = 0
ncv = 5 ! at least nev+1 (setting ncv>2*nev is recommended)
CALL dsaupd(ido,bmat,n,'LM',nev,tol,resid,ncv,v,ldv,iparam
& ,ipntr,workd,workl,lworkl,info)
END
<Error messages#1>
LINK : fatal error LNK1181: 'D:\1_STUDY\1_MATERIALS\00_ARPACK\test\test\arpack_x64.lib' (cannot be opened).
So, I added the arpack_x64.lib and arpack_x64.dll files to the same directory with the main.f file. Then, the above error disappeared, but the following error occurred.
<Error messages#2>
1>MAIN.obj : error LNK2019: DSAUPD (unresolved external symbol)
Then, to curcumvent this trouble, I added include 'arpack_x64.lib' just before the executable section. However, the following error occurred.
<Error messages#3>
1>D:\1_STUDY\1_MATERIALS\00_ARPACK\test\test\arpack_x64.lib(2): error #5149: Illegal character in statement label field [/]
1>D:\1_STUDY\1_MATERIALS\00_ARPACK\test\test\arpack_x64.lib(2): error #5078: Unrecognized token '`' skipped
1>D:\1_STUDY\1_MATERIALS\00_ARPACK\test\test\arpack_x64.lib(2): error #5082: Syntax error, found INTEGER_CONSTANT '151140550408617' when expecting one of: <END-OF-STATEMENT> ; <LABEL> BLOCK BLOCKDATA PROGRAM MODULE TYPE COMPLEX BYTE ...
1>D:\1_STUDY\1_MATERIALS\00_ARPACK\test\test\arpack_x64.lib(2): error #6904: This label has too many digits; a label has a maximum of a 4 digit integer. [151140550408617]
1>D:\1_STUDY\1_MATERIALS\00_ARPACK\test\test\arpack_x64.lib(2): error #6321: An unterminated block exists.
1>D:\1_STUDY\1_MATERIALS\00_ARPACK\test\test\arpack_x64.lib(2): error #6323: This label is not defined in this scoping unit. [151140550408617]
=============================================================================
I want to save the .dll and .lib files to a canonical place and use them instead of copying the files into the local directory every time.
I'm really not sure that the procedure I followed was in right direction since I'm a novice on this library installation.
So any helps or comments are welcome.
Thanks.