Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

Using ARPACK with Visual Fotran (under XP)

vutanvan
Beginner
976 Views
Dear All,

I use ARPACK library to solve the Complex Generalized Nonsymmetric Eigenvalue Problems, http://www.caam.rice.edu/software/ARPACK/index.html 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

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
ArturGuzik
Valued Contributor I
975 Views
you need to adjust paths in makefile.

What about this solution. See also this thread.

A.
0 Kudos
vutanvan
Beginner
975 Views
 
0 Kudos
mecej4
Honored Contributor III
975 Views
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 12.0.2.154 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 Armake.inc, 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 ARmake.inc, 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

Reply