Giter Site home page Giter Site logo

OutOfMemoryError about deeph-pack HOT 9 CLOSED

mzjb avatar mzjb commented on June 8, 2024
OutOfMemoryError

from deeph-pack.

Comments (9)

mzjb avatar mzjb commented on June 8, 2024

By default DeepH-pack use the dense matrix to compute the eigenvalues. One should use sparse matrix to perform the calculation for large-scale materials like TBG with 1.05 degree. Please set

[basic]
dense_calc = False

in your inference parameters.

By the way, I just updated a parallel version of sparse calculation script, which is X (X ≈ the number of CPU cores) times faster than the original sparse calculation script. One should update the DeepH-pack and install Pardiso.jl and LinearMaps.jl by following the updated README to use it.

One needs about 80GB of memory to calculate 50 bands of TBG with 11908 atoms.

from deeph-pack.

newplay avatar newplay commented on June 8, 2024

@mzjb Thank you for your response, I will try as soon as possible.

from deeph-pack.

newplay avatar newplay commented on June 8, 2024

By default DeepH-pack use the dense matrix to compute the eigenvalues. One should use sparse matrix to perform the calculation for large-scale materials like TBG with 1.05 degree. Please set

[basic]
dense_calc = False

in your inference parameters.

By the way, I just updated a parallel version of sparse calculation script, which is X (X ≈ the number of CPU cores) times faster than the original sparse calculation script. One should update the DeepH-pack and install Pardiso.jl and LinearMaps.jl by following the updated README to use it.

One needs about 80GB of memory to calculate 50 bands of TBG with 11908 atoms.

Hello, I have a question about the parallel version of parsing calculation: How can I utilize all of the CPU cores (such as 64 cores)? Are there any parameters in the .ini file that I can adjust to achieve this?

from deeph-pack.

mzjb avatar mzjb commented on June 8, 2024

By default DeepH-pack use the dense matrix to compute the eigenvalues. One should use sparse matrix to perform the calculation for large-scale materials like TBG with 1.05 degree. Please set

[basic]
dense_calc = False

in your inference parameters.
By the way, I just updated a parallel version of sparse calculation script, which is X (X ≈ the number of CPU cores) times faster than the original sparse calculation script. One should update the DeepH-pack and install Pardiso.jl and LinearMaps.jl by following the updated README to use it.
One needs about 80GB of memory to calculate 50 bands of TBG with 11908 atoms.

Hello, I have a question about the parallel version of parsing calculation: How can I utilize all of the CPU cores (such as 64 cores)? Are there any parameters in the .ini file that I can adjust to achieve this?

Use

set_nprocs!(ps, 64)

after line 45 of this file to set the number of threads to 64. I found that the default value is the number of cpu cores when I use Intel oneapi MKL.
(https://github.com/JuliaSparse/Pardiso.jl#mkl-pardiso-1)

from deeph-pack.

newplay avatar newplay commented on June 8, 2024

Hi, I have found that Julia 1.5.4 does not support Pardiso 0.5.4 version, and the function "fix_iparm!" will not be executed. This issue has been resolved by updating Julia to version 1.8.5, but I cannot confirm if the program you wrote supports the syntax of 1.8.5. Please take note of this issue.

from deeph-pack.

mzjb avatar mzjb commented on June 8, 2024

Thank you for your reminder. I am actually using julia 1.6.6, and I forgot to update the README.

Hi, I have found that Julia 1.5.4 does not support Pardiso 0.5.4 version, and the function "fix_iparm!" will not be executed. This issue has been resolved by updating Julia to version 1.8.5, but I cannot confirm if the program you wrote supports the syntax of 1.8.5. Please take note of this issue.

from deeph-pack.

newplay avatar newplay commented on June 8, 2024

Hi,After changing the keyword to
[basic] dense_calc = False
I have a new question: The resulting band structure appears to contain numerous sawtooth-shaped bands, which is evidently incorrect. I suspect that the Hamiltonian matrix may not be as sparse as I originally thought, or perhaps my radius is set too large. Specifically, my radius is currently set to 9.
Can you give me some advice?

from deeph-pack.

aaaashanghai avatar aaaashanghai commented on June 8, 2024

Hi,After changing the keyword to
[basic] dense_calc = False
I have a new question: The resulting band structure appears to contain numerous sawtooth-shaped bands, which is evidently incorrect. I suspect that the Hamiltonian matrix may not be as sparse as I originally thought, or perhaps my radius is set too large. Specifically, my radius is currently set to 9.
Can you give me some advice?

Hi there, thank you for raising this issue. I'm another developer of DeepH (Zechen Tang) and am responding to your question.
I believe there's no primary error in your calculation. The reason for seeing sawtooth-shaped bands lies in the incorrect ordering of bands. In the dense_calc mode, all eigenvalues are calculated and thus indexed in a correct manner. In the sparse diagonalization scheme, however, only a few eigenvalues near Fermi level are calculated, which are in general not all bands. It is very likely that these bands are labelled with incorrect indexes.
If you're using matplotlib.pyplot.plot to plot band diagram, the eigenvalues with the same "index" along different k-points are recognized as the same band and are joined together to form a line. This can result in the appearance of a sawtooth pattern so long as the indexes are incorrect.
Here are two ways to solve this issue:

  1. Use scattering plot (matplotlib.pyplot.scatter) instead of line plot. In this way you'll be able to see the shape of the band without being bothered by the sawtooth.
  2. For gapped systems, you can manually assign an energy level in a gap, and sort all VBMs and CBMs by there distance to this energy level. This could give a correct "index" of all calculated eigenvalues, and will result in a correct line plot.

Unfortunately the second approach would involve some coding dependent on the way you organize your band eigenvalue output, and we don't have a general script on this. I would recommend you try the first approach instead.
We sincerely appreciate you for bringing up this issue. If you have any further questions, we would be more than happy to provide you with additional support.

from deeph-pack.

newplay avatar newplay commented on June 8, 2024

@aaaashanghai Thank you very much for your response, it completely dispelled my doubts!

from deeph-pack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.