GithubHelp home page GithubHelp logo

Is parallelization possible? about dftd4 HOT 6 CLOSED

atom-moyer avatar atom-moyer commented on June 1, 2024
Is parallelization possible?

from dftd4.

Comments (6)

awvwgk avatar awvwgk commented on June 1, 2024 1

Thanks for checking.

Technical Details

Indeed we are currently only offering openMP parallelisation in dftd4, so we have neither MPI nor GPU support available right now, which makes your neural network clearly superior if you go massively parallel. I should stress that dftd4 implements a method meant to be used together with DFT.

We can definitely speed up dftd4 quite a lot (sparse solvers, MPI, maybe GPU support), but so far this what not in-scope for a dispersion correction targeting DFT, since you hardly notice the dftd4 run there.

What to do?

Now since you are designing a low-cost method, there are several things we can do, from a methodological point. dftd4 is build quite modular, so we can start throwing away terms, which will increase the speed by sacrificing some accuracy (so the usual trade-off when designing low-cost methods). So you can try to

  • reduce the cutoff radii (currently only possible in the source code)
  • disable the Axilrod-Teller-Muto three-body correction
  • disable the charge calculation (yields effectively D3, if you do a few more changes)

I should mention that there is no point in doing this when combining D4 with DFT (just as a disclaimer for future readers).

We also have very efficient implementations of D3 available for using it in the force field context, feel free to contact my boss or me if you are interested in using them.

from dftd4.

atom-moyer avatar atom-moyer commented on June 1, 2024

Also, just double checking that I am not doing anything crazy.

For 2 residue poly-ALA:
The D4 correction is calculating 80 per second.
The neural network is calculating 180 per second.

For 12 residue poly-ALA:
The D4 correction is calculating 8 per second.
The neural network is calculating 80 per second.

Is that performance that you would expect for the D4 correction?
Would you recommend using a different dispersion correction if speed is necessary to me?

from dftd4.

atom-moyer avatar atom-moyer commented on June 1, 2024

Thanks a bunch for getting back to me.

I would be able to utilize the openMP support because my 5 cpus are on one node. Is that connected through the python interface? It looks like it was meant to be supported, but to my understanding of the code, it does not actually get passed through the python-fortran bindings.

from dftd4.

awvwgk avatar awvwgk commented on June 1, 2024

Of course, but you have to compile with openMP support and set the respective environment variables (if you use MKL as backend, set the threads there as well!). Right now you cannot set it in Python via the API, but you can set it by environment variables.

from dftd4.

awvwgk avatar awvwgk commented on June 1, 2024

@atom-moyer is this still an issue?

from dftd4.

awvwgk avatar awvwgk commented on June 1, 2024

Closing this issue as stale.

The reference DFT-D4 implementation provides a shared memory parallelisation for CPUs. Investing in GPU parallelisation currently seems unfeasible for this project due to the limited toolchains available for this purpose. Revisiting different implementations using MPI (like the D4 variant in DFTB+) or OpenACC (like the D4 variant in xtb) could be done as part of this project in the future or in a separate project as necessary.

from dftd4.

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.