help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: octave, arpack, umfpack


From: sibu xolo
Subject: Re: octave, arpack, umfpack
Date: Thu, 18 Nov 2010 11:13:45 +0000
User-agent: KMail/1.13.5 (Linux/2.6.34.0nbf9aDRIm; KDE/4.4.5; x86_64; ; )

On Wednesday 17 November 2010 18:01:03 John W. Eaton wrote:

> The following works for me:
> 
> ARPACK (http://www.caam.rice.edu/software/ARPACK)
> 
>   In ARmake.inc set the following variables:
> 
>     home=path to directory ARPACK
>     FC=gfortran
>     FFLAGS=-fPIC -O
>     MAKE=make
>     ARPACKLIB=$(home)/libarpack.a
>     DIRS=$(UTILdir) $(SRCdir)
> 
>   Edit the file UTIL/second.f and change the line
> 
>     EXTERNAL           ETIME
> 
>   to
> 
>     INTRINSIC          ETIME
> 
>   After building .a library, you can make a shared version with
> 
>     mkdir tmp
>     cd tmp
>     ar x ../libarpack.a
>     gcc -shared -o ../libarpack.so *.o -L$prefix64/lib -llapack -lblas
>     cd ..
>     rm -rf tmp
> 
>   Copy the library libarpack.so to $prefix/lib/libarpack.a.
> 
> SUITESPARSE (http://www.cise.ufl.edu/research/sparse/SuiteSparse)
> 
>   In UFconfig/UFconfig.mk use the following options for CFLAGS and
> F77FLAGS:
> 
>     CC = gcc
>     CFLAGS = -fPIC -O
>     F77 = gfortran
>     F77FLAGS = -fPIC -O
>     BLAS = -lblas -lgfortran
>     LAPACK = -llapack
> 
>   Disable the GPL-incompatible METIS library:
> 
>     CHOLMOD_CONFIG = -DNPARTITION
>     SPQR_CONFIG = -DNPARTITION
>     METIS_PATH =
>     METIS =
> 
>   Run make to build the libraries.
> 
>   The SuiteSparse Makefile does not have an install target so you must
>   install the files by hand:
> 
>     cp {AMD,BTF,CAMD,CCOLAMD,CHOLMOD,COLAMD,CXSparse,UMFPACK}/Lib/lib*a
> $prefix/lib mkdir $prefix/include/suitesparse
>     cp {AMD,BTF,CAMD,CCOLAMD,CHOLMOD,COLAMD,CXSparse,UMFPACK}/Include/*h
> UFconfig/UFconfig.h $prefix64/include/suitesparse
> 
>   You can generate shared versions of these libraries by doing the
>   following in the $prefix64/lib directory:
> 
>     top=$(pwd)
>     for f in *.a; do
>       mkdir tmp
>       cd tmp
>       ar vx ../$f
>       gcc -shared -o ../${f%%.a}.so *.o
>       cd $top
>       rm -rf tmp
>     done
> 
> I did the above and put the suitesparse libraries in
> /tmp/suitesparse/lib and the suitesparse include files in
> /tmp/suitesparse/include/suitesparse and the arpack library in
> /tmp/arpack.  Then I configured Octave with
> 
>   ./configure CPPFLAGS=-I/tmp/suitesparse/include \
>               LDFLAGS="-L/tmp/suitesparse/lib -L/tmp/arpack"
> 
> 
> and it worked for me.  I also tried
> 
>   ./configure --with-amd-includedir=/tmp/suitesparse/include \
>               --with-amd-libdir=/tmp/suitesparse/lib \
>               --with-camd-includedir=/tmp/suitesparse/include \
>               --with-camd-libdir=/tmp/suitesparse/lib \
>               --with-colamd-includedir=/tmp/suitesparse/include \
>               --with-colamd-libdir=/tmp/suitesparse/lib \
>               --with-ccolamd-includedir=/tmp/suitesparse/include \
>               --with-ccolamd-libdir=/tmp/suitesparse/lib \
>               --with-cholmod-includedir=/tmp/suitesparse/include \
>               --with-cholmod-libdir=/tmp/suitesparse/lib \
>               --with-cxsparse-includedir=/tmp/suitesparse/include \
>               --with-cxsparse-libdir=/tmp/suitesparse/lib \
>               --with-umfpack-includedir=/tmp/suitesparse/include \
>               --with-umfpack-libdir=/tmp/suitesparse/lib \
>               --with-arpack-libdir=/tmp/arpack
> 
> and it also worked for me.
> 
> Note that if you use the --with-X-libdir and --with-X-includedir
> options and you installed the suitesparse libraries and header files
> in a location where the compiler will not find them by default, then
> you must specify all the --with options for all the libraries since
> some of them depend on others.  Currently there are no options like
> --with-suitesparse-{include,lib}dir options that will set all the
> other variables.
> 

thanks for your suggestion,  unfortunately this will not work for me  
because:-
A)I have a modern version of atlas(3.9.32) and lapack (3.2.2) and  I  want all 
fortran-based  numeric programs using the same consistent BLAS/LAPACK 
interface(S).
B)the  octave-3.3.53 autoconf script 'sees' installed  umfpack and arpack 
provided they are not linked to  the atlas(BLAS) and lapack I have installed. 

The fact that 
(a) I am using a testing version (3.3.53)  of octave  
(b) other numeric programs such as cholmod-1.7.x (built the same way as 
umfpack and arpack)  are 'seen' by the configure script of octave-3.3.53

(I am hoping) is cause for optimism  that a fix  (with  someone making my day)  
 
is  on the way.

(And  maybe this is   an oblique point:-,   but I found  the not too 
dissimilar  program scilab-5.2.2 builds against   the umfpack  referred to 
above .  I know  scilab-5.2.2  a different program etc   etc)

Thanks again  for your  suggestion

sincerely
sX


reply via email to

[Prev in Thread] Current Thread [Next in Thread]