From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.redhat.com (mail.redhat.com [199.183.24.239]) by listman.redhat.com (Postfix) with ESMTP id 696F72F39B for ; Tue, 10 Apr 2001 19:47:31 -0400 (EDT) Received: (from mail@localhost) by mail.redhat.com (8.11.0/8.8.7) id f3ANnVk07261 for axp-list@listman.redhat.com; Tue, 10 Apr 2001 19:49:31 -0400 Received: from alpha-gw.alpha-processor.com (barracuda.alpha-processor.com [192.233.60.7]) by mail.redhat.com (8.11.0/8.8.7) with SMTP id f3ANnVV07256 for ; Tue, 10 Apr 2001 19:49:31 -0400 Received: from barracuda.alpha-processor.com by alpha-gw.alpha-processor.com via smtpd (for mail.redhat.com [199.183.24.239]) with SMTP; 10 Apr 2001 23:44:36 UT Received: by barracuda.alpha-processor.com with Internet Mail Service (5.5.2653.19) id ; Tue, 10 Apr 2001 19:42:35 -0400 Message-ID: <051DFF3BBA73D3119A5800A0C95BD021C3A4D9@barracuda.alpha-processor.com> From: Tom Morris To: axp-list@redhat.com Subject: RE: FFTW performance Date: Tue, 10 Apr 2001 19:42:35 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain X-Loop: axp-list@redhat.com Sender: axp-list-admin@redhat.com Errors-To: axp-list-admin@redhat.com X-BeenThere: axp-list@redhat.com X-Mailman-Version: 2.0.1 Precedence: bulk Reply-To: axp-list@redhat.com List-Help: List-Post: List-Subscribe: , List-Id: Linux and Red Hat on Alpha processors List-Unsubscribe: , List-Archive: On Tuesday, April 10, 2001 3:33 AM, chu@tes-mail.jpl.nasa.gov [SMTP:chu@tes-mail.jpl.nasa.gov] wrote: > Are there any special flags (besides -fast) that will generate better code? To answer the last question first, since it seems to have attracted the most comment, ccc -fast will typically get you 90% of the way there and is probably all you need for most applications. > The CPU benchmark that we use > most often is running FFTs. More specifically, we use the FFTW package > from MIT. Even more specifically, I understand from a private conversation with Eugene that their benchmark uses a single size of 131072 points for the FFT test. As it happens, this is in a region where FFTW seems to choose an algorithm which is particularly sub-optimal for Alpha. If you look at http://www.fftw.org/benchfft/results/alpha467.html you can actually see that this behavior goes back all the way to EV56 and FFTW2.0 For powers of two at 16K points and above, CWP significantly outperforms that algorithm that FFTW is using. Running benchFFT with FFTW2.1.3 and CXML 4.0.0 shows FFTW to be 2-5 times faster for powers of 2 between 2 and 64. Between 128 and 4K both packages are within 10-15% of each other. FFTW is 30% faster at 8K. At 16k and above, CXML is 1.5 to 5 times faster than FFTW. Specifically at 128K, CXML is 2.6 times faster than FFTW. Comparing the performance for CXML and CWP, I'd guess that CXML actually uses the CWP algorithm in this region. For non-powers of 2, or at least those that are tested by benchfft, FFTW is consistently better than most other algorithms/packages and CXML is very erratic in its performance. This isn't really the kind of problem that will be helped by compiler switches or even better compilers. This is largely a data flow problem and the data access pattern is something intrinsic to the algorithm. The compiler's going to have little luck fixing it up after the fact to try and match the machine's architecture. I haven't looked at what FFTW is doing specifically, but it's obviously not making effective use of the high speed DDR cache on the 833 MHz Slot B module. If FFTs are important to you, it's worth having a look at the different algorithms available, because they have different strengths and weaknesses and VERY different performance characteristics. For Eugene's application at a size of 128K points, it looks like CXML or CWP is the way to go. At smaller sizes, FFTW is pretty hard to beat. Tom