[gmx-developers] Re: FFTW 3.1.2 and wisdom

Allen Smith easmith at beatrice.rutgers.edu
Fri Aug 10 05:23:52 CEST 2007


Sorry for the delay; email system problem...

>Hi Allen,      
                 
>By all means test it - the FFTW calls are isolated to the single file
>src/mdlib/gmx_fft_fftw3.c :-)

I suspected as much, but thank you for the confirmation.

>However, I wouldn't expect any major impact:
>
>First, the actual 3D FFTs account for less than 10% of the runtime
>with PME, so even a 30% improvement would barely be noticable for
>your Gromacs performance.

I'm curious as to why the plan calls are done with FFTW_MEASURE, then.
         
>Second, on x86 platforms the best choice is obviously the SSE/SSE2
>FFT-lets.

We may be using IRIX boxes for some things, however.

>We've made sure the FFT grid allocated in Gromacs is
>properly aligned to enable these (although we also support FFTs for
>unaligned arrays in the interface), so I'm not sure what would change if
>more time is spent benchmarking.

Understand.

>You could try replacing the alloc () call
>with the FFTW one; the main reason we provide our own is just
>that we need to support alternative FFT libraries like MKL and
>FFTPACK too.   

I suspected as much; an #ifdef of some variety seems to be indicated.

>I've been wrong on (multiple) occasions before though, so please
>share the results if you test it . Even if it just confirms my
>guesses it would be useful to know for sure!

Indeed; I will probably implement the system "wisdom" option, since this
will be rather easier to do for someone like myself (my favorite programming
language is Perl, not C...), although possibly less of interest than the
results of doing a more general loading in from a previously produced file -
the latter both saving time normally used for FFTW_MEASURE (dunno how much
that is, though...) and potentially helping in speed in long runs. OTOH,
FFTW_EXHAUSTIVE - especially for a less-commonly-developed-for system such
as SGIs nowadays - with its trying of various very odd options might
actually help sometimes...

	 Yours,

	 -Allen

>Cheers,   
            
>Erik 
       
>>On Jul 31, 2007, at 7:42 PM, Allen Smith wrote:
              
>> Has anyone worked on using a system "wisdom" file for FFTW 3.1.2 usage by
>>GROMACS and/or having GROMACS do more extensive planning for FFTW3 - e.g.,
>>FFTW_PATIENT instead of FFTW_MEASURE - but save the resulting "wisdom"? In
>>the former case, one could make some pre-done system "wisdom" created
>>using fftwf-wisdom running with the routines that GROMACS uses, with the
>>-x (FFTW_EXHAUSTIVE) flag used. The latter might be the best if the code
>>alignment is considerably different between fftwf-wisdom and GROMACS (more
>>so than any differences due to GROMACS not planning on the same-allocated
>>arrays (or FFTW malloced arrays) than the execution is taking place on; I
>>am wondering as to why plans are not done for unaligned arrays with the
>>FFTW_UNALIGNED planner flag... alternatively, could fftw_malloc be used in
>>place of gmx_alloc_aligned?), according to the FFTW documentation
>>("Caveats in Using Wisdom").
>>                     
>>       Thanks,     
>>                     
>>       -Allen
>>      
>> P.S. The systems that we'd be using this on would be a mix of Redhat
>>Linux boxes (2.4.21-27.ELhugemem or 2.4.21-27.ELsmp, dual P4 Xeon
>>(Foster)) and SGIs (IRIX 6.5.28m-6.5.30m, generally dual-processor
>>R12000/IP30).

-- 
Allen Smith			         http://cesario.rutgers.edu/easmith/
There is only one sound argument for democracy, and that is the argument
that it is a crime for any man to hold himself out as better than other men,
and, above all, a most heinous offense for him to prove it. - H. L. Mencken



More information about the gromacs.org_gmx-developers mailing list