Coder Social home page Coder Social logo

Multiple FFTs at once about dftk.jl HOT 8 CLOSED

juliamolsim avatar juliamolsim commented on May 28, 2024
Multiple FFTs at once

from dftk.jl.

Comments (8)

mfherbst avatar mfherbst commented on May 28, 2024

Good idea. I would expect that for a large number of bands, using a "half-band" version is also reasonable, since it probably will take quite some iterations to go from 1 locked to half locked and in between you need to use the 1-band version for almost the complete band. But I agree, we should look at the other codes.

from dftk.jl.

antoine-levitt avatar antoine-levitt commented on May 28, 2024

So I did a bit of digging.

If I understand correctly QE does not do multiple FFTs at once (PW/src/vloc_psi.F90 calls fwfft, defined in FFTXlib/fft_interfaces.F90, without the optional argument howmany).

Abinit... has a m_fft.F90 file that is 4940 lines long (so about twice the size of DFTK right now), which as far as I understand is . That's just the high-level interface though; if you add the low-level wrapper around FFTW3, it adds 15k lines. But of course there's also the FFT routines from Goedecker, that are still used by default when running under MPI, which add another 10k lines. So the only way to know what is actually going on is to run it through a debugger.

from dftk.jl.

antoine-levitt avatar antoine-levitt commented on May 28, 2024

Just while I'm at it, here are some fun LOC stats. Counting just the "core" part (as best as I could find out what's core and what's not) of what DFTK does right now, excluding parallelisation etc. as far as I could:

Abinit: sloccount 28_numeric_noabirule/ 29_kpoints/ 32_util/ 41_xc_lowlevel/ 42_parser/ 44_abit* 46_diago/ 53_ffts/ 55_abiutil/ 56* 57* 56* 61* 62* 66_nonlocal/ 66_wfs/ 67_common/ 69_wfdesc/ 94_scfcv/ 98_main/ 83_cut3d/ => 190k

QE: sloccount LAXlib/ FFTXlib/ UtilXlib/ KS_Solvers/ PW/src/ => 85k (excluding the copy of an '97 version of FFTW they have in there)

from dftk.jl.

antoine-levitt avatar antoine-levitt commented on May 28, 2024

GPAW is comparatively pretty good: the core part is about 30k lines of python, supports three different basis sets, with about 10k of C code for performance-critical parts.

from dftk.jl.

antoine-levitt avatar antoine-levitt commented on May 28, 2024

So, reading the FFTW manual more closely, there is a "wisdom" mechanism for reusing measurements to create new plans; they say it's pretty smart, and so this might negate the problem of the changing nband (ie do the FFTW_MEASURE with the full nband, and reuse the wisdom to do a smaller number of bands)

from dftk.jl.

mfherbst avatar mfherbst commented on May 28, 2024

Ah that can be done quite easily in fact.

from dftk.jl.

mfherbst avatar mfherbst commented on May 28, 2024

This issue is related to the TODO given in https://github.com/mfherbst/DFTK.jl/blob/master/src/core/PlaneWaveBasis.jl#L76

from dftk.jl.

antoine-levitt avatar antoine-levitt commented on May 28, 2024

Closing in favour of #15

from dftk.jl.

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.