serial execution. Added comment explaining that mp_startup reads the command
line. Example fermisurfer_example/ was cited in the doc but was missing.
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@13986 c92efa57-630b-4861-b058-cf58834340f0
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
KS_Solvers/CG, KS_Solvers/Davidson, KS_Solvers/Davidson_RCI.
Two are currently used by QE, the third one implements the Davidson
diagonalization within the Reverse Communication Interface paradigm,
courtesy of Micael Oliveira.
KS_Solvers routines depend only on lower level libraries, notably UtilXlib,
LAXlib, (SCA)LAPACK, and BLAS.
reorganization can be improved. For instance some duplicated routines like
cdiaghg and rdiaghg could/should be moved in LAXlib. This could reduce the need
to include KS_Solvers directories in the link step of many codes.
Minimal changes to calling sequence have been made, essentially just adding
h_psi,s_psi,g_psi and h_1psi,s_1psi routines names as arguments (with a
specific calling sequence ihardcode inside the routines that agree with PWSCF one).
This could be avoided adopting the RCI paradigm.
Compiled in serial and parallel, 177/182 pw tests passed (3 that were failing
even before on my laptop pw-berry, pw-langevin, pw-pawatom + 2 unknown==not tested),
12 /17 cp tests passed (some o2-us-para-pbe-X fail but the same was for the
original version)
I assume the modified calling procedure is working and the problem lies somewhere else.
Randomly tested some examples in pw, ph, pwcond and it seams to work.
Please report any problem.
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@13644 c92efa57-630b-4861-b058-cf58834340f0
mp_start_diag only needs the parent communicator !
The other quantities needed to initialize correctly SCALAPACK blacs quantities
are obtained from mpi calls involving MPI_COMM_WORLD.
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@13635 c92efa57-630b-4861-b058-cf58834340f0
it just needs to know how many group and a different id for each grop.
- On some MPI the previous band/diag parallelization was not working properly
- further chack are needed
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@12237 c92efa57-630b-4861-b058-cf58834340f0
introducing ortho_parent_comm to be used when addressing the whole group.
linear algebra is now distributed (in PW) inside the pool group (in CPV is left unchanged... are there pools in CPV?).
mp_global sets ortho_comm as a sub-communicator of intra_pool_comm (used to be intra_bgrp_comm). It can be reverted
to previous choice by commenting/uncommenting one line
tested on PW/example02 co.rx.in case (both Gamma and K=(000)) with
-np 8 -nd 4 -nb 2
that is using 2 bgrp (procs 0123 and 4567) and diagonalizing on 4 procs (0246).
tested also on
-np 4 -nd 4 -nb 2
that is using 2 bgrp (procs 01 and 34) and diagonalizing on 4 procs (0123).
some bgrp parallelization added to a few routines. global variables (evc,..) are NOT distributed but some local ones
are and more could be done.
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@11863 c92efa57-630b-4861-b058-cf58834340f0
more efficient.
subroutine init_index_over_band ( comm, nbnd ) that set ibnd_start and ibnd_end
variables requiring comm=inter_bgrp_comm is removed and replaced by
subroutine set_bgrp_indices ( nbnd, ibnd_start, ibnd_end ) implementing the same
relationships between its arguments but:
- forcing the use of inter_bgrp_comm from the same mp_bands module,
- returning ibnd_start and ibnd_end as explicit outputs that are not anymore kept
in the module. In this way other quantities can be distributes if needed in any
given routine without too many non-local effects.
For compatibility with TDDFPT, that uses the bgrp parallelization and loads
ibnd_start/ibnd_end trhough mp_global module, these two variables are moved in
a dedicated module mp_bands_TDDFPT included in Module/mp_bands.f90. This is done
to avoid too much invasive changes in a code i don't know well. In this way the
needed changes are very localized and transparent, the code compiles correctly
so I think it should work exactly as before.
In my opinion the two variables should be moved somewhere inside TDDFPT.
Band parallelization is extended to h_psi(lda,n,m,psi,hpsi) and s_psi routines
(only when .not.exx_is_active because otherwise it is already used inside vexx)
for generic values of m (of course it gives a speedup only when m is not too small
compared to nbgrp but it works also if m < nbgrp ).
Compatibility with task groups has not be explored but should not be conceptually
different from how it works in the exx case.
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@11835 c92efa57-630b-4861-b058-cf58834340f0
mp.f90 to mp_world.f90, interface mp_comm_free used instead of direct
call to mpi_comm_free, deallocation of communicators. Should be harmless
but please check.
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@10649 c92efa57-630b-4861-b058-cf58834340f0
(I think): mp_bands.f90 . Many changes but nothing dangerous. Note that
codes not in svn may be broken by this change, but the fix is very simple
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@10567 c92efa57-630b-4861-b058-cf58834340f0
variables for the "world" MPI communicator. The latter are to be found in
world_comm instead. mp_global should be used only to start and to end the
various parallelization levels. Many small but harmless changes: a few
variables removed or moved to another module in most cases.
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@10558 c92efa57-630b-4861-b058-cf58834340f0
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
a few shorthands (-i, -ni, -nk, -nb, -nt, -nd) with obvious meaning and updated
the documentation. The old syntax will still work. Cleanup of routines catching
command-line options. More serious cleanup of the entire stuff is anyway needed
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@9819 c92efa57-630b-4861-b058-cf58834340f0
was doing something not really correct: initializing the all-processor group
(mpi_comm_world or whatever it is called) with an image. Now variables root,
world_comm, mpime, nproc are those for the world group and not for an image.
This has no consequences at all if images are not used. It shouldn't have any
consequences for codes using images as well (neb, ph, gipaw), because those
variables are not used in practise. If it has, the correct way to fix it is to
remove inappropriate usage of those variables
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@9804 c92efa57-630b-4861-b058-cf58834340f0