This is the final commit for the vdW kernel on the fly recoding. The new
routines have been extensively tested and no differences were found when
compared to qe-6.4.1 output.
In this commit, we have updated the reference files for example16 of the
PHonon code. Finally, a short note describing this work was put into
Doc/release-notes.
This work was performed by T. Thonhauser and is supported by NSF Grant
No. 1712425.
In this commit, the entire Quantum Espresso environment is updated so
that "make all" succeeds and produces functional codes. The resulting
codes were tested with the test-suite and all related tests passed. In
addition, I did some more extensive testing with van der Waals systems,
using the option "verbosity = 'high'" so that the non-local corr. energy
is written out explicitly; in all cases, results were identical to
qe-6.4.1 (also tested in parallel).
Overall, I updated 21 Fortran source files, mostly related to the
handling of the kernel file name(s). Modules/xc_rVV10.f90 saw more
substantial changes and now also computes the kernel on the fly. The
two routines PW/src/generate_rVV10_kernel_table.f90 and
PW/src/generate_vdW_kernel_table.f90 are now removed.
In addition, I updated the developer manual and the PW user guide. I
edited two Makefiles and ran "make depend", resulting in 6 changed
make.depend files. I updated 5 scripts and one README file, mostly
related to examples.
Finally, some of the reference files in the test suite and in some
examples had a rather old format and a "diff" after running those cases
shows unnecessarily many differences. I thus created new reference data
for the vdW cases in the test suite (running "make create-reference-pw")
and I updated the PHonon/examples/example16 and
PW/examples/vdwDF_example references (23 files updated, 11 files
deleted, and 6 files added; the file and directory structure of the
delta-scf calculations needed some more substantial updating). I also
updated PP/examples/ACF_example/reference_vdw-df-cx/atoms.out.
At this point I will do some final testing and cleaning-up of the code.
The next commit fill be the final commit.
1. parallelization on atoms in DFT-D2 made uniform with other cases
2. phonon check added: gamma_gama tricks and el-ph are incompatible
3. cleaning shell cleaned up
Routines filling xml objects: qexsd_init_*, with QE variables passed as
arguments, taken out from qexsd_module and moved to a separate qexsd_init
module in file Modules/qexsd_init.f90. In the process, some unused variables
have been removed and make.depend updated.
No true changes and no side effect expected, just some re-ordering.
There are still some qexsd_init_* routines that either follow a different
logic, or that are called inside routines in qexsd_module (notably: general,
parallel, timing info, MD steps) that write the xml file, or that contain
references to QE modules. These will be fixed sooner or later.
cause strange crashes in spin-polarized phonon calculations.
In spite of a recent extensive review, the phonon makefile did not have all
needed dependencies in place: changes to Modules/ were ignored by "make ph"
Module input_parameters should be used ONLY to read input variables.
Once variables are read, they must be copied into QE modules and
input_parameters should be no longer used. Morever, input_parameters
is initialized ONLY when input is read, NOT when the data file is read.
when a ph.x calculation for q=Gamma and this is not the first computed
q nscf calculation must be run. The temporary directories must treated
as for the other points in this case.
there was an out-of-bound error in dgradcorr. I am not sure I understand
the fix (I am actually sure I don't) but it gives the same "zue" and
"zeu" effective charges in a simple test and the same for LDA and LSDA
with no spin polarization. Also: ZDOTC => zdotc, because some machines
need to preprocess zdotc and replace it with the zdotc_wrapper
of dangerous confusion: the "true" fractional translations, in crystal
axis units, are in "ft". First batch of removals, notably from smallg_q
(where it was not used) and from code calling it. More will come soon.
Updated release checklist, fixed typo in README.md
other cases: the main code was loaded into the library, while in all other cases it
is kept separate from the library. Not a big deal but some old gfortran complains
counterpart unset_mpi_comm_4_solvers are called at the begining and
at the end of the same source, so that unset_etc_etc is never called
by mistake (I don't think it is really necessary to call it, actually,
it's just a good habit). Asymptotically set_etc_etc should be moved to
the source code where parallel diagonalization is performed.
To make things safer, I added a note that HP and PHonon+U
are in the experimental stage. The codes work but they were
not tested in all possible 1001 cases...
1. FLUSH is an intrisic function
2. to continuate a string, you must end the firt line AND start the second with an '&'
3. missing comma in format string
- to avoid unneeded dependencies: currently each and every code that initializes mpi depends upon LAXlib,
including those that never diagonalize a matrix (e.g., ld1.x). This is completely ridiculous.
- to be free to choose the parallelization of linear algebra after data is read and metabolized.
It used to be done like that some time ago, by the way.
IMPORTANT NOTICE: all codes that use parallelization of linear algebra MUST explicitly call mp_start_diag.
Currently this is done by: cp.x, pw.x, neb.x, ph.x, projwfc.x. All other codes cannot currently use linear
algebra parallelization (linear algebra will run on 1 processor).
into xml files, listed among input variables, but it is never used and no longer
useful. In case, it is easy and quick to reintroduce it, in a less confusing way
This bug was mistakenly introduced during ithe porting of DFPT+U
from QE 5.0.2 to the latest QE. Interestingly, this stupid bug
was found only when computing phononsi+U for bulk Fe using
Fe.pbe-spn-rrkjus_psl.0.2.1.UPF (the bug did not show up when using
e.g. fe_pbe_v1.5.uspp.F.UPF). The benchmark was done with the
frozen phonon approach using phonopy. Moreover, in other tests
(for bulk Si, Al, Ni) this bug also did not show up.
1) DFPT+U with ortho-atomic orbitals is disables,
because it is more complicated than it was expected.
First, Hubbard forces in pw.x must be extended to ortho-atomic orbitals
and then DFPT+U must be reconsidered.
2) Update the reference files for example18 for DFPT+U
3) Various minor changes
phonon code to prevent execution in non-implemented cases (NOT YET WORKING
because variables lxdm and dft_d3 are not properly set when file is read!);
removal of unused variables
I. Timrov, B. Himmetoglu, N. Marzari, M. Cococcioni). The code was ported
from QE 5.0.2 to the latest version of QE, by I. Timrov with the help of
A. Floris and M. Cococcioni. Many thanks for the discussions with P. Giannozzi,
P. Delugas, A. Dal Corso, M. Calandra, L. Paulatto about various issues
during the porting. Sorry if I forgot to mention someone.
2) Some small modifications in the HP code in order to be consistent
with the porting of PHonon+U and changes in LR_Modules.
uneeded relinking; the mysterious "tldeps" machinery modified accordingly;
added explicit dependencies to GWW targets to prevent (once again) problems
with make -j (seems to work now). make.depend updated (once again).
impossible clashes with LIBS as defined by the OS or as used by the configure's
of external libraries (e.g. FoX, for which one such problem has been reported)
Explaintion:
The Wigner-Seitz construction in EPW was done by constructing a cell
centred unit cell. This is fine for electronic properties (this is what is done in wannier90).
However for phonon or electron-phonon properties, one can have issues when the cell
is tilded for example.
The proper way is to construct a set of WS vectors centred on pairs of atoms (phonons)
or atoms (el-ph).
In the matdyn code, a FT grid is constructed with weigths centred on pairs of atoms
and zeros everywhere else.
EPW now reproduced exactly the results of matdyn for the interpolated phonons at a
lower computation cost. Indeed we minimize the number of zeros by keeping the union
of values between all the cells.
In both cases this is very fast anyway but is important for el-ph properties.
A Wigner module was created to deal with this.
In addition, the subroutine cdiagh2 from PHonon/PH/rigid.f90 has been made public to
avoid code duplication in EPW
functions
in case the starting computation has been done twfcollect=.true.
run_nscf saves the wave functions in tmp_dir_phq and not in tmp_dir.
We have to find a way to have them in the same place in both cases.
Not now because release is tomorrow (29 june 2018).
Dirty fix if open_buffer fails in tmp_dir go back to tmp_dir_phq and try
again.
Since github and gitlab just distribute a snapshot of the git repository,
these files must be in the repository as well. NOTA BENE:
All changes MUST GO TO *.tex or *.def FILES, NOT to these files!
Also note that the "make doc" machinery produces also *.xml files and
latex2html converted html versions of latex files. I don't think they belong
to the repository (latex files should maybe be replaced by md files)
containing Eliashberg functions to allow plotting with gnuplot for each mode
separately. Contributed by Mitsuaki Kawamura. Note: uses a fixed format with
a lot of fields (1000) per line.
use internal variable dft%lgamma instead of global variable gamma_only
(in the future they might have a slightly different meaning), obsolete
routines removed. To be done: CP
versions deleted: "fft_qgradient" and "fft_qgraddot". These are the versions
of fft_gradient_r2r and fft_graddot for complex arrays with exp(iqr) behavior,
fr usage in the phonon code (gradient of Delta rho at finite q). Note that in
phonon, indices of drho_gradient have been reversed as well in vdW-DF routines,
and that the call to dgradcorr has been changed (dfftp is passed as argument)
while previous "fft_gradient" becomes "fft_gradient_r2r".
Routine "grad_dot" moved to gradutils, with new name "fft_graddot" and
removal of useless variable in the list of argument.
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
three types of calls are possibles : 'Rho', 'Wave', 'tgWave'
In order to enable an fft-type for a given grid the corresponding clock_labels must be set.
One gives a name to desc%rho_clock_lable for 'Rho' type fft and a name to
desc%wave_clock_lable for 'Wave' and 'tgWave' types. Whether tg is
possible depends of the already defined value of desc%have_task_groups variable (mispell to be corrected soon).
definining
dffts%rho_clock_label='ffts', dffts%wave_clock_label='fftw',
dfftp%rho_clock_label='fft', dfftt%rho_clock_label='fftc' and
dfftt%wave_clock_label='fftcw'
and changing
'Dense'->'Rho', 'Smooth'->'Rho', 'Custom'->'Rho', 'CustomWave'->'Wave'
the same clock names and the same overall behavior as with the old interface is obtained.
the nyfft variable must be provided as done in the scf case.
compiles and run.
parallelization with task_group and/or bands not working in some cases
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@13807 c92efa57-630b-4861-b058-cf58834340f0
* PHonon/PH/prepare_q.f90
dfpt_tetra_linit should be initialized here for the multi-q
computation including Gamma point.
* PP/src/fermisurfer_common.f90
The routine computing equivalent k-points was incorrect for
body/face/base-centered lattice with nk1/=nk2/=nk3.
Extensions:
* Electron-phonon + tetrahedra works with q2r.x
* matdyn.f90 computes also \omega_ln
(Mitsuaki Kawamura)
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@13806 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
broke PH/examples/example14 because of the involuted way twfcollect and tmp_dir_phq
interact in the phonon code.
variable wf_collect=.false. defined in input so that the code avoids the confusion
and other changes can be tested.
Problem still to be fixed properly.
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@13671 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
basic operations: error handling, timing clocks, interfaces to basic mpi
calls, find free units...
These routines are moved from Modules and dependencies to other modules
are removed.
MANY files are updated to comply with the move.
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@13629 c92efa57-630b-4861-b058-cf58834340f0
US variable qq renamed qq_nt and a new variable qq_na added
because in real space the integral may depend (slightly) on
the atomic position and an atomic value is needed to compute
exactly normalizable wfc.
Whenever realspace tricks are not used qq_nt is used.
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@13604 c92efa57-630b-4861-b058-cf58834340f0
from generic one. read/write_rho => read/write_scf for structure rho.
read/write_rho_only => read/write_only, moved to Modules/xml_io_base.f90.
Nothing substantial, but beware side effects
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@13502 c92efa57-630b-4861-b058-cf58834340f0
This version rotates the pattern to the one of the final q-point, instead of recomputing, which works around oddities of set_irr and company subroutines (i.e. using global variables, calling mp_bcast..)
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@13441 c92efa57-630b-4861-b058-cf58834340f0
I've been using this version for years without problems, and I know it has solved a few cases of "wrong representation"
Please report if it gives the wrong modes for any input.
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@13421 c92efa57-630b-4861-b058-cf58834340f0
of cases, there is no difference and it's just aesthetic, but in some cases
a tiny error may have been corrected - please verify
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@13316 c92efa57-630b-4861-b058-cf58834340f0
computing symmetries into a separate routine called after the first one.
Everything should work exactly the same as before. This is just a preliminary
step towards automatic parallelization. Next step: force the FFT grids to be
commensurate with symmetries and not vice versa.
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@13265 c92efa57-630b-4861-b058-cf58834340f0