Commit fd38db27 authored by Alberto Garcia's avatar Alberto Garcia
Browse files

Merged PEXSI-solver interface code

Please see the manual for the new options related to the PEXSI
solver. Keep in mind that this solver is competitive only for very
large calculations.

Alberto Garcia thanks Lin Lin, Chao Yang, Georg Huhs, and Nick Papior
for their help with the design and coding of the interface.

Developer note: Please see the "Notes for PEXSI operation" in
Src/siesta.F for a brief overview of the basic coding changes
that need to be kept into account for further development work.

parents 3b4dcdf9 da222183
......@@ -38,11 +38,13 @@ Jaime Ferrer
Chu-Chun Fu
Sandra Garcia
Victor M. Garcia-Suarez
Georg Huhs
Rogeli Grima
Rainer Hoft
Jorge Kohanoff
Richard Korytar
In-Ho Lee
Lin Lin
Nicolas Lorente
Miquel Llunell
Eduardo Machado
......@@ -61,7 +63,7 @@ Andrew Walker
Andrew Walkingshaw
Toby White
Francois Willaime
Chao Yang
O.F. Sankey, D.J. Niklewski and D.A. Drabold made the FIREBALL code
available to P. Ordejon. Although we no longer use the routines in
......
This directory contains html files produced directly from the .lit files in Src.
These are written in emacs' org-mode, using the literate programming constructs.
This is work in progress as the capabilities of the system are explored.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
-------------------------------------------------------------------
November 25, 2013 Alberto Garcia trunk-447--pexsi-54--bracket-6
Extra parameter for PEXSI "annealing"
Use larger PEXSI temperatures when dDmax is far from convergence.
This can remove instabilities for problematic systems.
Options:
PEXSI.use-annealing T
PEXSI.annealing-preconditioner {number} (default 1)
PEXSI.annealing-target-factor {number} (default 10)
The effective PEXSI temperature (for solver and inertia-counts processing) is computed
as:
T = T_0 * ( 1 + precond* log(prevDmax/(target_factor*Dtol))
(with maximum of T_0)
where 'Dtol' is the scf tolerance, 'prevDmax' is the previous iteration's maximum
deviation in DM (or H), 'target_factor' determines the level at which the nominal
temperature is reached in relation to the scf tolerance, and 'precond' is a scale
factor for the increase in temperature.
After the second iteration, the temperature decreases monotonically, regardless of
any large fluctuations in prevDmax, to avoid convergence oscillations.
modified:
Src/m_pexsi_solver.F90
-------------------------------------------------------------------
November 22, 2013 Alberto Garcia trunk-447--pexsi-54--bracket-5
Implement PEXSI "annealing"
Use larger PEXSI temperatures when dDmax is far from convergence.
This can remove instabilities for problematic systems.
Option:
PEXSI.use-annealing T
PEXSI.annealing-preconditioner {number}
See code for details.
modified:
Src/m_pexsi_solver.F90
-------------------------------------------------------------------
November 21, 2013 Alberto Garcia trunk-447--pexsi-54--bracket-4
Add more heuristics for bracketting
Clarification of the workflow. Many more options to control the number
of inertia count steps, the bracketting convergence, and the use of
the information about the shift in Ef:
* In numInertiaCounts is negative, it indicates a minimum number of ic
steps. There can be more, if the dDmax in the previous iteration is
above:
safe_dDmax_NoInertia = fdf_get("PEXSI.safe-dDmax-no-inertia",0.05)
* Use of Ef shift:
If the dDmax in the previous iteration is above:
safe_dDmax_Ef_Inertia = fdf_get("PEXSI.safe-dDmax-ef-inertia",0.1)
safe_dDmax_Ef_solver = fdf_get("PEXSI.safe-dDmax-ef-solver",0.05)
the bracketting for IC and solver steps is controlled by
safe_width_ic = fdf_get("PEXSI.safe-width-ic-bracket",4.0_dp*eV,"Ry")
(half that width on either side of muLower and muUpper from the latest
inertia count step)
safe_width_solver = fdf_get("PEXSI.safe-width-solver-bracket",2.0_dp*eV,"Ry")
(half that width on either side of mu from the latest solver step)
If the dDmax is below the tolerance, the shift in Ef is used to move the
previous brackets for IC and the solver
* Cosmetics
The flow is now more clear.
See the code for a complete rundown of the changes. There are too many
to list at this stage.
* New version of "memory" routine with basic MPI awareness.
The routine memory_all prints the maximum and minimum values of the
peak working set size accross the processors in the
communicator. Used only in the PEXSI routines for now.
added:
Src/memory_all.F90
modified:
Src/Makefile
Src/m_pexsi_solver.F90
-------------------------------------------------------------------
November 18, 2013 Alberto Garcia trunk-447--pexsi-54--bracket-3
Implement Ef shift estimation
Using H for the current and the previous iterations, and the most recent DM,
the program estimates the change in the band-structure energy, and from it
(assuming a rigid shift), the change in Fermi level. This is passed to
the PEXSI solver to modify the inherited brackets.
added:
Src/compute_ebs_shift.F90
modified:
Src/Makefile
Src/compute_dm.F
Src/m_pexsi_solver.F90
Src/setup_hamiltonian.F
Src/siesta_forces.F
Src/sparse_matrices.F
Src/state_init.F
-------------------------------------------------------------------
November 18, 2013 Alberto Garcia trunk-447--pexsi-54--bracket-2
Sync to trunk-pexsi-54
Deallocate buffers in write_mat.
(+ comment out initial memory snapshot in siesta.F -- no ionode yet)
modified:
Src/m_matio.F90
Src/siesta.F
-------------------------------------------------------------------
November 16, 2013 Alberto Garcia trunk-447--pexsi-53--bracket-2
Monitoring of memory peaks by calls to getrusage()
A simple, and crude for now, method to display the maximum resident
size so far at several points in the program has been implemented, with
file rusage.f90 (an interface to the C routine getrusage()) and
memory_snapshot.f90. This is not completely portable.
added:
Src/memory_snapshot.f90
Src/rusage.f90
modified:
Src/Makefile
Src/m_pexsi_solver.F90
Src/siesta.F
Src/siesta_forces.F
-------------------------------------------------------------------
November 6, 2013 Alberto Garcia trunk-447--pexsi-53--bracket-1
Implement an "expert" inertia-count driver and mu bracket heuristics
(Work in progress)
With the option
PEXSI.inertia-expert-driver T
the program will call the inertia-count routine requesting a single
iteration, and use the results in a loop to increase the number of
criteria for convergence:
-- Electron tolerance in the base interval.
This reflects the basic heuristic that the integrated DOS should be more
precise as the interval gets shorter.
PEXSI.inertia-num-electron-tolerance [default 20]
-- Workable electron tolerance in the base interval.
PEXSI.inertia-min-num-electron-tolerance [default 10]
There can be problems with the algorithm if the interval is too small. Hence this termination criterion.
-- Mu tolerance
If the chemical potential has changed by less than
PEXSI.inertia-mu-tolerance [default a very small number] unit
from one inertia-count iteration to the next, the cycle ends, and mu is passed
on to the PEXSI solver.
-- Energy width of the interval (deprecated, as it does not make sense
for gapped systems)
When the inertia-count cycle ends, the bracket passed to the PEXSI solver is:
[muMinInertia, muMaxInertia] (the refined interval)
unless the user uses the option
PEXSI.UseFixedMuBracket T
in which case the bracket is
[muLower - delta/2, muUpper + delta/2]
where delta is controlled by
PEXSI.FixedMuBracket [default 0.4 eV]
added:
Src/m_interpolate.F90
modified:
Src/Makefile
Src/m_pexsi_solver.F90
April 25, 2013 Georg Huhs trunk-434--pexsi-2--gh-richer-1
Smarter interface with interval guessing by inertia counts
This is the implementation by Georg Huhs of the new interface.
There are now two entry points to PEXSI:
f_ppexsi_inertiacount_interface
f_ppexsi_solve_interface
together with new parameters to determine the behavior of the code.
Full documentation will be produced at the time of merging.
(the dummy file pexsi_interface.F90, and the Makefile, was updated
by A. Garcia)
removed:
Src/pexsi.h
added:
Docs/pexsi-gh-richer.CHANGES
Src/pexsi_inertia.h
Src/pexsi_solve.h
modified:
Src/Makefile
Src/m_pexsi_solver.F90
Src/pexsi_interface.F90
---------------------------------------------------------------
October 14, 2013 Alberto Garcia trunk-445--pexsi-46--hio-2
Optionally read the Hamiltonian for analysis
With the option
read-H-from-file T
the program will attempt to read H from the file "H_IN". This is
useful when performing analyses which only need H (and S), but not
the DM.
For example, to compute bands, or (p)DOS:
(... options for bands or (p)DOS...)
max-scf-iterations 0
read-H-from-file T
Optionally, since the Fermi level is not computed in these cases, it
can be set directly in the fdf file:
manual-fermi-level -3.05 eV
The program might still attempt to initialize the DM, and print messages
mentioning DM input. These are cosmetic issues, but the user should be
aware that this options are to be used with care.
modified:
Src/siesta_analysis.F
---------------------------------------------------------------
October 14, 2013 Alberto Garcia trunk-445--pexsi-46--hio-1
Save Hamiltonian and/or DM with proper filenames
New file names:
DM_MIXED: Useful for checkpointing
DM_OUT: Last DM computed
H_MIXED: Useful for checkpointing
H_DMGEN: Last H from which the electronic structure was computed
The "mixed" files are produced only in the appropriate runs (MixDM
(default), or MixHamiltonian).
Other options affecting which files are written:
- Checkpointing options:
WriteDM
WriteH
- Analysis options:
WriteDM.end.of.cycle
WriteH.end.of.cycle
- Backwards compatibility:
SCF.MixAfterConvergence
modified:
Src/Makefile
Src/m_iodm.F
Src/save_density_matrix.F
Src/siesta_forces.F
Src/siesta_options.F90
-----------------------------------------------------------------
October 24, 2013 Alberto Garcia trunk-445--pexsi-50--matio-6
Fix bug in dmbs2dm. Change name of argument to write_mat
* A record was missing in the conversion to classic DM format by
Util/DensityMatrix/dmbs2dm.
* The optional argument to signal blocked operation in write_mat in
module m_matio has been changed from "historical" to "compatible".
modified:
Src/m_iodm.F
Src/m_matio.F90
Src/overlap.f
Src/save_density_matrix.F
Util/DensityMatrix/dmbs2dm.F90
-----------------------------------------------------------------
October 23, 2013 Alberto Garcia trunk-445--pexsi-50--matio-5
Write converter from blocked to non-blocked and deploy
The newly re-organized DM and H information is now written
to file in "blocked format" by default, unless the option
Use.Blocked.WriteMat F
is used.
The new format is not backwards compatible. A converter
program (Util/DensityMatrix/dmbs2dm.F90) has been written
to post-process those files intended for further analysis
or re-use in Siesta. This is the best option for now, since
it allows liberal checkpointing with a much smaller time
consumption, and only incurs costs when re-using or analyzing
files.
Note that TranSiesta will continue to produce .DM files,
in the old format (See save_density_matrix.F)
( To test the new features, the option
S.Only T
can be used. It will produce three files: a standard one,
another one with optimized MPI communications, and a third,
blocked one.
)
added:
Util/DensityMatrix/dmbs2dm.F90
Util/DensityMatrix/f2kcli.F90
Util/DensityMatrix/m_getopts.f90
modified:
Src/Makefile
Src/m_iodm.F
Src/save_density_matrix.F
Util/DensityMatrix/makefile
-----------------------------------------------------------------
October 22, 2013 Alberto Garcia trunk-445--pexsi-50--matio-4
Use larger chunks for file writes
The information in a whole "blocksize"-worth of data is now
written to a single record on disk. This speeds up the I/O
significantly.
The new format is not backwards compatible. A new reading routine
(possibly with on-the-fly blocksize changes) has to be written.
modified:
Src/Makefile
Src/m_matio.F90
Src/overlap.f
Src/siesta_forces.F
------------------------------------------------------------
September 30, 2013 A. Garcia trunk-444--pexsi-42--mixing-6
Documentation for latest features
Merged trunk-mixing--6. See Mixing.CHANGES.
------------------------------------------------------------
September 20, 2013 A. Garcia trunk-444--pexsi-42--mixing-5
Fixes for TranSiesta continuation and scf loop logic
Merged trunk-mixing--5. See Mixing.CHANGES.
------------------------------------------------------------
September 16, 2013 A. Garcia trunk-444--pexsi-42--mixing-4
Normalize the DM in the routines that handle it
Merged trunk-mixing--4. See Mixing.CHANGES.
------------------------------------------------------------
September 13, 2013 A. Garcia trunk-444--pexsi-42--mixing-3
Optionally avoid mixing DM or H after scf-convergence
Merged trunk-mixing--3. See Mixing.CHANGES.
------------------------------------------------------------
September 13, 2013 A. Garcia trunk-444--pexsi-42--mixing-2
(Sync patchlogs for H mixing)
Merged trunk-mixing--2. See Mixing.CHANGES.
No changes to the code needed.
------------------------------------------------------------
September 13, 2013 A. Garcia trunk-444--pexsi-42--mixing-1
More options for Pulay mixing
Merged trunk-mixing--1. See Mixing.CHANGES.
------------------------------------------------------------
December 22, 2014 A. Garcia trunk-464--pexsi-v0.7-14
Clarifications in the manual. Non-square np-per-pole.
Made some clarifications in the manual on the basis of feedback from
Lin Lin.
- The restriction of being a perfect square for np-per-pole has been lifted.
- New default of 1 for PEXSI.np-symbfact.
- Clearer labeling for different ways of computing the band-structure
energy (displayed when verbosity >= 2)
modified:
Docs/siesta.tex
Src/m_pexsi.f90
Src/m_pexsi_dos.F90
Src/m_pexsi_driver.F90
Src/m_pexsi_local_dos.F90
------------------------------------------------------------
December 17, 2014 A. Garcia trunk-464--pexsi-v0.7-13
Some more documentation. Update of PEXSI tests.
added:
Tests/sih-pexsi/
Tests/sih-pexsi/makefile
Tests/sih-pexsi/sih-pexsi.fdf
Tests/sih-pexsi/sih-pexsi.pseudos
modified:
Docs/siesta.tex
Src/obj_setup.sh
Tests/si64-pexsi/si64-pexsi.fdf
------------------------------------------------------------
December 17, 2014 A. Garcia trunk-464--pexsi-v0.7-12
Sync to trunk-464. More documentation on sparse-matrix i/o.
Improve the documentation of the new framework for H and DM output.
Add Util/DensityMatrix/dmUnblock.F90
464: Merge fixes from rc-4.0: constr. forces, MPI compilation, mm.potentials
463: Added restart file for smooth continuation of annealing runs (F. Corsetti)
462: Improved MPI version of siesta as a subroutine (J.M.Soler)
461: %files added to Util/JobList options (J.M.Soler)
460: New GGA and VDW functionals (M.Fritz & J.M.Soler)
added:
Docs/gga.CHANGES
Docs/rc-4.0.CHANGES
Src/SiestaXC/Testers/Reference/
Src/SiestaXC/Testers/test6.f90
Src/SiestaXC/Testers/test6.m
Tests/anneal-cont/
Tests/anneal-cont/README
Tests/anneal-cont/makefile
Tests/anneal-cont/script.sh
Util/DensityMatrix/dmUnblock.F90
Util/JobList/Examples/Ice/dummyFile
Util/SiestaSubroutine/ProtoNEB/
renamed:
Src/SiestaXC/Testers/test2.f90 => Src/SiestaXC/Testers/test2.F90
modified:
Docs/CHANGES
Docs/siesta.tex
Pseudo/atom/Docs/atom.tex
Pseudo/atom/pseudoXML.f
Pseudo/atom/pxf.F90
Pseudo/atom/velect.f
Pseudo/atom/version.h
Src/MPI/Makefile
Src/SiestaXC/Testers/makefile
Src/SiestaXC/Testers/test1.f90
Src/SiestaXC/Testers/test3.F90
Src/SiestaXC/Testers/test4.F90
Src/SiestaXC/Testers/test5.f90
Src/SiestaXC/atomxc.F90
Src/SiestaXC/cellxc.F90
Src/SiestaXC/ggaxc.f
Src/SiestaXC/ldaxc.f
Src/SiestaXC/makefile
Src/SiestaXC/siestaxc.F90
Src/SiestaXC/vdwxc.F90
Src/SiestaXC/vv_vdwxc.F90
Src/SiestaXC/xcmod.f90
Src/atom.F
Src/dynamics.f
Src/fsiesta_mpi.F90
Src/molecularmechanics.F90
Src/write_subs.F
Src/xc.f
Util/DensityMatrix/README
Util/DensityMatrix/makefile
Util/JobList/Examples/Ice/iceChecks.jobs
Util/JobList/README
Util/JobList/Src/jobList.f90
Util/SiestaSubroutine/README
Src/SiestaXC/Testers/test2.F90
----------------------------------------------------------------
December 16, 2014 A. Garcia trunk-459--pexsi-59--v0.7-11
More documentation. Cosmetic changes in output
Improve the documentation of some features.
Remove very low-level output and wrap other according to verbosity levels
(work in progress).
modified:
Docs/siesta.tex
Src/m_pexsi_dos.F90
Src/m_pexsi_driver.F90
Src/m_pexsi_local_dos.F90
Src/m_redist_spmatrix.F90
----------------------------------------------------------------
December 15, 2014 A. Garcia trunk-459--pexsi-59--v0.7-10
Document the PEXSI features and update interface to v0.7.3
Wrote the first version of a new section of the manual devoted to
PEXSI.
Updated the interpretation of the PEXSI.safe-width-ef-solver parameter
to make it consistent with the psimilar parameter for
inertia-counting.
Deprecated the use of the parameter PEXSI.inertia-count.