[Q-e-developers] Fast Fourier Transform

Stefano de Gironcoli degironc at sissa.it
Wed Feb 7 21:21:04 CET 2018


Dear Miguel,

   the FFT types have been simplified. As described in fft_fwinv.f90


   !! **grid_type = 'Rho'** :
   !!   fourier transform of potentials and charge density f
   !!
   !! **grid_type = 'Wave'** :
   !!   ifourier transform of  wave functions f
   !!
   !! **grid_type = 'tgWave'** :
   !!   fourier transform of  wave functions f with task group
   !!
   !! **dfft = FFT descriptor**, IMPORTANT NOTICE: grid is specified 
only by dfft.

previously there was an unnecessary mixing between  grid_type (actually 
meaning fft_type ... we should rename it as such) and FFT grid descriptors

Previously

'Dense' could only be used with dfftp and transformed density-like arrays

'Smooth' could only be used with dffts and transformed density-like arrays

'Custom' could only use the custom grid and acted on density-like arrays

'Wave' could only be used with dffts and transformed wfc-like arrays

'tgWave' could only be used with dfft to transform wfc with task-groups

'CustomWave' could only use the custum grid to transform wfc-like array

consistency of fft_type and grid_descriptor was not internally checked !

Now

Rho/Wave/tgWave tells which type of fft you are performing and the fft 
descriptor tells which grid you are using.

If the grid has not been initialized for that fft type an error message 
is issued.

in short

'Dense' on dfftp  became 'Rho' on dfftp
'Smooth' on dffts became 'Rho' on dffts
'Custom' on dfftt became 'Rho' on dfftt
'Wave' on dffts became 'Wave' on dffts
'CustomWave' on dfftt became 'Wave' on dfftt
'tgWave' on dffts became 'tgWave' on dffts

other combinations are possible if properly initialized but are not 
currently used in QE

best,

stefano


On 07/02/2018 16:28, Miguel Carvajal wrote:
> I seems that in the current codebase some renaming have been made to 
> the fft grids.
> Now there exist the `Rho` grid and the `Wave` grid. Can some one 
> explain  the mappings from this new name to the old ones and what 
> happened to the `CustomWave` grid.
> Best regards,
>
>
>
>
> *Miguel Carvajal*   PhD
> photo 	
> Mobile:+32 465 35 17 77
> Email: miguel.carvajalrivero at uantwerpen.be 
> <mailto://miguel.carvajalrivero@uantwerpen.be>
> Address: CMT Groenenborgerlaan 171, BE-2020 Antwerpen 
> <https://maps.google.com/?q=Groenenborgerlaan+171,+BE-2020+Antwerpen&entry=gmail&source=g>
>
> <https://www.facebook.com/erpan.arkin><https://plus.google.com/+ErpanArkin><https://www.researchgate.net/profile/Y_Aierken>linkedin 
> logo <https://www.linkedin.com/in/krvajal/>vcard logo 
> <https://www.uantwerpen.be/vcard.aspx?emplid=13497&photo=true&logo=true&lang=EN> 
>
> CMT group, University of Antwerp
>
> On Thu, Nov 9, 2017 at 6:51 AM, Carlo Cavazzoni <c.cavazzoni at cineca.it 
> <mailto:c.cavazzoni at cineca.it>> wrote:
>
>     It may help thinking that we use fft to compute a non linear
>     Operator (convolution), then the result is represented on
>     A denser grid in order not to loose accuracy.
>     So we end up with 2 fft grids, for each type,
>     Whereas different types are needed to cope with different observables
>     With different basis sets.
>     In principle we can do everything using just one grid, the largest,
>     But we would waste a lot of space and cycles
>
>     Carlo
>     ----- Stefano de Gironcoli <degironc at sissa.it
>     <mailto:degironc at sissa.it>> wrote:
>     > It's confusing...
>     >
>     > for a given grid there are two type of FFTs
>     >
>     > the one used to transform wavefunctions, limited to G-vectors up
>     to Ecutwfc
>     >
>     > and the one associated to the density/potential, up to 4*Ecutwfc
>     or Ecutrho
>     >
>     > There are three grids. the Smooth one (dffts: accommodating
>     G-vectors up
>     > to 4*Ecutwfc), the Dense one (dfftp: accommodating G-vectors up to
>     > Ecutrho) and the Custom one (used in exx calculations), for a
>     total of
>     > 2x3 = 6 combinations.
>     >
>     > only five are actually used:
>     >
>     > Wave: transforms wavefunction on the smooth grid (dffts)
>     >
>     > Smooth: transforms densities/potentials on the smooth grid (dffts)
>     >
>     > Dense: transforms densities/potentials on the dense grid (dfftp)
>     >
>     > CustomWave: transforms wavefunction on the custom grid
>     >
>     > Custom: transforms densities/potentials on the custom grid.
>     >
>     > The missing combination (wavefunction on the dense grid) is
>     never needed.
>     >
>     > It would make sense to redefine the type of fft as 'Rho/Wave'
>     but for
>     > historical and timing-definition reasons this is not done (yet?).
>     >
>     > Have a look to FFTXlib/fft_fwinv.f90 if you want to see how
>     things work
>     > in detail.
>     >
>     > ... and actually there are three types of FFTs: Rho, Wave, and
>     Wave with
>     > task groups, the last one only used on the smooth grid as
>     > invfft/fwfft('tgWave', psic, dffts)
>     >
>     > stefano
>     >
>     >
>     > On 06/11/2017 14:01, Miguel Carvajal wrote:
>     > > Dear all,
>     > > can some one explain to me what is the difference of calling
>     > >
>     > >
>     > >
>     > > CALL fwfft ('Custom', rhoc(:,ii), dfftt)
>     > > CALL fwfft (‘Wave', rhoc(:,ii), dfftt)
>     > > CALL fwfft (‘Dense', rhoc(:,ii),dfftt)
>     > > CALL fwfft (’Smooth', rhoc(:,ii), dfftt)
>     > > when doing FFT on QE; as well as the appropriate grid to be
>     used in
>     > > each instance: *dfft, dfftp or  dffts*.
>     > > I have some ideas but not a full understanding of it.
>     > > Best regards,
>     > >
>     > > Lic. Miguel Carvajal - Instituto Balseiro - Bariloche
>     > > National Atomic Energy Comission
>     > > [+54] 2944782429 <tel:%5B%2B54%5D%202944782429> (tel) /
>     krvajal.miguel (skype)
>     > > LinkedIn: in/krvajal <https://www.linkedin.com/in/krvajal/
>     <https://www.linkedin.com/in/krvajal/>>
>     > >
>     > >
>     > > _______________________________________________
>     > > Q-e-developers mailing list
>     > > Q-e-developers at qe-forge.org <mailto:Q-e-developers at qe-forge.org>
>     > > http://qe-forge.org/mailman/listinfo/q-e-developers
>     <http://qe-forge.org/mailman/listinfo/q-e-developers>
>     >
>
>
>     _______________________________________________
>     Q-e-developers mailing list
>     Q-e-developers at qe-forge.org <mailto:Q-e-developers at qe-forge.org>
>     http://qe-forge.org/mailman/listinfo/q-e-developers
>     <http://qe-forge.org/mailman/listinfo/q-e-developers>
>
>
>
>
> _______________________________________________
> Q-e-developers mailing list
> Q-e-developers at qe-forge.org
> http://qe-forge.org/mailman/listinfo/q-e-developers

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quantum-espresso.org/pipermail/developers/attachments/20180207/d7586411/attachment.html>


More information about the developers mailing list