Git Product home page Git Product logo

Comments (3)

aeantipov avatar aeantipov commented on August 23, 2024

Hi Junya,

I apologize for a delay, I was out of commission last couple of days.
I actually worked on this problem some time ago, but ultimately stopped developing this. Normally I'd expect the single component calculation to be long enough, that there should be almost no overhead from just submitting N_orb^4 jobs to the cluster, each being MPI with an appropriate number of cores.

However, if that's not an option, here's how it could be done (for the code see below):

Background

mpi_dispatcher as well as compute method of TwoParticleGF receive a communicator as a const reference.
That communicator could be created elsewhere. Normally it's mpi_comm_world, but it doesn't have to be.

Boost::mpi (although by now old) actually has an option of splitting communicators.
See http://www.boost.org/doc/libs/1_66_0/doc/html/boost/mpi/communicator.html#id-1_3_26_6_5_2_1_1_3_33-bb

Basically, you can create a communicator of size 1 and attach it to TwoParticleGF. That way you achieve no parallelization in it, but can still parallelize on every component.
The drawback is that this way you'd have to statically allocate nodes to components (not dynamically as mpi_dispatcher does), but it works.

Code

This was actually implemented in a container class for TwoParticleGF : TwoParticleGFContainer.
The code: https://github.com/aeantipov/pomerol/blob/master/src/pomerol/TwoParticleGFContainer.cpp#L68

Test: https://github.com/aeantipov/pomerol/blob/master/test/TwoParticleGFContainerTest.cpp

from pomerol.

j-otsuki avatar j-otsuki commented on August 23, 2024

Dear Andrey,

thank you for your detailed explanation.
I understand that creating a communicator of size 1 is an easy way to disable MPI. No modification of the library is necessary.
Using the container class TwoParticleGFContainer seems to be a better choice. I found it is used in the sample program hubbard2d.cpp (I did not recognized because I learned only tutorial). I'll try using it.

The situation I'm working on is the following.
I'm computing multi-orbital model, e.g, d-electrons. The number of orbitals is N_orb=5 or 10 without/with spin-orbit coupling, so there are 5^4 or 10^4 components (of course, some are equivalent). Now, there is a crystal field potential and rotational symmetry does not exist. Classification of states by quantum numbers of L_z or J_z does not work. Therefore, the number of jobs done in the compute method is not so many.
This brings me to consider using MPI for the orbital indices outside of the compute method.

Best regards,
Junya Otsuki

from pomerol.

aeantipov avatar aeantipov commented on August 23, 2024

Junya, I see. Hopefully, the calculation won't run into memory issues by the large size of the 2PGF.
I hope it works, keep me updated. Closing it for now.

from pomerol.

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.