• degironc's avatar
    MAJOR restructuring of the FFTXlib library · 3e6b4f8e
    degironc authored
    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
    3e6b4f8e
Name
Last commit
Last update
..
Makefile Loading commit data...
atom.f90 Loading commit data...
atomic_number.f90 Loading commit data...
autopilot.f90 Loading commit data...
basic_algebra_routines.f90 Loading commit data...
becmod.f90 Loading commit data...
bfgs_module.f90 Loading commit data...
bspline.f90 Loading commit data...
bz_form.f90 Loading commit data...
capital.f90 Loading commit data...
cell_base.f90 Loading commit data...
check_stop.f90 Loading commit data...
command_line_options.f90 Loading commit data...
compute_dipole.f90 Loading commit data...
constants.f90 Loading commit data...
constraints_module.f90 Loading commit data...
control_flags.f90 Loading commit data...
coulomb_vcut.f90 Loading commit data...
cryst_to_car.f90 Loading commit data...
date_and_tim.f90 Loading commit data...
deviatoric.f90 Loading commit data...
dist.f90 Loading commit data...
dylmr2.f90 Loading commit data...
electrons_base.f90 Loading commit data...
environment.f90 Loading commit data...
erf.f90 Loading commit data...
expint.f90 Loading commit data...
fcp_variables.f90 Loading commit data...
fd_gradient.f90 Loading commit data...
fft_base.f90 Loading commit data...
fft_custom.f90 Loading commit data...
fft_rho.f90 Loading commit data...
fsockets.f90 Loading commit data...
funct.f90 Loading commit data...
functionals.f90 Loading commit data...
generate_function.f90 Loading commit data...
generate_k_along_lines.f90 Loading commit data...
gth.f90 Loading commit data...
gvecw.f90 Loading commit data...
has_xml.f90 Loading commit data...
hdf5_qe.f90 Loading commit data...
inpfile.f90 Loading commit data...
input_parameters.f90 Loading commit data...
int_to_char.f90 Loading commit data...
invmat.f90 Loading commit data...
io_base.f90 Loading commit data...
io_files.f90 Loading commit data...
io_global.f90 Loading commit data...
ions_base.f90 Loading commit data...
kernel_table.f90 Loading commit data...
kind.f90 Loading commit data...
latgen.f90 Loading commit data...
libxc.f90 Loading commit data...
libxc_funcs.f90 Loading commit data...
linpack.f90 Loading commit data...
lsda_functionals.f90 Loading commit data...
make.depend Loading commit data...
matches.f90 Loading commit data...
metagga.f90 Loading commit data...
mm_dispersion.f90 Loading commit data...
more_functionals.f90 Loading commit data...
mp_bands.f90 Loading commit data...
mp_exx.f90 Loading commit data...
mp_global.f90 Loading commit data...
mp_images.f90 Loading commit data...
mp_pools.f90 Loading commit data...
mp_wave.f90 Loading commit data...
mp_world.f90 Loading commit data...
noncol.f90 Loading commit data...
open_close_input_file.f90 Loading commit data...
parameters.f90 Loading commit data...
parser.f90 Loading commit data...
paw_variables.f90 Loading commit data...
plot_io.f90 Loading commit data...
plugin_arguments.f90 Loading commit data...
plugin_flags.f90 Loading commit data...
plugin_variables.f90 Loading commit data...
pseudo_types.f90 Loading commit data...
pw_dot.f90 Loading commit data...
qeh5_module.f90 Loading commit data...
qes_libs.f90 Loading commit data...
qes_module.f90 Loading commit data...
qes_read_module.f90 Loading commit data...
qes_types.f90 Loading commit data...
qexml.f90 Loading commit data...
qexsd.f90 Loading commit data...
qexsd_input.f90 Loading commit data...
qexsd_reader_module.f90 Loading commit data...
qmmm.f90 Loading commit data...
radial_gradients.f90 Loading commit data...
radial_grids.f90 Loading commit data...
random_numbers.f90 Loading commit data...
read_cards.f90 Loading commit data...
read_input.f90 Loading commit data...
read_namelists.f90 Loading commit data...
read_ncpp.f90 Loading commit data...
read_pseudo.f90 Loading commit data...
read_upf_v1.f90 Loading commit data...
read_upf_v2.f90 Loading commit data...
read_uspp.f90 Loading commit data...
read_xml.f90 Loading commit data...
read_xml_cards.f90 Loading commit data...
read_xml_fields.f90 Loading commit data...
recips.f90 Loading commit data...
recvec.f90 Loading commit data...
recvec_subs.f90 Loading commit data...
remove_tot_torque.f90 Loading commit data...
rgen.f90 Loading commit data...
run_info.f90 Loading commit data...
set_hubbard_l.f90 Loading commit data...
set_hubbard_n.f90 Loading commit data...
set_signal.f90 Loading commit data...
setqf.f90 Loading commit data...
simpsn.f90 Loading commit data...
sort.f90 Loading commit data...
space_group.f90 Loading commit data...
sph_bes.f90 Loading commit data...
sph_dbes.f90 Loading commit data...
splinelib.f90 Loading commit data...
test_input_file.f90 Loading commit data...
timestep.f90 Loading commit data...
trimcheck.f90 Loading commit data...
tsvdw.f90 Loading commit data...
upf.f90 Loading commit data...
upf_to_internal.f90 Loading commit data...
uspp.f90 Loading commit data...
version.f90.in Loading commit data...
volume.f90 Loading commit data...
w0gauss.f90 Loading commit data...
w1gauss.f90 Loading commit data...
wannier_gw.f90 Loading commit data...
wannier_new.f90 Loading commit data...
wave_base.f90 Loading commit data...
wavefunctions.f90 Loading commit data...
wgauss.f90 Loading commit data...
wrappers.f90 Loading commit data...
write_upf_v2.f90 Loading commit data...
ws_base.f90 Loading commit data...
wyckoff.f90 Loading commit data...
wypos.f90 Loading commit data...
xc_rVV10.f90 Loading commit data...
xc_vdW_DF.f90 Loading commit data...
xml_input.f90 Loading commit data...
xml_io_base.f90 Loading commit data...
xsf.f90 Loading commit data...
ylmr2.f90 Loading commit data...
zdotc_wrapper.f90 Loading commit data...
zvscal.f90 Loading commit data...