Commit Graph

22 Commits

Author SHA1 Message Date
Paolo Giannozzi 00ff840eed More mp_global cleanup: PHonon, GWW 2019-01-31 22:09:24 +01: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
spigafi 185f9ed185 ifndef preprocessor macro refactoring
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@12986 c92efa57-630b-4861-b058-cf58834340f0
2016-09-19 21:11:20 +00:00
spigafi 02ad44cdf1 ifdef preprocessor macro refactoring (GWW)
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@12979 c92efa57-630b-4861-b058-cf58834340f0
2016-09-18 15:13:03 +00:00
giannozz 4afba4a591 Removal of a few unused references to variables "ecutwfc" and "g2kin".
I noticed that there is a disproportionate number of calls to sorting routine
gk_sort, computing k+G indices (igk). This is VERY DANGEROUS: the ordering of
degenerate k+G shells is unpredictable and any operation that changes k even 
by even the least significant bit may lead to a slightly different ordering.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@11982 c92efa57-630b-4861-b058-cf58834340f0
2016-01-13 10:32:30 +00:00
giannozz b5db8d6d76 Standard F2003 calls to: get_environment_variable, get_command_argument,
command_argument_count, flush, are used everywhere instead of wrappers.
Some old versions of compilers may no longer work.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@11759 c92efa57-630b-4861-b058-cf58834340f0
2015-09-24 10:24:03 +00:00
giannozz b13f91e362 Removal of obsolete __PARA preprocessing option
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@11361 c92efa57-630b-4861-b058-cf58834340f0
2015-02-04 16:02:56 +00:00
obm 17a77a3ee2 1)dfftp was used to read an dffts grid
2)a potential unintentional overwrite situation with multiple processors


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@11047 c92efa57-630b-4861-b058-cf58834340f0
2014-06-16 13:14:53 +00:00
ccavazzoni 3667d17bd3 - optional communicator completely removed
- PWCOND was not compiling any more after last branch merging,
  I fix it mapping old to new variables (realus), but I need someone checking it 


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@10532 c92efa57-630b-4861-b058-cf58834340f0
2013-10-12 21:32:01 +00:00
giannozz 658331b284 branch espresso-paw-exx merged back into the trunk. Beware all kinds of
unexpected side effects!


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@10516 c92efa57-630b-4861-b058-cf58834340f0
2013-10-07 15:19:12 +00:00
puma 8754daeaea Replacing old GWW code with new GWL one.
PU


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@10345 c92efa57-630b-4861-b058-cf58834340f0
2013-07-03 15:24:46 +00:00
giannozz 4de42518ea No reason to have both __PARA and __MPI preprocessing options: they have the same meaning. __MPI is more explicit, so I am keeping it
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@8572 c92efa57-630b-4861-b058-cf58834340f0
2012-02-02 22:12:26 +00:00
ccavazzoni 8040dea31d - grid data structure merged with the fft data structure.
Now all variables regarding real space grid, fft and 
  their parallelization are contained into the objects:
  dfftp (dense grid) 
  dffts (smooth grid)



git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@7973 c92efa57-630b-4861-b058-cf58834340f0
2011-07-14 22:14:15 +00:00
ccavazzoni 930828018e - real space grid variables (nr1, nr2, ecc...) substituted by a data type.
Further changes will follow in order to reduce dependencies and 
  duplicate variables (especially with dfft data structure) 
  


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@7961 c92efa57-630b-4861-b058-cf58834340f0
2011-07-10 20:56:44 +00:00
giannozz 08d96590f9 More merge of grid dimensions:
1) variables nrxx, nr[123][x] moved from gvect to grid_dimensions
2) when the FFT descriptor, fdfftp, is presewnt, values contained
   in the descriptor are used instead
Beware unintended side effects.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@7167 c92efa57-630b-4861-b058-cf58834340f0
2010-10-26 08:28:22 +00:00
giannozz 77648909ed Variable nrxxs removed from module gvect. Either the value in module
smooth_grid_dimensions or in dffts%nnr is used instead. Lots of changes
but nothing substantial. Beware unintended side effects


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@7164 c92efa57-630b-4861-b058-cf58834340f0
2010-10-24 08:05:12 +00:00
giannozz 388e78dc35 COmpilation problem
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@7163 c92efa57-630b-4861-b058-cf58834340f0
2010-10-23 07:03:03 +00:00
giannozz 6bfc647bc8 Grid dimensions for the smooth grid, nr[123]s and nr[123]sx, are only in
module smooth_grid_dimensions and no longer in gsmooth. Note that in most
cases, dffts%nr[123] is used instead (of course they are the same).
Lots of changes but nothing substantial. Beware unintended side effects


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@7159 c92efa57-630b-4861-b058-cf58834340f0
2010-10-22 15:47:22 +00:00
giannozz b41ba40564 Harmonization of FFT grid variables with CP:
nrx1, nrx2, nrx3 => nr1x, nr2x, nr3x
  nrx1s,nrx2s,nrx3s=> nr1sx,nr2sx nr3sx


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@7091 c92efa57-630b-4861-b058-cf58834340f0
2010-09-18 16:48:39 +00:00
giannozz d0fd7b19c6 More cft3/cft3s => fwfft/invfft unification
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@7045 c92efa57-630b-4861-b058-cf58834340f0
2010-08-31 03:24:58 +00:00
giannozz 7a187311db diropn moved from PW/ into module io_files (where it belongs). davcio also
moved into file Modules/io_files.f90 but not inside module io_files. A better
place is in flib/ in my opinion. Removed dependency of CP upon PW. Lots of
changes but ne substantial or dangerous change.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@6835 c92efa57-630b-4861-b058-cf58834340f0
2010-06-13 11:29:12 +00:00
marsamos 3adcb6c382 pw4gww files from GWW added to the repository
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@5832 c92efa57-630b-4861-b058-cf58834340f0
2009-08-07 11:51:54 +00:00