[vsipl++] CLAPACK and Matlab IO documentation
Jules Bergmann
jules at codesourcery.com
Thu Jul 20 13:47:12 UTC 2006
Assem,
Can you fix the 4 items below and then check in the CLAPACK changes
(vendor/GNUmakefile.inc.in, vendor/clapack/blas/SRC/*, configure.ac)?
thanks,
-- Jules
> ------------------------------------------------------------------------
>
> ########################################################################
> #
> # File: GNUmakefile.inc.in
> # Author: Jules Bergmann
> # Date: 2005-11-22
> #
> # Contents: Makefile fragment for vendor
> #
> ########################################################################
>
> ########################################################################
> # Variables
> ########################################################################
>
>
> BUILD_ATLAS := @BUILD_ATLAS@
> BUILD_REF_LAPACK := @BUILD_REF_LAPACK@
> BUILD_REF_CLAPACK := @BUILD_REF_CLAPACK@
> BUILD_REF_CLAPACK_BLAS := @BUILD_REF_CLAPACK_BLAS@
> BUILD_LIBF77 := @BUILD_LIBF77@
>
> USE_ATLAS_LAPACK := @USE_ATLAS_LAPACK@
> USE_SIMPLE_LAPACK := @USE_SIMPLE_LAPACK@
>
> #### LIBS
> vendor_ATLAS := vendor/atlas/lib/libatlas.a
> vendor_FLAPACK := vendor/lapack/lapack.a
> vendor_CLAPACK := vendor/clapack/liblapack.a
> vendor_MERGED_LAPACK := vendor/atlas/lib/liblapack.a
> vendor_PRE_LAPACK := vendor/atlas/lib/libprelapack.a
> vendor_CLAPACK_BLAS := vendor/clapack/libblas.a
> vendor_LIBF77 := vendor/clapack/F2CLIBS/libF77/libF77.a
>
> ########################################################################
> ################# BUILD PART ###########################################
> ########################################################################
>
>
> ifdef BUILD_REF_LAPACK
> all:: $(vendor_FLAPACK)
> endif
>
> ifdef BUILD_REF_LAPACK
> all:: $(vendor_FLAPACK)
> vendor_LAPACK := $(vendor_FLAPACK)
> endif
[1] Is this a typo? The two previous ifdefs have the same guard
(REF_BUILD_LAPACK)
>
> ifdef BUILD_REF_CLAPACK
> all:: $(vendor_CLAPACK)
> vendor_LAPACK := $(vendor_CLAPACK)
> endif
>
> ifdef BUILD_REF_CLAPACK_BLAS
> all:: $(vendor_CLAPACK_BLAS)
> endif
>
> ifdef BUILD_LIBF77
> all:: $(vendor_LIBF77)
> endif
>
> ifdef BUILD_ATLAS
> all:: $(vendor_ATLAS) $(vendor_MERGED_LAPACK)
> endif
>
> ##### RULES
> $(vendor_FLAPACK):
> @echo "Building FLAPACK (see flapack.build.log)"
> @make -C vendor/lapack/SRC all >& flapack.build.log
>
> $(vendor_CLAPACK):
> @echo "Building CLAPACK (see clapack.build.log)"
> @make -C vendor/clapack/SRC all >& clapack.build.log
>
> $(vendor_CLAPACK_BLAS):
> @echo "Building CLAPACK BLAS (see clapack.blas.build.log)"
> @make -C vendor/clapack/blas/SRC all >& clapack.blas.build.log
>
> $(vendor_LIBF77):
> @echo "Building LIBF77 (see libF77.blas.build.log)"
> @make -C vendor/clapack/F2CLIBS/libF77 all >& libF77.blas.build.log
>
> $(vendor_ATLAS):
> @echo "Building ATLAS (see atlas.build.log)"
> @make -C vendor/atlas build >& atlas.build.log
[2] This rule builds 4 targets:
vendor/atlas/lib/libatlas.a (aka vendor_ATLAS)
vendor/atlas/lib/libcblas.a
vendor/atlas/lib/libprelapack.a (aka vendor_PRE_LAPACK)
vendor/atlas/lib/libf77blas.a
You can represent this by putting multiple targets:
vendor/atlas/lib/libatlas.a vendor/atlas/lib/libcblas.a ...:
...
Is is slightly more convenient to create a variable
vendor_ATLAS_LIBS := \
$(vendor_ATLAS) \
vendor/atlas/lib/libcblas.a \
$(vendor_F77BLAS) \
$(vendor_PRE_LAPACK)
$(vendor_ATLAS_LIBS):
...
>
> $(vendor_MERGED_LAPACK):
[3] This rule should have dependencies to make sure things get done in the
right order:
$(vendor_MERGED_LAPACK): $(vendor_PRE_LAPACK) $(vendor_LAPACK)
> @echo "Merging pre-lapack and reference lapack..."
> @mkdir -p vendor/atlas/lib/tmp
> @cd vendor/atlas/lib/tmp;ar x ../../../../$(vendor_PRE_LAPACK)
> @cp $(vendor_LAPACK) $(vendor_MERGED_LAPACK)
> @cd vendor/atlas/lib/tmp;ar r ../../../../$(vendor_MERGED_LAPACK) *
> @rm -rf vendor/atlas/lib/tmp
>
>
> ########################################################################
> ################# INSTALL PART #########################################
> ########################################################################
>
> ifdef BUILD_LIBF77
> install::
[4] The install rules should have dependencies to insure things happen in
the right order ('make install' should work without having to first do
a 'make' or 'make all').
In this case:
install:: $(vendor_LIBF77)
Likewise for the rules below.
> $(INSTALL_DATA) $(vendor_LIBF77) $(DESTDIR)$(libdir)
> endif
>
> ifdef BUILD_REF_LAPACK
> install::
> $(INSTALL_DATA) vendor/atlas/lib/libf77blas.a $(DESTDIR)$(libdir)
> endif
>
> ifdef USE_ATLAS_LAPACK
> install::
> $(INSTALL_DATA) vendor/atlas/lib/libatlas.a $(DESTDIR)$(libdir)
> $(INSTALL_DATA) vendor/atlas/lib/libcblas.a $(DESTDIR)$(libdir)
> $(INSTALL_DATA) vendor/atlas/lib/liblapack.a $(DESTDIR)$(libdir)
> $(INSTALL_DATA) vendor/atlas/lib/liblapack.a $(DESTDIR)$(libdir)
> $(INSTALL_DATA) $(srcdir)/vendor/atlas/include/cblas.h
$(DESTDIR)$(includedir)
> endif
>
> ifdef USE_SIMPLE_LAPACK
> install::
> $(INSTALL_DATA) $(vendor_CLAPACK) $(DESTDIR)$(libdir)
> $(INSTALL_DATA) $(vendor_CLAPACK_BLAS) $(DESTDIR)$(libdir)
> $(INSTALL_DATA) $(srcdir)/vendor/clapack/SRC/cblas.h
$(DESTDIR)$(includedir)
> endif
>
>
--
Jules Bergmann
CodeSourcery
jules at codesourcery.com
(650) 331-3385 x705
More information about the vsipl++
mailing list