Boost logo

Boost-Build :

From: Philipp Frauenfelder (pfrauenf_at_[hidden])
Date: 2004-09-14 02:49:26


Dear Toon

On Tue, Sep 14, 2004 at 08:18:00AM +0200, Toon Knapen wrote:
> OTOH, we work on multiple platforms (and that's the reason we use bjam
> because of uniformity on all platform) and the exact BLAS library does
> not only depend on the platform (where platform is combination of
> hardware and OS) but can be anything (in many cases there is a
> vendor-optimised blas library, there is atlas, there is flame). Flame
> for instance is only a partial implementation of BLAS so one could want
> to link with flame and after that with atlas (to resolve all symbols not
> resolved by flame).
> So the prebuilt library I want to link with should be configured by the
> user.

I am exactly in the same situation as you. I am using the
following code in my site-config.jam:

# Direct solver Umfpack
feature.feature have-umfpack : yes no ;
UMFPACK_PATH = /scratch/pfrauenf/umfpack-4.1 ;
UMFPACK_LIB = umfpack_ia32 ;
if ! [ GLOB $(UMFPACK_PATH)/lib : lib$(UMFPACK_LIB)* ] {
Echo * Direct solver Umfpack not installed. ;
feature.set-default <have-umfpack> : no ;
alias umfpack ;
alias umfpackuse ;
} else {
Echo * Activating support for direct solver Umfpack. ;
feature.set-default <have-umfpack> : yes ;
lib umfpackuse : : :
: <include>$(UMFPACK_PATH)/UMFPACK/Include <define>HAS_UMFPACK
<define>UMFPACK_41 ;
lib amd : : <name>$(UMFPACK_LIB) <search>$(UMFPACK_PATH)/lib ;
lib umfpack : : <name>amd_ia32 <search>$(UMFPACK_PATH)/lib :
: <library>amd ;
}

This detects if the library is present and sets some flags. I
need these since it activates some parts of the software if a
specific library is present (not uncommon, huh?).

This example also shows that I was working around the problem
described in the original posting of this thread: the order of
the libraries is inverted. libumfpack uses symbols from libamd
(sidenote: to reorder the matrix, Umfpack is a sparse direct
solver, in my case faster than SuperLU). So the link command
should look like

-lumfpack -lamd

However, if I use

lib amd : : <name>amd ;
lib umfpack : : <name>umfpack : : <library>amd ;

bjam gets this wrong. I worked around this problem with

lib amd : : <name>umfpack ;
lib umfpack : : <name>amd : : <library>amd ;

Ugly, I know, but it works.

Regards

-- 
Philipp | work: pfrauenf_at_[hidden] +41 44 632 60 38
Frauenfelder | home: pfrauenf_at_[hidden] +41 44 862 73 14
[PGP] | http://www.math.ethz.ch/~pfrauenf/
Proudly running Debian GNU/Linux. See http://www.debian.org/
 

Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk