Showing results for 
Search instead for 
Did you mean: 

Using ARPACK with Visual Fotran (under XP)

Dear All,

I use ARPACK library to solve the Complex Generalized Nonsymmetric Eigenvalue Problems, andVisual Fortran was chosen as the language programming.
Firstly, I try to run a example from the folder NONSYM, the driver : dndrv5.f in the Fotran Console Application. I do not modify any command in this file. Then, I added whole files from the Library LAPACK, BLAS,UTIL,SRC into the Header File Folder. Finally, I get errors from the debug program,which are listing as follows,

Compiling Fortran...


F:\\ARPACK\\PACK\\SRC\\znaupd.f(387) : Error: Cannot open include file 'debug.h'

include 'debug.h'


F:\\ARPACK\\PACK\\SRC\\znaupd.f(388) : Error: Cannot open include file 'stat.h'

include 'stat.h'




Error executing df.exe.

Test.exe - 56 error(s), 0 warning(s)

Any help will be greately appreciated.
0 Kudos
3 Replies
Valued Contributor I

you need to adjust paths in makefile.

What about this solution. See also this thread.

0 Kudos

0 Kudos
Black Belt

As distributed, the ARPACK distribution provides makefiles targeting Linux/Unix. If you have Cygwin or Mingw installed, you can use GNU make. For your convenience, I have added the prebuilt library (compiled using the IA-32 compiler) as an attachment to this post.

The following changes to the makefiles are needed to make it work with IFort under Windows with Cygwin, using MKL instead of the BLAS and LAPACK provided with ARPACK. These changes are all routine and trivial if you are used to Linux/Unix, but they may help if you are unfamiliar with Make.

In all makefiles and, change the .f.o: rule to

@$(FC) -c $(FFLAGS) $< -Fo$@

and change the setting of FC and FFLAGS to (modify to suit your wishes)

FC = ifort

FFLAGS = -Ot -Qmkl -extlnk:o

In, set "home" to suit, and set

DIRS = $(UTILdir) $(SRCdir)
ALIBS = arpack.lib
ARPACKLIB = $(home)/arpack.lib

In the main makefile, set

PRECISIONS = single double complex complex16 sdrv ddrv cdrv zdrv

Start up the IFort command window, change to the ARPACK directory, and add ...\SRC\ to the INCLUDE environment variable and the ARPACK directory to the LIB environment variable.

Run the Cygwin shell (bash) there.

Type "make all" to build the library.

Change to the desired EXAMPLES subdirectory and do, for example, "make dndrv5" and "./dndrv5". The example should run and produce output to the console.

You can also build the examples without using Cygwin or Make. For example:

ifort /Qmkl dndrv5.f arpack.lib