[vsipl++] Atlas patch
Jules Bergmann
jules at codesourcery.com
Tue Jun 13 20:59:11 UTC 2006
Stefan Seefeld wrote:
> Assem Salama wrote:
>
>>> I notice you have taken out this and a couple of other link
>>> generations. What's the rationale
>>> for that ?
>>>
>> When I tried to do a make, this link produced an error because there
>> already was a lib in vendor/clapack/F2CLIBS/libF77/libF77.a
>
> Sounds like a bug. I should check whether that file already exists,
> before creating it (or alternatively first removing it).
> But just removing the link generation surely doesn't solve that bug. :-)
>
>>> Could you summarize / document the build logic a bit ? This last line
>>> actually happens inside the 'ifdef USE_SIMPLE_LAPACK' conditional, so
>>> the following targets are only defined if both variables
>>> (USE_SIMPLE_LAPACK as well
>>> as USE_FORTRAN_LAPACK) are defined. Is that intended ?
>>>
>> I think you are correct, this is redundant because FORTRAN_LAPACK should
>> never be defined with SIMPLE_LAPACK.
>
> But can it not be defined (used) without SIMPLE_LAPACK ?
>
> Thanks,
> Stefan
>
Roughly, we have three configurations for builtin lapack:
--with-lapack=builtin
=> build ATLAS (provides full CBLAS, partial LAPACK)
=> build ref CLAPACK (provides remainder of LAPACK)
=> build libF77 (provides fortran bits for CLAPACK)
--with-lapack=fortran-builtin
=> build ATLAS (provides full CBLAS, partial LAPACK)
=> build ref LAPACK (provides remainder of LAPACK)
(libg2c is required for this approach)
--with-lapack=simple-builtin
=> build ref CLAPACK/BLAS (provides full BLAS)
=> build ref CLAPACK (provides full LAPACK)
=> build libF77
To avoid duplicating rules in vendor/GNUmakefile.inc.in, let's change
the logic to be more explicit:
ifdef BUILD_REF_LAPACK
... rules to build vendor/lapack/SRC
endif
ifdef BUILD_REF_CLAPACK
... rules to build vendor/clapack/SRC
endif
ifdef BUILD_REF_CLAPACK_BLAS
... rules to bild vendor/clapack/BLAS/SRC
endif
ifdef BUILD_ATLAS
rules for vendor/atlas
if BUILD_REF_LAPACK
rule to install ATLAS libf77
endif
endif
ifdef BUILD_LIBF77
rules to build vendor/clapack/F2CLIBS/libF77
endif
ifdef USE_ATLAS_LAPACK
rules to merge lapack (either Fortran or C) with atlas
to generate final lapack
endif
ifdef USE_SIMPLE_LAPACK
rules to install vendor/clapack/SRC and
vendor/clapack/BLAS/SRC
endif
Inside of configure, our options would map to Makefile variables as follows:
--with-lapack=builtin
BUILD_ATLAS = 1
BUILD_REF_LAPACK = 0
BUILD_REF_CLAPACK = 1
BUILD_REF_CLAPACK_BLAS = 0
BUILD_LIBF77 = 1
USE_ATLAS_LAPACK = 1
USE_SIMPLE_LAPACK = 0
--with-lapack=fortran-builtin
BUILD_ATLAS = 1
BUILD_REF_LAPACK = 1
BUILD_REF_CLAPACK = 0
BUILD_REF_CLAPACK_BLAS = 0
BUILD_LIBF77 = 0
USE_ATLAS_LAPACK = 1
USE_SIMPLE_LAPACK = 0
--with-lapack=simple-builtin
BUILD_ATLAS = 0
BUILD_REF_LAPACK = 0
BUILD_REF_CLAPACK = 1
BUILD_REF_CLAPACK_BLAS = 1
BUILD_LIBF77 = 1
USE_ATLAS_LAPACK = 0
USE_SIMPLE_LAPACK = 1
How does this sound?
-- Jules
--
Jules Bergmann
CodeSourcery
jules at codesourcery.com
(650) 331-3385 x705
More information about the vsipl++
mailing list