From jules at codesourcery.com Thu Dec 1 15:28:57 2005 From: jules at codesourcery.com (Jules Bergmann) Date: Thu, 01 Dec 2005 10:28:57 -0500 Subject: patch: Fixes for ATLAS build Message-ID: <438F16B9.90409@codesourcery.com> This patch fixes some errata with the ATLAS patch. First, the conventions for calling Fortran functions compiled by g77 from C appear to change when going from i386 to x86-64. In particular, a Fortran function returning a float looks like a C function returning a float for i386, but looks like a C function returning a double on x86-64. This situation is made more complex by MKL, which has real functions that look like C functions returning a float. The right thing to do here is to avoid calling Fortran functions altogether (Fortran subroutines are OK). Fortunately, the only Fortran functions we call are in BLAS, which has a C API (CBLAS). This patch adds support to use CBLAS if present. This can be disabled with the --disable-cblas option. This patch also lets the path to libg2c.a be specified as a configure option. This is useful on machines like Sethra where libg2c.a is in a directory with old libstdc++ libraries, making it impossible to add the directory as a -L option to LDFLAGS before calling configure. For an example of using this option, the following configure line should work on Sethra to configure the library to use the internal ATLAS: configure --with-lapack=builtin \ --with-g2c-path=/usr/lib/gcc-lib/x86_64-redhat-linux/3.2.3 The following configure line should do the same on Sparrowhawk: configure --with-lapack=builtin \ --with-g2c-path=/usr/lib/gcc/x86_64-redhat-linux/3.4.3 Finally, this patch changes the behavior of the --with-mkl-prefix=PATH configure option slightly. Previously, PATH was the directory containing the MKL libraries (i.e. /opt/mkl721/lib/em64t on Sethra). Now, PATH should be the top-level MKL directory (/opt/mkl721). Configure attempts to determine the subdirectory of lib based on the host_cpu type, and can be given a hint with the --with-mkl-arch=ARCH option. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: atlas2.diff URL: From don at codesourcery.com Thu Dec 1 23:37:35 2005 From: don at codesourcery.com (Don McCoy) Date: Thu, 01 Dec 2005 16:37:35 -0700 Subject: [patch] freqswap [signal.freqswap] Message-ID: <438F893F.2040501@codesourcery.com> The attached patch implements frequency swapping for vectors and matrices. Regards, -- Don McCoy CodeSourcery, LLC -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: fs.changes URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: fs.diff Type: text/x-patch Size: 7304 bytes Desc: not available URL: From jules at codesourcery.com Fri Dec 2 20:15:09 2005 From: jules at codesourcery.com (Jules Bergmann) Date: Fri, 02 Dec 2005 15:15:09 -0500 Subject: [patch] cleanup lapack options in configure Message-ID: <4390AB4D.6050902@codesourcery.com> This patch cleans up the lapack options in configure. From the user point of view, it merges the --enable-lapack and --with-lapack options together: - by default, use of LAPACK is not enabled - "--with-lapack" enables searching for a lapack library - "--with-lapack=PKG" enable search for a specific lapack library. I.e. --with-lapack=mkl searchs for MKL. The choices are mkl, atlas, generic, and builtin. Power users can specify multiple libraries to search for. For example: --with-lapack="generic mkl atlas" The consideration of the builtin ATLAS is controlled by the --enable-builtin-atlas option. By default, "--with-lapack" is equivalent to --with-lapack="atlas generic builtin". However, if "--disable-builtin-atlas" is given, then it is equivalent to --with-lapack="atlas generic". Internally, the handling of '--with-mkl-prefix' and '--with-atlas-prefix' (which imply --with-lapack=mkl and --with-lapack=atlas) is cleaned up. -- Jules -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: cfg.diff URL: From jules at codesourcery.com Fri Dec 2 20:18:25 2005 From: jules at codesourcery.com (Jules Bergmann) Date: Fri, 02 Dec 2005 15:18:25 -0500 Subject: [vsipl++] [patch] freqswap [signal.freqswap] In-Reply-To: <438F893F.2040501@codesourcery.com> References: <438F893F.2040501@codesourcery.com> Message-ID: <4390AC11.30503@codesourcery.com> Don, this looks good, please check it in. thanks, -- Jules Don McCoy wrote: > The attached patch implements frequency swapping for vectors and matrices. > > Regards, > From jules at codesourcery.com Sun Dec 4 21:53:16 2005 From: jules at codesourcery.com (Jules Bergmann) Date: Sun, 04 Dec 2005 16:53:16 -0500 Subject: [patch] 2D convolution Message-ID: <4393654C.8070307@codesourcery.com> This patch implements and tests 2D convolution. It provides both generic and IPP optimized implementations. It doesn't provide a SAL implementation, but the dispatch should fallback to the generic version in this case. IPP only provides full- and min-support convolutions. Same-support convolution is implemented by first using IPP's min-support conv and then filling in the edges. -- Jules -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: c2d.diff URL: From jules at codesourcery.com Mon Dec 5 16:12:38 2005 From: jules at codesourcery.com (Jules Bergmann) Date: Mon, 05 Dec 2005 11:12:38 -0500 Subject: [patch] Update parallel support functions to match spec. Message-ID: <439466F6.7070807@codesourcery.com> This patch updates the parallel support functions to match the latest draft of the parallel spec. The changes are primarily in naming (for example, changine support function names from 'get_local_dom()' to 'local_domain()', moving 'impl_' functions to be public, and the name of the type for subblocks from 'subblock_type' to 'index_type'). However, some new functions were added to query the global processor set and processor sets associated with maps. This patch also adds support for parallel benchmarks, and includes fast convolution and matrix copy benchmarks that can be run in parallel. Finally, it includes a benchmark-ified version of Randy Judd's product variations. -- Jules -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: psf.diff URL: From jules at codesourcery.com Mon Dec 5 19:32:41 2005 From: jules at codesourcery.com (Jules Bergmann) Date: Mon, 05 Dec 2005 14:32:41 -0500 Subject: [patch] fix for outer product when using BLAS (issue #95) Message-ID: <439495D9.50904@codesourcery.com> Don, This patch changes how complex outer products using BLAS to compute a row-major matrix are done. The current implementation modifies one of the input vectors to perform conjugation. This causes the wrong results if the two input vectors overlap. Since it is possible for input vectors to overlap even if they aren't the same vector (for example, a row and column from a matrix), we can't make this safe by checking that the pointers are different. The patch changes the outer implementation to modify the output matrix instead. Alas, this is more costly -- O(n^2) vs O(n), which is why we didn't do it this way to begin with -- but safe. As I type this email, another solution comes to mind that would allow us to safely check between the original version and the new version. We could do some modulo arithmetic to check for overlap (i.e. solve A_ptr + i * A_stride == B_ptr + j * B_stride for a solution i, j where i < A_size and j < B_size). I think the safe thing to do is go with this patch for correctness, and then perform the more complex modulo arithmetic check as an optimization. OK to commit? -- Jules -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: 95.diff URL: From jules at codesourcery.com Mon Dec 5 19:34:26 2005 From: jules at codesourcery.com (Jules Bergmann) Date: Mon, 05 Dec 2005 14:34:26 -0500 Subject: [patch] Documentation update for configure Message-ID: <43949642.8080909@codesourcery.com> This patch documents most of the configure options in quickstart.xml. -- Jules * doc/quickstart/quickstart.xml: Add description of configure options. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: cfg-doc.diff URL: From don at codesourcery.com Mon Dec 5 19:43:35 2005 From: don at codesourcery.com (Don McCoy) Date: Mon, 05 Dec 2005 12:43:35 -0700 Subject: [vsipl++] [patch] fix for outer product when using BLAS (issue #95) In-Reply-To: <439495D9.50904@codesourcery.com> References: <439495D9.50904@codesourcery.com> Message-ID: <43949867.9000602@codesourcery.com> Jules Bergmann wrote: > I think the safe thing to do is go with this patch for correctness, > and then perform the more complex modulo arithmetic check as an > optimization. > > OK to commit? > Sounds good. Thank you for fixing this, and finding it in the first place. -- Don McCoy CodeSourcery, LLC From jules at codesourcery.com Mon Dec 5 20:24:39 2005 From: jules at codesourcery.com (Jules Bergmann) Date: Mon, 05 Dec 2005 15:24:39 -0500 Subject: [patch] fix for par support functions Message-ID: <4394A207.6040901@codesourcery.com> Fixes two problems: - return type mismatch between num_processors() decl and defn. - missing decl for processor_set(). patch applied. -- Jules -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: psf2.diff URL: From don at codesourcery.com Mon Dec 5 22:04:23 2005 From: don at codesourcery.com (Don McCoy) Date: Mon, 05 Dec 2005 15:04:23 -0700 Subject: [patch] histogram [signal.histo] Message-ID: <4394B967.4080808@codesourcery.com> Please find the attached patch for the histogram class. Regards, -- Don McCoy CodeSourcery, LLC -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hg.changes URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: hg.diff Type: text/x-patch Size: 8648 bytes Desc: not available URL: From jules at codesourcery.com Mon Dec 5 23:41:28 2005 From: jules at codesourcery.com (Jules Bergmann) Date: Mon, 05 Dec 2005 18:41:28 -0500 Subject: [vsipl++] [patch] histogram [signal.histo] In-Reply-To: <4394B967.4080808@codesourcery.com> References: <4394B967.4080808@codesourcery.com> Message-ID: <4394D028.4040504@codesourcery.com> Don, Looks good, a couple of minor suggestions below, please check it in. -- Jules Don McCoy wrote: > Please find the attached patch for the histogram class. > > Regards, > > You could replace code like: > + index_type n = num_bin_; > + while ( n-- ) > + hist_.put(n, 0); with this: hist_ = 0; Also, you might take the common code for computing the histogram index and put it into a separate member function: inline index_type impl_bin(T value) { if (value < min_) return 0; else if (value >= max_) return num_bin - 1; else return (index_type)((data(i) - min_) / delta_); } That would let you simplify the vector/matrix loops: > + > + for ( index_type i = 0; i < data.size(); ++i ) > + { index_type n = impl_bin(data(i)); hist_(n) += 1; > + } This would also replace the multiple references to data(i) (which the compiler might not be able to recognize as constant, esp if data is a view of an expression block) with a single one. From don at codesourcery.com Tue Dec 6 01:04:03 2005 From: don at codesourcery.com (Don McCoy) Date: Mon, 05 Dec 2005 18:04:03 -0700 Subject: [vsipl++] [patch] histogram [signal.histo] In-Reply-To: <4394D028.4040504@codesourcery.com> References: <4394B967.4080808@codesourcery.com> <4394D028.4040504@codesourcery.com> Message-ID: <4394E383.7010003@codesourcery.com> Jules Bergmann wrote: > Don, > > Looks good, a couple of minor suggestions below, please check it in. > -- Jules > Checked in with the following changes. Revised patch attached. > You could replace code like: > >> + index_type n = num_bin_; >> + while ( n-- ) >> + hist_.put(n, 0); > > with this: > > hist_ = 0; > Done > > Also, you might take the common code for computing the histogram index > and put it into a separate member function: > > inline index_type > impl_bin(T value) > { > if (value < min_) > return 0; > else if (value >= max_) > return num_bin - 1; > else > return (index_type)((data(i) - min_) / delta_); > } Done. Thanks -- that cleans it up nicely. -- Don McCoy CodeSourcery, LLC -------------- next part -------------- A non-text attachment was scrubbed... Name: hg2.diff Type: text/x-patch Size: 9117 bytes Desc: not available URL: From jules at codesourcery.com Tue Dec 6 02:18:19 2005 From: jules at codesourcery.com (Jules Bergmann) Date: Mon, 05 Dec 2005 21:18:19 -0500 Subject: [patch] Fixes for parallel.hpp and ref-impl/selgen. Message-ID: <4394F4EB.3000705@codesourcery.com> This fixes the 'processor_set()' decl in parallel.hpp (missing the vsip namespace - doh!) and updates the ref-impl/selgen test to use the current API for clip and invclip. With Don's commits for histogram, all but one of our tests are passing! woo-hoo! The remaining failure is a regression for comparisons against lvalue_proxy's. I have a fix for that, but I'd like to wait until after the HPEC-SI meeting to give it a bit more testing. Patch applied. -- Jules -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: fix.diff URL: From don at codesourcery.com Tue Dec 6 06:33:03 2005 From: don at codesourcery.com (Don McCoy) Date: Mon, 05 Dec 2005 23:33:03 -0700 Subject: [patch] Issue #88: FIXME: Have cheby use lib functions where possible. Message-ID: <4395309F.6060707@codesourcery.com> The attached patch cleans up some places where inline code was used in place of (formerly) missing library functions. See https://support.codesourcery.com/VSIPLXX/issue88. Regards, -- Don McCoy CodeSourcery, LLC -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: sw.changes URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sw.diff Type: text/x-patch Size: 3819 bytes Desc: not available URL: From jules at codesourcery.com Wed Dec 7 13:21:16 2005 From: jules at codesourcery.com (Jules Bergmann) Date: Wed, 07 Dec 2005 08:21:16 -0500 Subject: [vsipl++] [patch] Issue #88: FIXME: Have cheby use lib functions where possible. In-Reply-To: <4395309F.6060707@codesourcery.com> References: <4395309F.6060707@codesourcery.com> Message-ID: <4396E1CC.6090209@codesourcery.com> Don McCoy wrote: > The attached patch cleans up some places where inline code was used in > place of (formerly) missing library functions. See > https://support.codesourcery.com/VSIPLXX/issue88. Looks good! Please check it in. -- Jules From jules at codesourcery.com Fri Dec 9 17:24:59 2005 From: jules at codesourcery.com (Jules Bergmann) Date: Fri, 09 Dec 2005 12:24:59 -0500 Subject: Using synopsis for VSIPL++ documentation Message-ID: <4399BDEB.6010100@codesourcery.com> Stefan, Mark, I'd like to include the synopsis generated documentation for VSIPL++ in our releases and (eventually) place it on our website. Stefan, can you: (a) create a build-synopsis script (for inclusion in build-vpp-World) so that we can install synopsis in /usr/local/tools/vpp-1.0. (b) add/update the Makefiles to run synopsis (if not already done) (c) incorporate suggestions from Mark (see below) on the format (we need to make sure it looks good, has proper branding, etc) Mark, can you review the synopsis generated documentation for formatting and branding. You might start by looking at https://intranet.codesourcery.com/vsiplreference/ . It is a bit old, but should be representative. thanks, -- Jules From stefan at codesourcery.com Fri Dec 9 17:30:13 2005 From: stefan at codesourcery.com (Stefan Seefeld) Date: Fri, 09 Dec 2005 12:30:13 -0500 Subject: [vsipl++] Using synopsis for VSIPL++ documentation In-Reply-To: <4399BDEB.6010100@codesourcery.com> References: <4399BDEB.6010100@codesourcery.com> Message-ID: <4399BF25.5020806@codesourcery.com> Jules Bergmann wrote: > Stefan, Mark, > > I'd like to include the synopsis generated documentation for VSIPL++ in > our releases and (eventually) place it on our website. > > Stefan, can you: > > (a) create a build-synopsis script (for inclusion in build-vpp-World) so > that we can install synopsis in /usr/local/tools/vpp-1.0. What platforms would this be (potentially) be run on ? I'd like to make sure synopsis compiles out of the box on all those, before I add a dependency like that. Also, what constraints does this impose on synopsis' availability ? Can / should it be fetched from svn ? Or should we put it locally into our own repository ? > (b) add/update the Makefiles to run synopsis (if not already done) That is already done, AFAICT. Regards, Stefan From jules at codesourcery.com Fri Dec 9 18:30:28 2005 From: jules at codesourcery.com (Jules Bergmann) Date: Fri, 09 Dec 2005 13:30:28 -0500 Subject: [vsipl++] Using synopsis for VSIPL++ documentation In-Reply-To: <4399BF25.5020806@codesourcery.com> References: <4399BDEB.6010100@codesourcery.com> <4399BF25.5020806@codesourcery.com> Message-ID: <4399CD44.6040101@codesourcery.com> Stefan Seefeld wrote: >> (a) create a build-synopsis script (for inclusion in build-vpp-World) >> so that we can install synopsis in /usr/local/tools/vpp-1.0. > > > What platforms would this be (potentially) be run on ? I'd like to make > sure synopsis compiles out of the box on all those, before I add a > dependency > like that. Also, what constraints does this impose on synopsis' > availability ? Can / should it be fetched from svn ? Or should we put it > locally > into our own repository ? The build-synopsis script would be run on our build systems (i.e. Sethra) to build a "good" version synopsis for use in making releases. We wouldn't distribute the build-synopsis or even synopsis with VSIPL++, just the generated output. The build-synopsis script could work from a tarball, or from CVS (such as build-qmtest). I don't know if we have any build-* scripts that pull out of svn, but if that makes sense, it shouldn't be too hard. > >> (b) add/update the Makefiles to run synopsis (if not already done) > > > That is already done, AFAICT. good! -- Jules From jules at codesourcery.com Mon Dec 12 13:42:39 2005 From: jules at codesourcery.com (Jules Bergmann) Date: Mon, 12 Dec 2005 08:42:39 -0500 Subject: [patch] 2-D correlation Message-ID: <439D7E4F.20507@codesourcery.com> This patch implements and tests 2-D correlation, with a simple C++ implementation. Also in this patch: - Add test_assert(), which is essentially the same as assert(), but not disabled by defining NDEBUG. This way our tests still check themselves even when the library is configured for performance. - Move error_db into its own header (tests/error_db.hpp) for common use (suggested by Don). - Element-wise "ite", similar to the "?:" operator. For example: out = ite(bool_view, a_view, b_view); is equivalent to: out(i) = bool_view(i) ? a_view(i) : b_view(i); - Moved "reference" implementations of 1-D and 2-D correlation into tests/ref_corr.hpp. This is similar to ref_matvec. Doing this will make it easier to check the output of correlation in other contexts. For example, if we had a correlation benchmark, it could check values against the reference to make sure that optimizations were in fact correct. -- Jules -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: conv2d.diff URL: From stefan at codesourcery.com Mon Dec 12 14:41:25 2005 From: stefan at codesourcery.com (Stefan Seefeld) Date: Mon, 12 Dec 2005 09:41:25 -0500 Subject: PATCH: fix some installation issues Message-ID: <439D8C15.8080902@codesourcery.com> The attached patch fixes some issues with the 'install' target. Notably, on at least one machine the 'install.sh' script would expect a single input argument, and not a list of files, resulting in only the first file in the list to be actually installed. 'make install' now also installs documentation (quickstart and tutorial, for now). Regards, Stefan -------------- next part -------------- A non-text attachment was scrubbed... Name: doc.patch Type: text/x-patch Size: 4125 bytes Desc: not available URL: From jules at codesourcery.com Mon Dec 12 15:07:33 2005 From: jules at codesourcery.com (Jules Bergmann) Date: Mon, 12 Dec 2005 10:07:33 -0500 Subject: [vsipl++] PATCH: fix some installation issues In-Reply-To: <439D8C15.8080902@codesourcery.com> References: <439D8C15.8080902@codesourcery.com> Message-ID: <439D9235.8040508@codesourcery.com> Stefan, this looks good, please check it in (plus ChangeLog of course) -- Jules Stefan Seefeld wrote: > The attached patch fixes some issues with the 'install' target. > Notably, on at least one machine the 'install.sh' script would > expect a single input argument, and not a list of files, resulting > in only the first file in the list to be actually installed. > 'make install' now also installs documentation (quickstart and > tutorial, for now). > > Regards, > Stefan > From mark at codesourcery.com Tue Dec 13 01:37:54 2005 From: mark at codesourcery.com (Mark Mitchell) Date: Mon, 12 Dec 2005 17:37:54 -0800 Subject: PATCH: Move DocBook Makefile rules into csl-docbook Message-ID: <200512130137.jBD1bsLQ014345@sethra.codesourcery.com> Since the point of the csl-docbook module is to provide reusable DocBook infrastructures for other CodeSourcery projects, it makes sense for the Makefile rules to live there. This patch relocates DocBook stuff from the VSIPL++ Makefile into the csl-docbook Makefile. Committed. -- Mark Mitchell CodeSourcery, LLC mark at codesourcery.com 2005-12-12 Mark Mitchell * GNUmakefile.in: Rely on csl-docbook/GNUmakefile.inc for DocBook rules. * doc/tex.dsl: Remove. * doc/wraptex: Likewise. 2005-12-12 Mark Mitchell * GNUmakefile.inc: New file. * wraptex: New file. * dsl/tex.dsl: Likewise. Index: GNUmakefile.in =================================================================== RCS file: /home/cvs/Repository/vpp/GNUmakefile.in,v retrieving revision 1.28 diff -c -5 -p -r1.28 GNUmakefile.in *** GNUmakefile.in 12 Dec 2005 15:12:00 -0000 1.28 --- GNUmakefile.in 13 Dec 2005 01:31:51 -0000 *************** JADE := *** 84,112 **** PDFJADETEX := # The command used to turn XSL-FO into PDF. XEP := @XEP@ # The command used to turn DocBook into HTML or XSL-FO. XSLTPROC := @XSLTPROC@ ! # If XEP is available, use the XEP extensions when generating XSL-FO. ! ifdef XEP ! XSLTPROCFOFLAGS := --stringparam xep.extensions 1 ! endif ! # The patch to the SGML declaration of XML. ! XML_DCL := xml.dcl ! ! ifdef XSLTPROC ! docbook_html := yes ! ifdef XEP ! docbook_pdf := yes ! endif ! endif ! ! ifdef JADE ! ifdef PDFJADETEX ! docbook_pdf := yes ! endif ! endif ######################################################################## # Subdirectory Variables ######################################################################## --- 84,95 ---- PDFJADETEX := # The command used to turn XSL-FO into PDF. XEP := @XEP@ # The command used to turn DocBook into HTML or XSL-FO. XSLTPROC := @XSLTPROC@ ! # The location of the csl-docbook directory. ! csldocbookdir := $(srcdir)/doc/csl-docbook ######################################################################## # Subdirectory Variables ######################################################################## *************** dir_var = $($(call norm_dir,$(1))$(2)) *** 183,192 **** --- 166,177 ---- ######################################################################## # Implicit Rules ######################################################################## + include $(csldocbookdir)/GNUmakefile.inc + # Compile a C++ source file. In addition to $CXXFLAGS, the compiler # will be passed the options in $dir_CXXFLAGS, where dir is the # subdirectory containing the input source file, with slashes replaced # by underscores. %.$(OBJEXT): %.cpp *************** dir_var = $($(call norm_dir,$(1))$(2)) *** 198,250 **** %.d: %.cpp $(SHELL) -ec '$(CXXDEP) $(CXXFLAGS) \ $(call dir_var,$(dir $<),CXXFLAGS) $< \ | sed "s|$(*F)\\.o[ :]*|$*\\.d $*\\.$(OBJEXT) : |g" > $@' - ifdef XSLTPROC - # Generate HTML from DocBook. - %.html: %.xml $(srcdir)/doc/csl-docbook/xsl/html/csl.xsl - rm -rf $(@D)/html - mkdir -p $(@D)/html - $(XSLTPROC) \ - --stringparam csl_docbook.root $(srcdir)/doc/csl-docbook \ - --output $(@D)/html/index.html \ - $(srcdir)/doc/csl-docbook/xsl/html/csl.xsl \ - $< - touch $@ - - # Generate XSL-FO from DocBook. - %.fo: %.xml $(srcdir)/doc/csl-docbook/xsl/fo/csl.xsl - mkdir -p $(@D) - $(XSLTPROC) $(XSLTPROCFOFLAGS) \ - --stringparam csl_docbook.root $(srcdir)/doc/csl-docbook \ - --output $@ \ - $(srcdir)/doc/csl-docbook/xsl/fo/csl.xsl \ - $< - - ifdef XEP - # Generate PDF from XSL-FO. - %.pdf: %.fo - $(XEP) $< - endif - endif - - # If we do not have XEP, then perhaps we can generate PDF using Jade. - ifndef XEP - ifdef JADE - # Generate TeX from DocBook. - %.jtex: %.xml - mkdir -p $(@D) - $(JADE) -t tex -d $(srcdir)/doc/tex.dsl \ - -o $@ $(XML_DCL) $< - - # Generate PDF from TeX. - %.pdf: %.jtex - $(srcdir)/doc/wraptex $(PDFJADETEX) $< - endif - endif - %.syn: %.hpp $(SYNOPSIS) parse --output=$@ $< vsip.syn: $(syn) $(SYNOPSIS) link --output=$@ $^ --- 183,192 ---- *************** vsipdoc: vsip.syn *** 258,288 **** $(SYNOPSIS) html --output=$@ $< vsipsxr: vsip.syn $(SYNOPSIS) sxr --output=$@ $< - # If we do not have mechanisms for generating documentation, but the - # documentation is present in the source directory, copy it from - # there. - - ifndef docbook_pdf - %.pdf: - if test -r $(srcdir)/$@; then \ - cp $(srcdir)/$@ $@; \ - fi - endif - - ifndef docbook_html - %.html: - if test -r $(srcdir)/$(@D)/html; then \ - rm -rf $(@D)/html; \ - mkdir -p $(@D)/html; \ - cp -r $(srcdir)/$(@D)/html/*.html $(@D)/html; \ - touch $@; \ - fi - endif - ######################################################################## # Standard Targets ######################################################################## # Subdirectory Makefile fragments may add to the actions to be taken --- 200,209 ---- Index: doc/tex.dsl =================================================================== RCS file: doc/tex.dsl diff -N doc/tex.dsl *** doc/tex.dsl 21 May 2005 19:06:23 -0000 1.1 --- /dev/null 1 Jan 1970 00:00:00 -0000 *************** *** 1,36 **** - - - - - ]> - - - - - - ;; Customizations here. - - ;; Number chapters and sections. - (define %chapter-autolabel% #t) - (define %section-autolabel% #t) - - - - - --- 0 ---- Index: doc/wraptex =================================================================== RCS file: doc/wraptex diff -N doc/wraptex *** doc/wraptex 4 Jun 2005 18:20:21 -0000 1.1 --- /dev/null 1 Jan 1970 00:00:00 -0000 *************** *** 1,48 **** - #! /bin/sh - - # This helper script runs a LaTeX variant in a loop until the .aux file - # stabilizes. - - if [ $# -ne 2 ]; then - echo "usage: $0 TEX-VARIANT INPUT-FILE" >&2 - exit 2 - fi - - TEX="$1" - input="$2" - - case "$input" in */*) - indir="${input%/*}" - input="${input##*/}" - cd "$indir" || exit 1 - ;; - esac - - ibase="${input%.*}" - aux="$ibase".aux - oaux="$ibase".oaux - - rm -f "$aux" "$oaux" - - # Run TeX once in \nonstopmode. We expect the primary output to be - # junk, because the aux file doesn't exist (yet). If it fails, abort. - - echo "+ $TEX -interaction=nonstopmode \"$input\"" - $TEX -interaction=nonstopmode "$input" || exit 1 - - # Cache the aux file that the first run produced. - cp "$aux" "$oaux" - - # Now run TeX over and over again until the .aux file stops changing. - # We use \batchmode for these cycles - the user has already seen any - # diagnostics of interest. - while :; do - echo "+ $TEX -interaction=batchmode \"$input\"" - $TEX -interaction=batchmode "$input" || exit 1 - if cmp -s "$aux" "$oaux"; then - break - fi - cp "$aux" "$oaux" - done - - rm -f "$oaux" --- 0 ---- Index: doc/csl-docbook/GNUmakefile.inc =================================================================== RCS file: doc/csl-docbook/GNUmakefile.inc diff -N doc/csl-docbook/GNUmakefile.inc *** /dev/null 1 Jan 1970 00:00:00 -0000 --- doc/csl-docbook/GNUmakefile.inc 13 Dec 2005 01:31:51 -0000 *************** *** 0 **** --- 1,128 ---- + ######################################################################## + # + # File: GNUmakefile.inc + # Author: Mark Mitchell + # Date: 2005-12-14 + # + # Contents: Makefile fragment for DocBook + # + ######################################################################## + + ######################################################################## + # Notes + ######################################################################## + + # This Makefile fragment contains rules for processing DocBook + # source. To use this fragment, you must: + # + # 1. Set the following variables. If you do not have a particular + # tool, just leave the variable undefined, or give it an empty + # value. + # + # csldocbookdir The path to the csl-docbook directory. + # JADE The path to jade. + # PDFJADETEXT The path to pdfjadetex. + # XEP The path to the RenderX XEP program. + # XSLTPROC The path to xsltproc. + # + # 2. Use "include $(csldocbookdir)/GNUmakefile.inc" to include + # this fragment. + # + # Then, targets with ".pdf" or ".html" extensions will be built + # automatically from DocBook source. + + ######################################################################## + # Configuration + ######################################################################## + + # Define docbook_html to a non-empty value if we have tools available + # to generate HTML from DocBook. Similarly, define docbook_pdf + + ifdef XSLTPROC + docbook_html := yes + ifdef XEP + docbook_pdf := yes + endif + endif + + ifdef JADE + ifdef PDFJADETEX + docbook_pdf := yes + endif + endif + + # If XEP is available, use the XEP extensions when generating XSL-FO. + ifdef XEP + XSLTPROCFOFLAGS := --stringparam xep.extensions 1 + endif + + # The patch to the SGML declaration of XML. + XML_DCL := xml.dcl + + ######################################################################## + # Implicit Rules + ######################################################################## + + ifdef XSLTPROC + # Generate HTML from DocBook. + %.html: %.xml $(csldocbookdir)/xsl/html/csl.xsl + rm -rf $(@D)/html + mkdir -p $(@D)/html + $(XSLTPROC) \ + --stringparam csl_docbook.root $(csldocbookdir) \ + --output $(@D)/html/index.html \ + $(csldocbookdir)/xsl/html/csl.xsl \ + $< + touch $@ + + # Generate XSL-FO from DocBook. + %.fo: %.xml $(csldocbookdir)/xsl/fo/csl.xsl + mkdir -p $(@D) + $(XSLTPROC) $(XSLTPROCFOFLAGS) \ + --stringparam csl_docbook.root $(csldocbookdir) \ + --output $@ \ + $(csldocbookdir)/xsl/fo/csl.xsl \ + $< + + ifdef XEP + # Generate PDF from XSL-FO. + %.pdf: %.fo + $(XEP) $< + endif + endif + + # If we do not have XEP, then perhaps we can generate PDF using Jade. + ifndef XEP + ifdef JADE + # Generate TeX from DocBook. + %.jtex: %.xml + mkdir -p $(@D) + $(JADE) -t tex -d $(csldocbookdir)/dsl/tex.dsl \ + -o $@ $(XML_DCL) $< + + # Generate PDF from TeX. + %.pdf: %.jtex + $(csldocbookdir)/wraptex $(PDFJADETEX) $< + endif + endif + + # If we do not have mechanisms for generating documentation, but the + # documentation is present in the source directory, copy it from + # there. + + ifndef docbook_pdf + %.pdf: + if test -r $(srcdir)/$@; then \ + cp $(srcdir)/$@ $@; \ + fi + endif + + ifndef docbook_html + %.html: + if test -r $(srcdir)/$(@D)/html; then \ + rm -rf $(@D)/html; \ + mkdir -p $(@D)/html; \ + cp -r $(srcdir)/$(@D)/html/*.html $(@D)/html; \ + touch $@; \ + fi + endif Index: doc/csl-docbook/wraptex =================================================================== RCS file: doc/csl-docbook/wraptex diff -N doc/csl-docbook/wraptex *** /dev/null 1 Jan 1970 00:00:00 -0000 --- doc/csl-docbook/wraptex 13 Dec 2005 01:31:51 -0000 *************** *** 0 **** --- 1,48 ---- + #! /bin/sh + + # This helper script runs a LaTeX variant in a loop until the .aux file + # stabilizes. + + if [ $# -ne 2 ]; then + echo "usage: $0 TEX-VARIANT INPUT-FILE" >&2 + exit 2 + fi + + TEX="$1" + input="$2" + + case "$input" in */*) + indir="${input%/*}" + input="${input##*/}" + cd "$indir" || exit 1 + ;; + esac + + ibase="${input%.*}" + aux="$ibase".aux + oaux="$ibase".oaux + + rm -f "$aux" "$oaux" + + # Run TeX once in \nonstopmode. We expect the primary output to be + # junk, because the aux file doesn't exist (yet). If it fails, abort. + + echo "+ $TEX -interaction=nonstopmode \"$input\"" + $TEX -interaction=nonstopmode "$input" || exit 1 + + # Cache the aux file that the first run produced. + cp "$aux" "$oaux" + + # Now run TeX over and over again until the .aux file stops changing. + # We use \batchmode for these cycles - the user has already seen any + # diagnostics of interest. + while :; do + echo "+ $TEX -interaction=batchmode \"$input\"" + $TEX -interaction=batchmode "$input" || exit 1 + if cmp -s "$aux" "$oaux"; then + break + fi + cp "$aux" "$oaux" + done + + rm -f "$oaux" Index: doc/csl-docbook/dsl/tex.dsl =================================================================== RCS file: doc/csl-docbook/dsl/tex.dsl diff -N doc/csl-docbook/dsl/tex.dsl *** /dev/null 1 Jan 1970 00:00:00 -0000 --- doc/csl-docbook/dsl/tex.dsl 13 Dec 2005 01:31:51 -0000 *************** *** 0 **** --- 1,36 ---- + + + + + ]> + + + + + + ;; Customizations here. + + ;; Number chapters and sections. + (define %chapter-autolabel% #t) + (define %section-autolabel% #t) + + + + + From jules at codesourcery.com Tue Dec 13 20:34:34 2005 From: jules at codesourcery.com (Jules Bergmann) Date: Tue, 13 Dec 2005 15:34:34 -0500 Subject: [patch] Fixes for mercury benchmarks Message-ID: <439F305A.8080902@codesourcery.com> Patch applied. -- Jules -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: misc.diff URL: From stefan at codesourcery.com Fri Dec 16 13:54:03 2005 From: stefan at codesourcery.com (Stefan Seefeld) Date: Fri, 16 Dec 2005 08:54:03 -0500 Subject: PATCH: Allow multiple configurations of the same library to be installed on top of each other. Message-ID: <43A2C6FB.80507@codesourcery.com> The attached patch moves the generation of the vsipl++.pc config file to the 'install' target, and thus allows certain values to vary between configuration and installation time. With that I'm able to run the following sequence: ../vpp/configure --prefix=/usr/local make install libdir=/usr/local/lib/vsip-debug make clean make install libdir=/usr/local/lib/vsip-optimize and will get two versions of libvsip.a (and vsipl++.pc), but only one set of header files. Regards, Stefan -------------- next part -------------- A non-text attachment was scrubbed... Name: install.patch Type: text/x-patch Size: 2768 bytes Desc: not available URL: From jules at codesourcery.com Fri Dec 16 19:06:26 2005 From: jules at codesourcery.com (Jules Bergmann) Date: Fri, 16 Dec 2005 14:06:26 -0500 Subject: [vsipl++] PATCH: Allow multiple configurations of the same library to be installed on top of each other. In-Reply-To: <43A2C6FB.80507@codesourcery.com> References: <43A2C6FB.80507@codesourcery.com> Message-ID: <43A31032.3060301@codesourcery.com> Stefan, I'm sorry, I didn't do a very good job of explaining the problem that I would like to solve. Let's say we install a Sourcery VSIPL++ binary package on a machine (like the GTRI cluster). What I would like is to allow people to use Makefiles like this: ---------------------------------------------------------------- PKG = vsipl++ CXX = $(shell pkg-config --variable=cxx $PKG) CXXFLAGS = $(shell pkg-config --cflags $PKG) \ $(shell pkg-config --variable=cxxflags $PKG) LIBS = $(shell pkg-config --libs $PKG) all: example1 example1.o: example1.cpp %: %.o @ $(CXX) $(CXXFLAGS) -o $@ $< $(LIBS) || rm -f $@ %.o: %.cpp @ $(CXX) -c $(CXXFLAGS) -o $@ $< || rm -f $@ ---------------------------------------------------------------- When developing, they would set PKG to "vsipl++-debug", which would result in CXXFLAGS that include debugging and warnings, don't include optimization, etc (i.e. "-g -W -Wall"). When building a release version of an application, people would set PKG to "vsipl++" or perhaps "vsipl++-release", which would ratchet up the optimization flags (i.e. something ugly like "-g -O2 -funswitch-loops -fgcse-after-reload --param max-inline-insns-single=2000 --param large-function-insns=6000 --param large-function-growth=800 --param inline-unit-growth=300"). Also, on a machine that could be used in 32-bit or 64-bit mode, we could imagine having PKGs for "vsipl++-release-64" etc. pkg-config doesn't include compilation options in the --cflags, but by using variables, we can advertise to the user our recommended compiler (which is good since the default c++ compiler in their path may not be ABI compatible with the one that built VSIPL++) and our recommended flags (also useful, since getting good performance will require aggressive inlining). We could do this by having multiple .pc files that exist in the same directory. After installing the binary package, there would be a "vsipl++.pc", a "vsipl++-debug.pc", a "vsipl++-release.pc", etc. Users would select between .pc packages by the package name given to pkg-config, not the directory the .pc files are in. It matters less where the libraries are installed (i.e. either putting them in separate directories, such as the patch, or giving them differing suffixes "libvsip-release.a", would be fine.) To make it possible to build a binary package this way, if we had an option to specify a .pc/library suffix to configure, then we could do something like this: configure CXXFLAGS="-g" --suffix="-debug" make make install configure CXXFLAGS="-go-fast" --suffix="-release" make make install The second 'make install' would write over the first, with the exceptions of the .pc files and libraries, which would have different suffixes. Later in the release process, we could insert a symbolic link from vsipl++.pc to vsipl++-release.pc . How does this sound? -- Jules Stefan Seefeld wrote: > The attached patch moves the generation of the vsipl++.pc config file > to the 'install' target, and thus allows certain values to vary between > configuration and installation time. > > With that I'm able to run the following sequence: > > ../vpp/configure --prefix=/usr/local > make install libdir=/usr/local/lib/vsip-debug > make clean > make install libdir=/usr/local/lib/vsip-optimize > > and will get two versions of libvsip.a (and vsipl++.pc), but only > one set of header files. From jules at codesourcery.com Fri Dec 16 22:24:30 2005 From: jules at codesourcery.com (Jules Bergmann) Date: Fri, 16 Dec 2005 17:24:30 -0500 Subject: [patch] Benchmarking bits, constructor for Whole_dist Message-ID: <43A33E9E.2060606@codesourcery.com> This patch mostly contains benchmarks bits: new benchmarks for FFTM and vector-matrix multiply. Additional cases for fast convolution. Parallelize some fast convolution cases. However, the patch also contains a new constructor for Whole_dist that takes a number of subblocks. Since whole distributions can't be subdivided, the number of subblocks must always be 1. This is checked at runtime. This allows maps to be constructed a bit more conveniently. For example, to construct a map with the first dimension distributed by block and the second dimension not distributed, you can now write: typedef Map map_type; map_type map(num_proc, 1); Previously, you would have to write: map_type map(num_proc, Whole_dist()); -- Jules From jules at codesourcery.com Fri Dec 16 22:32:58 2005 From: jules at codesourcery.com (Jules Bergmann) Date: Fri, 16 Dec 2005 17:32:58 -0500 Subject: [vsipl++] [patch] Benchmarking bits, constructor for Whole_dist In-Reply-To: <43A33E9E.2060606@codesourcery.com> References: <43A33E9E.2060606@codesourcery.com> Message-ID: <43A3409A.4040904@codesourcery.com> Oops, missing the attachment! Jules Bergmann wrote: > This patch mostly contains benchmarks bits: new benchmarks for FFTM and > vector-matrix multiply. Additional cases for fast convolution. > Parallelize some fast convolution cases. > > However, the patch also contains a new constructor for Whole_dist that > takes a number of subblocks. Since whole distributions can't be > subdivided, the number of subblocks must always be 1. This is checked > at runtime. > > This allows maps to be constructed a bit more conveniently. For > example, to construct a map with the first dimension distributed by > block and the second dimension not distributed, you can now write: > > typedef Map map_type; > > map_type map(num_proc, 1); > > Previously, you would have to write: > > map_type map(num_proc, Whole_dist()); > > -- Jules -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: bench.diff URL: From mark at codesourcery.com Fri Dec 16 22:34:40 2005 From: mark at codesourcery.com (Mark Mitchell) Date: Fri, 16 Dec 2005 14:34:40 -0800 Subject: [vsipl++] PATCH: Allow multiple configurations of the same library to be installed on top of each other. In-Reply-To: <43A31032.3060301@codesourcery.com> References: <43A2C6FB.80507@codesourcery.com> <43A31032.3060301@codesourcery.com> Message-ID: <43A34100.9060508@codesourcery.com> Jules Bergmann wrote: > When developing, they would set PKG to "vsipl++-debug", which would > result in CXXFLAGS that include debugging and warnings, don't include > optimization, etc (i.e. "-g -W -Wall"). When building a release version > of an application, people would set PKG to "vsipl++" or perhaps > "vsipl++-release", which would ratchet up the optimization flags (i.e. > something ugly like "-g -O2 -funswitch-loops -fgcse-after-reload --param > max-inline-insns-single=2000 --param large-function-insns=6000 --param > large-function-growth=800 --param inline-unit-growth=300"). Also, on a > machine that could be used in 32-bit or 64-bit mode, we could imagine > having PKGs for "vsipl++-release-64" etc. Would a bit of a manual post-processing of Stefan's approach work for you? To expand on Stefan's example a bit: # Build and install the default, optimized library. mkdir opt cd opt $srcdir/vpp/configure --prefix=/usr/local make install # Build and install the debuggable library. mkdir debug cd debug $srcdir/vpp/configure --prefix=/usr/local CXXFLAGS="-g" make install libdir=/usr/local/lib/vsip-debug # Create a vsipl++-debug config file. ln -s /usr/local/lib/vsip-debug/vsip++.pc /usr/local/lib/vsip++-debug.pc Then, the user will be able to use the pkgconfig command you envision, but the build infrastruture won't have to change. -- Mark Mitchell CodeSourcery, LLC mark at codesourcery.com (916) 791-8304 From jules at codesourcery.com Fri Dec 16 22:59:57 2005 From: jules at codesourcery.com (Jules Bergmann) Date: Fri, 16 Dec 2005 17:59:57 -0500 Subject: [vsipl++] PATCH: Allow multiple configurations of the same library to be installed on top of each other. In-Reply-To: <43A34100.9060508@codesourcery.com> References: <43A2C6FB.80507@codesourcery.com> <43A31032.3060301@codesourcery.com> <43A34100.9060508@codesourcery.com> Message-ID: <43A346ED.10205@codesourcery.com> Mark Mitchell wrote: > > Would a bit of a manual post-processing of Stefan's approach work for you? That works. From stefan at codesourcery.com Mon Dec 19 15:29:45 2005 From: stefan at codesourcery.com (Stefan Seefeld) Date: Mon, 19 Dec 2005 10:29:45 -0500 Subject: PATCH: Refine vsipl++.pc generation Message-ID: <43A6D1E9.5050707@codesourcery.com> This patch refines the vsipl++.pc generation patch I sent out earlier. Options to report header / library paths and options to report compiler / linker flags are separated a little more clear now. It is thus suggested that users use 'pkg-config vsipl++ --variable cppflags' to obtain include paths, and 'pkg-config vsipl++ --variable cxxflags' to obtain the set of compiler flags used to compile libvsip.a (and thus, the flags we would suggest users to use for their own vsipl++ applications). These options should probably be documented in the quickstart guide. Regards, Stefan -------------- next part -------------- A non-text attachment was scrubbed... Name: install.patch Type: text/x-patch Size: 2786 bytes Desc: not available URL: From jules at codesourcery.com Mon Dec 19 15:38:06 2005 From: jules at codesourcery.com (Jules Bergmann) Date: Mon, 19 Dec 2005 10:38:06 -0500 Subject: [vsipl++] PATCH: Refine vsipl++.pc generation In-Reply-To: <43A6D1E9.5050707@codesourcery.com> References: <43A6D1E9.5050707@codesourcery.com> Message-ID: <43A6D3DE.3070106@codesourcery.com> Stefan, looks good. Please check it in. -- Jules Stefan Seefeld wrote: > This patch refines the vsipl++.pc generation patch I sent out earlier. > Options to report header / library paths and options to report compiler / > linker flags are separated a little more clear now. > > It is thus suggested that users use 'pkg-config vsipl++ --variable > cppflags' > to obtain include paths, and 'pkg-config vsipl++ --variable cxxflags' to > obtain the set of compiler flags used to compile libvsip.a (and thus, > the flags we would suggest users to use for their own vsipl++ > applications). > > These options should probably be documented in the quickstart guide. > > Regards, > Stefan > From jules at codesourcery.com Mon Dec 19 18:42:53 2005 From: jules at codesourcery.com (Jules Bergmann) Date: Mon, 19 Dec 2005 13:42:53 -0500 Subject: [patch] IIR Filter Message-ID: <43A6FF2D.1030501@codesourcery.com> This patch implements and tests IIR filters. -- Jules -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: iir.diff URL: From don at codesourcery.com Mon Dec 19 19:00:04 2005 From: don at codesourcery.com (Don McCoy) Date: Mon, 19 Dec 2005 12:00:04 -0700 Subject: [patch] misc benchmark fixes Message-ID: <43A70334.5090606@codesourcery.com> This patch adds some additional targets to the benchmark makefile in order to group the benchmarks by dependencies. Is there is a better way to do this - perhaps automatically, depending on which libraries are installed? As it stands now, the following are available: 'make bench' builds benchmarks that should work on any platform 'make bench-ipp' builds those tests that are dependent on ipp 'make bench-lapack' builds those dependent on lapack Regards, -- Don McCoy CodeSourcery, LLC -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: bench.changes URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: bench.diff Type: text/x-patch Size: 3802 bytes Desc: not available URL: From jules at codesourcery.com Mon Dec 19 19:41:57 2005 From: jules at codesourcery.com (Jules Bergmann) Date: Mon, 19 Dec 2005 14:41:57 -0500 Subject: [vsipl++] [patch] misc benchmark fixes In-Reply-To: <43A70334.5090606@codesourcery.com> References: <43A70334.5090606@codesourcery.com> Message-ID: <43A70D05.3040401@codesourcery.com> Don McCoy wrote: > This patch adds some additional targets to the benchmark makefile in > order to group the benchmarks by dependencies. Is there is a better way > to do this - perhaps automatically, depending on which libraries are > installed? Instead of always putting the IPP and SAL bechmarks in special, you could selectively remove them from def_build if VSIP_IMPL_HAVE_{IPP/SAL} is not defined. > > As it stands now, the following are available: > > 'make bench' builds benchmarks that should work on any platform > 'make bench-ipp' builds those tests that are dependent on ipp > 'make bench-lapack' builds those dependent on lapack > > Regards, > > > ------------------------------------------------------------------------ > > 2005-12-06 Don McCoy > > * benchmarks/GNUmakefile.inc.in: additonal targets added. > fixed 'bench' target to build basic performance tests only. > * benchmarks/dot.cpp: corrected evaluator tag for vector- > vector dot product. > > > ------------------------------------------------------------------------ > First, you'll need something like this at the start of GNUmakefile: (althoughthese lines are already in src/vsip/GNUmakefile.inc ... perhaps we should just move them into the top-level GNUmakefile so that they can be shared): VSIP_IMPL_HAVE_IPP := @VSIP_IMPL_HAVE_IPP@ VSIP_IMPL_HAVE_SAL := @VSIP_IMPL_HAVE_SAL@ > benchmarks_cxx_tests := $(patsubst $(srcdir)/%.cpp, %.test, \ > $(benchmarks_cxx_sources)) > > ! benchmarks_cxx_exes_ipp := benchmarks/conv_ipp$(EXEEXT) \ > ! benchmarks/fft_ipp$(EXEEXT) benchmarks/fft_ext_ipp$(EXEEXT) \ > ! benchmarks/vmul_ipp$(EXEEXT) > ! > ! benchmarks_cxx_exes_lapack := benchmarks/qrd$(EXEEXT) > ! > ! benchmarks_cxx_exes_special := benchmarks/main$(EXEEXT) \ ## Leave IPP and SAL executables out of special ## DELETE > ! $(benchmarks_cxx_exes_ipp) $(benchmarks_cxx_exes_lapack) > benchmarks_cxx_exes_def_build := $(filter-out $(benchmarks_cxx_exes_special), \ > $(benchmarks_cxx_exes)) ## Instead take them out here: ifndef VSIP_IMPL_HAVE_IPP benchmarks_cxx_exes_def_build := ... filter out ipp exes ... endif ifndef VSIP_IMPL_HAVE_SAL benchmarks_cxx_exes_def_build := ... filter out SAL exes ... endif > > *************** cxx_sources += $(benchmarks_cxx_sources) > *** 41,47 **** > # Rules > ######################################################################## > > ! bench:: $(benchmarks_cxx_exec) > > # Object files will be deleted by the parent clean rule. > clean:: > --- 48,58 ---- > # Rules > ######################################################################## > > ! bench:: $(benchmarks_cxx_exes_def_build) > ! > ! bench-ipp:: $(benchmarks_cxx_exes_ipp) > ! > ! bench-lapack:: $(benchmarks_cxx_exes_lapack) > > # Object files will be deleted by the parent clean rule. > clean:: > *************** clean:: > *** 50,58 **** > --- 61,79 ---- > $(benchmarks_cxx_exes_def_build): %$(EXEEXT) : %.$(OBJEXT) benchmarks/main.$(OBJEXT) src/vsip/libvsip.a > $(CXX) $(LDFLAGS) -o $@ $^ $(LIBS) || rm -f $@ > > + $(benchmarks_cxx_exes_ipp): %$(EXEEXT) : %.$(OBJEXT) benchmarks/main.$(OBJEXT) src/vsip/libvsip.a > + $(CXX) $(LDFLAGS) -o $@ $^ $(LIBS) || rm -f $@ > + > + $(benchmarks_cxx_exes_lapack): %$(EXEEXT) : %.$(OBJEXT) benchmarks/main.$(OBJEXT) src/vsip/libvsip.a > + $(CXX) $(LDFLAGS) -o $@ $^ $(LIBS) || rm -f $@ > + > xyz: > @echo $(benchmarks_cxx_exes) > @echo "--------------------------------------------------" > @echo $(benchmarks_cxx_exes_def_build) > @echo "--------------------------------------------------" > + @echo $(benchmarks_cxx_exes_ipp) > + @echo "--------------------------------------------------" > + @echo $(benchmarks_cxx_exes_fft) > + @echo "--------------------------------------------------" > @echo $(benchmarks_cxx_exes_special) Well, you should really delete this target! I was using it for debugging and accidentally checked it in ... From don at codesourcery.com Tue Dec 20 08:31:38 2005 From: don at codesourcery.com (Don McCoy) Date: Tue, 20 Dec 2005 01:31:38 -0700 Subject: [vsipl++] [patch] misc benchmark fixes In-Reply-To: <43A70D05.3040401@codesourcery.com> References: <43A70334.5090606@codesourcery.com> <43A70D05.3040401@codesourcery.com> Message-ID: <43A7C16A.9040300@codesourcery.com> Jules Bergmann wrote: > > Don McCoy wrote: > >> This patch adds some additional targets to the benchmark makefile in >> order to group the benchmarks by dependencies. Is there is a better >> way to do this - perhaps automatically, depending on which libraries >> are installed? > > > Instead of always putting the IPP and SAL bechmarks in special, you > could selectively remove them from def_build if > VSIP_IMPL_HAVE_{IPP/SAL} is not defined. Done and thank you for the suggestion. We will have to remember to add tests that have these dependencies to the appropriate exceptions variable (benchmarks_cxx_exes_ipp/lapack/etc...). Regards, -- Don McCoy CodeSourcery, LLC -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: bench.changes URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: bench.diff Type: text/x-patch Size: 5272 bytes Desc: not available URL: From jules at codesourcery.com Tue Dec 20 12:48:06 2005 From: jules at codesourcery.com (Jules Bergmann) Date: Tue, 20 Dec 2005 07:48:06 -0500 Subject: [patch] Fix lvalue_proxy issue (#51), Use test_assert Message-ID: <43A7FD86.9000408@codesourcery.com> This patch adds operator= specializations for Lvalue_proxy. This closes issue #51. regr_proxy_lvalue_conv.cpp should now start to pass (in fact, all of our tests should pass now!). Also, this patch changes most of the tests to use test_assert instead of assert. This makes the test results meaningful when compiling with regular assertions turned off. Patch applied. -- Jules -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: ta.diff URL: From jules at codesourcery.com Tue Dec 20 12:51:41 2005 From: jules at codesourcery.com (Jules Bergmann) Date: Tue, 20 Dec 2005 07:51:41 -0500 Subject: [vsipl++] [patch] misc benchmark fixes In-Reply-To: <43A7C16A.9040300@codesourcery.com> References: <43A70334.5090606@codesourcery.com> <43A70D05.3040401@codesourcery.com> <43A7C16A.9040300@codesourcery.com> Message-ID: <43A7FE5D.70306@codesourcery.com> Don, this looks good. Please commit. thanks, -- Jules Don McCoy wrote: > > Done and thank you for the suggestion. We will have to remember to add > tests that have these dependencies to the appropriate exceptions > variable (benchmarks_cxx_exes_ipp/lapack/etc...). > > Regards, From jules at codesourcery.com Tue Dec 20 18:48:41 2005 From: jules at codesourcery.com (Jules Bergmann) Date: Tue, 20 Dec 2005 13:48:41 -0500 Subject: built-in FFTW3 integration Message-ID: <43A85209.6040002@codesourcery.com> Nathan, Refresh my memory, why do we need to regenerate configure for FFTW3? Fixing up the loose ends in your patch, it works fine with the upstream FFTW3 configure. I tested locally (i686) and on Setha (x86-64). I had to disable the use of SIMD on sethra do to the following errors when compiling FFTW3: gcc -DHAVE_CONFIG_H -I. -I../../fftw-3.0.1/simd -I.. -I../../fftw-3.0.1/kernel -O3 -fomit-frame-pointer -fno-schedule-insns -fstrict-aliasing -mpreferred-stack-boundary=4 -msse -MT sse.lo -MD -MP -MF .deps/sse.Tpo -c ../../fftw-3.0.1/simd/sse.c -o sse.o /tmp/cckBDFeA.s: Assembler messages: /tmp/cckBDFeA.s:83: Error: suffix or operands invalid for `push' /tmp/cckBDFeA.s:85: Error: suffix or operands invalid for `pop' I see the same errors when configuring/compiling FFTW3 outside of VSIPL++. Once we figure out how to fix these, we can re-enable SIMD for x86-64. Below are the changes relative to the patch you posted. I did not apply the results of re-running FFTW3's bootstrap. Patch applied. -- Jules -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: fftw-patch-patch.diff URL: From ncm at codesourcery.com Tue Dec 20 19:21:39 2005 From: ncm at codesourcery.com (Nathan (Jasper) Myers) Date: Tue, 20 Dec 2005 11:21:39 -0800 Subject: [vsipl++] re: built-in FFTW3 integration In-Reply-To: <43A85209.6040002@codesourcery.com> References: <43A85209.6040002@codesourcery.com> Message-ID: <20051220192139.GA29701@codesourcery.com> Jules, On Tue, Dec 20, 2005 at 01:48:41PM -0500, Jules Bergmann wrote: > > Refresh my memory, why do we need to regenerate configure for FFTW3? Maybe it's not necessary. If I recall right, I was looking at generated code in upstream's autotools output, and it seemed to be assuming really old compilers. > Fixing up the loose ends in your patch, it works fine with the upstream > FFTW3 configure. > I tested locally (i686) and on Sethra (x86-64). I had > to disable the use of SIMD on sethra do to the following errors when > compiling FFTW3: ... > > /tmp/cckBDFeA.s: Assembler messages: > /tmp/cckBDFeA.s:83: Error: suffix or operands invalid for `push' > /tmp/cckBDFeA.s:85: Error: suffix or operands invalid for `pop' Google seems to suggest it's toolchain versionitis, maybe a path problem. I'll look into that today. > Below are the changes relative to the patch you posted. I did not apply > the results of re-running FFTW3's bootstrap. > > Patch applied. Thank you. Nathan Myers ncm From ncm at codesourcery.com Wed Dec 21 05:04:38 2005 From: ncm at codesourcery.com (Nathan (Jasper) Myers) Date: Tue, 20 Dec 2005 21:04:38 -0800 Subject: [patch] SSE on amd64, other config hax Message-ID: <20051221050438.GC29701@codesourcery.com> Patch below makes FFTW3 use SSE/SSE2 on x86-64, and cleans up some config file and minor build details. OK? Nathan Myers ncm Index: ChangeLog =================================================================== RCS file: /home/cvs/Repository/vpp/ChangeLog,v retrieving revision 1.344 diff -u -p -r1.344 ChangeLog --- ChangeLog 21 Dec 2005 04:04:36 -0000 1.344 +++ ChangeLog 21 Dec 2005 05:00:45 -0000 @@ -1,3 +1,11 @@ +2005-12-20 Nathan Myers + + * configure.ac, vendor/fftw/simd/sse.c, vendor/fftw/simd/sse2.c: + enable using SSE/SSE2 on x86-64. + * vendor/GNUmakefile.inc.in: improve build status reports. + * configure.ac, GNUmakefile.in: rearrange -I, -L so compiler will + find internal includes & libs first, installed second. + 2005-12-20 Stefan Seefeld * synopsis.py.in: Additional code not yet part of the last (0.8) release. Index: GNUmakefile.in =================================================================== RCS file: /home/cvs/Repository/vpp/GNUmakefile.in,v retrieving revision 1.32 diff -u -p -r1.32 GNUmakefile.in --- GNUmakefile.in 20 Dec 2005 17:10:34 -0000 1.32 +++ GNUmakefile.in 21 Dec 2005 05:00:45 -0000 @@ -58,13 +58,13 @@ CXXINCLUDES := -I src -I $(srcdir)/src # C++ macro definitions. CXXDEFS := # C++ preprocessor flags. -CXXCPPFLAGS := $(CXXINCLUDES) $(CXXDEFS) @CPPFLAGS@ @INT_CPPFLAGS@ +CXXCPPFLAGS := $(CXXINCLUDES) $(CXXDEFS) @INT_CPPFLAGS@ @CPPFLAGS@ # C++ compilation flags. CXXFLAGS := $(CXXCPPFLAGS) @CXXFLAGS@ # The extension for executable programs. EXEEXT := @EXEEXT@ # Linker flags. -LDFLAGS := @LDFLAGS@ @INT_LDFLAGS@ +LDFLAGS := @INT_LDFLAGS@ @LDFLAGS@ # Libraries to link to. LIBS := @LIBS@ # The extension for object files. Index: configure.ac =================================================================== RCS file: /home/cvs/Repository/vpp/configure.ac,v retrieving revision 1.60 diff -u -p -r1.60 configure.ac --- configure.ac 20 Dec 2005 18:50:29 -0000 1.60 +++ configure.ac 21 Dec 2005 05:00:45 -0000 @@ -456,11 +456,9 @@ if test "$build_fftw3" != "no"; then fftw3_d_simd= fftw3_l_simd= case "$host_cpu" in - (ia32|i686) fftw3_f_simd="--enable-sse" + (ia32|i686|x86_64) fftw3_f_simd="--enable-sse" fftw3_d_simd="--enable-sse2" ;; - (x86_64) fftw3_d_simd="" - ;; (ppc*) fftw3_f_simd="--enable-altivec" ;; esac AC_MSG_NOTICE([fftw3 config options: $fftw3_opts $fftw3_simd.]) @@ -523,11 +521,11 @@ if test "$build_fftw3" != "no"; then # fail). Instead we add them to LATE_LIBS, which gets added to # LIBS just before AC_OUTPUT. - LATE_LIBS="$LATE_LIBS $FFTW3_LIBS" - INT_CPPFLAGS="$INT_CPPFLAGS -I$curdir/vendor/fftw/include" - INT_LDFLAGS="$INT_LDFLAGS -L$curdir/vendor/fftw/lib" - CPPFLAGS="$CPPFLAGS -I$includedir/fftw3" - LDFLAGS="$LDFLAGS -L$libdir/fftw3" + LATE_LIBS="$FFTW3_LIBS $LATE_LIBS" + INT_CPPFLAGS="-I$curdir/vendor/fftw/include $INT_CPPFLAGS" + INT_LDFLAGS="-L$curdir/vendor/fftw/lib $INT_LDFLAGS" + CPPFLAGS="-I$includedir/fftw3 $CPPFLAGS" + LDFLAGS="-L$libdir/fftw3 $LDFLAGS" fi if test "$enable_fftw2" != "no" ; then @@ -1083,12 +1081,12 @@ if test "$with_lapack" != "no"; then # fail). Instead we add them to LATE_LIBS, which gets added to # LIBS just before AC_OUTPUT. - LATE_LIBS="$LATE_LIBS -lcsl_lapack -lcsl_cblas -lcsl_f77blas -lcsl_atlas $use_g2c" + LATE_LIBS="-lcsl_lapack -lcsl_cblas -lcsl_f77blas -lcsl_atlas $use_g2c $LATE_LIBS" - INT_CPPFLAGS="$INT_CPPFLAGS -I$my_abs_top_srcdir/vendor/atlas/include" - INT_LDFLAGS="$INT_LDFLAGS -L$curdir/vendor/atlas/lib" - CPPFLAGS="$keep_CPPFLAGS -I$includedir/atlas" - LDFLAGS="$keep_LDFLAGS -L$libdir/atlas" + INT_CPPFLAGS="-I$my_abs_top_srcdir/vendor/atlas/include $INT_CPPFLAGS" + INT_LDFLAGS="-L$curdir/vendor/atlas/lib $INT_LDFLAGS" + CPPFLAGS="-I$includedir/atlas $keep_CPPFLAGS" + LDFLAGS="-L$libdir/atlas $keep_LDFLAGS" LIBS="$keep_LIBS" lapack_use_ilaenv=0 cblas_style="1" # use cblas.h @@ -1231,7 +1229,7 @@ AC_CHECK_PROGS(XEP, xep) AC_PROG_INSTALL # "Late" variables -LIBS="$LIBS $LATE_LIBS" +LIBS="$LATE_LIBS $LIBS" AC_SUBST(INT_LDFLAGS) AC_SUBST(INT_CPPFLAGS) Index: vendor/GNUmakefile.inc.in =================================================================== RCS file: /home/cvs/Repository/vpp/vendor/GNUmakefile.inc.in,v retrieving revision 1.3 diff -u -p -r1.3 GNUmakefile.inc.in --- vendor/GNUmakefile.inc.in 20 Dec 2005 18:50:30 -0000 1.3 +++ vendor/GNUmakefile.inc.in 21 Dec 2005 05:00:45 -0000 @@ -42,11 +42,11 @@ all:: $(vendor_LIBS) libs:: $(vendor_LIBS) $(vendor_ATLAS_LIBS): - @echo "Building ATLAS (atlas.build.log)" + @echo "Building ATLAS (see atlas.build.log)" @$(MAKE) -C vendor/atlas build > atlas.build.log 2>&1 $(vendor_REF_LAPACK): - @echo "Building LAPACK (lapack.build.log)" + @echo "Building LAPACK (see lapack.build.log)" @$(MAKE) -C vendor/lapack/SRC all > lapack.build.log 2>&1 $(vendor_USE_LAPACK): $(vendor_PRE_LAPACK) $(vendor_REF_LAPACK) @@ -57,11 +57,11 @@ $(vendor_USE_LAPACK): $(vendor_PRE_LAPAC rm -rf vendor/atlas/lib/tmp clean:: - @echo "Cleaning ATLAS (atlas.clean.log)" + @echo "Cleaning ATLAS (see atlas.clean.log)" @$(MAKE) -C vendor/atlas clean > atlas.clean.log 2>&1 install:: - @echo "Installing ATLAS (atlas.install.log)" + @echo "Installing ATLAS (see atlas.install.log)" # @$(MAKE) -C vendor/atlas installinstall > atlas.install.log 2>&1 $(INSTALL) -d $(libdir)/atlas $(INSTALL_DATA) vendor/atlas/lib/libcsl_atlas.a $(libdir)/atlas @@ -84,28 +84,28 @@ all:: $(vendor_FFTW_LIBS) libs:: $(vendor_FFTW_LIBS) vendor/fftw3f/libfftw3f-csl.a: - @echo "Building FFTW float (fftw-f.build.log)" + @echo "Building FFTW float (see fftw-f.build.log)" @$(MAKE) -C vendor/fftw3f > fftw-f.build.log 2>&1 mv vendor/fftw3f/.libs/libfftw3f.a vendor/fftw3f/libfftw3f-csl.a vendor/fftw3/libfftw3-csl.a: - @echo "Building FFTW double (fftw-d.build.log)" + @echo "Building FFTW double (see fftw-d.build.log)" @$(MAKE) -C vendor/fftw3 > fftw-d.build.log 2>&1 mv vendor/fftw3/.libs/libfftw3.a vendor/fftw3/libfftw3-csl.a vendor/fftw3l/libfftw3l-csl.a: - @echo "Building FFTW double (fftw-l.build.log)" + @echo "Building FFTW long double (see fftw-l.build.log)" @$(MAKE) -C vendor/fftw3l > fftw-l.build.log 2>&1 mv vendor/fftw3l/.libs/libfftw3l.a vendor/fftw3l/libfftw3l-csl.a clean:: - @echo "Cleaning FFTW (fftw.clean.log)" + @echo "Cleaning FFTW (see fftw.clean.log)" @$(MAKE) -C vendor/fftw3f clean > fftw.clean.log 2>&1 @$(MAKE) -C vendor/fftw3 clean >> fftw.clean.log 2>&1 @$(MAKE) -C vendor/fftw3l clean >> fftw.clean.log 2>&1 install:: - @echo "Installing FFTW (fftw.install.log)" + @echo "Installing FFTW (see fftw.install.log)" $(INSTALL) -d $(libdir)/fftw3 $(INSTALL_DATA) vendor/fftw3f/libfftw3f-csl.a $(libdir)/fftw3 $(INSTALL_DATA) vendor/fftw3/libfftw3-csl.a $(libdir)/fftw3 Index: vendor/fftw/simd/sse.c =================================================================== RCS file: /home/cvs/Repository/fftw/simd/sse.c,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 sse.c --- vendor/fftw/simd/sse.c 1 Dec 2005 10:33:03 -0000 1.1.1.1 +++ vendor/fftw/simd/sse.c 21 Dec 2005 05:00:46 -0000 @@ -40,6 +40,13 @@ static inline int cpuid_edx(int op) pop ebx } return ret; +#elif defined(__x86_64__) + int rax, rcx, rdx; + + __asm__("pushq %%rbx\n\tcpuid\n\tpopq %%rbx" + : "=a" (rax), "=c" (rcx), "=d" (rdx) + : "a" (op)); + return rdx; #else int eax, ecx, edx; Index: vendor/fftw/simd/sse2.c =================================================================== RCS file: /home/cvs/Repository/fftw/simd/sse2.c,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 sse2.c --- vendor/fftw/simd/sse2.c 1 Dec 2005 10:33:03 -0000 1.1.1.1 +++ vendor/fftw/simd/sse2.c 21 Dec 2005 05:00:46 -0000 @@ -40,6 +40,13 @@ static inline int cpuid_edx(int op) pop ebx } return ret; +#elif defined(__x86_64__) + int rax, rcx, rdx; + + __asm__("pushq %%rbx\n\tcpuid\n\tpopq %%rbx" + : "=a" (rax), "=c" (rcx), "=d" (rdx) + : "a" (op)); + return rdx; #else int eax, ecx, edx; From jules at codesourcery.com Wed Dec 21 05:13:15 2005 From: jules at codesourcery.com (Jules Bergmann) Date: Wed, 21 Dec 2005 00:13:15 -0500 Subject: [vsipl++] [patch] SSE on amd64, other config hax In-Reply-To: <20051221050438.GC29701@codesourcery.com> References: <20051221050438.GC29701@codesourcery.com> Message-ID: <43A8E46B.90402@codesourcery.com> Nathan (Jasper) Myers wrote: > Patch below makes FFTW3 use SSE/SSE2 on x86-64, and cleans up some > config file and minor build details. OK? > Looks good, please check it in. Do the x86-64 changes work on Sethra? -- Jules From ncm at codesourcery.com Wed Dec 21 07:38:23 2005 From: ncm at codesourcery.com (Nathan (Jasper) Myers) Date: Tue, 20 Dec 2005 23:38:23 -0800 Subject: [vsipl++] [patch] SSE on amd64, other config hax In-Reply-To: <43A8E46B.90402@codesourcery.com> References: <20051221050438.GC29701@codesourcery.com> <43A8E46B.90402@codesourcery.com> Message-ID: <20051221073823.GE29701@codesourcery.com> On Wed, Dec 21, 2005 at 12:13:15AM -0500, Jules Bergmann wrote: > > Nathan (Jasper) Myers wrote: > >Patch below makes FFTW3 use SSE/SSE2 on x86-64, and cleans up some > >config file and minor build details. OK? > > Looks good, please check it in. Do the x86-64 changes work on Sethra? Hmm, on cugel, built with /home/jules/local/x86_64/gcc-4.0.1/bin/g++... qmtest run fft.cpp PASS qmtest run fftm.cpp FAIL Looking into the failure, something is odd. In particular, at line 258 of fftm.cpp, it calls error_db. In the second loop there, line 162, with j=4 and i=1, val is reported in gdb as 0, but is 0x7ff0000000000000. Furthermore, (gdb) p v1.get(j,i) $45 = {_M_value = -2.80966903e+29 + 7.42688186e-44 * I} (gdb) p v2.get(j,i) $46 = {_M_value = 2.47443301e-38 + 0 * I} (gdb) p v1.get(j,i) - v2.get(j,i) Attempt to take address of value not located in memory. (gdb) p v1.block().data_[4*18 + 1] $59 = {_M_value = -1.39658792e-14 + -6.5881545e-16 * I} (gdb) p v2.block().data_[4*18 + 1] $60 = {_M_value = -1.3965925e-14 + 0 * I} I will build with gnu-toolchains/x86_64-unknown-linux-gnu/gcc-3.4.4/bin/g++ and see what happens. Incidentally, I also did: Index: tests/context.in =================================================================== RCS file: /home/cvs/Repository/vpp/tests/context.in,v retrieving revision 1.4 diff -u -p -r1.4 context.in --- tests/context.in 1 Dec 2005 16:39:27 -0000 1.4 +++ tests/context.in 21 Dec 2005 07:35:55 -0000 @@ -1,8 +1,8 @@ CompilerTable.languages= cxx CompilerTable.cxx_kind= GCC CompilerTable.cxx_path= @CXX@ -CompilerTable.cxx_options= -I at abs_top_builddir@/src -I at abs_top_srcdir@/src @CPP FLAGS@ @INT_CPPFLAGS@ @CXXFLAGS@ -CompilerTable.cxx_ldflags= @LDFLAGS@ @INT_LDFLAGS@ @abs_top_builddir@/src/vsip/ libvsip.a @LIBS@ +CompilerTable.cxx_options= -I at abs_top_builddir@/src -I at abs_top_srcdir@/src @INT _CPPFLAGS@ @CPPFLAGS@ @CXXFLAGS@ +CompilerTable.cxx_ldflags= @INT_LDFLAGS@ @LDFLAGS@ @abs_top_builddir@/src/vsip/ libvsip.a @LIBS@ GPPInit.options= GPPInit.library_directories= DejaGNUTest.target= @host@ Nathan Myers ncm From ncm at codesourcery.com Wed Dec 21 08:50:49 2005 From: ncm at codesourcery.com (Nathan (Jasper) Myers) Date: Wed, 21 Dec 2005 00:50:49 -0800 Subject: [patch] Re: [patch] SSE on amd64, other config hax In-Reply-To: <20051221073823.GE29701@codesourcery.com> References: <20051221050438.GC29701@codesourcery.com> <43A8E46B.90402@codesourcery.com> <20051221073823.GE29701@codesourcery.com> Message-ID: <20051221085049.GF29701@codesourcery.com> On Tue, Dec 20, 2005 at 11:38:23PM -0800, Nathan (Jasper) Myers wrote: > On Wed, Dec 21, 2005 at 12:13:15AM -0500, Jules Bergmann wrote: > > Nathan (Jasper) Myers wrote: > > >Patch below makes FFTW3 use SSE/SSE2 on x86-64, and cleans up some > > >config file and minor build details. OK? > > > > Looks good, please check it in. Do the x86-64 changes work on Sethra? > > Hmm, on cugel, built with /home/jules/local/x86_64/gcc-4.0.1/bin/g++ ... > > qmtest run fft.cpp PASS > qmtest run fftm.cpp FAIL When built with /usr/local/tools/gcc-3.4.0/bin/g++ and tested using /home/jules/local/x86_64/bin/qmtest, both PASS. (BTW, when tested using /usr/local/tools/gcc-3.4.0/bin/qmtest, all tests fail with 'The context variable "CompilerTable.compiler_table" was not defined.' Evidently the qmtest installed there is obsolete.) New patch below. I tried to check it in, from both cugel and sethra, but just get "cvs commit: Up-to-date check failed for" Changelog, configure.ac, and GNUmakefile.in, despite that I have just cvs-updated them; and then deleted, cvs-updated, and re-patched them. Are the timestamps on CVS's files messed up? Nathan Myers ncm at cantrip.org Index: ChangeLog =================================================================== RCS file: /home/cvs/Repository/vpp/ChangeLog,v retrieving revision 1.344 diff -u -p -r1.344 ChangeLog --- ChangeLog 21 Dec 2005 04:04:36 -0000 1.344 +++ ChangeLog 21 Dec 2005 08:48:13 -0000 @@ -1,3 +1,13 @@ +2005-12-20 Nathan Myers + + * configure.ac, vendor/fftw/simd/sse.c, vendor/fftw/simd/sse2.c: + enable using SSE/SSE2 on x86-64. + * vendor/GNUmakefile.inc.in: improve build status reports, + simplify handling of ".a" results so that 'make clean' works. + * configure.ac, GNUmakefile.in, tests/context.in: + rearrange -I, -L so compiler will find internal includes & libs + first, installed ones second, environment ones last. + 2005-12-20 Stefan Seefeld * synopsis.py.in: Additional code not yet part of the last (0.8) release. Index: GNUmakefile.in =================================================================== RCS file: /home/cvs/Repository/vpp/GNUmakefile.in,v retrieving revision 1.32 diff -u -p -r1.32 GNUmakefile.in --- GNUmakefile.in 20 Dec 2005 17:10:34 -0000 1.32 +++ GNUmakefile.in 21 Dec 2005 08:48:13 -0000 @@ -58,13 +58,13 @@ CXXINCLUDES := -I src -I $(srcdir)/src # C++ macro definitions. CXXDEFS := # C++ preprocessor flags. -CXXCPPFLAGS := $(CXXINCLUDES) $(CXXDEFS) @CPPFLAGS@ @INT_CPPFLAGS@ +CXXCPPFLAGS := $(CXXINCLUDES) $(CXXDEFS) @INT_CPPFLAGS@ @CPPFLAGS@ # C++ compilation flags. CXXFLAGS := $(CXXCPPFLAGS) @CXXFLAGS@ # The extension for executable programs. EXEEXT := @EXEEXT@ # Linker flags. -LDFLAGS := @LDFLAGS@ @INT_LDFLAGS@ +LDFLAGS := @INT_LDFLAGS@ @LDFLAGS@ # Libraries to link to. LIBS := @LIBS@ # The extension for object files. Index: configure.ac =================================================================== RCS file: /home/cvs/Repository/vpp/configure.ac,v retrieving revision 1.60 diff -u -p -r1.60 configure.ac --- configure.ac 20 Dec 2005 18:50:29 -0000 1.60 +++ configure.ac 21 Dec 2005 08:48:13 -0000 @@ -456,11 +456,9 @@ if test "$build_fftw3" != "no"; then fftw3_d_simd= fftw3_l_simd= case "$host_cpu" in - (ia32|i686) fftw3_f_simd="--enable-sse" + (ia32|i686|x86_64) fftw3_f_simd="--enable-sse" fftw3_d_simd="--enable-sse2" ;; - (x86_64) fftw3_d_simd="" - ;; (ppc*) fftw3_f_simd="--enable-altivec" ;; esac AC_MSG_NOTICE([fftw3 config options: $fftw3_opts $fftw3_simd.]) @@ -523,11 +521,11 @@ if test "$build_fftw3" != "no"; then # fail). Instead we add them to LATE_LIBS, which gets added to # LIBS just before AC_OUTPUT. - LATE_LIBS="$LATE_LIBS $FFTW3_LIBS" - INT_CPPFLAGS="$INT_CPPFLAGS -I$curdir/vendor/fftw/include" - INT_LDFLAGS="$INT_LDFLAGS -L$curdir/vendor/fftw/lib" - CPPFLAGS="$CPPFLAGS -I$includedir/fftw3" - LDFLAGS="$LDFLAGS -L$libdir/fftw3" + LATE_LIBS="$FFTW3_LIBS $LATE_LIBS" + INT_CPPFLAGS="-I$curdir/vendor/fftw/include $INT_CPPFLAGS" + INT_LDFLAGS="-L$curdir/vendor/fftw/lib $INT_LDFLAGS" + CPPFLAGS="-I$includedir/fftw3 $CPPFLAGS" + LDFLAGS="-L$libdir/fftw3 $LDFLAGS" fi if test "$enable_fftw2" != "no" ; then @@ -1083,12 +1081,12 @@ if test "$with_lapack" != "no"; then # fail). Instead we add them to LATE_LIBS, which gets added to # LIBS just before AC_OUTPUT. - LATE_LIBS="$LATE_LIBS -lcsl_lapack -lcsl_cblas -lcsl_f77blas -lcsl_atlas $use_g2c" + LATE_LIBS="-lcsl_lapack -lcsl_cblas -lcsl_f77blas -lcsl_atlas $use_g2c $LATE_LIBS" - INT_CPPFLAGS="$INT_CPPFLAGS -I$my_abs_top_srcdir/vendor/atlas/include" - INT_LDFLAGS="$INT_LDFLAGS -L$curdir/vendor/atlas/lib" - CPPFLAGS="$keep_CPPFLAGS -I$includedir/atlas" - LDFLAGS="$keep_LDFLAGS -L$libdir/atlas" + INT_CPPFLAGS="-I$my_abs_top_srcdir/vendor/atlas/include $INT_CPPFLAGS" + INT_LDFLAGS="-L$curdir/vendor/atlas/lib $INT_LDFLAGS" + CPPFLAGS="-I$includedir/atlas $keep_CPPFLAGS" + LDFLAGS="-L$libdir/atlas $keep_LDFLAGS" LIBS="$keep_LIBS" lapack_use_ilaenv=0 cblas_style="1" # use cblas.h @@ -1231,7 +1229,7 @@ AC_CHECK_PROGS(XEP, xep) AC_PROG_INSTALL # "Late" variables -LIBS="$LIBS $LATE_LIBS" +LIBS="$LATE_LIBS $LIBS" AC_SUBST(INT_LDFLAGS) AC_SUBST(INT_CPPFLAGS) Index: tests/context.in =================================================================== RCS file: /home/cvs/Repository/vpp/tests/context.in,v retrieving revision 1.4 diff -u -p -r1.4 context.in --- tests/context.in 1 Dec 2005 16:39:27 -0000 1.4 +++ tests/context.in 21 Dec 2005 08:48:13 -0000 @@ -1,8 +1,8 @@ CompilerTable.languages= cxx CompilerTable.cxx_kind= GCC CompilerTable.cxx_path= @CXX@ -CompilerTable.cxx_options= -I at abs_top_builddir@/src -I at abs_top_srcdir@/src @CPPFLAGS@ @INT_CPPFLAGS@ @CXXFLAGS@ -CompilerTable.cxx_ldflags= @LDFLAGS@ @INT_LDFLAGS@ @abs_top_builddir@/src/vsip/libvsip.a @LIBS@ +CompilerTable.cxx_options= -I at abs_top_builddir@/src -I at abs_top_srcdir@/src @INT_CPPFLAGS@ @CPPFLAGS@ @CXXFLAGS@ +CompilerTable.cxx_ldflags= @INT_LDFLAGS@ @LDFLAGS@ @abs_top_builddir@/src/vsip/libvsip.a @LIBS@ GPPInit.options= GPPInit.library_directories= DejaGNUTest.target= @host@ Index: vendor/GNUmakefile.inc.in =================================================================== RCS file: /home/cvs/Repository/vpp/vendor/GNUmakefile.inc.in,v retrieving revision 1.3 diff -u -p -r1.3 GNUmakefile.inc.in --- vendor/GNUmakefile.inc.in 20 Dec 2005 18:50:30 -0000 1.3 +++ vendor/GNUmakefile.inc.in 21 Dec 2005 08:48:13 -0000 @@ -42,11 +42,11 @@ all:: $(vendor_LIBS) libs:: $(vendor_LIBS) $(vendor_ATLAS_LIBS): - @echo "Building ATLAS (atlas.build.log)" + @echo "Building ATLAS (see atlas.build.log)" @$(MAKE) -C vendor/atlas build > atlas.build.log 2>&1 $(vendor_REF_LAPACK): - @echo "Building LAPACK (lapack.build.log)" + @echo "Building LAPACK (see lapack.build.log)" @$(MAKE) -C vendor/lapack/SRC all > lapack.build.log 2>&1 $(vendor_USE_LAPACK): $(vendor_PRE_LAPACK) $(vendor_REF_LAPACK) @@ -57,11 +57,11 @@ $(vendor_USE_LAPACK): $(vendor_PRE_LAPAC rm -rf vendor/atlas/lib/tmp clean:: - @echo "Cleaning ATLAS (atlas.clean.log)" + @echo "Cleaning ATLAS (see atlas.clean.log)" @$(MAKE) -C vendor/atlas clean > atlas.clean.log 2>&1 install:: - @echo "Installing ATLAS (atlas.install.log)" + @echo "Installing ATLAS (see atlas.install.log)" # @$(MAKE) -C vendor/atlas installinstall > atlas.install.log 2>&1 $(INSTALL) -d $(libdir)/atlas $(INSTALL_DATA) vendor/atlas/lib/libcsl_atlas.a $(libdir)/atlas @@ -75,41 +75,38 @@ endif ifdef USE_BUILTIN_FFTW vendor_FFTW_LIBS := \ - vendor/fftw3f/libfftw3f-csl.a \ - vendor/fftw3/libfftw3-csl.a \ - vendor/fftw3l/libfftw3l-csl.a \ + vendor/fftw3f/.libs/libfftw3f-csl.a \ + vendor/fftw3/.libs/libfftw3-csl.a \ + vendor/fftw3l/.libs/libfftw3l-csl.a all:: $(vendor_FFTW_LIBS) libs:: $(vendor_FFTW_LIBS) -vendor/fftw3f/libfftw3f-csl.a: - @echo "Building FFTW float (fftw-f.build.log)" +vendor/fftw3f/.libs/libfftw3f-csl.a: + @echo "Building FFTW float (see fftw-f.build.log)" @$(MAKE) -C vendor/fftw3f > fftw-f.build.log 2>&1 - mv vendor/fftw3f/.libs/libfftw3f.a vendor/fftw3f/libfftw3f-csl.a -vendor/fftw3/libfftw3-csl.a: - @echo "Building FFTW double (fftw-d.build.log)" +vendor/fftw3/.libs/libfftw3-csl.a: + @echo "Building FFTW double (see fftw-d.build.log)" @$(MAKE) -C vendor/fftw3 > fftw-d.build.log 2>&1 - mv vendor/fftw3/.libs/libfftw3.a vendor/fftw3/libfftw3-csl.a -vendor/fftw3l/libfftw3l-csl.a: - @echo "Building FFTW double (fftw-l.build.log)" +vendor/fftw3l/.libs/libfftw3l-csl.a: + @echo "Building FFTW long double (see fftw-l.build.log)" @$(MAKE) -C vendor/fftw3l > fftw-l.build.log 2>&1 - mv vendor/fftw3l/.libs/libfftw3l.a vendor/fftw3l/libfftw3l-csl.a clean:: - @echo "Cleaning FFTW (fftw.clean.log)" + @echo "Cleaning FFTW (see fftw.clean.log)" @$(MAKE) -C vendor/fftw3f clean > fftw.clean.log 2>&1 @$(MAKE) -C vendor/fftw3 clean >> fftw.clean.log 2>&1 @$(MAKE) -C vendor/fftw3l clean >> fftw.clean.log 2>&1 install:: - @echo "Installing FFTW (fftw.install.log)" + @echo "Installing FFTW" $(INSTALL) -d $(libdir)/fftw3 - $(INSTALL_DATA) vendor/fftw3f/libfftw3f-csl.a $(libdir)/fftw3 - $(INSTALL_DATA) vendor/fftw3/libfftw3-csl.a $(libdir)/fftw3 - $(INSTALL_DATA) vendor/fftw3l/libfftw3l-csl.a $(libdir)/fftw3 + $(INSTALL_DATA) vendor/fftw3f/.libs/libfftw3f-csl.a $(libdir)/fftw3 + $(INSTALL_DATA) vendor/fftw3/.libs/libfftw3-csl.a $(libdir)/fftw3 + $(INSTALL_DATA) vendor/fftw3l/.libs/libfftw3l-csl.a $(libdir)/fftw3 $(INSTALL) -d $(includedir) $(INSTALL_DATA) $(srcdir)/vendor/fftw/api/fftw3.h $(includedir) endif Index: vendor/fftw/simd/sse.c =================================================================== RCS file: /home/cvs/Repository/fftw/simd/sse.c,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 sse.c --- vendor/fftw/simd/sse.c 1 Dec 2005 10:33:03 -0000 1.1.1.1 +++ vendor/fftw/simd/sse.c 21 Dec 2005 08:48:13 -0000 @@ -40,6 +40,13 @@ static inline int cpuid_edx(int op) pop ebx } return ret; +#elif defined(__x86_64__) + int rax, rcx, rdx; + + __asm__("pushq %%rbx\n\tcpuid\n\tpopq %%rbx" + : "=a" (rax), "=c" (rcx), "=d" (rdx) + : "a" (op)); + return rdx; #else int eax, ecx, edx; Index: vendor/fftw/simd/sse2.c =================================================================== RCS file: /home/cvs/Repository/fftw/simd/sse2.c,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 sse2.c --- vendor/fftw/simd/sse2.c 1 Dec 2005 10:33:03 -0000 1.1.1.1 +++ vendor/fftw/simd/sse2.c 21 Dec 2005 08:48:13 -0000 @@ -40,6 +40,13 @@ static inline int cpuid_edx(int op) pop ebx } return ret; +#elif defined(__x86_64__) + int rax, rcx, rdx; + + __asm__("pushq %%rbx\n\tcpuid\n\tpopq %%rbx" + : "=a" (rax), "=c" (rcx), "=d" (rdx) + : "a" (op)); + return rdx; #else int eax, ecx, edx; From jules at codesourcery.com Wed Dec 21 13:48:11 2005 From: jules at codesourcery.com (Jules Bergmann) Date: Wed, 21 Dec 2005 08:48:11 -0500 Subject: [vsipl++] [patch] Re: [patch] SSE on amd64, other config hax In-Reply-To: <20051221085049.GF29701@codesourcery.com> References: <20051221050438.GC29701@codesourcery.com> <43A8E46B.90402@codesourcery.com> <20051221073823.GE29701@codesourcery.com> <20051221085049.GF29701@codesourcery.com> Message-ID: <43A95D1B.8000701@codesourcery.com> Nathan (Jasper) Myers wrote: > On Tue, Dec 20, 2005 at 11:38:23PM -0800, Nathan (Jasper) Myers wrote: > >>On Wed, Dec 21, 2005 at 12:13:15AM -0500, Jules Bergmann wrote: >> >>>Nathan (Jasper) Myers wrote: >>> >>>>Patch below makes FFTW3 use SSE/SSE2 on x86-64, and cleans up some >>>>config file and minor build details. OK? >>> >>>Looks good, please check it in. Do the x86-64 changes work on Sethra? >> >>Hmm, on cugel, built with /home/jules/local/x86_64/gcc-4.0.1/bin/g++ ... >> >>qmtest run fft.cpp PASS >>qmtest run fftm.cpp FAIL Good thing I asked! > > > When built with /usr/local/tools/gcc-3.4.0/bin/g++ and tested using > /home/jules/local/x86_64/bin/qmtest, both PASS. Good, that is the compiler we're most worried about (and the Sourcery G++ packaged version of it). > > (BTW, when tested using /usr/local/tools/gcc-3.4.0/bin/qmtest, > all tests fail with 'The context variable "CompilerTable.compiler_table" > was not defined.' Evidently the qmtest installed there is obsolete.) You should be pulling qmtest out of /usr/local/tools/vpp-1.0/bin. If you source /usr/local/tools/vpp-1.0/vars.sh, it will set your path up for you. > > New patch below. I tried to check it in, from both cugel and sethra, > but just get "cvs commit: Up-to-date check failed for" Changelog, > configure.ac, and GNUmakefile.in, despite that I have just cvs-updated > them; and then deleted, cvs-updated, and re-patched them. Are the > timestamps on CVS's files messed up? Don't know whats causing that. I will tests the patch and then apply it for you. I'm going to leave out the questionable bits below. > > vendor_FFTW_LIBS := \ > - vendor/fftw3f/libfftw3f-csl.a \ > - vendor/fftw3/libfftw3-csl.a \ > - vendor/fftw3l/libfftw3l-csl.a \ > + vendor/fftw3f/.libs/libfftw3f-csl.a \ > + vendor/fftw3/.libs/libfftw3-csl.a \ > + vendor/fftw3l/.libs/libfftw3l-csl.a If you change the locations of the libraries, don't you also need to change the soft links created by configure? > > all:: $(vendor_FFTW_LIBS) > > libs:: $(vendor_FFTW_LIBS) > > -vendor/fftw3f/libfftw3f-csl.a: > - @echo "Building FFTW float (fftw-f.build.log)" > +vendor/fftw3f/.libs/libfftw3f-csl.a: > + @echo "Building FFTW float (see fftw-f.build.log)" > @$(MAKE) -C vendor/fftw3f > fftw-f.build.log 2>&1 > - mv vendor/fftw3f/.libs/libfftw3f.a vendor/fftw3f/libfftw3f-csl.a Does this actually work? When building FFTW3, I see it ignoring the "-csl" suffix passed at configure. Hence the move from 'vendor/fftw3f/.libs/libfftw3f.a'. Likewise for libfftw3.a and libfftw3l.a. -- Jules From jules at codesourcery.com Wed Dec 21 15:11:33 2005 From: jules at codesourcery.com (Jules Bergmann) Date: Wed, 21 Dec 2005 10:11:33 -0500 Subject: [vsipl++] [patch] Re: [patch] SSE on amd64, other config hax In-Reply-To: <43A95D1B.8000701@codesourcery.com> References: <20051221050438.GC29701@codesourcery.com> <43A8E46B.90402@codesourcery.com> <20051221073823.GE29701@codesourcery.com> <20051221085049.GF29701@codesourcery.com> <43A95D1B.8000701@codesourcery.com> Message-ID: <43A970A5.7000303@codesourcery.com> Patch applied. Tested locally (i686) and Sethra (x86-64). -- Jules -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: fftw-2.diff URL: From jules at codesourcery.com Wed Dec 21 16:27:56 2005 From: jules at codesourcery.com (Jules Bergmann) Date: Wed, 21 Dec 2005 11:27:56 -0500 Subject: [patch] Don't build builtin FFTW if another FFT requested Message-ID: <43A9828C.8050809@codesourcery.com> This patch disables the building of the builtin FFTW3 if another FFT is requested, such as IPP. In the future, if we support multiple FFT libraries at once, we can revisit this. Nathan, ok to apply? -- Jules -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: fftw-3.diff URL: From jules at codesourcery.com Wed Dec 21 21:17:37 2005 From: jules at codesourcery.com (Jules Bergmann) Date: Wed, 21 Dec 2005 16:17:37 -0500 Subject: [patch] vmmul, IPP scalar-view, dense<2> opt. Message-ID: <43A9C671.3000104@codesourcery.com> This patch contains several performance enhancements: - Optimization of dense 2-D and 3-D get and put. Previously, it tried to be clever and abstract the 2-D and 3-D varieties into a get(Point) and put(Point), which where later "de-abstracted" by Layout, by converting the point into a location in memory to access. Our compilers have trouble collapsing this. Changing the implementation to pass the indices directly to layout improves performance. - Dispatch matrix expressions through Serial_dispatch_evaluator. This, in along with an additional trasnspose tag in LibraryTagList, lets us plug fast transpose algorithms into the dispatch framework. - Add evaluator to decompose vector-matrix multiply into individual vector-vector or scalar-vector element-wise operations (depending on whether the multiply is by-row or by-column and what the output dimension-ordering is), which are themselves dispatched. For IPP, this results in better performance than plain loop fusion. For non-IPP, this results in better performance then loop fusion if the decomposition is to scalar-vector (because this reduces the memory bandwidth of the operation), or the same performance if the decomposition is to vector-vector. - Add IPP dispatch for scalar-vector add, subtract, multiply, and divide operations. New scalar-view test for additional coverage. Ok to commit? -- Jules -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: misc.diff URL: From mark at codesourcery.com Wed Dec 21 22:21:42 2005 From: mark at codesourcery.com (Mark Mitchell) Date: Wed, 21 Dec 2005 14:21:42 -0800 Subject: [vsipl++] [patch] vmmul, IPP scalar-view, dense<2> opt. In-Reply-To: <43A9C671.3000104@codesourcery.com> References: <43A9C671.3000104@codesourcery.com> Message-ID: <43A9D576.8010800@codesourcery.com> Jules Bergmann wrote: > This patch contains several performance enhancements: > > - Optimization of dense 2-D and 3-D get and put. Previously, it > tried to be clever and abstract the 2-D and 3-D varieties into > a get(Point) and put(Point), which where later "de-abstracted" > by Layout, by converting the point into a location in memory to > access. Our compilers have trouble collapsing this. Changing > the implementation to pass the indices directly to layout > improves performance. That's too bad (about the compilers), but this is exactly the right decision; the basic goal is to deliver something that works well for the customers, and the customers don't care about the fact that the code underneath is a little more verbose. I suspect that the problem (FYI) is that compilers in general, and GCC in particular, are not as good at eliminating structures as they are scalars. When you bind things together into a point, you get something that doesn't fit in registers, and compilers tend to drop these things on the stack and then be unable to undo the damage. > - Dispatch matrix expressions through Serial_dispatch_evaluator. > > This, in along with an additional trasnspose tag in LibraryTagList, > lets us plug fast transpose algorithms into the dispatch > framework. > > - Add evaluator to decompose vector-matrix multiply into individual > vector-vector or scalar-vector element-wise operations (depending on > whether the multiply is by-row or by-column and what the output > dimension-ordering is), which are themselves dispatched. For IPP, > this results in better performance than plain loop fusion. For > non-IPP, this results in better performance then loop fusion if the > decomposition is to scalar-vector (because this reduces the memory > bandwidth of the operation), or the same performance if the > decomposition is to vector-vector. > > - Add IPP dispatch for scalar-vector add, subtract, multiply, and > divide operations. New scalar-view test for additional coverage. I'm nowhere near understanding the code, but I think these are all great ideas! -- Mark Mitchell CodeSourcery, LLC mark at codesourcery.com (650) 331-3385 x713 From ncm at codesourcery.com Wed Dec 21 22:40:23 2005 From: ncm at codesourcery.com (Nathan (Jasper) Myers) Date: Wed, 21 Dec 2005 14:40:23 -0800 Subject: [patch] more FFTW cleanup Message-ID: <20051221224023.GI29701@codesourcery.com> This is another (non-minimal) try at making "make clean" clear out fftw libs. It also fixes a typo in tests/fft.cpp that we hadn't tripped on yet. Tested on sethra. OK to commit? Before I do, though, I wonder: should we really be $(INSTALL)ing the libraries in $(libdir)/atlas and $(libdir)/fftw? Shouldn't they just go in $(libdir)? BTW, /usr/local/tools/vpp-1.0/bin/qmtest on sethra doesn't work for me. I had to use /home/jules/local/x86_64/bin/qmtest. Nathan Myers ncm =================================================================== RCS file: /home/cvs/Repository/vpp/ChangeLog,v retrieving revision 1.346 diff -u -p -r1.346 ChangeLog --- ChangeLog 21 Dec 2005 18:26:37 -0000 1.346 +++ ChangeLog 21 Dec 2005 22:27:08 -0000 @@ -1,6 +1,12 @@ +2005-12-21 Nathan Myers + + * configure.ac, vendor/GNUmakefile.inc.in: fix "make clean" + for fftw libs, other cleanup. + * tests/fft.cpp: typo; test with double if float not supported. + 2005-12-21 Jules Bergmann - * configure.ac: Done build builtin FFTW3 when asked to use another + * configure.ac: Don't build builtin FFTW3 when asked to use another FFT library than FFTW3. 2005-12-21 Nathan Myers Index: configure.ac =================================================================== RCS file: /home/cvs/Repository/vpp/configure.ac,v retrieving revision 1.62 diff -u -p -r1.62 configure.ac --- configure.ac 21 Dec 2005 18:26:38 -0000 1.62 +++ configure.ac 21 Dec 2005 22:27:08 -0000 @@ -485,13 +485,19 @@ if test "$build_fftw3" != "no"; then echo "===============================================================" rm -rf vendor/fftw - mkdir -p vendor/fftw/lib + mkdir -p vendor/fftw/ + echo \ +"Warning: this directory is deleted and rebuilt by the configure script. +There are no regular files here, only symlinks (except this one)." \ + > vendor/fftw/README + mkdir -p vendor/fftw/include fftw3_src_prefix="`(cd $srcdir/vendor/fftw; echo \"$PWD\")`" - ln -s "$fftw3_src_prefix"/api vendor/fftw/include - # these don't refer to anything yet, but will when built: - ln -s ../../fftw3f/libfftw3f-csl.a vendor/fftw/lib/libfftw3f-csl.a - ln -s ../../fftw3/libfftw3-csl.a vendor/fftw/lib/libfftw3-csl.a - ln -s ../../fftw3l/libfftw3l-csl.a vendor/fftw/lib/libfftw3l-csl.a + ln -s "$fftw3_src_prefix"/api/fftw3.h vendor/fftw/include/fftw3.h + mkdir -p vendor/fftw/lib + # these don't refer to anything yet. + ln -s ../../fftw3f/.libs/libfftw3f.a vendor/fftw/lib/libfftw3f-csl.a + ln -s ../../fftw3/.libs/libfftw3.a vendor/fftw/lib/libfftw3-csl.a + ln -s ../../fftw3l/.libs/libfftw3l.a vendor/fftw/lib/libfftw3l-csl.a else AC_MSG_RESULT([not found]) fi Index: vendor/GNUmakefile.inc.in =================================================================== RCS file: /home/cvs/Repository/vpp/vendor/GNUmakefile.inc.in,v retrieving revision 1.4 diff -u -p -r1.4 GNUmakefile.inc.in --- vendor/GNUmakefile.inc.in 21 Dec 2005 14:52:43 -0000 1.4 +++ vendor/GNUmakefile.inc.in 21 Dec 2005 22:27:08 -0000 @@ -74,42 +74,41 @@ endif ifdef USE_BUILTIN_FFTW +# note: configure script constructs vendor/fftw/ symlinks. + vendor_FFTW_LIBS := \ - vendor/fftw3f/libfftw3f-csl.a \ - vendor/fftw3/libfftw3-csl.a \ - vendor/fftw3l/libfftw3l-csl.a \ + vendor/fftw3f/.libs/libfftw3f.a \ + vendor/fftw3/.libs/libfftw3.a \ + vendor/fftw3l/.libs/libfftw3l.a all:: $(vendor_FFTW_LIBS) libs:: $(vendor_FFTW_LIBS) -vendor/fftw3f/libfftw3f-csl.a: - @echo "Building FFTW float (fftw-f.build.log)" +vendor/fftw3f/.libs/libfftw3f.a: + @echo "Building FFTW float (see fftw-f.build.log)" @$(MAKE) -C vendor/fftw3f > fftw-f.build.log 2>&1 - mv vendor/fftw3f/.libs/libfftw3f.a vendor/fftw3f/libfftw3f-csl.a -vendor/fftw3/libfftw3-csl.a: - @echo "Building FFTW double (fftw-d.build.log)" +vendor/fftw3/.libs/libfftw3.a: + @echo "Building FFTW double (see fftw-d.build.log)" @$(MAKE) -C vendor/fftw3 > fftw-d.build.log 2>&1 - mv vendor/fftw3/.libs/libfftw3.a vendor/fftw3/libfftw3-csl.a -vendor/fftw3l/libfftw3l-csl.a: - @echo "Building FFTW double (fftw-l.build.log)" +vendor/fftw3l/.libs/libfftw3l.a: + @echo "Building FFTW double (see fftw-l.build.log)" @$(MAKE) -C vendor/fftw3l > fftw-l.build.log 2>&1 - mv vendor/fftw3l/.libs/libfftw3l.a vendor/fftw3l/libfftw3l-csl.a clean:: - @echo "Cleaning FFTW (fftw.clean.log)" + @echo "Cleaning FFTW (see fftw.clean.log)" @$(MAKE) -C vendor/fftw3f clean > fftw.clean.log 2>&1 - @$(MAKE) -C vendor/fftw3 clean >> fftw.clean.log 2>&1 - @$(MAKE) -C vendor/fftw3l clean >> fftw.clean.log 2>&1 + @$(MAKE) -C vendor/fftw3 clean >> fftw.clean.log 2>&1 + @$(MAKE) -C vendor/fftw3l clean >> fftw.clean.log 2>&1 install:: - @echo "Installing FFTW (fftw.install.log)" + @echo "Installing FFTW" $(INSTALL) -d $(libdir)/fftw3 - $(INSTALL_DATA) vendor/fftw3f/libfftw3f-csl.a $(libdir)/fftw3 - $(INSTALL_DATA) vendor/fftw3/libfftw3-csl.a $(libdir)/fftw3 - $(INSTALL_DATA) vendor/fftw3l/libfftw3l-csl.a $(libdir)/fftw3 + $(INSTALL_DATA) vendor/fftw/lib/libfftw3f-csl.a $(libdir)/fftw3 + $(INSTALL_DATA) vendor/fftw/lib/libfftw3-csl.a $(libdir)/fftw3 + $(INSTALL_DATA) vendor/fftw/lib/libfftw3l-csl.a $(libdir)/fftw3 $(INSTALL) -d $(includedir) $(INSTALL_DATA) $(srcdir)/vendor/fftw/api/fftw3.h $(includedir) endif Index: tests/fft.cpp =================================================================== RCS file: /home/cvs/Repository/vpp/tests/fft.cpp,v retrieving revision 1.9 diff -u -p -r1.9 fft.cpp --- tests/fft.cpp 20 Dec 2005 12:48:40 -0000 1.9 +++ tests/fft.cpp 21 Dec 2005 22:27:08 -0000 @@ -1001,7 +1001,7 @@ main() #if defined(VSIP_IMPL_FFT_USE_FLOAT) # define SCALAR float -#elif defined(VSIP_IMPL_FFT_USE_FLOAT) +#elif defined(VSIP_IMPL_FFT_USE_DOUBLE) # define SCALAR double #endif From mark at codesourcery.com Wed Dec 21 22:52:26 2005 From: mark at codesourcery.com (Mark Mitchell) Date: Wed, 21 Dec 2005 14:52:26 -0800 Subject: [vsipl++] [patch] more FFTW cleanup In-Reply-To: <20051221224023.GI29701@codesourcery.com> References: <20051221224023.GI29701@codesourcery.com> Message-ID: <43A9DCAA.40208@codesourcery.com> Nathan (Jasper) Myers wrote: > Before I do, though, I wonder: should we really be $(INSTALL)ing > the libraries in $(libdir)/atlas and $(libdir)/fftw? Shouldn't > they just go in $(libdir)? Yes, I think they should just go in libdir. I also don't think we need the -csl suffix; if you want to use a different libfftw.a, just put a -L option for that in your path before the output from pkgconfig. In fact, the -csl suffix might be dangerous; if people were to have Makefiles that use -lfftw, they might get both their FFTW and ours. -- Mark Mitchell CodeSourcery, LLC mark at codesourcery.com (650) 331-3385 x713 From jules at codesourcery.com Thu Dec 22 01:21:37 2005 From: jules at codesourcery.com (Jules Bergmann) Date: Wed, 21 Dec 2005 20:21:37 -0500 Subject: [vsipl++] [patch] more FFTW cleanup In-Reply-To: <20051221224023.GI29701@codesourcery.com> References: <20051221224023.GI29701@codesourcery.com> Message-ID: <43A9FFA1.4040401@codesourcery.com> Nathan (Jasper) Myers wrote: > This is another (non-minimal) try at making "make clean" clear out > fftw libs. It also fixes a typo in tests/fft.cpp that we hadn't > tripped on yet. Tested on sethra. > > OK to commit? Looks good. Please check it in. Good catch on the FFT bug. Can you extend fft.cpp to cover the double precision FFTs as well. -- Jules From jules at codesourcery.com Thu Dec 22 01:23:39 2005 From: jules at codesourcery.com (Jules Bergmann) Date: Wed, 21 Dec 2005 20:23:39 -0500 Subject: [vsipl++] [patch] more FFTW cleanup In-Reply-To: <43A9DCAA.40208@codesourcery.com> References: <20051221224023.GI29701@codesourcery.com> <43A9DCAA.40208@codesourcery.com> Message-ID: <43AA001B.2010604@codesourcery.com> Mark Mitchell wrote: > Nathan (Jasper) Myers wrote: > >>Before I do, though, I wonder: should we really be $(INSTALL)ing >>the libraries in $(libdir)/atlas and $(libdir)/fftw? Shouldn't >>they just go in $(libdir)? > > > Yes, I think they should just go in libdir. > > I also don't think we need the -csl suffix; if you want to use a > different libfftw.a, just put a -L option for that in your path before > the output from pkgconfig. In fact, the -csl suffix might be dangerous; > if people were to have Makefiles that use -lfftw, they might get both > their FFTW and ours. > Nathan, can you take care of the -csl suffix for fftw? I'll handle removing the csl_ prefix for ATLAS. -- Jules From jules at codesourcery.com Thu Dec 22 01:34:56 2005 From: jules at codesourcery.com (Jules Bergmann) Date: Wed, 21 Dec 2005 20:34:56 -0500 Subject: [vsipl++] [patch] more FFTW cleanup In-Reply-To: <43AA001B.2010604@codesourcery.com> References: <20051221224023.GI29701@codesourcery.com> <43A9DCAA.40208@codesourcery.com> <43AA001B.2010604@codesourcery.com> Message-ID: <43AA02C0.7010003@codesourcery.com> Jules Bergmann wrote: >> > > Nathan, can you take care of the -csl suffix for fftw? I'll handle > removing the csl_ prefix for ATLAS. Nathan, scratch that. I thought that fixing this required mucking with ATLAS' configure, but it should be confined to the top-level configure and vendor/GNUmakefile.inc. Can you take care of the csl_ ATLAS prefix too when taking out the -csl suffix. thanks, -- Jules From ncm at codesourcery.com Thu Dec 22 02:06:55 2005 From: ncm at codesourcery.com (Nathan (Jasper) Myers) Date: Wed, 21 Dec 2005 18:06:55 -0800 Subject: [patch] Re: more FFTW cleanup (round 2) In-Reply-To: <43AA02C0.7010003@codesourcery.com> References: <20051221224023.GI29701@codesourcery.com> <43A9DCAA.40208@codesourcery.com> <43AA001B.2010604@codesourcery.com> <43AA02C0.7010003@codesourcery.com> Message-ID: <20051222020655.GK29701@codesourcery.com> On Wed, Dec 21, 2005 at 08:34:56PM -0500, Jules Bergmann wrote: > Jules Bergmann wrote: > Can you take care of the csl_ ATLAS prefix > too when taking out the -csl suffix. Round 2. Nathan Myers ncm Index: ChangeLog =================================================================== RCS file: /home/cvs/Repository/vpp/ChangeLog,v retrieving revision 1.346 diff -u -p -r1.346 ChangeLog --- ChangeLog 21 Dec 2005 18:26:37 -0000 1.346 +++ ChangeLog 22 Dec 2005 01:59:01 -0000 @@ -1,6 +1,12 @@ +2005-12-21 Nathan Myers + + * configure.ac, vendor/GNUmakefile.inc.in: fix "make clean" + for fftw libs, other cleanup, install in $(libdir). + * tests/fft.cpp: typo; test with double if float not supported. + 2005-12-21 Jules Bergmann - * configure.ac: Done build builtin FFTW3 when asked to use another + * configure.ac: Don't build builtin FFTW3 when asked to use another FFT library than FFTW3. 2005-12-21 Nathan Myers Index: configure.ac =================================================================== RCS file: /home/cvs/Repository/vpp/configure.ac,v retrieving revision 1.62 diff -u -p -r1.62 configure.ac --- configure.ac 21 Dec 2005 18:26:38 -0000 1.62 +++ configure.ac 22 Dec 2005 01:59:01 -0000 @@ -405,8 +405,8 @@ if test "$enable_fftw3" != "no" ; then if test "$with_fft" != "builtin"; then if test -n "$with_fftw3_prefix"; then - CPPFLAGS="$CPPFLAGS -I$with_fftw3_prefix/include" - LIBS="$LIBS -L$with_fftw3_prefix/lib" + CPPFLAGS="-I$with_fftw3_prefix/include $CPPFLAGS" + LIBS="-L$with_fftw3_prefix/lib $LIBS" fi AC_MSG_CHECKING([for external FFTW3 library]) @@ -449,7 +449,6 @@ if test "$build_fftw3" != "no"; then fftw3_configure="`(cd $srcdir/vendor/fftw; echo \"$PWD\")`"/configure fftw3_opts="--disable-dependency-tracking --silent" - fftw3_opts="$fftw3_opts --program-suffix=-csl" fftw3_opts="$fftw3_opts --disable-fortran" @@ -485,13 +484,19 @@ if test "$build_fftw3" != "no"; then echo "===============================================================" rm -rf vendor/fftw - mkdir -p vendor/fftw/lib + mkdir -p vendor/fftw/ + echo \ +"Warning: this directory is deleted and rebuilt by the configure script. +There are no regular files here, only symlinks (except this one)." \ + > vendor/fftw/README + mkdir -p vendor/fftw/include fftw3_src_prefix="`(cd $srcdir/vendor/fftw; echo \"$PWD\")`" - ln -s "$fftw3_src_prefix"/api vendor/fftw/include - # these don't refer to anything yet, but will when built: - ln -s ../../fftw3f/libfftw3f-csl.a vendor/fftw/lib/libfftw3f-csl.a - ln -s ../../fftw3/libfftw3-csl.a vendor/fftw/lib/libfftw3-csl.a - ln -s ../../fftw3l/libfftw3l-csl.a vendor/fftw/lib/libfftw3l-csl.a + ln -s "$fftw3_src_prefix"/api/fftw3.h vendor/fftw/include/fftw3.h + mkdir -p vendor/fftw/lib + # these don't refer to anything yet. + ln -s ../../fftw3f/.libs/libfftw3f.a vendor/fftw/lib/libfftw3f.a + ln -s ../../fftw3/.libs/libfftw3.a vendor/fftw/lib/libfftw3.a + ln -s ../../fftw3l/.libs/libfftw3l.a vendor/fftw/lib/libfftw3l.a else AC_MSG_RESULT([not found]) fi @@ -512,7 +517,7 @@ if test "$build_fftw3" != "no"; then my_abs_top_srcdir="$curdir/$srcdir" fi - FFTW3_LIBS="-lfftw3f-csl -lfftw3-csl -lfftw3l-csl" + FFTW3_LIBS="-lfftw3f -lfftw3 -lfftw3l" AC_MSG_NOTICE([Will link with $FFTW3_LIBS.]) AC_SUBST(USE_BUILTIN_FFTW, 1) @@ -1056,7 +1061,7 @@ if test "$with_lapack" != "no"; then else AC_MSG_RESULT([Cannot find vendor/atlas/configure after cd.]) fi - $atlas_configure --with-libprefix=csl_ + $atlas_configure cd ../.. echo "===============================================================" @@ -1082,7 +1087,7 @@ if test "$with_lapack" != "no"; then # fail). Instead we add them to LATE_LIBS, which gets added to # LIBS just before AC_OUTPUT. - LATE_LIBS="-lcsl_lapack -lcsl_cblas -lcsl_f77blas -lcsl_atlas $use_g2c $LATE_LIBS" + LATE_LIBS="-llapack -lcblas -lf77blas -latlas $use_g2c $LATE_LIBS" INT_CPPFLAGS="-I$my_abs_top_srcdir/vendor/atlas/include $INT_CPPFLAGS" INT_LDFLAGS="-L$curdir/vendor/atlas/lib $INT_LDFLAGS" Index: tests/fft.cpp =================================================================== RCS file: /home/cvs/Repository/vpp/tests/fft.cpp,v retrieving revision 1.9 diff -u -p -r1.9 fft.cpp --- tests/fft.cpp 20 Dec 2005 12:48:40 -0000 1.9 +++ tests/fft.cpp 22 Dec 2005 01:59:01 -0000 @@ -1001,7 +1036,7 @@ main() #if defined(VSIP_IMPL_FFT_USE_FLOAT) # define SCALAR float -#elif defined(VSIP_IMPL_FFT_USE_FLOAT) +#elif defined(VSIP_IMPL_FFT_USE_DOUBLE) # define SCALAR double #endif Index: vendor/GNUmakefile.inc.in =================================================================== RCS file: /home/cvs/Repository/vpp/vendor/GNUmakefile.inc.in,v retrieving revision 1.4 diff -u -p -r1.4 GNUmakefile.inc.in --- vendor/GNUmakefile.inc.in 21 Dec 2005 14:52:43 -0000 1.4 +++ vendor/GNUmakefile.inc.in 22 Dec 2005 01:59:01 -0000 @@ -16,19 +16,19 @@ USE_BUILTIN_ATLAS := @USE_BUILTIN_ATLAS@ USE_BUILTIN_FFTW := @USE_BUILTIN_FFTW@ vendor_REF_LAPACK = vendor/lapack/lapack.a -vendor_PRE_LAPACK = vendor/atlas/lib/libcsl_prelapack.a -vendor_USE_LAPACK = vendor/atlas/lib/libcsl_lapack.a +vendor_PRE_LAPACK = vendor/atlas/lib/libprelapack.a +vendor_USE_LAPACK = vendor/atlas/lib/liblapack.a vendor_ATLAS_LIBS := \ - vendor/atlas/lib/libcsl_atlas.a \ - vendor/atlas/lib/libcsl_cblas.a \ - vendor/atlas/lib/libcsl_f77blas.a \ + vendor/atlas/lib/libatlas.a \ + vendor/atlas/lib/libcblas.a \ + vendor/atlas/lib/libf77blas.a \ $(vendor_PRE_LAPACK) vendor_LIBS := \ - vendor/atlas/lib/libcsl_atlas.a \ - vendor/atlas/lib/libcsl_cblas.a \ - vendor/atlas/lib/libcsl_f77blas.a \ + vendor/atlas/lib/libatlas.a \ + vendor/atlas/lib/libcblas.a \ + vendor/atlas/lib/libf77blas.a \ $(vendor_USE_LAPACK) @@ -64,52 +64,51 @@ install:: @echo "Installing ATLAS (see atlas.install.log)" # @$(MAKE) -C vendor/atlas installinstall > atlas.install.log 2>&1 $(INSTALL) -d $(libdir)/atlas - $(INSTALL_DATA) vendor/atlas/lib/libcsl_atlas.a $(libdir)/atlas - $(INSTALL_DATA) vendor/atlas/lib/libcsl_cblas.a $(libdir)/atlas - $(INSTALL_DATA) vendor/atlas/lib/libcsl_f77blas.a $(libdir)/atlas - $(INSTALL_DATA) vendor/atlas/lib/libcsl_lapack.a $(libdir)/atlas + $(INSTALL_DATA) vendor/atlas/lib/libatlas.a $(libdir) + $(INSTALL_DATA) vendor/atlas/lib/libcblas.a $(libdir) + $(INSTALL_DATA) vendor/atlas/lib/libf77blas.a $(libdir) + $(INSTALL_DATA) vendor/atlas/lib/liblapack.a $(libdir) $(INSTALL) -d $(includedir)/atlas - $(INSTALL_DATA) $(srcdir)/vendor/atlas/include/cblas.h $(includedir)/atlas + $(INSTALL_DATA) $(srcdir)/vendor/atlas/include/cblas.h $(includedir) endif ifdef USE_BUILTIN_FFTW vendor_FFTW_LIBS := \ - vendor/fftw3f/libfftw3f-csl.a \ - vendor/fftw3/libfftw3-csl.a \ - vendor/fftw3l/libfftw3l-csl.a \ + vendor/fftw3f/.libs/libfftw3f.a \ + vendor/fftw3/.libs/libfftw3.a \ + vendor/fftw3l/.libs/libfftw3l.a all:: $(vendor_FFTW_LIBS) libs:: $(vendor_FFTW_LIBS) -vendor/fftw3f/libfftw3f-csl.a: - @echo "Building FFTW float (fftw-f.build.log)" +vendor/fftw3f/.libs/libfftw3f.a: + @echo "Building FFTW float (see fftw-f.build.log)" @$(MAKE) -C vendor/fftw3f > fftw-f.build.log 2>&1 - mv vendor/fftw3f/.libs/libfftw3f.a vendor/fftw3f/libfftw3f-csl.a -vendor/fftw3/libfftw3-csl.a: - @echo "Building FFTW double (fftw-d.build.log)" +vendor/fftw3/.libs/libfftw3.a: + @echo "Building FFTW double (see fftw-d.build.log)" @$(MAKE) -C vendor/fftw3 > fftw-d.build.log 2>&1 - mv vendor/fftw3/.libs/libfftw3.a vendor/fftw3/libfftw3-csl.a -vendor/fftw3l/libfftw3l-csl.a: - @echo "Building FFTW double (fftw-l.build.log)" +vendor/fftw3l/.libs/libfftw3l.a: + @echo "Building FFTW double (see fftw-l.build.log)" @$(MAKE) -C vendor/fftw3l > fftw-l.build.log 2>&1 - mv vendor/fftw3l/.libs/libfftw3l.a vendor/fftw3l/libfftw3l-csl.a clean:: - @echo "Cleaning FFTW (fftw.clean.log)" + @echo "Cleaning FFTW (see fftw.clean.log)" @$(MAKE) -C vendor/fftw3f clean > fftw.clean.log 2>&1 - @$(MAKE) -C vendor/fftw3 clean >> fftw.clean.log 2>&1 - @$(MAKE) -C vendor/fftw3l clean >> fftw.clean.log 2>&1 + @$(MAKE) -C vendor/fftw3 clean >> fftw.clean.log 2>&1 + @$(MAKE) -C vendor/fftw3l clean >> fftw.clean.log 2>&1 + + # note: configure script constructs vendor/fftw/ symlinks used here. install:: - @echo "Installing FFTW (fftw.install.log)" - $(INSTALL) -d $(libdir)/fftw3 - $(INSTALL_DATA) vendor/fftw3f/libfftw3f-csl.a $(libdir)/fftw3 - $(INSTALL_DATA) vendor/fftw3/libfftw3-csl.a $(libdir)/fftw3 - $(INSTALL_DATA) vendor/fftw3l/libfftw3l-csl.a $(libdir)/fftw3 + @echo "Installing FFTW" + $(INSTALL) -d $(libdir) + $(INSTALL_DATA) vendor/fftw/lib/libfftw3f.a $(libdir) + $(INSTALL_DATA) vendor/fftw/lib/libfftw3.a $(libdir) + $(INSTALL_DATA) vendor/fftw/lib/libfftw3l.a $(libdir) $(INSTALL) -d $(includedir) $(INSTALL_DATA) $(srcdir)/vendor/fftw/api/fftw3.h $(includedir) endif From ncm at codesourcery.com Thu Dec 22 08:22:55 2005 From: ncm at codesourcery.com (Nathan (Jasper) Myers) Date: Thu, 22 Dec 2005 00:22:55 -0800 Subject: [patch] long double FFT tests Message-ID: <20051222082255.GL29701@codesourcery.com> Per Jules's orders, tests for FFTs applied to long-double elements where supported. Committed. Nathan Myers ncm Index: ChangeLog =================================================================== RCS file: /home/cvs/Repository/vpp/ChangeLog,v retrieving revision 1.348 diff -u -p -r1.348 ChangeLog --- ChangeLog 22 Dec 2005 06:53:51 -0000 1.348 +++ ChangeLog 22 Dec 2005 08:12:54 -0000 @@ -1,5 +1,14 @@ 2005-12-21 Nathan Myers + * src/vsip/fft-core.hpp: mention long double in comments + * src/vsip/fft-ldouble.cpp: new file, long-double element FFTs + * tests/fft.cpp, tests/fftm.cpp: add tests for long double. + * tests/fft.cpp: typo; test variant data organizations & axes + with float, double or long double, whichever is first found + to be supported. + +2005-12-21 Nathan Myers + * configure.ac, vendor/GNUmakefile.inc.in: fix "make clean" for fftw libs, other cleanup, install in $(libdir). Index: src/vsip/fft-ldouble.cpp =================================================================== RCS file: src/vsip/fft-ldouble.cpp diff -N src/vsip/fft-ldouble.cpp --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/vsip/fft-ldouble.cpp 22 Dec 2005 08:12:54 -0000 @@ -0,0 +1,15 @@ +/* Copyright (c) 2005 by CodeSourcery, LLC. All rights reserved. */ + +/** @file vsip/fft-ldouble.cpp + @author Nathan Myers + @date 2005-12-21 + @brief VSIPL++ Library: long-double-precision Fft instantiation +*/ + +// This file is just here to persuade Make to give us an fft-ldouble.o. + +#include +#ifdef VSIP_IMPL_FFT_USE_LONG_DOUBLE +#define VSIP_IMPL_FFT_LONG_DOUBLE +#include +#endif Index: src/vsip/impl/fft-core.hpp =================================================================== RCS file: /home/cvs/Repository/vpp/src/vsip/impl/fft-core.hpp,v retrieving revision 1.18 diff -u -p -r1.18 fft-core.hpp --- src/vsip/impl/fft-core.hpp 29 Sep 2005 02:01:09 -0000 1.18 +++ src/vsip/impl/fft-core.hpp 22 Dec 2005 08:12:54 -0000 @@ -34,6 +34,7 @@ // // VSIP_IMPL_FFT_FLOAT // VSIP_IMPL_FFT_DOUBLE +// VSIP_IMPL_FFT_LONG_DOUBLE #ifndef VSIP_IMPL_FFT_CORE_HPP #define VSIP_IMPL_FFT_CORE_HPP @@ -59,7 +60,7 @@ extern "C" #endif #if defined(VSIP_IMPL_FFTW3) -# include // fftw3 has decls for float and double here. +# include // fftw3 has decls for all sizes here. #endif #if defined(VSIP_IMPL_IPP_FFT) Index: tests/fft.cpp =================================================================== RCS file: /home/cvs/Repository/vpp/tests/fft.cpp,v retrieving revision 1.9 diff -u -p -r1.9 fft.cpp --- tests/fft.cpp 20 Dec 2005 12:48:40 -0000 1.9 +++ tests/fft.cpp 22 Dec 2005 08:12:54 -0000 @@ -957,6 +957,27 @@ main() #endif +#if defined(VSIP_IMPL_FFT_USE_LONG_DOUBLE) + +#if ! defined(VSIP_IMPL_IPP_FFT) + test_by_ref >(2, 64); + test_by_ref >(1, 68); + test_by_ref >(2, 256); + test_by_ref >(2, 252); + test_by_ref >(3, 17); + + test_by_val >(1, 128); + test_by_val >(2, 256); + test_by_val >(3, 512); + + test_real(1, 128); + test_real(2, 242); + test_real(3, 16); +#endif + +#endif + + // // check 2D, 3D @@ -995,14 +1016,32 @@ main() #endif +#if defined(VSIP_IMPL_FFT_USE_LONG_DOUBLE) + +#if ! defined(VSIP_IMPL_IPP_FFT) + test_fft<0,0,double,false,2,vsip::fft_fwd>(); + test_fft<0,0,double,false,3,vsip::fft_fwd>(); + + test_fft<0,0,double,true,2,1>(); + test_fft<0,0,double,true,2,0>(); + + test_fft<0,0,double,true,3,2>(); + test_fft<0,0,double,true,3,1>(); + test_fft<0,0,double,true,3,0>(); +#endif /* VSIP_IMPL_IPP_FFT */ + +#endif + // // check with different block types // #if defined(VSIP_IMPL_FFT_USE_FLOAT) # define SCALAR float -#elif defined(VSIP_IMPL_FFT_USE_FLOAT) +#elif defined(VSIP_IMPL_FFT_USE_DOUBLE) # define SCALAR double +#elif defined(VSIP_IMPL_FFT_USE_LONG_DOUBLE) +# define SCALAR long double #endif #if defined(SCALAR) Index: tests/fftm.cpp =================================================================== RCS file: /home/cvs/Repository/vpp/tests/fftm.cpp,v retrieving revision 1.9 diff -u -p -r1.9 fftm.cpp --- tests/fftm.cpp 20 Dec 2005 12:48:40 -0000 1.9 +++ tests/fftm.cpp 22 Dec 2005 08:12:54 -0000 @@ -532,5 +532,32 @@ main() test_real(16); #endif +#if defined(VSIP_IMPL_FFT_USE_LONG_DOUBLE) + +#if ! defined(VSIP_IMPL_IPP_FFT) + test_by_ref_x >(18); + test_by_ref_x >(64); + test_by_ref_x >(68); + test_by_ref_x >(256); + test_by_ref_x >(252); + + test_by_ref_y >(68); + test_by_ref_y >(256); + + test_by_val_x >(128); + test_by_val_x >(256); + test_by_val_x >(512); + + test_by_val_y >(18); + test_by_val_y >(256); + + // Tests for test r->c, c->r. + test_real(128); + test_real(242); + test_real(16); +#endif /* VSIP_IMPL_IPP_FFT */ + +#endif + return 0; } From jules at codesourcery.com Thu Dec 22 11:30:12 2005 From: jules at codesourcery.com (Jules Bergmann) Date: Thu, 22 Dec 2005 06:30:12 -0500 Subject: [vsipl++] [patch] long double FFT tests In-Reply-To: <20051222082255.GL29701@codesourcery.com> References: <20051222082255.GL29701@codesourcery.com> Message-ID: <43AA8E44.1080108@codesourcery.com> Nathan (Jasper) Myers wrote: > Per Jules's orders, tests for FFTs applied to long-double elements > where supported. > The request was to extend our tests so that they catch the SCALAR double typo. Do they do catch that now? -- Jules From don at codesourcery.com Thu Dec 22 16:01:41 2005 From: don at codesourcery.com (Don McCoy) Date: Thu, 22 Dec 2005 09:01:41 -0700 Subject: [patch] add --with-fft=none option to configure Message-ID: <43AACDE5.4070608@codesourcery.com> This allows the user to disable support for FFT's altogether. Committed. -- Don McCoy CodeSourcery, LLC -------------- next part -------------- A non-text attachment was scrubbed... Name: wfft.diff Type: text/x-patch Size: 1536 bytes Desc: not available URL: From ncm at codesourcery.com Thu Dec 22 16:39:35 2005 From: ncm at codesourcery.com (Nathan (Jasper) Myers) Date: Thu, 22 Dec 2005 08:39:35 -0800 Subject: [vsipl++] [patch] add --with-fft=none option to configure In-Reply-To: <43AACDE5.4070608@codesourcery.com> References: <43AACDE5.4070608@codesourcery.com> Message-ID: <20051222163935.GM29701@codesourcery.com> On Thu, Dec 22, 2005 at 09:01:41AM -0700, Don McCoy wrote: > This allows the user to disable support for FFT's altogether. I have a rather more elaborate patch, almost ready, to allow float, double, and long double FFTs to be turned off individually. It's nice to see your immediate problem so easily solved. Nathan Myers ncm From ncm at codesourcery.com Thu Dec 22 16:49:57 2005 From: ncm at codesourcery.com (Nathan (Jasper) Myers) Date: Thu, 22 Dec 2005 08:49:57 -0800 Subject: [vsipl++] [patch] long double FFT tests In-Reply-To: <43AA8E44.1080108@codesourcery.com> References: <20051222082255.GL29701@codesourcery.com> <43AA8E44.1080108@codesourcery.com> Message-ID: <20051222164957.GN29701@codesourcery.com> On Thu, Dec 22, 2005 at 06:30:12AM -0500, Jules Bergmann wrote: > > > Nathan (Jasper) Myers wrote: > >Per Jules's orders, tests for FFTs applied to long-double elements > >where supported. > > > > The request was to extend our tests so that they catch the SCALAR double > typo. Do they do catch that now? My last commit included #if defined(VSIP_IMPL_FFT_USE_FLOAT) # define SCALAR float -#elif defined(VSIP_IMPL_FFT_USE_FLOAT) +#elif defined(VSIP_IMPL_FFT_USE_DOUBLE) # define SCALAR double +#elif defined(VSIP_IMPL_FFT_USE_LONG_DOUBLE) +# define SCALAR long double #endif which fixed the typo, and also enabled it to do complete transpose/rank testing even if float and double support are not present. I don't know if that answers your question. It took hardly any time to add full support for long double FFTs, and thorough testing. Of course only FFTW3 enables that, so far. Nathan Myers ncm From jules at codesourcery.com Thu Dec 22 16:55:35 2005 From: jules at codesourcery.com (Jules Bergmann) Date: Thu, 22 Dec 2005 11:55:35 -0500 Subject: [vsipl++] [patch] long double FFT tests In-Reply-To: <20051222164957.GN29701@codesourcery.com> References: <20051222082255.GL29701@codesourcery.com> <43AA8E44.1080108@codesourcery.com> <20051222164957.GN29701@codesourcery.com> Message-ID: <43AADA87.2080203@codesourcery.com> Nathan (Jasper) Myers wrote: > > which fixed the typo, and also enabled it to do complete transpose/rank > testing even if float and double support are not present. I don't know > if that answers your question. The question is: would our tests catch the typo? I.e. would one of our tests fail if the typo was put back into the code. -- Jules From jules at codesourcery.com Thu Dec 22 17:02:40 2005 From: jules at codesourcery.com (Jules Bergmann) Date: Thu, 22 Dec 2005 12:02:40 -0500 Subject: [vsipl++] [patch] add --with-fft=none option to configure In-Reply-To: <20051222163935.GM29701@codesourcery.com> References: <43AACDE5.4070608@codesourcery.com> <20051222163935.GM29701@codesourcery.com> Message-ID: <43AADC30.70706@codesourcery.com> Nathan (Jasper) Myers wrote: > On Thu, Dec 22, 2005 at 09:01:41AM -0700, Don McCoy wrote: > >>This allows the user to disable support for FFT's altogether. > > > I have a rather more elaborate patch, almost ready, to allow float, > double, and long double FFTs to be turned off individually. > It's nice to see your immediate problem so easily solved. Nathan, Can you send out a patch for the work you did last month to use SAL FFTs? Even though its not ready for check-in, it might be useful in benchmarking. thanks, -- Jules From ncm at codesourcery.com Thu Dec 22 19:10:08 2005 From: ncm at codesourcery.com (Nathan (Jasper) Myers) Date: Thu, 22 Dec 2005 11:10:08 -0800 Subject: [vsipl++] [patch] long double FFT tests In-Reply-To: <43AADA87.2080203@codesourcery.com> References: <20051222082255.GL29701@codesourcery.com> <43AA8E44.1080108@codesourcery.com> <20051222164957.GN29701@codesourcery.com> <43AADA87.2080203@codesourcery.com> Message-ID: <20051222191008.GO29701@codesourcery.com> On Thu, Dec 22, 2005 at 11:55:35AM -0500, Jules Bergmann wrote: > Nathan (Jasper) Myers wrote: > > >which fixed the typo, and also enabled it to do complete transpose/rank > >testing even if float and double support are not present. I don't know > >if that answers your question. > > The question is: would our tests catch the typo? I.e. would one of our > tests fail if the typo was put back into the code. I see why I was confused. The typo was in the test code itself. It was not tripped because we haven't been running tests of any configuration that lacks FFT float support. Thus far, that would mean configuring for an FFTW2 that was built to operate (only) on double. Nathan Myers ncm From jules at codesourcery.com Thu Dec 22 19:27:02 2005 From: jules at codesourcery.com (Jules Bergmann) Date: Thu, 22 Dec 2005 14:27:02 -0500 Subject: [vsipl++] [patch] long double FFT tests In-Reply-To: <20051222191008.GO29701@codesourcery.com> References: <20051222082255.GL29701@codesourcery.com> <43AA8E44.1080108@codesourcery.com> <20051222164957.GN29701@codesourcery.com> <43AADA87.2080203@codesourcery.com> <20051222191008.GO29701@codesourcery.com> Message-ID: <43AAFE06.3040808@codesourcery.com> Nathan (Jasper) Myers wrote: > > I see why I was confused. The typo was in the test code itself. > It was not tripped because we haven't been running tests of any > configuration that lacks FFT float support. Thus far, that would > mean configuring for an FFTW2 that was built to operate (only) on > double. Sounds good. I was confused too, I thought the typo was in the library. -- Jules From ncm at codesourcery.com Fri Dec 23 00:24:43 2005 From: ncm at codesourcery.com (Nathan (Jasper) Myers) Date: Thu, 22 Dec 2005 16:24:43 -0800 Subject: [patch] add --disable-fft-double etc. Message-ID: <20051223002443.GA3272@codesourcery.com> The patch below implements configure options --disable-fft-float --disable-fft-double --disable-fft-long-double to omit building support for those operations. This is in addition to Don's --with-fft=none. For the moment the two don't interact, but that will change, trivially, when built-in FFTW3 is used in fill in omissions from other libraries. Not committed yet. OK? Nathan Myers ncm Index: ChangeLog =================================================================== RCS file: /home/cvs/Repository/vpp/ChangeLog,v retrieving revision 1.351 diff -u -p -r1.351 ChangeLog --- ChangeLog 22 Dec 2005 16:31:40 -0000 1.351 +++ ChangeLog 23 Dec 2005 00:15:19 -0000 @@ -1,3 +1,9 @@ +2005-12-22 Nathan Myers + + * configure.ac, vendor/GNUmakefile.inc.in: Add configure options + --disable-fft-double etc., and arrange not to build/install/clean + built-in FFTW3 libs so disabled. + 2005-12-22 Stefan Seefeld * GNUmakefile.in: Define and use 'suffix' during installation. Index: configure.ac =================================================================== RCS file: /home/cvs/Repository/vpp/configure.ac,v retrieving revision 1.64 diff -u -p -r1.64 configure.ac --- configure.ac 22 Dec 2005 16:26:29 -0000 1.64 +++ configure.ac 23 Dec 2005 00:15:19 -0000 @@ -62,7 +62,7 @@ AC_ARG_WITH(mpi_prefix, dnl If the user specified --with-mpi-prefix, they mean to use MPI for sure. [enable_mpi=yes]) -### Mecury Scientific Algorithm (SAL) +### Mercury Scientific Algorithm (SAL) AC_ARG_ENABLE([sal], AS_HELP_STRING([--enable-sal], [use SAL if found (default is to not search for it)]),, @@ -119,6 +119,22 @@ AC_ARG_WITH(fftw2_prefix, Headers must be in PATH/include; libraries in PATH/lib.]), [with_fft=fftw2]) +AC_ARG_ENABLE([fft-float], + AS_HELP_STRING([--disable-fft-float], + [Omit support for FFT applied to float elements]),, + [enable_fft_float=yes]) + +AC_ARG_ENABLE([fft-double], + AS_HELP_STRING([--disable-fft-double], + [Omit support for FFT applied to double elements]),, + [enable_fft_double=yes]) + +AC_ARG_ENABLE([fft-long-double], + AS_HELP_STRING([--disable-fft-long-double], + [Omit support for FFT applied to long double elements]),, + [enable_fft_long_double=yes]) + + # LAPACK and related libraries (Intel MKL) AC_ARG_WITH([lapack], @@ -364,26 +380,31 @@ enable_fftw2="no" enable_ipp_fft="no" build_fftw3="no" -if test "$chose_fft" = "no" \ - -o "$with_fft" = "fftw3" \ - -o "$with_fft" = "builtin"; then - enable_fftw3="yes" -elif test "$with_fft" = "fftw2-float"; then - enable_fftw2="yes" - enable_fftw2_float="yes" -elif test "$with_fft" = "fftw2-double"; then - enable_fftw2="yes" - enable_fftw2_double="yes" -elif test "$with_fft" = "fftw2-generic"; then - enable_fftw2="yes" - enable_fftw2_generic="yes" - enable_fftw2_float="yes" -elif test "$with_fft" = "ipp"; then - enable_ipp_fft="yes" -elif test "$with_fft" != "none"; then - AC_MSG_ERROR([Argument to --with-fft= must be one of fftw3, fftw2-float, - fftw2-double, fftw2-generic, ipp, builtin, or none.]) -fi +if test "$enable_fft_float" = yes -o \ + "$enable_fft_double" = yes -o \ + "$enable_fft_long_double" = yes ; then + + if test "$chose_fft" = "no" \ + -o "$with_fft" = "fftw3" \ + -o "$with_fft" = "builtin"; then + enable_fftw3="yes" + elif test "$with_fft" = "fftw2-float"; then + enable_fftw2="yes" + enable_fftw2_float="yes" + elif test "$with_fft" = "fftw2-double"; then + enable_fftw2="yes" + enable_fftw2_double="yes" + elif test "$with_fft" = "fftw2-generic"; then + enable_fftw2="yes" + enable_fftw2_generic="yes" + enable_fftw2_float="yes" + elif test "$with_fft" = "ipp"; then + enable_ipp_fft="yes" + elif test "$with_fft" != "none"; then + AC_MSG_ERROR([Argument to --with-fft= must be one of fftw3, fftw2-float, + fftw2-double, fftw2-generic, ipp, builtin, or none.]) + fi +fi if test "$enable_fftw3" != "no" ; then build_fftw3=yes @@ -394,12 +415,26 @@ if test "$enable_fftw3" != "no" ; then # We will certainly have a complete FFTW3 environment, even if we have to # build it ourselves. - AC_DEFINE_UNQUOTED(VSIP_IMPL_FFT_USE_FLOAT, 1, - [Define to build code for float-precision FFT.]) - AC_DEFINE_UNQUOTED(VSIP_IMPL_FFT_USE_DOUBLE, 1, - [Define to build code for double-precision FFT.]) - AC_DEFINE_UNQUOTED(VSIP_IMPL_FFT_USE_LONG_DOUBLE, 1, - [Define to build code for long-double-precision FFT.]) + libs= + syms= + if test "$enable_fft_float" = yes ; then + AC_DEFINE_UNQUOTED(VSIP_IMPL_FFT_USE_FLOAT, 1, + [Define to build code for float-precision FFT.]) + libs="$libs -lfftw3f" + syms="$syms const char* fftwf_version;" + fi + if test "$enable_fft_double" = yes ; then + AC_DEFINE_UNQUOTED(VSIP_IMPL_FFT_USE_DOUBLE, 1, + [Define to build code for double-precision FFT.]) + libs="$libs -lfftw3" + syms="$syms const char* fftw_version;" + fi + if test "$enable_fft_long_double" = yes; then + AC_DEFINE_UNQUOTED(VSIP_IMPL_FFT_USE_LONG_DOUBLE, 1, + [Define to build code for long-double-precision FFT.]) + libs="$libs -lfftw3l" + syms="$syms const char* fftwl_version;" + fi AC_DEFINE_UNQUOTED(VSIP_IMPL_FFTW3, 1, [Define to build using FFTW3 headers.]) @@ -410,12 +445,10 @@ if test "$enable_fftw3" != "no" ; then fi AC_MSG_CHECKING([for external FFTW3 library]) - LIBS="$LIBS -lfftw3f -lfftw3 -lfftw3l" + LIBS="$LIBS $libs" AC_LINK_IFELSE( [AC_LANG_PROGRAM([[#include ]], - [[const char *fftwf_version; - const char *fftw_version; - const char *fftwl_version;]])], + [[$syms]])], [AC_MSG_RESULT([enabled.]) keep_LIBS="$LIBS" keep_CPPFLAGS="$CPPFLAGS" @@ -439,6 +472,7 @@ if test "$build_fftw3" != "no"; then # Build and use builtin fftw3. AC_MSG_CHECKING([for built-in FFTW3 library source]) + libs= fftw3_configure="$srcdir/vendor/fftw/configure" if test -e "$fftw3_configure"; then AC_MSG_RESULT([found]) @@ -462,24 +496,31 @@ if test "$build_fftw3" != "no"; then (ppc*) fftw3_f_simd="--enable-altivec" ;; esac AC_MSG_NOTICE([fftw3 config options: $fftw3_opts $fftw3_simd.]) - AC_MSG_NOTICE([fftw3 float config options: '$fftw3_f_simd'.]) - AC_MSG_NOTICE([fftw3 double config options: '$fftw3_d_simd'.]) - AC_MSG_NOTICE([fftw3 long-double config options: '$fftw3_l_simd'.]) echo "===============================================================" - mkdir -p vendor/fftw3f - AC_MSG_NOTICE([Configuring fftw3f (float).]) - (cd vendor/fftw3f; $fftw3_configure $fftw3_f_simd $fftw3_opts --enable-float) - - mkdir -p vendor/fftw3 - AC_MSG_NOTICE([Configuring fftw3 (double).]) - (cd vendor/fftw3; $fftw3_configure $fftw3_d_simd $fftw3_opts ) - - # fftw3l config doesn't get SIMD option - mkdir -p vendor/fftw3l - AC_MSG_NOTICE([Configuring fftw3l (long double).]) - (cd vendor/fftw3l; $fftw3_configure $fftw3_l_simd $fftw3_opts --enable-long-double) + if test "$enable_fft_float" = yes; then + mkdir -p vendor/fftw3f + AC_MSG_NOTICE([Configuring fftw3f (float).]) + AC_MSG_NOTICE([extra config options: '$fftw3_f_simd'.]) + (cd vendor/fftw3f; $fftw3_configure $fftw3_f_simd $fftw3_opts --enable-float) + libs="$libs -lfftw3f" + fi + if test "$enable_fft_double" = yes; then + mkdir -p vendor/fftw3 + AC_MSG_NOTICE([Configuring fftw3 (double).]) + AC_MSG_NOTICE([extra config options: '$fftw3_d_simd'.]) + (cd vendor/fftw3; $fftw3_configure $fftw3_d_simd $fftw3_opts ) + libs="$libs -lfftw3" + fi + if test "$enable_fft_long_double" = yes; then + # fftw3l config doesn't get SIMD option + mkdir -p vendor/fftw3l + AC_MSG_NOTICE([Configuring fftw3l (long double).]) + AC_MSG_NOTICE([extra config options: '$fftw3_l_simd'.]) + (cd vendor/fftw3l; $fftw3_configure $fftw3_l_simd $fftw3_opts --enable-long-double) + libs="$libs -lfftw3l" + fi echo "===============================================================" @@ -494,16 +535,27 @@ There are no regular files here, only sy ln -s "$fftw3_src_prefix"/api/fftw3.h vendor/fftw/include/fftw3.h mkdir -p vendor/fftw/lib # these don't refer to anything yet. - ln -s ../../fftw3f/.libs/libfftw3f.a vendor/fftw/lib/libfftw3f.a - ln -s ../../fftw3/.libs/libfftw3.a vendor/fftw/lib/libfftw3.a - ln -s ../../fftw3l/.libs/libfftw3l.a vendor/fftw/lib/libfftw3l.a + if test "$enable_fft_float" = yes; then + ln -s ../../fftw3f/.libs/libfftw3f.a vendor/fftw/lib/libfftw3f.a + AC_SUBST(USE_BUILTIN_FFTW_FLOAT, 1) + fi + if test "$enable_fft_double" = yes; then + ln -s ../../fftw3/.libs/libfftw3.a vendor/fftw/lib/libfftw3.a + AC_SUBST(USE_BUILTIN_FFTW_DOUBLE, 1) + fi + if test "$enable_fft_long_double" = yes; then + ln -s ../../fftw3l/.libs/libfftw3l.a vendor/fftw/lib/libfftw3l.a + AC_SUBST(USE_BUILTIN_FFTW_LONG_DOUBLE, 1) + fi else AC_MSG_RESULT([not found]) fi - if test -f "vendor/fftw3f/Makefile" -a \ - -f "vendor/fftw3/Makefile" -a \ - -f "vendor/fftw3l/Makefile" ; then + + if test \( "$enable_fft_float" != yes -o -f "vendor/fftw3f/Makefile" \) -a \ + \( "$enable_fft_double" != yes -o -f "vendor/fftw3/Makefile" \) -a \ + \( "$enable_fft_long_double" != yes -o -f "vendor/fftw3l/Makefile" \) + then AC_MSG_RESULT([Built-in FFTW3 configures successful.]) else AC_MSG_ERROR([Built-in FFTW3 configures FAILED, see config.log @@ -517,7 +569,7 @@ There are no regular files here, only sy my_abs_top_srcdir="$curdir/$srcdir" fi - FFTW3_LIBS="-lfftw3f -lfftw3 -lfftw3l" + FFTW3_LIBS="$libs" AC_MSG_NOTICE([Will link with $FFTW3_LIBS.]) AC_SUBST(USE_BUILTIN_FFTW, 1) @@ -861,10 +913,14 @@ int main(int, char **) AC_SUBST(VSIP_IMPL_IPP_FFT, 1) AC_DEFINE_UNQUOTED(VSIP_IMPL_IPP_FFT, 1, [Define to use Intel's IPP library to perform FFTs.]) - AC_DEFINE_UNQUOTED(VSIP_IMPL_FFT_USE_FLOAT, $vsip_impl_use_float, - [Define to build code with support for FFT on float types.]) - AC_DEFINE_UNQUOTED(VSIP_IMPL_FFT_USE_DOUBLE, $vsip_impl_use_double, - [Define to build code with support for FFT on double types.]) + if test "$enable_fft_float" = yes; then + AC_DEFINE_UNQUOTED(VSIP_IMPL_FFT_USE_FLOAT, $vsip_impl_use_float, + [Define to build code with support for FFT on float types.]) + fi + if test "$enable_fft_double" = yes; then + AC_DEFINE_UNQUOTED(VSIP_IMPL_FFT_USE_DOUBLE, $vsip_impl_use_double, + [Define to build code with support for FFT on double types.]) + fi fi fi fi Index: vendor/GNUmakefile.inc.in =================================================================== RCS file: /home/cvs/Repository/vpp/vendor/GNUmakefile.inc.in,v retrieving revision 1.5 diff -u -p -r1.5 GNUmakefile.inc.in --- vendor/GNUmakefile.inc.in 22 Dec 2005 06:53:52 -0000 1.5 +++ vendor/GNUmakefile.inc.in 23 Dec 2005 00:15:19 -0000 @@ -14,6 +14,9 @@ USE_BUILTIN_ATLAS := @USE_BUILTIN_ATLAS@ USE_BUILTIN_FFTW := @USE_BUILTIN_FFTW@ +USE_BUILTIN_FFTW_FLOAT := @USE_BUILTIN_FFTW_FLOAT@ +USE_BUILTIN_FFTW_DOUBLE := @USE_BUILTIN_FFTW_DOUBLE@ +USE_BUILTIN_FFTW_LONG_DOUBLE := @USE_BUILTIN_FFTW_LONG_DOUBLE@ vendor_REF_LAPACK = vendor/lapack/lapack.a vendor_PRE_LAPACK = vendor/atlas/lib/libprelapack.a @@ -74,41 +77,51 @@ endif ifdef USE_BUILTIN_FFTW -vendor_FFTW_LIBS := \ - vendor/fftw3f/.libs/libfftw3f.a \ - vendor/fftw3/.libs/libfftw3.a \ - vendor/fftw3l/.libs/libfftw3l.a - -all:: $(vendor_FFTW_LIBS) - -libs:: $(vendor_FFTW_LIBS) - -vendor/fftw3f/.libs/libfftw3f.a: +ifdef USE_BUILTIN_FFTW_FLOAT +LIBFFTW_FLOAT := vendor/fftw3f/.libs/libfftw3f.a +$(LIBFFTW_FLOAT): @echo "Building FFTW float (see fftw-f.build.log)" @$(MAKE) -C vendor/fftw3f > fftw-f.build.log 2>&1 - -vendor/fftw3/.libs/libfftw3.a: +else +LIBFFTW_LONG_FLOAT := +endif +ifdef USE_BUILTIN_FFTW_DOUBLE +LIBFFTW_DOUBLE := vendor/fftw3/.libs/libfftw3.a +$(LIBFFTW_DOUBLE): @echo "Building FFTW double (see fftw-d.build.log)" @$(MAKE) -C vendor/fftw3 > fftw-d.build.log 2>&1 +else +LIBFFTW_DOUBLE := +endif -vendor/fftw3l/.libs/libfftw3l.a: +ifdef USE_BUILTIN_FFTW_LONG_DOUBLE +LIBFFTW_LONG_DOUBLE := vendor/fftw3l/.libs/libfftw3l.a +$(LIBFFTW_LONG_DOUBLE): @echo "Building FFTW double (see fftw-l.build.log)" @$(MAKE) -C vendor/fftw3l > fftw-l.build.log 2>&1 +else +LIBFFTW_LONG_DOUBLE := +endif + +vendor_FFTW_LIBS := $(LIBFFTW_FLOAT) $(LIBFFTW_DOUBLE) $(LIBFFTW_LONG_DOUBLE) + +all:: $(vendor_FFTW_LIBS) + +libs:: $(vendor_FFTW_LIBS) clean:: @echo "Cleaning FFTW (see fftw.clean.log)" - @$(MAKE) -C vendor/fftw3f clean > fftw.clean.log 2>&1 - @$(MAKE) -C vendor/fftw3 clean >> fftw.clean.log 2>&1 - @$(MAKE) -C vendor/fftw3l clean >> fftw.clean.log 2>&1 - + @for ldir in $(subst /.libs/,,$(dir $(vendor_FFTW_LIBS))); do \ + echo "$(MAKE) -C $$ldir clean "; \ + $(MAKE) -C $$ldir clean; done > fftw.clean.log 2>&1 # note: configure script constructs vendor/fftw/ symlinks used here. install:: @echo "Installing FFTW" $(INSTALL) -d $(libdir) - $(INSTALL_DATA) vendor/fftw/lib/libfftw3f.a $(libdir) - $(INSTALL_DATA) vendor/fftw/lib/libfftw3.a $(libdir) - $(INSTALL_DATA) vendor/fftw/lib/libfftw3l.a $(libdir) + @for lib in $(vendor_FFTW_LIBS); do \ + echo "$(INSTALL_DATA) $$lib $(libdir)"; \ + $(INSTALL_DATA) $$lib $(libdir); done $(INSTALL) -d $(includedir) $(INSTALL_DATA) $(srcdir)/vendor/fftw/api/fftw3.h $(includedir) endif From stefan at codesourcery.com Fri Dec 23 03:16:46 2005 From: stefan at codesourcery.com (Stefan Seefeld) Date: Thu, 22 Dec 2005 22:16:46 -0500 Subject: PATCH: Add 'check-installed' target to build system. Message-ID: <43AB6C1E.9060209@codesourcery.com> The attached patch adds a new 'check-installed' target. It is very similar to 'check', but instead of testing the uninstalled code from build- and sourcedir, it tests installed (binary) packages. To do this it generates a new 'context' variable (used by QMTest) by means of pkg-config. Simply supply 'make check-installed' with the two optional 'prefix' and 'suffix' variables to extract the appropriate parameters from the installed pc file. If no such variables are provided, 'make check-installed' can be called right after 'make install' to test the freshly installed package. For other values separately installed vsipl++ packages can be tested. Don, this patch is a slight refinement on the one I sent you earlier. It doesn't overwrite the existing tests/context file but uses a distinct one, so 'make check' is still possible even after having called 'make check-installed'. Regards, Stefan -------------- next part -------------- A non-text attachment was scrubbed... Name: check-installed.patch Type: text/x-patch Size: 1781 bytes Desc: not available URL: From ncm at codesourcery.com Fri Dec 23 11:07:42 2005 From: ncm at codesourcery.com (Nathan (Jasper) Myers) Date: Fri, 23 Dec 2005 03:07:42 -0800 Subject: finding native lam 6.x mpi In-Reply-To: <43AADC30.70706@codesourcery.com> References: <43AACDE5.4070608@codesourcery.com> <20051222163935.GM29701@codesourcery.com> <43AADC30.70706@codesourcery.com> Message-ID: <20051223110742.GB3272@codesourcery.com> On Thu, Dec 22, 2005 at 12:02:40PM -0500, Jules Bergmann wrote: > > Can you send out a patch for the work you did last month to use SAL > FFTs? Even though its not ready for check-in, it might be useful in > benchmarking. OK, I'll get something posted shortly. Right after native lam 6.x? I'm thinking we can provide our own to satisfy the #include in mpi.h, in case it's not there -- or if it has stuff in it we don't want. An alternative is to #define the macro that prevents it from being loaded, in par-services-mpi.hpp: #include #include #ifdef LAM_WANT_MPI2CPP # undef LAM_WANT_MPI2CPP #fi #include VSIP_IMPL_MPI_H /* , in this case. */ All the alternatives stink, but some more than others. Nathan Myers ncm From stefan at codesourcery.com Fri Dec 23 16:24:58 2005 From: stefan at codesourcery.com (Stefan Seefeld) Date: Fri, 23 Dec 2005 11:24:58 -0500 Subject: PATCH: Typo in doc/GNUmakefile.inc.in Message-ID: <43AC24DA.4090408@codesourcery.com> The attached patch fixes a typo in the 'install' target rule. Committed. Regards, Stefan -------------- next part -------------- A non-text attachment was scrubbed... Name: GNUmakefile.inc.in.diff Type: text/x-patch Size: 900 bytes Desc: not available URL: From stefan at codesourcery.com Fri Dec 23 19:20:39 2005 From: stefan at codesourcery.com (Stefan Seefeld) Date: Fri, 23 Dec 2005 14:20:39 -0500 Subject: [vsipl++] PATCH: Add 'check-installed' target to build system. In-Reply-To: <43AB6C1E.9060209@codesourcery.com> References: <43AB6C1E.9060209@codesourcery.com> Message-ID: <43AC4E07.1040207@codesourcery.com> This new patch corrects a little bug that used the wrong variable to determine the desired PKG_CONFIG_PATH. Don: please confirm that this now works with an explicit --exec-prefix variable. Thanks, Stefan -------------- next part -------------- A non-text attachment was scrubbed... Name: check-installed.patch Type: text/x-patch Size: 1777 bytes Desc: not available URL: From ncm at codesourcery.com Fri Dec 23 19:33:38 2005 From: ncm at codesourcery.com (Nathan (Jasper) Myers) Date: Fri, 23 Dec 2005 11:33:38 -0800 Subject: [vsipl++] [patch] add --disable-fft-double etc. In-Reply-To: <20051223002443.GA3272@codesourcery.com> References: <20051223002443.GA3272@codesourcery.com> Message-ID: <20051223193338.GD3272@codesourcery.com> Committed, unchanged except ChangeLog. On Thu, Dec 22, 2005 at 04:24:43PM -0800, Nathan (Jasper) Myers wrote: > The patch below implements configure options > --disable-fft-float --disable-fft-double --disable-fft-long-double > to omit building support for those operations. > > This is in addition to Don's --with-fft=none. For the moment the two > don't interact, but that will change, trivially, when built-in FFTW3 > is used in fill in omissions from other libraries. > > Not committed yet. OK? > > Nathan Myers > ncm > > Index: ChangeLog > =================================================================== > RCS file: /home/cvs/Repository/vpp/ChangeLog,v > retrieving revision 1.351 > diff -u -p -r1.351 ChangeLog > --- ChangeLog 22 Dec 2005 16:31:40 -0000 1.351 > +++ ChangeLog 23 Dec 2005 00:15:19 -0000 > @@ -1,3 +1,9 @@ > +2005-12-22 Nathan Myers > + > + * configure.ac, vendor/GNUmakefile.inc.in: Add configure options > + --disable-fft-double etc., and arrange not to build/install/clean > + built-in FFTW3 libs so disabled. > + > 2005-12-22 Stefan Seefeld > > * GNUmakefile.in: Define and use 'suffix' during installation. > Index: configure.ac > =================================================================== > RCS file: /home/cvs/Repository/vpp/configure.ac,v > retrieving revision 1.64 > diff -u -p -r1.64 configure.ac > --- configure.ac 22 Dec 2005 16:26:29 -0000 1.64 > +++ configure.ac 23 Dec 2005 00:15:19 -0000 > @@ -62,7 +62,7 @@ AC_ARG_WITH(mpi_prefix, > dnl If the user specified --with-mpi-prefix, they mean to use MPI for sure. > [enable_mpi=yes]) > > -### Mecury Scientific Algorithm (SAL) > +### Mercury Scientific Algorithm (SAL) > AC_ARG_ENABLE([sal], > AS_HELP_STRING([--enable-sal], > [use SAL if found (default is to not search for it)]),, > @@ -119,6 +119,22 @@ AC_ARG_WITH(fftw2_prefix, > Headers must be in PATH/include; libraries in PATH/lib.]), > [with_fft=fftw2]) > > +AC_ARG_ENABLE([fft-float], > + AS_HELP_STRING([--disable-fft-float], > + [Omit support for FFT applied to float elements]),, > + [enable_fft_float=yes]) > + > +AC_ARG_ENABLE([fft-double], > + AS_HELP_STRING([--disable-fft-double], > + [Omit support for FFT applied to double elements]),, > + [enable_fft_double=yes]) > + > +AC_ARG_ENABLE([fft-long-double], > + AS_HELP_STRING([--disable-fft-long-double], > + [Omit support for FFT applied to long double elements]),, > + [enable_fft_long_double=yes]) > + > + > > # LAPACK and related libraries (Intel MKL) > AC_ARG_WITH([lapack], > @@ -364,26 +380,31 @@ enable_fftw2="no" > enable_ipp_fft="no" > build_fftw3="no" > > -if test "$chose_fft" = "no" \ > - -o "$with_fft" = "fftw3" \ > - -o "$with_fft" = "builtin"; then > - enable_fftw3="yes" > -elif test "$with_fft" = "fftw2-float"; then > - enable_fftw2="yes" > - enable_fftw2_float="yes" > -elif test "$with_fft" = "fftw2-double"; then > - enable_fftw2="yes" > - enable_fftw2_double="yes" > -elif test "$with_fft" = "fftw2-generic"; then > - enable_fftw2="yes" > - enable_fftw2_generic="yes" > - enable_fftw2_float="yes" > -elif test "$with_fft" = "ipp"; then > - enable_ipp_fft="yes" > -elif test "$with_fft" != "none"; then > - AC_MSG_ERROR([Argument to --with-fft= must be one of fftw3, fftw2-float, > - fftw2-double, fftw2-generic, ipp, builtin, or none.]) > -fi > +if test "$enable_fft_float" = yes -o \ > + "$enable_fft_double" = yes -o \ > + "$enable_fft_long_double" = yes ; then > + > + if test "$chose_fft" = "no" \ > + -o "$with_fft" = "fftw3" \ > + -o "$with_fft" = "builtin"; then > + enable_fftw3="yes" > + elif test "$with_fft" = "fftw2-float"; then > + enable_fftw2="yes" > + enable_fftw2_float="yes" > + elif test "$with_fft" = "fftw2-double"; then > + enable_fftw2="yes" > + enable_fftw2_double="yes" > + elif test "$with_fft" = "fftw2-generic"; then > + enable_fftw2="yes" > + enable_fftw2_generic="yes" > + enable_fftw2_float="yes" > + elif test "$with_fft" = "ipp"; then > + enable_ipp_fft="yes" > + elif test "$with_fft" != "none"; then > + AC_MSG_ERROR([Argument to --with-fft= must be one of fftw3, fftw2-float, > + fftw2-double, fftw2-generic, ipp, builtin, or none.]) > + fi > +fi > > if test "$enable_fftw3" != "no" ; then > build_fftw3=yes > @@ -394,12 +415,26 @@ if test "$enable_fftw3" != "no" ; then > # We will certainly have a complete FFTW3 environment, even if we have to > # build it ourselves. > > - AC_DEFINE_UNQUOTED(VSIP_IMPL_FFT_USE_FLOAT, 1, > - [Define to build code for float-precision FFT.]) > - AC_DEFINE_UNQUOTED(VSIP_IMPL_FFT_USE_DOUBLE, 1, > - [Define to build code for double-precision FFT.]) > - AC_DEFINE_UNQUOTED(VSIP_IMPL_FFT_USE_LONG_DOUBLE, 1, > - [Define to build code for long-double-precision FFT.]) > + libs= > + syms= > + if test "$enable_fft_float" = yes ; then > + AC_DEFINE_UNQUOTED(VSIP_IMPL_FFT_USE_FLOAT, 1, > + [Define to build code for float-precision FFT.]) > + libs="$libs -lfftw3f" > + syms="$syms const char* fftwf_version;" > + fi > + if test "$enable_fft_double" = yes ; then > + AC_DEFINE_UNQUOTED(VSIP_IMPL_FFT_USE_DOUBLE, 1, > + [Define to build code for double-precision FFT.]) > + libs="$libs -lfftw3" > + syms="$syms const char* fftw_version;" > + fi > + if test "$enable_fft_long_double" = yes; then > + AC_DEFINE_UNQUOTED(VSIP_IMPL_FFT_USE_LONG_DOUBLE, 1, > + [Define to build code for long-double-precision FFT.]) > + libs="$libs -lfftw3l" > + syms="$syms const char* fftwl_version;" > + fi > AC_DEFINE_UNQUOTED(VSIP_IMPL_FFTW3, 1, > [Define to build using FFTW3 headers.]) > > @@ -410,12 +445,10 @@ if test "$enable_fftw3" != "no" ; then > fi > > AC_MSG_CHECKING([for external FFTW3 library]) > - LIBS="$LIBS -lfftw3f -lfftw3 -lfftw3l" > + LIBS="$LIBS $libs" > AC_LINK_IFELSE( > [AC_LANG_PROGRAM([[#include ]], > - [[const char *fftwf_version; > - const char *fftw_version; > - const char *fftwl_version;]])], > + [[$syms]])], > [AC_MSG_RESULT([enabled.]) > keep_LIBS="$LIBS" > keep_CPPFLAGS="$CPPFLAGS" > @@ -439,6 +472,7 @@ if test "$build_fftw3" != "no"; then > > # Build and use builtin fftw3. > AC_MSG_CHECKING([for built-in FFTW3 library source]) > + libs= > fftw3_configure="$srcdir/vendor/fftw/configure" > if test -e "$fftw3_configure"; then > AC_MSG_RESULT([found]) > @@ -462,24 +496,31 @@ if test "$build_fftw3" != "no"; then > (ppc*) fftw3_f_simd="--enable-altivec" ;; > esac > AC_MSG_NOTICE([fftw3 config options: $fftw3_opts $fftw3_simd.]) > - AC_MSG_NOTICE([fftw3 float config options: '$fftw3_f_simd'.]) > - AC_MSG_NOTICE([fftw3 double config options: '$fftw3_d_simd'.]) > - AC_MSG_NOTICE([fftw3 long-double config options: '$fftw3_l_simd'.]) > > echo "===============================================================" > > - mkdir -p vendor/fftw3f > - AC_MSG_NOTICE([Configuring fftw3f (float).]) > - (cd vendor/fftw3f; $fftw3_configure $fftw3_f_simd $fftw3_opts --enable-float) > - > - mkdir -p vendor/fftw3 > - AC_MSG_NOTICE([Configuring fftw3 (double).]) > - (cd vendor/fftw3; $fftw3_configure $fftw3_d_simd $fftw3_opts ) > - > - # fftw3l config doesn't get SIMD option > - mkdir -p vendor/fftw3l > - AC_MSG_NOTICE([Configuring fftw3l (long double).]) > - (cd vendor/fftw3l; $fftw3_configure $fftw3_l_simd $fftw3_opts --enable-long-double) > + if test "$enable_fft_float" = yes; then > + mkdir -p vendor/fftw3f > + AC_MSG_NOTICE([Configuring fftw3f (float).]) > + AC_MSG_NOTICE([extra config options: '$fftw3_f_simd'.]) > + (cd vendor/fftw3f; $fftw3_configure $fftw3_f_simd $fftw3_opts --enable-float) > + libs="$libs -lfftw3f" > + fi > + if test "$enable_fft_double" = yes; then > + mkdir -p vendor/fftw3 > + AC_MSG_NOTICE([Configuring fftw3 (double).]) > + AC_MSG_NOTICE([extra config options: '$fftw3_d_simd'.]) > + (cd vendor/fftw3; $fftw3_configure $fftw3_d_simd $fftw3_opts ) > + libs="$libs -lfftw3" > + fi > + if test "$enable_fft_long_double" = yes; then > + # fftw3l config doesn't get SIMD option > + mkdir -p vendor/fftw3l > + AC_MSG_NOTICE([Configuring fftw3l (long double).]) > + AC_MSG_NOTICE([extra config options: '$fftw3_l_simd'.]) > + (cd vendor/fftw3l; $fftw3_configure $fftw3_l_simd $fftw3_opts --enable-long-double) > + libs="$libs -lfftw3l" > + fi > > echo "===============================================================" > > @@ -494,16 +535,27 @@ There are no regular files here, only sy > ln -s "$fftw3_src_prefix"/api/fftw3.h vendor/fftw/include/fftw3.h > mkdir -p vendor/fftw/lib > # these don't refer to anything yet. > - ln -s ../../fftw3f/.libs/libfftw3f.a vendor/fftw/lib/libfftw3f.a > - ln -s ../../fftw3/.libs/libfftw3.a vendor/fftw/lib/libfftw3.a > - ln -s ../../fftw3l/.libs/libfftw3l.a vendor/fftw/lib/libfftw3l.a > + if test "$enable_fft_float" = yes; then > + ln -s ../../fftw3f/.libs/libfftw3f.a vendor/fftw/lib/libfftw3f.a > + AC_SUBST(USE_BUILTIN_FFTW_FLOAT, 1) > + fi > + if test "$enable_fft_double" = yes; then > + ln -s ../../fftw3/.libs/libfftw3.a vendor/fftw/lib/libfftw3.a > + AC_SUBST(USE_BUILTIN_FFTW_DOUBLE, 1) > + fi > + if test "$enable_fft_long_double" = yes; then > + ln -s ../../fftw3l/.libs/libfftw3l.a vendor/fftw/lib/libfftw3l.a > + AC_SUBST(USE_BUILTIN_FFTW_LONG_DOUBLE, 1) > + fi > else > AC_MSG_RESULT([not found]) > fi > > - if test -f "vendor/fftw3f/Makefile" -a \ > - -f "vendor/fftw3/Makefile" -a \ > - -f "vendor/fftw3l/Makefile" ; then > + > + if test \( "$enable_fft_float" != yes -o -f "vendor/fftw3f/Makefile" \) -a \ > + \( "$enable_fft_double" != yes -o -f "vendor/fftw3/Makefile" \) -a \ > + \( "$enable_fft_long_double" != yes -o -f "vendor/fftw3l/Makefile" \) > + then > AC_MSG_RESULT([Built-in FFTW3 configures successful.]) > else > AC_MSG_ERROR([Built-in FFTW3 configures FAILED, see config.log > @@ -517,7 +569,7 @@ There are no regular files here, only sy > my_abs_top_srcdir="$curdir/$srcdir" > fi > > - FFTW3_LIBS="-lfftw3f -lfftw3 -lfftw3l" > + FFTW3_LIBS="$libs" > AC_MSG_NOTICE([Will link with $FFTW3_LIBS.]) > > AC_SUBST(USE_BUILTIN_FFTW, 1) > @@ -861,10 +913,14 @@ int main(int, char **) > AC_SUBST(VSIP_IMPL_IPP_FFT, 1) > AC_DEFINE_UNQUOTED(VSIP_IMPL_IPP_FFT, 1, > [Define to use Intel's IPP library to perform FFTs.]) > - AC_DEFINE_UNQUOTED(VSIP_IMPL_FFT_USE_FLOAT, $vsip_impl_use_float, > - [Define to build code with support for FFT on float types.]) > - AC_DEFINE_UNQUOTED(VSIP_IMPL_FFT_USE_DOUBLE, $vsip_impl_use_double, > - [Define to build code with support for FFT on double types.]) > + if test "$enable_fft_float" = yes; then > + AC_DEFINE_UNQUOTED(VSIP_IMPL_FFT_USE_FLOAT, $vsip_impl_use_float, > + [Define to build code with support for FFT on float types.]) > + fi > + if test "$enable_fft_double" = yes; then > + AC_DEFINE_UNQUOTED(VSIP_IMPL_FFT_USE_DOUBLE, $vsip_impl_use_double, > + [Define to build code with support for FFT on double types.]) > + fi > fi > fi > fi > Index: vendor/GNUmakefile.inc.in > =================================================================== > RCS file: /home/cvs/Repository/vpp/vendor/GNUmakefile.inc.in,v > retrieving revision 1.5 > diff -u -p -r1.5 GNUmakefile.inc.in > --- vendor/GNUmakefile.inc.in 22 Dec 2005 06:53:52 -0000 1.5 > +++ vendor/GNUmakefile.inc.in 23 Dec 2005 00:15:19 -0000 > @@ -14,6 +14,9 @@ > > USE_BUILTIN_ATLAS := @USE_BUILTIN_ATLAS@ > USE_BUILTIN_FFTW := @USE_BUILTIN_FFTW@ > +USE_BUILTIN_FFTW_FLOAT := @USE_BUILTIN_FFTW_FLOAT@ > +USE_BUILTIN_FFTW_DOUBLE := @USE_BUILTIN_FFTW_DOUBLE@ > +USE_BUILTIN_FFTW_LONG_DOUBLE := @USE_BUILTIN_FFTW_LONG_DOUBLE@ > > vendor_REF_LAPACK = vendor/lapack/lapack.a > vendor_PRE_LAPACK = vendor/atlas/lib/libprelapack.a > @@ -74,41 +77,51 @@ endif > > ifdef USE_BUILTIN_FFTW > > -vendor_FFTW_LIBS := \ > - vendor/fftw3f/.libs/libfftw3f.a \ > - vendor/fftw3/.libs/libfftw3.a \ > - vendor/fftw3l/.libs/libfftw3l.a > - > -all:: $(vendor_FFTW_LIBS) > - > -libs:: $(vendor_FFTW_LIBS) > - > -vendor/fftw3f/.libs/libfftw3f.a: > +ifdef USE_BUILTIN_FFTW_FLOAT > +LIBFFTW_FLOAT := vendor/fftw3f/.libs/libfftw3f.a > +$(LIBFFTW_FLOAT): > @echo "Building FFTW float (see fftw-f.build.log)" > @$(MAKE) -C vendor/fftw3f > fftw-f.build.log 2>&1 > - > -vendor/fftw3/.libs/libfftw3.a: > +else > +LIBFFTW_LONG_FLOAT := > +endif > +ifdef USE_BUILTIN_FFTW_DOUBLE > +LIBFFTW_DOUBLE := vendor/fftw3/.libs/libfftw3.a > +$(LIBFFTW_DOUBLE): > @echo "Building FFTW double (see fftw-d.build.log)" > @$(MAKE) -C vendor/fftw3 > fftw-d.build.log 2>&1 > +else > +LIBFFTW_DOUBLE := > +endif > > -vendor/fftw3l/.libs/libfftw3l.a: > +ifdef USE_BUILTIN_FFTW_LONG_DOUBLE > +LIBFFTW_LONG_DOUBLE := vendor/fftw3l/.libs/libfftw3l.a > +$(LIBFFTW_LONG_DOUBLE): > @echo "Building FFTW double (see fftw-l.build.log)" > @$(MAKE) -C vendor/fftw3l > fftw-l.build.log 2>&1 > +else > +LIBFFTW_LONG_DOUBLE := > +endif > + > +vendor_FFTW_LIBS := $(LIBFFTW_FLOAT) $(LIBFFTW_DOUBLE) $(LIBFFTW_LONG_DOUBLE) > + > +all:: $(vendor_FFTW_LIBS) > + > +libs:: $(vendor_FFTW_LIBS) > > clean:: > @echo "Cleaning FFTW (see fftw.clean.log)" > - @$(MAKE) -C vendor/fftw3f clean > fftw.clean.log 2>&1 > - @$(MAKE) -C vendor/fftw3 clean >> fftw.clean.log 2>&1 > - @$(MAKE) -C vendor/fftw3l clean >> fftw.clean.log 2>&1 > - > + @for ldir in $(subst /.libs/,,$(dir $(vendor_FFTW_LIBS))); do \ > + echo "$(MAKE) -C $$ldir clean "; \ > + $(MAKE) -C $$ldir clean; done > fftw.clean.log 2>&1 > > # note: configure script constructs vendor/fftw/ symlinks used here. > install:: > @echo "Installing FFTW" > $(INSTALL) -d $(libdir) > - $(INSTALL_DATA) vendor/fftw/lib/libfftw3f.a $(libdir) > - $(INSTALL_DATA) vendor/fftw/lib/libfftw3.a $(libdir) > - $(INSTALL_DATA) vendor/fftw/lib/libfftw3l.a $(libdir) > + @for lib in $(vendor_FFTW_LIBS); do \ > + echo "$(INSTALL_DATA) $$lib $(libdir)"; \ > + $(INSTALL_DATA) $$lib $(libdir); done > $(INSTALL) -d $(includedir) > $(INSTALL_DATA) $(srcdir)/vendor/fftw/api/fftw3.h $(includedir) > endif From mark at codesourcery.com Sat Dec 24 08:13:27 2005 From: mark at codesourcery.com (Mark Mitchell) Date: Sat, 24 Dec 2005 00:13:27 -0800 Subject: PATCH: Provide common installation rules for DocBook Message-ID: <200512240813.jBO8DRYI023735@sethra.codesourcery.com> This patch updates csl-docbook's Makefile fragment so as to provide installation rule templates. These honor the htmldir/pdfdir variables, as per the GNU Coding Standards. >From the Makefile fragment: # 3. Use the installation templates from this file to install the # manuals. # # For example, if $(pdf_manuals) is the PDF manuals, relative to # $(objdir), do: # # install-pdf: $(foreach f,$(pdf_manuals),install-pdf-$(notdir $(f))) # # $(foreach f,$(pdf_manuals),$(eval $(call install_pdf_template,$(f)))) # # to install all of the PDF manuals in $(pdfdir). Applied. -- Mark Mitchell CodeSourcery, LLC mark at codesourcery.com 2005-12-24 Mark Mitchell * GNUmakefile.inc (%.html): Use the target name as the name of the directory into which the manual is placed. (install_pdf_template): New template. (install_html_template): Likewise. (install-pdfdir): New rule. (install-htmldir): Likewise. Index: GNUmakefile.inc =================================================================== RCS file: /home/cvs/Repository/csl-docbook/GNUmakefile.inc,v retrieving revision 1.4 diff -c -5 -p -r1.4 GNUmakefile.inc *** GNUmakefile.inc 19 Dec 2005 05:17:18 -0000 1.4 --- GNUmakefile.inc 24 Dec 2005 08:05:57 -0000 *************** *** 1,6 **** ! ######################################################################## # # File: GNUmakefile.inc # Author: Mark Mitchell # Date: 2005-12-14 # --- 1,6 ---- ! ######################################################### -*-Makefile-*- # # File: GNUmakefile.inc # Author: Mark Mitchell # Date: 2005-12-14 # *************** *** 18,37 **** # 1. Set the following variables. If you do not have a particular # tool, just leave the variable undefined, or give it an empty # value. # # csldocbookdir The path to the csl-docbook directory. # JADE The path to jade. # PDFJADETEXT The path to pdfjadetex. # XEP The path to the RenderX XEP program. # XSLTPROC The path to xsltproc. # # 2. Use "include $(csldocbookdir)/GNUmakefile.inc" to include # this fragment. # ! # Then, targets with ".pdf" or ".html" extensions will be built ! # automatically from DocBook source. ######################################################################## # Configuration ######################################################################## --- 18,54 ---- # 1. Set the following variables. If you do not have a particular # tool, just leave the variable undefined, or give it an empty # value. # # csldocbookdir The path to the csl-docbook directory. + # htmldir The directory in which HTML manuals should + # be installed. + # pdfdir The directory in which PDF manuals should + # be installed. + # # JADE The path to jade. # PDFJADETEXT The path to pdfjadetex. # XEP The path to the RenderX XEP program. # XSLTPROC The path to xsltproc. # # 2. Use "include $(csldocbookdir)/GNUmakefile.inc" to include # this fragment. # ! # Then, targets with ".pdf" or ".html" extensions will be built ! # automatically from DocBook source. ! # ! # 3. Use the installation templates from this file to install the ! # manuals. ! # ! # For example, if $(pdf_manuals) is the PDF manuals, relative to ! # $(objdir), do: ! # ! # install-pdf: $(foreach f,$(pdf_manuals),install-pdf-$(notdir $(f))) ! # ! # $(foreach f,$(pdf_manuals),$(eval $(call install_pdf_template,$(f)))) ! # ! # to install all of the PDF manuals in $(pdfdir). ######################################################################## # Configuration ######################################################################## *************** endif *** 58,83 **** # The patch to the SGML declaration of XML. XML_DCL := xml.dcl ######################################################################## # Implicit Rules ######################################################################## ifdef XSLTPROC # Generate HTML from DocBook. %.html: %.xml \ $(csldocbookdir)/xsl/html/csl.xsl \ $(csldocbookdir)/css/cs.css ! mkdir -p $(@D)/html ! cp $(csldocbookdir)/css/cs.css $(@D)/html $(XSLTPROC) \ --xinclude \ --stringparam csl_docbook.root $(csldocbookdir) \ --stringparam html.stylesheet cs.css \ --stringparam keep.relative.image.uris 1 \ ! --output $(@D)/html/index.html \ $(csldocbookdir)/xsl/html/csl.xsl \ $< touch $@ # Generate XSL-FO from DocBook. --- 75,132 ---- # The patch to the SGML declaration of XML. XML_DCL := xml.dcl ######################################################################## + # Templates + ######################################################################## + + # Install a PDF manual. + define install_pdf_template + .PHONY: install-pdf-$(notdir $(1)) + install-pdf-$(notdir $(1)): $(1) install-pdfdir + if test -r $(1); then $(INSTALL_DATA) $(1) $(pdfdir); fi + endef + + # Install an HTML manual. + define install_html_template + .PHONY: install-html-$(notdir $(1)) + install-html-$(notdir $(1)): $(1) install-htmldir + if test -r $(1); then \ + $(INSTALL) -d $(htmldir)/$(notdir $(1)); \ + $(INSTALL_DATA) $(1)/*.html $(htmldir)/$(notdir $(1)); \ + $(INSTALL_DATA) $(1)/*.css $(htmldir)/$(notdir $(1)); \ + fi + if test -d $(1)/images; then \ + $(INSTALL) -d $(htmldir)/$(notdir $(1))/images; \ + $(INSTALL_DATA) $(1)/images/*.png \ + $(htmldir)/$(notdir $(1))/images; \ + fi + if test -d $(1)/images/callouts; then \ + $(INSTALL) -d $(htmldir)/$(notdir $(1))/images/callouts; \ + $(INSTALL_DATA) $(1)/images/callouts/*.png \ + $(htmldir)/$(notdir $(1))/images/callouts; \ + fi + endef + + ######################################################################## # Implicit Rules ######################################################################## ifdef XSLTPROC # Generate HTML from DocBook. %.html: %.xml \ $(csldocbookdir)/xsl/html/csl.xsl \ $(csldocbookdir)/css/cs.css ! mkdir -p $@ ! cp $(csldocbookdir)/css/cs.css $@ $(XSLTPROC) \ --xinclude \ --stringparam csl_docbook.root $(csldocbookdir) \ --stringparam html.stylesheet cs.css \ --stringparam keep.relative.image.uris 1 \ ! --output $@/index.html \ $(csldocbookdir)/xsl/html/csl.xsl \ $< touch $@ # Generate XSL-FO from DocBook. *************** ifndef docbook_pdf *** 123,134 **** fi endif ifndef docbook_html %.html: ! if test -r $(srcdir)/$(@D)/html; then \ ! rm -rf $(@D)/html; \ ! mkdir -p $(@D)/html; \ ! cp -r $(srcdir)/$(@D)/html/*.html $(@D)/html; \ ! touch $@; \ fi endif --- 172,194 ---- fi endif ifndef docbook_html %.html: ! if test -r $(srcdir)/$@; then \ ! rm -rf $@; \ ! mkdir -p $@; \ ! cp -r $(srcdir)/$@ $@; \ fi endif + + ######################################################################## + # Rules + ######################################################################## + + .PHONY: install-pdfdir + install-pdfdir: + $(INSTALL) -d $(pdfdir) + + .PHONY: install-htmldir + install-htmldir: + $(INSTALL) -d $(htmldir) From mark at codesourcery.com Sat Dec 24 08:45:52 2005 From: mark at codesourcery.com (Mark Mitchell) Date: Sat, 24 Dec 2005 00:45:52 -0800 Subject: PATCH: Overhaul documentation installation Message-ID: <200512240845.jBO8jqvd031024@sethra.codesourcery.com> As per discussion on IRC, this patch overhauls how documentation is installed. We now use the GNU Coding Standards required locations, leveraging the machinery in csl-docbook for installation. I also fixed a makefile bug for examples/example1. There was a dependency on "libs" there. But, that dependency did not fire because the examples Makefile fragment was read too early; variables in rules are expanded when the rule is read. IIUC, Stefan is going to work on a rule to install the documentation back into the source directory, for use in making source distributions. Applied. -- Mark Mitchell CodeSourcery, LLC mark at codesourcery.com 2005-12-24 Mark Mitchell * GNUmakefile.in (PACKAGE_TARNAME): New variable. (PACKAGE_VERSION): Likewise. (pkgdatadir): Likewise. (datarootdir): Likewise. (docdir): Use it. (htmldir): New variable. (pdfdir): Likewise. (pdf_manuals): Likewise. (html_manuals): Likewise. (doc): Depend on html, pdf. (html): New target. (pdf): Likewise. (install): Depend on install-pdf, install-html. (install-pdf): New target. (install-html): Likewise. * configure.ac (AC_INIT): Set PACKAGE_TARNAME, correct PACKAGE_NAME. * doc/GNUmakefile.in: Adjust for improvements to csl-docbook, toplevel GNUmakefile. * examples/GNUmakefile.inc.in (examples/example1$(EXEEXT)): Depend on $(libs). (install): Use $(pkgdatadir). * src/vsip/GNUmakefile.inc.in (libs): Make it a variable, not a target. * vendor/GNUmakefile.inc.in (libs): Likewise. Index: GNUmakefile.in =================================================================== RCS file: /home/cvs/Repository/vpp/GNUmakefile.in,v retrieving revision 1.34 diff -c -5 -p -r1.34 GNUmakefile.in *** GNUmakefile.in 22 Dec 2005 16:31:40 -0000 1.34 --- GNUmakefile.in 24 Dec 2005 08:40:24 -0000 *************** srcdir := @srcdir@ *** 32,52 **** # perform actions needed by maintainers. maintainer_mode := @maintainer_mode@ ### Installation ### # Order matters for the various directory variables, as autoconf makes some # of the variables depend on the values of others. prefix := @prefix@ exec_prefix := @exec_prefix@ datadir := @datadir@ includedir := @includedir@ libdir := @libdir@ ! docdir := $(prefix)/doc/vsip suffix := - INSTALL := @INSTALL@ - INSTALL_DATA := @INSTALL_DATA@ ### Compilation ### # The path to the archiver. AR := @AR@ --- 32,67 ---- # perform actions needed by maintainers. maintainer_mode := @maintainer_mode@ ### Installation ### + PACKAGE_TARNAME := @PACKAGE_TARNAME@ + PACKAGE_VERSION := @PACKAGE_VERSION@ + INSTALL := @INSTALL@ + INSTALL_DATA := @INSTALL_DATA@ + # Order matters for the various directory variables, as autoconf makes some # of the variables depend on the values of others. prefix := @prefix@ exec_prefix := @exec_prefix@ datadir := @datadir@ includedir := @includedir@ libdir := @libdir@ ! # The directory for putting data that is specific to this package. ! # This is not a standard variable name. ! pkgdatadir := $(datadir)/$(PACKAGE_TARNAME) ! ! # Documentation directories. According to the GNU Coding Standards, ! # Autoconf has @...@ variables for some of these, but Autoconf 2.59, ! # installed on CodeSourcery's sytems, does not, so we set these by ! # hand, using the defaults specified in the GNU Coding Standards. ! datarootdir := $(prefix)/share ! docdir := $(datarootdir)/doc/$(PACKAGE_TARNAME) ! htmldir := $(docdir) ! pdfdir := $(docdir) ! suffix := ### Compilation ### # The path to the archiver. AR := @AR@ *************** endif *** 115,137 **** ######################################################################## # Variables in this section may be appended to (with +=) by # subdirectory Makefile fragments. cxx_sources := ! ! # The subdirectories in which we can find sub-Makefiles. subdirs := \ apps \ benchmarks \ doc \ - examples \ src \ src/vsip \ tests \ tools \ ! vendor ######################################################################## # Included Files ######################################################################## --- 130,162 ---- ######################################################################## # Variables in this section may be appended to (with +=) by # subdirectory Makefile fragments. + # C++ source files, relative to $srcdir. cxx_sources := ! # Libraries, relative to $objdir. ! libs := ! # PDF documentation, relative to $objdir. ! pdf_manuals := ! # HTML documentation, relative to $objdir. ! html_manuals := ! ! # The subdirectories in which we can find sub-Makefiles. The ! # "examples" directory must be last because some of the targets there ! # depend on $(libs), and $(libs) will not be full initialized until ! # all other subdirectories have been processed. subdirs := \ apps \ benchmarks \ doc \ src \ src/vsip \ tests \ tools \ ! vendor \ ! examples ######################################################################## # Included Files ######################################################################## *************** vsipsxr: vsip.syn *** 244,270 **** .FORCE: .PHONY: all all:: - .PHONY: libs - libs:: - .PHONY: depend depend:: .PHONY: doc ! doc:: .PHONY: check check:: .PHONY: clean clean:: .PHONY: install ! install:: # Include automatically generated dependency files. ifeq (,$(filter $(MAKECMDGOALS), depend doc clean)) include $(deps) endif --- 269,308 ---- .FORCE: .PHONY: all all:: .PHONY: depend depend:: .PHONY: doc ! doc:: html pdf ! ! .PHONY: html ! html:: $(html_manuals) ! ! .PHONY: pdf ! pdf:: $(pdf_manuals) .PHONY: check check:: .PHONY: clean clean:: .PHONY: install ! install:: install-pdf install-html ! ! .PHONY: install-pdf ! install-pdf:: $(foreach f,$(pdf_manuals),install-pdf-$(notdir $(f))) ! ! $(foreach f,$(pdf_manuals),$(eval $(call install_pdf_template,$(f)))) ! ! .PHONY: install-html ! install-html: $(foreach f,$(html_manuals),install-html-$(notdir $(f))) ! ! $(foreach f,$(html_manuals),$(eval $(call install_html_template,$(f)))) # Include automatically generated dependency files. ifeq (,$(filter $(MAKECMDGOALS), depend doc clean)) include $(deps) endif Index: configure.ac =================================================================== RCS file: /home/cvs/Repository/vpp/configure.ac,v retrieving revision 1.65 diff -c -5 -p -r1.65 configure.ac *** configure.ac 23 Dec 2005 19:32:38 -0000 1.65 --- configure.ac 24 Dec 2005 08:40:24 -0000 *************** dnl *** 9,19 **** dnl ------------------------------------------------------------------ dnl Autoconf initialization dnl ------------------------------------------------------------------ AC_PREREQ(2.56) AC_REVISION($Revision: 1.65 $) ! AC_INIT(VSIPL++, 1.0, vsipl++ at codesourcery.com) ###################################################################### # Configure command line arguments. ###################################################################### --- 9,19 ---- dnl ------------------------------------------------------------------ dnl Autoconf initialization dnl ------------------------------------------------------------------ AC_PREREQ(2.56) AC_REVISION($Revision: 1.65 $) ! AC_INIT(Sourcery VSIPL++, 1.0, vsipl++ at codesourcery.com, sourceryvsipl++) ###################################################################### # Configure command line arguments. ###################################################################### Index: doc/GNUmakefile.inc.in =================================================================== RCS file: /home/cvs/Repository/vpp/doc/GNUmakefile.inc.in,v retrieving revision 1.11 diff -c -5 -p -r1.11 GNUmakefile.inc.in *** doc/GNUmakefile.inc.in 23 Dec 2005 16:24:11 -0000 1.11 --- doc/GNUmakefile.inc.in 24 Dec 2005 08:40:24 -0000 *************** doc_pdf_manuals := \ *** 16,35 **** doc/quickstart/quickstart.pdf \ doc/tutorial/tutorial.pdf doc_html_manuals := $(doc_pdf_manuals:%.pdf=%.html) doc_manuals := $(doc_pdf_manuals) $(doc_html_manuals) tutorial_images := \ $(wildcard $(srcdir)/doc/tutorial/images/*.png) \ $(wildcard $(srcdir)/doc/tutorial/images/callouts/*.png) \ ######################################################################## # Rules ######################################################################## - doc:: $(doc_html_manuals) $(doc_pdf_manuals) - ifdef DOXYGEN doc:: doc/html/index.html endif $(doc_manuals): \ --- 16,36 ---- doc/quickstart/quickstart.pdf \ doc/tutorial/tutorial.pdf doc_html_manuals := $(doc_pdf_manuals:%.pdf=%.html) doc_manuals := $(doc_pdf_manuals) $(doc_html_manuals) + pdf_manuals += $(doc_pdf_manuals) + html_manuals += $(doc_html_manuals) + tutorial_images := \ $(wildcard $(srcdir)/doc/tutorial/images/*.png) \ $(wildcard $(srcdir)/doc/tutorial/images/callouts/*.png) \ ######################################################################## # Rules ######################################################################## ifdef DOXYGEN doc:: doc/html/index.html endif $(doc_manuals): \ *************** $(doc_manuals): \ *** 38,81 **** doc/html/index.html: $(DOXYGEN) doc/Doxyfile doc/tutorial/tutorial.html: \ ! $(patsubst $(srcdir)/doc/tutorial/%,doc/tutorial/html/%,$(tutorial_images)) ! doc/tutorial/html/images/%.png: $(srcdir)/doc/tutorial/images/%.png mkdir -p $(@D) cp $< $@ clean:: ! rm -f $(doc_manuals) rm -rf doc/html - - # Install the manuals. - install:: - $(INSTALL) -d $(docdir) - for f in $(doc_pdf_manuals); do \ - if test -r $$f; then \ - $(INSTALL_DATA) $$f $(docdir); \ - fi; \ - done - # HTML manuals go in their own subdirectories. - for dir in quickstart tutorial; do \ - if test -r doc/$$dir/html/index.html; then \ - $(INSTALL) -d $(docdir)/html/$$dir; \ - $(INSTALL_DATA) doc/$$dir/html/*.html \ - $(docdir)/html/$$dir; \ - $(INSTALL_DATA) doc/$$dir/html/*.css \ - $(docdir)/html/$$dir; \ - fi; \ - if test -d doc/$$dir/html/images; then \ - $(INSTALL) -d $(docdir)/html/$$dir/images; \ - $(INSTALL_DATA) doc/$$dir/html/images/*.png \ - $(docdir)/html/$$dir/images; \ - fi; \ - if test -d doc/$$dir/html/images/callouts; then \ - $(INSTALL) -d \ - $(docdir)/html/$$dir/images/callouts; \ - $(INSTALL_DATA) doc/$$dir/html/images/callouts/*.png \ - $(docdir)/html/$$dir/images/callouts; \ - fi; \ - done --- 39,52 ---- doc/html/index.html: $(DOXYGEN) doc/Doxyfile doc/tutorial/tutorial.html: \ ! $(patsubst $(srcdir)/doc/tutorial/%,doc/tutorial/tutorial.html/%,$(tutorial_images)) ! doc/tutorial/tutorial.html/images/%.png: $(srcdir)/doc/tutorial/images/%.png mkdir -p $(@D) cp $< $@ clean:: ! rm -rf $(doc_manuals) rm -rf doc/html Index: examples/GNUmakefile.inc.in =================================================================== RCS file: /home/cvs/Repository/vpp/examples/GNUmakefile.inc.in,v retrieving revision 1.5 diff -c -5 -p -r1.5 GNUmakefile.inc.in *** examples/GNUmakefile.inc.in 1 Dec 2005 14:43:17 -0000 1.5 --- examples/GNUmakefile.inc.in 24 Dec 2005 08:40:28 -0000 *************** cxx_sources += $(examples_cxx_sources) *** 24,34 **** # Rules ######################################################################## all:: examples/example1$(EXEEXT) ! examples/example1$(EXEEXT): examples/example1.$(OBJEXT) libs $(CXX) $(LDFLAGS) -o $@ $< -Lsrc/vsip -lvsip $(LIBS) install:: ! $(INSTALL) -d $(datadir)/vsip ! $(INSTALL_DATA) $(examples_cxx_sources) $(datadir)/vsip --- 24,34 ---- # Rules ######################################################################## all:: examples/example1$(EXEEXT) ! examples/example1$(EXEEXT): examples/example1.$(OBJEXT) $(libs) $(CXX) $(LDFLAGS) -o $@ $< -Lsrc/vsip -lvsip $(LIBS) install:: ! $(INSTALL) -d $(pkgdatadir) ! $(INSTALL_DATA) $(examples_cxx_sources) $(pkgdatadir) Index: src/vsip/GNUmakefile.inc.in =================================================================== RCS file: /home/cvs/Repository/vpp/src/vsip/GNUmakefile.inc.in,v retrieving revision 1.11 diff -c -5 -p -r1.11 GNUmakefile.inc.in *** src/vsip/GNUmakefile.inc.in 22 Dec 2005 16:31:40 -0000 1.11 --- src/vsip/GNUmakefile.inc.in 24 Dec 2005 08:40:28 -0000 *************** ifdef VSIP_IMPL_HAVE_SAL *** 23,40 **** src_vsip_cxx_sources += $(srcdir)/src/vsip/impl/sal.cpp endif src_vsip_cxx_objects := $(patsubst $(srcdir)/%.cpp, %.$(OBJEXT), $(src_vsip_cxx_sources)) cxx_sources += $(src_vsip_cxx_sources) ######################################################################## # Rules ######################################################################## all:: src/vsip/libvsip.a - libs:: src/vsip/libvsip.a - clean:: rm -f src/vsip/libvsip.a src/vsip/libvsip.a: $(src_vsip_cxx_objects) $(AR) rc $@ $^ || rm -f $@ --- 23,39 ---- src_vsip_cxx_sources += $(srcdir)/src/vsip/impl/sal.cpp endif src_vsip_cxx_objects := $(patsubst $(srcdir)/%.cpp, %.$(OBJEXT), $(src_vsip_cxx_sources)) cxx_sources += $(src_vsip_cxx_sources) + libs += src/vsip/libvsip.a ######################################################################## # Rules ######################################################################## all:: src/vsip/libvsip.a clean:: rm -f src/vsip/libvsip.a src/vsip/libvsip.a: $(src_vsip_cxx_objects) $(AR) rc $@ $^ || rm -f $@ Index: vendor/GNUmakefile.inc.in =================================================================== RCS file: /home/cvs/Repository/vpp/vendor/GNUmakefile.inc.in,v retrieving revision 1.6 diff -c -5 -p -r1.6 GNUmakefile.inc.in *** vendor/GNUmakefile.inc.in 23 Dec 2005 19:32:38 -0000 1.6 --- vendor/GNUmakefile.inc.in 24 Dec 2005 08:40:28 -0000 *************** vendor_LIBS := \ *** 40,50 **** ######################################################################## ifdef USE_BUILTIN_ATLAS all:: $(vendor_LIBS) ! libs:: $(vendor_LIBS) $(vendor_ATLAS_LIBS): @echo "Building ATLAS (see atlas.build.log)" @$(MAKE) -C vendor/atlas build > atlas.build.log 2>&1 --- 40,50 ---- ######################################################################## ifdef USE_BUILTIN_ATLAS all:: $(vendor_LIBS) ! libs += $(vendor_LIBS) $(vendor_ATLAS_LIBS): @echo "Building ATLAS (see atlas.build.log)" @$(MAKE) -C vendor/atlas build > atlas.build.log 2>&1 *************** endif *** 105,115 **** vendor_FFTW_LIBS := $(LIBFFTW_FLOAT) $(LIBFFTW_DOUBLE) $(LIBFFTW_LONG_DOUBLE) all:: $(vendor_FFTW_LIBS) ! libs:: $(vendor_FFTW_LIBS) clean:: @echo "Cleaning FFTW (see fftw.clean.log)" @for ldir in $(subst /.libs/,,$(dir $(vendor_FFTW_LIBS))); do \ echo "$(MAKE) -C $$ldir clean "; \ --- 105,115 ---- vendor_FFTW_LIBS := $(LIBFFTW_FLOAT) $(LIBFFTW_DOUBLE) $(LIBFFTW_LONG_DOUBLE) all:: $(vendor_FFTW_LIBS) ! libs += $(vendor_FFTW_LIBS) clean:: @echo "Cleaning FFTW (see fftw.clean.log)" @for ldir in $(subst /.libs/,,$(dir $(vendor_FFTW_LIBS))); do \ echo "$(MAKE) -C $$ldir clean "; \ From ncm at codesourcery.com Mon Dec 26 20:05:34 2005 From: ncm at codesourcery.com (Nathan (Jasper) Myers) Date: Mon, 26 Dec 2005 12:05:34 -0800 Subject: [patch] Find & use native C MPI Message-ID: <20051226200534.GE3272@codesourcery.com> The attached fixes up config-time MPI library and build/link flag discovery. Committed. Nathan Myers ncm Index: ChangeLog =================================================================== RCS file: /home/cvs/Repository/vpp/ChangeLog,v retrieving revision 1.354 diff -u -p -r1.354 ChangeLog --- ChangeLog 23 Dec 2005 20:03:55 -0000 1.354 +++ ChangeLog 26 Dec 2005 19:42:54 -0000 @@ -1,3 +1,8 @@ +2005-12-26 Nathan Myers + + * configure.ac, src/vsip/impl/par-services-mpi.hpp: find native MPI + installations, correctly extract build options using C-only libs. + 2005-12-23 Stefan Seefeld * tests/GNUmakefile.inc.in: Add new check-installed target. Index: configure.ac =================================================================== RCS file: /home/cvs/Repository/vpp/configure.ac,v retrieving revision 1.65 diff -u -p -r1.65 configure.ac --- configure.ac 23 Dec 2005 19:32:38 -0000 1.65 +++ configure.ac 26 Dec 2005 19:42:54 -0000 @@ -27,9 +27,9 @@ AC_ARG_ENABLE(maintainer-mode, VSIPL++, but do not plan to modify Sourcery VSIPL++, you should not use this option.]), [case x"$enableval" in - xyes) maintainer_mode=true ;; - xno) maintainer_mode= ;; - *) AC_MSG_ERROR([Invalid argument to --enable-maintainer-mode.]) + (xyes) maintainer_mode=true ;; + (xno) maintainer_mode= ;; + (*) AC_MSG_ERROR([Invalid argument to --enable-maintainer-mode.]) esac], [maintainer_mode=]) AC_SUBST(maintainer_mode) @@ -54,7 +54,7 @@ AC_ARG_ENABLE([exceptions], AC_ARG_ENABLE([mpi], AS_HELP_STRING([--disable-mpi], [don't use MPI (default is to use it if found)]),, - [enable_mpi=no]) + [enable_mpi=yes]) AC_ARG_WITH(mpi_prefix, AS_HELP_STRING([--with-mpi-prefix=PATH], [Specify the installation prefix of the MPI library. Headers @@ -447,8 +447,8 @@ if test "$enable_fftw3" != "no" ; then AC_MSG_CHECKING([for external FFTW3 library]) LIBS="$LIBS $libs" AC_LINK_IFELSE( - [AC_LANG_PROGRAM([[#include ]], - [[$syms]])], + [AC_LANG_PROGRAM([#include ], + [$syms])], [AC_MSG_RESULT([enabled.]) keep_LIBS="$LIBS" keep_CPPFLAGS="$CPPFLAGS" @@ -656,6 +656,7 @@ fi if test "$enable_mpi" != "no"; then vsipl_par_service=1 + MPI_CPPFLAGS= if test -n "$with_mpi_prefix"; then MPI_CPPFLAGS="-I$with_mpi_prefix/include" fi @@ -663,12 +664,39 @@ if test "$enable_mpi" != "no"; then CPPFLAGS="$CPPFLAGS $MPI_CPPFLAGS" # Find mpi.h. + vsipl_lib_style=unknown vsipl_mpi_h_name="not found" - AC_CHECK_HEADER([mpi.h], [vsipl_mpi_h_name=''],, [// no prerequisites]) + vsipl_mpi_config_h_name="not found" + if test "$vsipl_mpi_config_h_name" = "not found"; then + AC_CHECK_HEADER([lam_config.h], + [vsipl_mpi_config_h_name='' + vsipl_mpi_h_name='' + vsipl_lib_style=lam + AC_DEFINE_UNQUOTED(VSIP_IMPL_HAVE_MPI_CONFIG_H,, + [A header to include before getting mpi.h.])],, + [ // no prerequisites ]) + fi + if test "$vsipl_mpi_h_config" = "not found"; then + AC_CHECK_HEADER([mpi/lam_config.h], + [vsipl_mpi_config_h_name='' + vsipl_mpi_h_name='' + vsipl_lib_style=lam + AC_DEFINE_UNQUOTED(VSIP_IMPL_HAVE_MPI_CONFIG_H,, + [A header to include before getting mpi.h.])],, + [ // no prerequisites ]) + fi if test "$vsipl_mpi_h_name" = "not found"; then - AC_CHECK_HEADER([mpi/mpi.h], [vsipl_mpi_h_name=''],, [// no prerequisites]) + AC_CHECK_HEADER([mpi.h], + [vsipl_mpi_h_name=''],, + [#define MPICH_SKIP_MPICXX 1]) + fi + if test "$vsipl_mpi_h_name" = "not found"; then + AC_CHECK_HEADER([mpi/mpi.h], + [vsipl_mpi_h_name=''],, + [#define MPICH_SKIP_MPICXX 1]) fi dnl Add further possibilities here. + if test "$vsipl_mpi_h_name" = "not found"; then if test "$enable_mpi" != "probe"; then AC_MSG_ERROR([MPI enabled, but no mpi.h detected]) @@ -677,69 +705,90 @@ if test "$enable_mpi" != "no"; then CPPFLAGS="$save_CPPFLAGS" fi else - AC_DEFINE_UNQUOTED(VSIP_IMPL_MPI_H, $vsipl_mpi_h_name, + AC_DEFINE_UNQUOTED([VSIP_IMPL_MPI_H], $vsipl_mpi_h_name, [The name of the header to include for the MPI interface, with <> quotes.]) # Find the library. - vsipl_lib_style=unknown - # Both MPICH 1 and 2 define MPICH_NAME. - AC_CHECK_DECL([MPICH_NAME], [vsipl_lib_style=mpich],, - [#include VSIP_IMPL_MPI_H]) + # if it's lam, we already identified it. if test $vsipl_lib_style = unknown; then - AC_CHECK_DECL([LAM_MPI], [vsipl_lib_style=lam],, - [#include VSIP_IMPL_MPI_H]) + # Both MPICH 1 and 2 define MPICH_NAME. + AC_CHECK_DECL([MPICH_NAME], [vsipl_lib_style=mpich],, + [[#include VSIP_IMPL_MPI_H]]) fi - case $vsipl_lib_style in - unknown) + AC_MSG_NOTICE([Discovering MPI compile and link flags]) + if test -n "$with_mpi_prefix"; then + MPICC="$with_mpi_prefix/bin/mpicc" + else + MPICC="mpicc" + fi + MPI_CPPFLAGS= + MPI_LIBS= + case "$vsipl_lib_style" in + (unknown) + AC_MSG_RESULT([failed]) AC_MSG_ERROR([unrecognized MPI implementation]) ;; - mpich) - if test -n "$with_mpi_prefix"; then - MPICXX="$with_mpi_prefix/bin/mpicxx -show" - else - MPICXX="mpicxx -show" - fi - ;; + (mpich) + [MPI_CPPFLAGS="`$MPICC -show -compile_info -cc= -c conftest.c | \ + sed -e \"s| *-c conftest.c||\"`"] + [MPI_LIBS="`$MPICC -show -link_info -cc= conftest.o | \ + sed -e \"s| *conftest.o||\"`"] + AC_MSG_RESULT([ok]) + ;; - lam) - if test -n "$with_mpi_prefix"; then - MPICXX="$with_mpi_prefix/bin/mpiCC -showme" - else - MPICXX="mpiCC -showme" - fi + (lam) + # lam 7 could use "-showme:compile" and "-showme:link" and avoid sed. + [MPI_CPPFLAGS="`$MPICC -showme -c conftest.c | \ + sed -e \"s|^[^ ]* ||\" -e \"s| *-c conftest.c||\"`"] + [MPI_LIBS="`$MPICC -showme conftest.o | \ + sed -e \"s|^[^ ]* ||\" -e \"s| *conftest.o||\"`"] + AC_MSG_RESULT([ok]) vsip_impl_avoid_posix_memalign=yes - ;; + ;; esac -changequote(<<, >>)dnl - MPI_CPPFLAGS="`$MPICXX -c conftest.cc | sed -e \"s|^[^ \t]*||\"\ - -e \"s|-DHAVE_MPI_CXX||\"\ - -e \"s|-c conftest.cc[ \t]*$||\"`" - MPI_LIBS="`$MPICXX | sed -e \"s|^[^ \t]*||\"\ - -e \"s|-DHAVE_MPI_CXX||\"`" -changequote([, ])dnl + AC_MSG_NOTICE([MPI_CPPFLAGS=$MPI_CPPFLAGS]) + AC_MSG_NOTICE([MPI_LIBS=$MPI_LIBS]) - AC_MSG_CHECKING([for MPI build instructions]) + AC_MSG_CHECKING([MPI build instructions]) save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $MPI_CPPFLAGS" save_LIBS="$LIBS" LIBS="$LIBS $MPI_LIBS" - AC_LINK_IFELSE( - [AC_LANG_PROGRAM([[#include VSIP_IMPL_MPI_H]], - [[MPI_Init(0, 0);]])], - [], - [AC_MSG_ERROR([Unable to compile / link test MPI application.])]) - - AC_MSG_RESULT(found) + case "$vsipl_lib_style" in + (mpich) + AC_LINK_IFELSE( + [AC_LANG_PROGRAM([#include VSIP_IMPL_MPI_H + #define MPICH_SKIP_MPICXX 1], + [MPI_Init(0, 0)])], + [AC_MSG_RESULT([worked])], + [AC_MSG_RESULT([failed]) + AC_MSG_ERROR([Unable to compile / link test MPICH program.])]) + ;; + (lam) + AC_LINK_IFELSE( + [AC_LANG_PROGRAM([ + #include VSIP_IMPL_HAVE_MPI_CONFIG_H + #ifdef LAM_WANT_MPI2CPP + #undef LAM_WANT_MPI2CPP + #endif + #include VSIP_IMPL_MPI_H ], + [MPI_Init(0, 0)])], + [AC_MSG_RESULT([worked])], + [AC_MSG_RESULT([failed]) + AC_MSG_ERROR([Unable to compile / link test LAM MPI program.])]) + ;; + esac if test -n "$vsip_impl_avoid_posix_memalign"; then AC_DEFINE_UNQUOTED(VSIP_IMPL_AVOID_POSIX_MEMALIGN, 1, [Set to 1 to avoid using posix_memalign (LAM defines its own malloc, including memalign but not posix_memalign).]) - AC_MSG_NOTICE([Avoiding posix_memalign, may not be compatible with LAM-MPI malloc]) + AC_MSG_NOTICE( + [Avoiding posix_memalign, may not be compatible with LAM-MPI malloc]) fi fi Index: src/vsip/impl/par-services-mpi.hpp =================================================================== RCS file: /home/cvs/Repository/vpp/src/vsip/impl/par-services-mpi.hpp,v retrieving revision 1.14 diff -u -p -r1.14 par-services-mpi.hpp --- src/vsip/impl/par-services-mpi.hpp 16 Sep 2005 22:03:20 -0000 1.14 +++ src/vsip/impl/par-services-mpi.hpp 26 Dec 2005 19:42:54 -0000 @@ -26,8 +26,24 @@ #include #include + +// work around, er, unfortunate MPICH implementation choice +#ifndef MPICH_SKIP_MPICXX +#define MPICH_SKIP_MPICXX 1 /* turn off #include in mpi.h */ +#endif + +// work around, er, unfortunate LAM 6.x,7 implementation choice +#ifdef VSIP_IMPL_HAVE_MPI_CONFIG_H +#include VSIP_IMPL_HAVE_MPI_CONFIG_H /* typically */ +#ifdef WANT_MPI2CPP +#undef WANT_MPI2CPP /* turn off "#include " in mpi.h */ +#endif +#endif + #include VSIP_IMPL_MPI_H +#undef MPICH_SKIP_MPICXX /* clean up */ + #include From mark at codesourcery.com Mon Dec 26 22:16:08 2005 From: mark at codesourcery.com (Mark Mitchell) Date: Mon, 26 Dec 2005 14:16:08 -0800 Subject: [vsipl++] [patch] Find & use native C MPI In-Reply-To: <20051226200534.GE3272@codesourcery.com> References: <20051226200534.GE3272@codesourcery.com> Message-ID: <43B06BA8.4080100@codesourcery.com> Nathan (Jasper) Myers wrote: you should not use this option.]), > [case x"$enableval" in > - xyes) maintainer_mode=true ;; > - xno) maintainer_mode= ;; > - *) AC_MSG_ERROR([Invalid argument to --enable-maintainer-mode.]) > + (xyes) maintainer_mode=true ;; > + (xno) maintainer_mode= ;; > + (*) AC_MSG_ERROR([Invalid argument to --enable-maintainer-mode.]) I didn't know about the (...) syntax, although I see it's certainly documented in bash. Is is valid with all shells? I haven't see anyone use that in an autoconf script before; my concern is that this might make the configure script less portable. -- Mark Mitchell CodeSourcery, LLC mark at codesourcery.com (650) 331-3385 x713 From ncm at codesourcery.com Tue Dec 27 08:55:25 2005 From: ncm at codesourcery.com (Nathan Myers) Date: Tue, 27 Dec 2005 00:55:25 -0800 Subject: [vsipl++] [patch] Find & use native C MPI In-Reply-To: <43B06BA8.4080100@codesourcery.com> References: <20051226200534.GE3272@codesourcery.com> <43B06BA8.4080100@codesourcery.com> Message-ID: <20051227085525.GA8939@codesourcery.com> On Mon, Dec 26, 2005 at 02:16:08PM -0800, Mark Mitchell wrote: > Nathan (Jasper) Myers wrote: > you should not use this option.]), > > [case x"$enableval" in > > - xyes) maintainer_mode=true ;; > > - xno) maintainer_mode= ;; > > - *) AC_MSG_ERROR([Invalid argument to --enable-maintainer-mode.]) > > + (xyes) maintainer_mode=true ;; > > + (xno) maintainer_mode= ;; > > + (*) AC_MSG_ERROR([Invalid argument to --enable-maintainer-mode.]) > > I didn't know about the (...) syntax, although I see it's certainly > documented in bash. Is is valid with all shells? > > I haven't see anyone use that in an autoconf script before; my concern > is that this might make the configure script less portable. I started using it when I got bizarre syntax errors from bash, on a particular script, if I didn't use it. Pdksh (or was it Bell Labs ksh?) also reported an ambiguity, and helpfully suggested the "()" notation to resolve it. I haven't encountered any sh that doesn't support it, going back to AT&T sh, and including zsh (ack! spit!) and ash. I added the "(" in this instance while tracing a bracketing problem, testing a configure script, that turned out to be a missing "fi". Unfortunately the script that provoked the error messages is lost, but it was less than four years ago. All I recall now is that the pattern involved was only a little more complicated than a literal string. The cases above are obviously canonical and so could not trigger the failure, but it seems to me more defensive to promote the "()" notation. Nathan Myers ncm From mark at codesourcery.com Tue Dec 27 09:56:56 2005 From: mark at codesourcery.com (Mark Mitchell) Date: Tue, 27 Dec 2005 01:56:56 -0800 Subject: [vsipl++] [patch] Find & use native C MPI In-Reply-To: <20051227085525.GA8939@codesourcery.com> References: <20051226200534.GE3272@codesourcery.com> <43B06BA8.4080100@codesourcery.com> <20051227085525.GA8939@codesourcery.com> Message-ID: <43B10FE8.9040601@codesourcery.com> Nathan Myers wrote: > Unfortunately the script that provoked the error messages is lost, > but it was less than four years ago. All I recall now is that the > pattern involved was only a little more complicated than a literal > string. The cases above are obviously canonical and so could not > trigger the failure, but it seems to me more defensive to promote > the "()" notation. Thanks for explaining. -- Mark Mitchell CodeSourcery, LLC mark at codesourcery.com (650) 331-3385 x713 From stefan at codesourcery.com Thu Dec 29 02:42:36 2005 From: stefan at codesourcery.com (Stefan Seefeld) Date: Wed, 28 Dec 2005 21:42:36 -0500 Subject: [vsipl++] PATCH: Provide common installation rules for DocBook In-Reply-To: <200512240813.jBO8DRYI023735@sethra.codesourcery.com> References: <200512240813.jBO8DRYI023735@sethra.codesourcery.com> Message-ID: <43B34D1C.7070308@codesourcery.com> Mark Mitchell wrote: > This patch updates csl-docbook's Makefile fragment so as to provide > installation rule templates. These honor the htmldir/pdfdir > variables, as per the GNU Coding Standards. [...] > Index: GNUmakefile.inc [...] > ######################################################################## > # Implicit Rules > ######################################################################## > > ifdef XSLTPROC > # Generate HTML from DocBook. > %.html: %.xml \ > $(csldocbookdir)/xsl/html/csl.xsl \ > $(csldocbookdir)/css/cs.css > ! mkdir -p $(@D)/html > ! cp $(csldocbookdir)/css/cs.css $(@D)/html > $(XSLTPROC) \ > --xinclude \ > --stringparam csl_docbook.root $(csldocbookdir) \ > --stringparam html.stylesheet cs.css \ > --stringparam keep.relative.image.uris 1 \ > ! --output $(@D)/html/index.html \ > $(csldocbookdir)/xsl/html/csl.xsl \ > $< > touch $@ vs. > + ######################################################################## > # Implicit Rules > ######################################################################## > > ifdef XSLTPROC > # Generate HTML from DocBook. > %.html: %.xml \ > $(csldocbookdir)/xsl/html/csl.xsl \ > $(csldocbookdir)/css/cs.css > ! mkdir -p $@ > ! cp $(csldocbookdir)/css/cs.css $@ > $(XSLTPROC) \ > --xinclude \ > --stringparam csl_docbook.root $(csldocbookdir) \ > --stringparam html.stylesheet cs.css \ > --stringparam keep.relative.image.uris 1 \ > ! --output $@/index.html \ > $(csldocbookdir)/xsl/html/csl.xsl \ > $< > touch $@ The previous rule generated a directory 'html/' together with a dummy 'tutorial.html' file (for example). I now get a 'tutorial.html/' directory, which I find slightly surprizing (a directory with a '.html' extension, that is). Using the '$*' variable above instead of '$@' would allow the creation of a 'tutorial/' output directory (keeping the dummy 'tutorial.html' for convenience). Regards, Stefan From mark at codesourcery.com Thu Dec 29 03:01:21 2005 From: mark at codesourcery.com (Mark Mitchell) Date: Wed, 28 Dec 2005 19:01:21 -0800 Subject: [vsipl++] PATCH: Provide common installation rules for DocBook In-Reply-To: <43B34D1C.7070308@codesourcery.com> References: <200512240813.jBO8DRYI023735@sethra.codesourcery.com> <43B34D1C.7070308@codesourcery.com> Message-ID: <43B35181.40808@codesourcery.com> Stefan Seefeld wrote: > The previous rule generated a directory 'html/' together with a dummy > 'tutorial.html' file (for example). I now get a 'tutorial.html/' directory, > which I find slightly surprizing (a directory with a '.html' extension, > that is). > Using the '$*' variable above instead of '$@' would allow the creation of a > 'tutorial/' output directory (keeping the dummy 'tutorial.html' for > convenience). I have no real preference; it just seemed simpler to avoid the dummy file. If you want to change it back, that's fine; just make sure the installation rules don't install the dummy file. Maybe the best thing would actually be to make the dummy file some kind of link to the index.html file in the subdirectory? I'm comfortable with basically anything; I think we're somewhat splitting hairs. If someone opens the .html directory in their browser, one of two things will happen: (a) it will show them the directory listing, and they can choose index.html, or (b) it will automatically load index.html for them. So, I don't think it will make too big a difference. -- Mark Mitchell CodeSourcery, LLC mark at codesourcery.com (650) 331-3385 x713