Commit Graph

30 Commits

Author SHA1 Message Date
obm d5d9929aa8 This is the first iteration in trying to implement a real space treatment of
projectors in USPPs. Hopefully this will allow one to study larger systems.
The modifications are done primarily keeping TDDFPT code in mind
(a branch of QE, you may see detailed explanation in qe-forge which I am trying
to keep tightly integrated). Please do not modify/beautify/make more elegant
 the corresponding subroutines without prior notice, due to their dependencies.
I have tested that the current modifications do not alter the behaviour of pw.x
other than designed with a number of small tests in HG1.
Some Pointers:
-All the new subroutines reside in PW/realus.f90
-A new flag real_space in &electrons control the implementation
-tqr flag is treated seperately.
-The implementation works only for (serial) gamma point single point calculations.
ToDo:
-I have written K point and task groups implementations of most of the corresponding routines, but did not have time to implement.
-Parallelism issues are still to be checked.
-The discrepancy in total energy is <0.002 eV for cutoff of 55Ry/550Ry however,
there are some strange force components. I do not know how this will effect
a possible optimization scheme.

Other:
Trying the compile CVS version in HG1 of sissa, using the "default" compiler
sets, I encountered a very strange compiler bug. Please have a look at
Modules/read_cards.f90 for details. Remove the stupid workaround to your liking.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@5493 c92efa57-630b-4861-b058-cf58834340f0
2009-04-02 16:05:09 +00:00
giannozz 3d5237d957 h_psi in the Gamma case used to force the input psi(G=0) to be real, in order
to prevent numerical trouble. Changed to set the output h*psi(G=0) to be real:
it should be equivalent and it is much more logical. Just in case, and in order
to have the same behavior,  Im [psi(G=0)] is set to 0 before calls to h_psi


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@5427 c92efa57-630b-4861-b058-cf58834340f0
2009-02-16 14:56:23 +00:00
cavazzon 1b0a45c1cb - small cleanup
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@5256 c92efa57-630b-4861-b058-cf58834340f0
2008-11-02 16:04:42 +00:00
cavazzon 6e6630adbe - reduce replaced by mp_sum
- sub. reduce, removed from para!


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@4826 c92efa57-630b-4861-b058-cf58834340f0
2008-04-20 21:23:37 +00:00
cavazzon f1983023f0 - fix for half bug, array sections
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@4818 c92efa57-630b-4861-b058-cf58834340f0
2008-04-18 11:03:20 +00:00
giannozz 2cbc30aa26 Cleanup of cpu time printout; start_clock and stop_clock modified to avoid
trouble if label is longer than expected


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@4473 c92efa57-630b-4861-b058-cf58834340f0
2007-11-23 16:00:25 +00:00
giannozz 885410ba15 Some cleanup in the various diagonalization routines, h_psi and s_psi.
Note that both the electric enthalpy term and the noncollinear routines
are called by h_psi and s_psi. Changes should be harmless.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@4470 c92efa57-630b-4861-b058-cf58834340f0
2007-11-22 21:28:22 +00:00
giannozz f0b1c48ff4 Old parallel subspace diagonalization (with matrix not distributed) removed
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@4464 c92efa57-630b-4861-b058-cf58834340f0
2007-11-21 20:45:16 +00:00
giannozz 86bd8ce9fe In all diagonalization-related routines, ndmx => npwx, ndim => npw .
Why? because the presence of different variables with the same name
makes usage of "grep" ineffective...


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@4260 c92efa57-630b-4861-b058-cf58834340f0
2007-09-18 14:28:03 +00:00
cavazzon 459274f7d7 - small cleanups
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@4168 c92efa57-630b-4861-b058-cf58834340f0
2007-08-20 22:01:04 +00:00
cavazzon 1b80ca7a2c - wrong leading dimension used for matrix blocks ( too large! )
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@4160 c92efa57-630b-4861-b058-cf58834340f0
2007-08-19 16:20:30 +00:00
cavazzon 0d5a751800 - some compiler (like PGI) does not like unallocated variables
to be passed as dummy argument (I think this is a compiler bug).
  then allocate variable on all procs with size 1


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@4159 c92efa57-630b-4861-b058-cf58834340f0
2007-08-19 14:32:33 +00:00
cavazzon 790329ccd0 - new version of reghter ( preghter ) without global replicated
data. Matrixes are distributed across processors.
- to turn on the use of the new algorithm, a new value for
  input parameter "diagonalization", has been introduced:

diagonalization = 'david+distpara'

work like david but use fully distributed memory
iteration loop. Allocated memory scale down with the
number of procs. Procs involved in diagonalization can
be changed with input parameter "ortho_para".
On multi core/CPUs often it is convenient to let only
one core per CPU to work on linear algebra.

User can tune the number of core involved in diag. with
the keyword in electrons namelist:

ortho_para = NN

then the code will use the largest square smaller than NN,
since matrixes are always distributed on a suqre grid of procs.
Note that if NN < 2*nproc, then one proc every two is taken
for parellel diag. The same for NN < 4*proc, one every four
is taken. This is to minimize memory contention on multi core proc.
In example, if you run with 64procs on a 4core CPU cluster,
it may be convenient to specify:
ortho_para = 16
So that only one core per CPU is involved in diagonalization.
Further performance enhancements will be possible using
OpenMP BLAS inside regter/cegter/rdiaghg/cdiaghg (to be implemented)


for the time been, all this is only for gamma_only calculation,
ceghter will follow...


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@4154 c92efa57-630b-4861-b058-cf58834340f0
2007-08-18 15:48:07 +00:00
giannozz 6eae898b2a More merge of noncolinear stuff
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@3702 c92efa57-630b-4861-b058-cf58834340f0
2007-01-21 20:09:10 +00:00
sbraccia adc692d6e2 Added parallel routines for matrix-matrix, and matrix-vector multiplications and
for Cholesky decomposition. These routines are used to parallelize the solvers
for the generalized eigenvalue problems, namely rdiaghg and cdiaghg (notice that
the inversion of the lower triangular matrix L is still done using a serial
lapack routine). These two routines are now used for Davidson parallelization.
Old algorithm based on the orthogonalization of the correction vectors has been
removed (it was awfully slow). The performance of the new algorithm should be
decent. Beware unexpected side effects. C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@3310 c92efa57-630b-4861-b058-cf58834340f0
2006-08-08 21:14:26 +00:00
sbraccia 23c45d3ebc Fixed an array out of bound in Gram-Schmidt. Cleanup of parallel Davidson.
C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@3061 c92efa57-630b-4861-b058-cf58834340f0
2006-05-01 22:14:22 +00:00
giannozz 27036092d5 Not sure the new format works in the noncolinear case, but for sure
it was not working before. TABs removed


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2857 c92efa57-630b-4861-b058-cf58834340f0
2006-03-01 15:25:50 +00:00
sbraccia 3958d9b912 Davidson with parallel subspace diagonalization implemented. At startup the code automatically
checks whether or not it is convenient to use the parallel diagonalizer reporting the result.
The output is still verbose to facilitate the identification of bugs.
C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2767 c92efa57-630b-4861-b058-cf58834340f0
2006-02-03 20:20:55 +00:00
giannozz f533b052d5 dbl => DP (defined as previously dbl was)
syntax for declarations: real(DP), without "kind="


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@2135 c92efa57-630b-4861-b058-cf58834340f0
2005-08-28 14:09:42 +00:00
ballabio dd20aa85cd lrot must be logical [Gerardo]
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1777 c92efa57-630b-4861-b058-cf58834340f0
2005-03-31 11:07:34 +00:00
sbraccia ddb2067a1e Conjugate-gradient: added a routine for gamma-only calculations. collinear and noncollinear routines unified.
Davidson: minor improvements of the davidson algorithm. collinear and noncollinear routines unified.
C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1769 c92efa57-630b-4861-b058-cf58834340f0
2005-03-30 14:37:55 +00:00
ballabio 59d48dd531 workarounds for g95 bug [Gerardo]
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1395 c92efa57-630b-4861-b058-cf58834340f0
2004-10-25 15:26:30 +00:00
sbraccia f80a54904f Some compilers complain for double colon after EXTERNAL.
C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1183 c92efa57-630b-4861-b058-cf58834340f0
2004-08-27 08:29:48 +00:00
sbraccia 2b357e927b DIIS: fixed some bugs in the diis procedure. Performance issue still to be addressed.
Davidson: minor cleanup
C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1133 c92efa57-630b-4861-b058-cf58834340f0
2004-08-19 16:22:51 +00:00
sbraccia afc04941bd Fixed a small bug added (by me) in a recent commit.
C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1082 c92efa57-630b-4861-b058-cf58834340f0
2004-07-19 13:36:17 +00:00
sbraccia 6eab239588 In the diagonalization two different tresholds are used for occupied and empty bands (as done in diis).
Marginal speed-up (of the order of 10%-20%), but safe.
C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1041 c92efa57-630b-4861-b058-cf58834340f0
2004-07-05 06:53:39 +00:00
sbraccia 0caeadbd7b Machine-dependent definitions are now contained in two different files (both in /include):
1) f_defs.h  for definitions to be included in FORTRAN files ONLY
   2) c_defs.h  for definitions to be included in C       files ONLY

C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@1012 c92efa57-630b-4861-b058-cf58834340f0
2004-06-25 17:25:37 +00:00
sbraccia 1ab31b8fdc Yet another version of the DIIS algorithm (it substitutes the previous one). This version is slower (but not dramatically) than davidson for small systems, faster for large systems (the cross-over is around 300 bands), but there is space for further improvements. A gamma-point version is also implemented (previously missing). An "holes-sniffer" is implemented to prevent holes in the eigenvalues spectrum.
C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@876 c92efa57-630b-4861-b058-cf58834340f0
2004-05-11 08:11:52 +00:00
giannozz 0b1a5c9fd8 Extensive module cleanup: DP moved from wrong place (parameters) to the
correct place (kinds); module "varie" replaced by "control_flags" (not
yet in pwcom, though) - many many files changed.
64-bit cpus (Opteron, maybe Itanium) should now work if __LINUX64 is defined


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@513 c92efa57-630b-4861-b058-cf58834340f0
2004-01-23 15:08:03 +00:00
sbraccia 2f4d7baded PW, Gamma and NEB are now unified.
C.S.


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@449 c92efa57-630b-4861-b058-cf58834340f0
2003-12-10 14:57:07 +00:00