Compiling and using ARPACK++ on Mac OS X

Alec Jacobson

November 27, 2010

weblog/

Hilariously arpack++ is supposed to make arpack more easily accessible. In the end, once it's finally working this is probably true. But getting it working is not at all easy. Arpack++ is a bunch of header files that provide an interface to the amazingly complicated fortran code of arpack.So the first step is to compile arpack itself. Next follow these instructions to build a superlu static or dynamic library using xcode. If you want a universal library (32-bit and 64-bit) be sure to enable both i386 and x86_64 when building the final release. Note: I skipped UMFPACK because I knew that I wouldn't be getting that far into arpack++'s fancy features. Now follow instructions 9 through 11 of these instructions in order to patch the outdated arpack++ code. I repeat them here:
9. So now download Arpack++ from (http://www.ime.unicamp.br/~chico/arpack++/), and its patch from (http://reuter.mit.edu/index.php/software/arpackpatch/). 10. extract Arpack++ and copy the patch file to the arpack++ folder, and type patch -p1 < arpack++1.2.patch.diff
I don't mess with the make files for the examples. Instead travel to examples/nonsym and build an example with something like:
g++ simple.cc -I../../../include -I ../../matrices/nonsym/ -I../ -o simple ~/ARPACK/libarpack.a -framework Accelerate ~/Downloads/SuperLU_4.1/lib/superlu/build/Release/libsuperlu.a -lf2c
You'll have to change the paths in the linked libraries to match yours. Update: Upon trying to compile x86_64 architecture 64-bit executables I notice that I get linker warnings, like:
ld warning: for symbol _debug_ tentative definition of size 192 from /Users/ajx/ARPACK/libarpack.a(dneigh.o) is is smaller than the real definition of size 96 from /var/folders/XJ/XJuT0FQMG4a+QhMSnFcAwU+++TI/-Tmp-//ccoufDAR.o
Then when I execute the programs I get runtime errors like:
Arpack error in Eupp.
-> Error in ARPACK Eupd fortran code.
Arpack error in FindEigenvectors.
-> Could not find any eigenvector.
Eigenvalues:
I guess for now I am bound to the 32-bit i386 version...

Comments

April 24, 2011, Alec
Hi Nicolas, sorry. I don't think I can be much help. I've changed Operating systems since messing with arpack++ and I didn't bother with it again. I'm just using straight arpack Now. -a