help-octave
[Top][All Lists]
Advanced

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

Re: Configuring with Sparse Matrix Libraries


From: Joe Koski
Subject: Re: Configuring with Sparse Matrix Libraries
Date: Thu, 03 Aug 2006 14:01:07 -0600
User-agent: Microsoft-Entourage/11.2.5.060620

on 8/2/06 1:17 PM, Quentin Spencer at address@hidden wrote:

> Joe Koski wrote:
> 
>> on 8/1/06 7:28 PM, Paul Kienzle at address@hidden wrote:
>> 
>>  
>> 
>>> On Aug 1, 2006, at 6:10 PM, Joe Koski wrote:
>>> 
>>>    
>>> 
>>>> Hi all,
>>>> 
>>>> A quick question. This is a question that all Mac users who build
>>>> octave-2.9.x will need to address. This specifically relates to
>>>> building
>>>> octave-2.9.7 on a G5 Mac under OS X 10.4.7 with Xcode tools 2.3 and
>>>> gfortran.
>>>> 
>>>> I have built and installed all the sparse matrix libraries
>>>> (libumfpack.a,
>>>> libcolamd.a, libccolamd.a, libcxsparse.a, and libcholmod.a) into
>>>> /usr/local/lib, with the header files in /usr/local/include.
>>>>      
>>>> 
>>> Looking at the manpage for gcc, you should be able to define the
>>> following environment variables:
>>> 
>>>    export CPATH=/usr/local/include
>>>    export LIBRARY_PATH=/usr/local/lib
>>> 
>>> or in csh syntax
>>> 
>>>    setenv CPATH /usr/local/include
>>>    setenv LIBRARY_PATH /usr/local/lib
>>> 
>>> Then you should be able to run configure without any options.
>>> 
>>> Alternatively, you can run ./configure as follows:
>>> 
>>>    ./configure CFLAGS="-g -O2 -I/usr/local/include" CXXFLAGS="-g -O2
>>> -I/usr/local/include" LDFLAGS="-L/usr/local/lib"
>>> 
>>> 
>>> - Paul
>>> 
>>>    
>>> 
>> Paul, Dmitri,
>> 
>> I initially tried Dmitri's solution, but it didn't work, and Paul's export
>> CPATH doesn't seem to work either. What I think we have is a case of no
>> "standard" installer for the sparse matrix libraries. For libraries like
>> ImageMagick, libjpeg, etc., I had gotten lucky in the past because their
>> build process has a standard "make install" that can be relied upon to put
>> the libraries into a predetermined location in /usr/local where the octave
>> configure script can expect them.
>> 
>> On the positive side, I have edited the Ufconfig.in file for the Mac, so
>> that it works to build all the necessary sparse libraries. Each build just
>> parks the .a file (e. g. libumfpack.a) in a /Lib directory with each library
>> (UMFPACK, COLAMD, CCOLAMD, etc.), and puts the .h files in an associated
>> /Include directory. There is no standard install into /usr/local for the
>> five (six?) libraries involved.
>> 
>> Here is what the configure shows:
>> 
>> checking for amd_postorder in -lamd... no
>> checking ufsparse/colamd.h usability... no
>> checking ufsparse/colamd.h presence... no
>> checking for ufsparse/colamd.h... no
>> checking colamd/colamd.h usability... no
>> checking colamd/colamd.h presence... no
>> checking for colamd/colamd.h... no
>> checking colamd.h usability... no
>> checking colamd.h presence... no
>> checking for colamd.h... no
>> checking ufsparse/ccolamd.h usability... no
>> checking ufsparse/ccolamd.h presence... no
>> checking for ufsparse/ccolamd.h... no
>> checking ccolamd/ccolamd.h usability... no
>> checking ccolamd/ccolamd.h presence... no
>> checking for ccolamd/ccolamd.h... no
>> checking ccolamd.h usability... no
>> checking ccolamd.h presence... no
>> checking for ccolamd.h... no
>> checking ufsparse/cs.h usability... no
>> checking ufsparse/cs.h presence... no
>> checking for ufsparse/cs.h... no
>> checking cxsparse/cs.h usability... no
>> checking cxsparse/cs.h presence... no
>> checking for cxsparse/cs.h... no
>> checking cs.h usability... no
>> checking cs.h presence... no
>> checking for cs.h... no
>> 
>> The header files mentioned are currently parked on my system in
>> /usr/local/include without subdirectories. That may be the problem. Also, I
>> may need libamd.a, because it is mentioned by the configure script early,
>> but is not listed as missing at the end of the configure process.
>> 
>> What file structure is the octave configure.in expecting? Maybe I can cobble
>> together a simple installer script that places the libraries and header
>> files into their proper "standard" locations.
>> 
>> Joe
>>  
>> 
> 
> 
> I thought I'd mention a couple of things. First (sorry if I'm stating
> the obvious), looking at config.log can be valuable in this situation
> for determining what error exactly is preventing configure from
> detecting the libraries. Second, I don't know which version of UFsparse
> you're using, but the 2.0 release has a small change in the headers that
> wasn't in previous versions. There is now a UFconfig.h file found in the
> UFconfig directory of the source tree that is included by all of the
> other headers, and they will break if you haven't copied this to your
> include file directory.
> 
> Quentin
> 
Quentin,

Your comments were again helpful. Thanks. The main problem revealed by
looking at config.log is that the header files "as received" in the library
.tar files, do not have read permissions set for user or group. As a result,
the configure script couldn't see them. After I did a chmod 0644, to
approximate the permissions I saw on other header files in
/usr/local/include, things started to work. I suspect that the library
developer used root privileges while developing the libraries, and never had
to worry.

I also added the Ufconfig.h file to /usr/local/include, as you suggested. I
had to install the METIS library headers into three separate locations
(/usr/local/include, /usr/local/include/ufsparse, and
/usr/local/include/metis), before I got configure to complete without
reporting errors. Again, checking config.log kept flagging the missing
headers. It took several iterations.

Besides adding METIS, I also added the CAMD library to satisfy missing
externals during the build. I now have eight separate, but related sparse
matrix libraries built in one folder. One fear that I have is that the
header files aren't consistent across all libraries. I got the latest
version of each from the appropriate website. Unfortunately, the versions
are not part of the folder names.

I now have a complete, working Mac G5 build of octave-2.9.7 with
octave-forge, but it fails the test_sparse.m routine with a seg fault. My
recommendation to Mac users would be to stay with octave-2.1.73 until the
kinks are worked out of the sparse matrix routines for the Mac.

Joe




reply via email to

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