Commit Graph

18 Commits

Author SHA1 Message Date
Pietro Bonfa 68477bc3d2 Merge branch 'develop' into gpu-develop 2020-09-16 09:51:07 +02:00
Paolo Giannozzi 884a6f8cd2 Cleanup of input redirection:
- reversed a recent change to "input_from_file" that has made temporary files
  "input_tmp.in" to appear after running many executables
- in epw_readin.f90 and phq_readin.f90, call to "input_from_file" replaced by
  "open_input_file"; added call to "close_input_file" to remove temporary file
- Various cleanup and streamlining
2020-08-09 14:57:32 +02:00
Pietro Bonfa 3549dade73 Merge commit '6dccd3df' into gpu-develop 2020-04-05 19:01:56 +02:00
giacombum 1f450feec1 new FFTXlib based on OpenMP 2020-02-13 16:03:41 +00:00
Pietro Bonfa dbf189b2e4 Merged 1D+2D FFT implementation 2019-02-04 18:50:30 +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
degironc 620330f595 -npot flag to deal with potential parallelization (recently suppressed) mapped into image parallelization
a few more flags needed for ACFDT added to acfdtest.f90 (hopefully soon to be removed)
 makedeps.sh adapted to the new LR_Modules structure 



git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@12247 c92efa57-630b-4861-b058-cf58834340f0
2016-03-24 19:14:59 +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 9592f95ef4 Wrappers for iargc, getarg, getenv used everywhere. Next step: replace them
with standard calls if accepted by all relevant compilers


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@11744 c92efa57-630b-4861-b058-cf58834340f0
2015-09-21 21:04:37 +00:00
giannozz c914890b4a More fixes for NAG compiler, activated by -D__NAG, for iargc, getarg intrinsic
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@11742 c92efa57-630b-4861-b058-cf58834340f0
2015-09-20 09:10:55 +00:00
giannozz 03d8985312 "pot" parallelization level, no longer used, is removed
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@11688 c92efa57-630b-4861-b058-cf58834340f0
2015-08-20 17:29:18 +00:00
giannozz 0fd8cef845 Added possibility to read command line options from an input string
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@10645 c92efa57-630b-4861-b058-cf58834340f0
2013-12-22 14:39:29 +00:00
giannozz a0f5f9b643 Extended length of input file name to 256 character
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@10529 c92efa57-630b-4861-b058-cf58834340f0
2013-10-11 10:46:30 +00:00
giannozz 41c8b628f1 Minor fixes by Axel to reduce the number of compiler warnings - harmless but
too many of them may hide serious warnings


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@10524 c92efa57-630b-4861-b058-cf58834340f0
2013-10-10 12:46:35 +00:00
giannozz b76c962d0f Changes to MPI initialization suggested by Axel in order to make gluing with
QMMM easier


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@10475 c92efa57-630b-4861-b058-cf58834340f0
2013-09-23 12:57:14 +00:00
giannozz b71b26e9fd Incorrect call in case of problems
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@9891 c92efa57-630b-4861-b058-cf58834340f0
2013-01-29 14:57:36 +00:00
giannozz c955629ae7 Cleanup of new initialization + restored missing in action ntask_group
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@9885 c92efa57-630b-4861-b058-cf58834340f0
2013-01-29 10:31:17 +00:00
giannozz aca32a501a Module mp_global split into more modules, one per parallelization level.
Module mp_global is still there for compatibility and still contains the
routine mp_startup that performs the intialization, but shouldn't be any
longer used in new developments and should be slowly replaced by specific
modules. New module containing command-line options added. Command-line
options are read at the beginning of the run and broadcast to all processors
(there is no guarantee that command-line options cam be accessed by all mpi
 processes). Nothing should be broken by these changes but please verify if
all parallelization levels work (I have limited access to parallel machines
right now)

The reason for these changes, and for those that will come soon, is to make
image parallelization easier (in particular in NEB but also for other cases). 
Right now it is a pain, in part because the initialization is inadequate,
in part because it is never clear who reads/writes what from/to where.
It will take a few weeks before everything converges to a stable state.
Meanwhile, please be patient and fix/report problems.



git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@9876 c92efa57-630b-4861-b058-cf58834340f0
2013-01-28 09:21:12 +00:00