[DFTB-Plus-User] Spase matrices and eigenvalue problem

Benjamin Hourahine benjamin.hourahine at strath.ac.uk
Wed May 21 18:10:33 CEST 2008

Hello Dr Romanowski,

the code structure already uses sparse matrices extensively
( see http://dx.doi.org/10.1021/jp070186p )

Unfortunately, for a typical problem, approximately half of
the eigenvalue/eigenvectors of the Hamiltonian must be
calculated to determine the energy/forces. This means that
most sparse solvers such as ARPACK are not efficent for this
type of problem, as they are designed to calculate only a
few eigenpairs. Additionally, even if you can solve the 
eigenproblem sparsely, this leads to a large dense matrix of 
eigenvectors (admittedly, you can construct the density matrix 
a state at a time, but this is definitely very slow in serial, 
or requires a parallel machine). Hence the standard DFTB+ code 
uses dense eigensolvers for this.

It is possible to use sparse solvers for DFTB, but you definitely 
need a multi-processor machine to run problems in the range of
sizes you indicated in your first mail. See 


for examples of DFTB using a parallel shift and invert sparse solver,
but I understand that you want to use run simulations on a serial processor.

An alternative possibility may be to use a linear scaling non-eigenvalue
based approach. We have under developement a version using Yang's divide
and conquer approach. Depending on the exact details of the problems you
are interested in, we might be able to collaborate on applying this. 


    Dr. B. Hourahine, Department of Physics, SUPA, University of Strathclyde,
      John Anderson Building, 107 Rottenrow, Glasgow G4 0NG, United Kingdom
    Ph +44 141 548 2325 FAX +44 141 552 2891 benjamin.hourahine at strath.ac.uk

The University of Strathclyde is a Scottish resisted charitable body, number SC015263

-----Original Message-----
From: dftb-plus-user-bounces at dftb-plus.info on behalf of Zbigniew Romanowski
Sent: Wed 21/05/2008 16:03
To: dftb-plus-user
Subject: [DFTB-Plus-User] Spase matrices and eigenvalue problem
Dear Dr. Bálint,

Thank you for your fast response concerning the CPU and memory usage.

In one of the previous message 
you wrote:

"Please note, that for big systems DFTB+ spends about 90% of its
execution time in the LAPACK diagonalisation routine. Therefore, you
should make sure, that you're linking the code with an OpenMP capable
BLAS/LAPACK library (e.g. MKL)."

Concerning this statement I have two questions:

1. Is it possible to implement sparse matrices to store H and S matrices 
in current version of DFTB+?

2. Is it of great worth to implement iterative algorithms for solving 
eigenvalue problem? I mean, does it save time  applying ARPACK library 
for sparse matrices instead of LAPACK for full matrices?

Could you please provide the answers for these two questions.

Best regards,
Zbigniew Romanowski


Wino, Kobiety, Spiew. Slodko-gorzka opowiesc o warszawskiej
Pradze. Zdobywca nagrody publicznosci na festiwalu w Gdyni! 
Sonia Bohosiewicz i Tomasz Karolak w filmie "Rezerwat". 
Juz na DVD! http://klik.wp.pl/?adr=http%3A%2F%2Fcorto.www.wp.pl%2Fas%2Frezerwat2.html&sid=360

DFTB-Plus-User mailing list
DFTB-Plus-User at dftb-plus.info

More information about the DFTB-Plus-User mailing list