Commit Graph

21 Commits

Author SHA1 Message Date
Stefano de Gironcoli cd2e99c523 Merge branch 'master' of https://gitlab.com/QEF/q-e
Conflicts:
	PW/src/sum_band.f90
2018-01-10 14:58:38 +01:00
Stefano de Gironcoli 4c4c93c257 define a generic interface for fft_interpolate and move the correspondig routine to FFTXlib 2018-01-08 23:02:08 +01:00
Paolo Giannozzi 9af0317f8d Once again, a problem with modules in Makefiles. In order to simplify things,
after the proliferarion of modules and libraries, I have collected into a
single variable BASEMOD_FLAGS, defined in make.inc, the list of directories
for modules, to be included by all codes. IMPORTANT NOTICE: re-run "configure",
the new Makefiles work in conjunction with the new make.inc
2018-01-08 22:28:48 +01:00
Carlo Cavazzoni 08e6a4beaf adding nl and nlm to fft_type 2017-12-24 00:15:56 +01:00
ccavazzoni 472101ce79 - task groups module not used, removed
- more helper functions 


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@13735 c92efa57-630b-4861-b058-cf58834340f0
2017-08-20 18:29:15 +00:00
ccavazzoni d12e374bdc - clanup
- adding new helper module to abstract FFT implementation specific
  data distribution, and low level real space grid operations.
  This will allow QE to link different FFTXlib implementations
  tuned and optimized for specific HW or problems


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@13731 c92efa57-630b-4861-b058-cf58834340f0
2017-08-19 16:43:31 +00:00
degironc 3e6b4f8e76 MAJOR restructuring of the FFTXlib library
In real space processors are organized in a 2D pattern.

Each processor owns data from a sub-set of Z-planes and a sub-set of Y-planes.
In reciprocal space each processor owns Z-columns that belong to a sub set of
X-values. This allows to split the processors in two sets for communication
in the YZ and XY planes.
In alternative, if the situation allows for it, a task group paralelization is used
(with ntg=nyfft) where complete XY planes of ntg wavefunctions are collected and Fourier
trasnformed in G space by different task-groups. This is preferable to the Z-proc + Y-proc
paralleization if task group can be used because a smaller number of larger ammounts of 
data are transferred. Hence three types of fft are implemented: 
 
  !
  !! ... isgn = +-1 : parallel 3d fft for rho and for the potential
  !
  !! ... isgn = +-2 : parallel 3d fft for wavefunctions
  !
  !! ... isgn = +-3 : parallel 3d fft for wavefunctions with task group
  !
  !! ... isgn = +   : G-space to R-space, output = \sum_G f(G)exp(+iG*R)
  !! ...              fft along z using pencils        (cft_1z)
  !! ...              transpose across nodes           (fft_scatter_yz)
  !! ...              fft along y using pencils        (cft_1y)
  !! ...              transpose across nodes           (fft_scatter_xy)
  !! ...              fft along x using pencils        (cft_1x)
  !
  !! ... isgn = -   : R-space to G-space, output = \int_R f(R)exp(-iG*R)/Omega
  !! ...              fft along x using pencils        (cft_1x)
  !! ...              transpose across nodes           (fft_scatter_xy)
  !! ...              fft along y using pencils        (cft_1y)
  !! ...              transpose across nodes           (fft_scatter_yz)
  !! ...              fft along z using pencils        (cft_1z)
  !
  ! If task_group_fft_is_active the FFT acts on a number of wfcs equal to 
  ! dfft%nproc2, the number of Y-sections in which a plane is divided. 
  ! Data are reshuffled by the fft_scatter_tg routine so that each of the 
  ! dfft%nproc2 subgroups (made by dfft%nproc3 procs) deals with whole planes 
  ! of a single wavefunciton.
  !

fft_type module heavily modified, a number of variables renamed with more intuitive names 
(at least to me), a number of more variables introduced for the Y-proc parallelization.

Task_group module made void. task_group management is now reduced to the logical component
 fft_desc%have_task_groups of fft_type_descriptor type variable fft_desc.

In term of interfaces, the 'easy' calling sequences are

SUBROUTINE invfft/fwfft( grid_type, f, dfft, howmany )

  !! where:
  !! 
  !! **grid_type = 'Dense'** : 
  !!   inverse/direct fourier transform of potentials and charge density f
  !!   on the dense grid (dfftp). On output, f is overwritten
  !! 
  !! **grid_type = 'Smooth'** :
  !!   inverse/direct fourier transform of  potentials and charge density f
  !!   on the smooth grid (dffts). On output, f is overwritten
  !! 
  !! **grid_type = 'Wave'** :
  !!   inverse/direct fourier transform of  wave functions f
  !!   on the smooth grid (dffts). On output, f is overwritten
  !!
  !! **grid_type = 'tgWave'** :
  !!   inverse/direct fourier transform of  wave functions f with task group
  !!   on the smooth grid (dffts). On output, f is overwritten
  !!
  !! **grid_type = 'Custom'** : 
  !!   inverse/direct fourier transform of potentials and charge density f
  !!   on a custom grid (dfft_exx). On output, f is overwritten
  !! 
  !! **grid_type = 'CustomWave'** :
  !!   inverse/direct fourier transform of  wave functions f
  !!   on a custom grid (dfft_exx). On output, f is overwritten
  !! 
  !! **dfft = FFT descriptor**, IMPORTANT NOTICE: grid is specified only by dfft.
  !!   No check is performed on the correspondence between dfft and grid_type.
  !!   grid_type is now used only to distinguish cases 'Wave' / 'CustomWave' 
  !!   from all other cases
                                                                                                 

Many more files modified.




git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@13676 c92efa57-630b-4861-b058-cf58834340f0
2017-08-01 20:31:02 +00:00
giannozz 3e30b7b51c The previous commit of mine broke compilation of everything: I had forgotten
that the F77_FUNC trick was used also in FFTXlib/fftw.c. Now it is removed for
good. There is a new file of interfaces. In case of a strange behavior with
FFTW, this is for sure the culprint.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@13642 c92efa57-630b-4861-b058-cf58834340f0
2017-07-28 15:17:10 +00:00
spigafi 026f27d732 Missing object files
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@13269 c92efa57-630b-4861-b058-cf58834340f0
2017-01-23 23:42:55 +00:00
giannozz 229692d720 Cleanup of FFTXlib:
1) routines fwfft and invfft moved out of file fft_interfaces.f90 into new
   file fft_fwinv.f90. Prevents massive recompilation if something changes
   in the FFT routines.
2) machine-dependent fft_scalar.*.f90 are now modules with different names,
   conditionally included into fft_scalar with a USE, no longer an #include.
   Avoids trouble with dependencies, allow simplification of makedeps.sh.
All changes should be harmless, but I have tested only FFTW, FFTW3, DFTI.
Please let me know if there is any problem



git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@13185 c92efa57-630b-4861-b058-cf58834340f0
2016-11-27 21:43:15 +00:00
ccavazzoni 54ca5bf7ce - no need to keep the instance of smap descriptor in the base library
- no need to keep stick_set.f90 at all
- eliminating unused type member


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@12779 c92efa57-630b-4861-b058-cf58834340f0
2016-08-17 22:46:37 +00:00
ccavazzoni 92503eb2cd - small boxes fft variables placed in a separate datatype, and removed from fft type
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@12671 c92efa57-630b-4861-b058-cf58834340f0
2016-08-06 09:09:42 +00:00
ccavazzoni de2a01c4e6 - Task groups variables moved form FFT type to a new data type
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@12626 c92efa57-630b-4861-b058-cf58834340f0
2016-07-29 14:25:22 +00:00
ccavazzoni e39c689df4 - start separating task groups variables and function from fft types
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@12621 c92efa57-630b-4861-b058-cf58834340f0
2016-07-28 08:56:27 +00:00
giannozz 02ce4df8d6 make.sys => make.inc. All other codes using make.sys should modify their build
mechanism accordingly.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@12539 c92efa57-630b-4861-b058-cf58834340f0
2016-06-25 07:26:50 +00:00
degironc 1f811e34bf Added a few simple routines in fft_parallel to read and write from/to a distributed array.
not for efficiency but to make examples easier.
added test0 that uses fwfft and invfft, slight change to test
added a few directories (not yet used) to better organize the library



git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@12517 c92efa57-630b-4861-b058-cf58834340f0
2016-06-21 14:47:21 +00:00
giannozz df30a665aa Explicit preprocessing produces *_tmp.f90 files instead of *.F90 files, to
prevent trouble with OS-X. May or may not work (it won't unless configure
is updated: please somebody with v.2.63 of autoconf do it), may turn out to
be obsolete anyway.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@12364 c92efa57-630b-4861-b058-cf58834340f0
2016-04-27 14:53:38 +00:00
ccavazzoni 2b9d99ad85 - FFT self testing program with timing
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@12115 c92efa57-630b-4861-b058-cf58834340f0
2016-02-13 00:48:02 +00:00
ccavazzoni dec6178f4e - adding a small testing program
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@12075 c92efa57-630b-4861-b058-cf58834340f0
2016-01-27 00:07:10 +00:00
ccavazzoni 78e0912ed4 - small fix for LINUX_ESSL
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@11859 c92efa57-630b-4861-b058-cf58834340f0
2015-11-21 10:49:08 +00:00
ccavazzoni fdf7766648 - FFT Modules replaced by FFTXlib
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@11857 c92efa57-630b-4861-b058-cf58834340f0
2015-11-21 10:37:48 +00:00