Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call micro simulation solve routine with multiple CPUs #68

Open
kalupaika opened this issue Oct 19, 2023 · 5 comments
Open

Call micro simulation solve routine with multiple CPUs #68

kalupaika opened this issue Oct 19, 2023 · 5 comments

Comments

@kalupaika
Copy link

kalupaika commented Oct 19, 2023

In case of a large micro simulation (in the orders of million elements or degrees of freedom at each Gauss point of the macro problem) or even multiple scales for a single solve call, access to multiple CPUs will be required for undertaking the analysis. Can we give each solve() call access to multiple CPUs?

@IshaanDesai IshaanDesai changed the title Access to multiple CPUs in a single solve call Call micro simulation solve() routine with multiple CPUs Oct 20, 2023
@IshaanDesai IshaanDesai changed the title Call micro simulation solve() routine with multiple CPUs Call micro simulation solve routine with multiple CPUs Dec 18, 2023
@IshaanDesai
Copy link
Member

One way to do this would be using pympipool. Then the Micro Manager is itself not launched with mpi4py, but just in serial, and MPI is called in sub processes or functions, which are then run with the Executor instance. This would also allow for greater freedom in controlling how different parts of the micro simulations are run.

@steffenger
Copy link

I would also appreciate such a feature. In theory it should be doable to do some multiprocessing on the solve loop, since the microsimulations are idenpendent of each other in the timestep itself. The questions is how to handle this with the adaptivity in a meaningfull way. If i could a achieve a perfect mutliprocessing, wouldn't that make adaptivity obsolete in terms of wall time?

@uekerman
Copy link
Member

In theory it should be doable to do some multiprocessing on the solve loop, since the microsimulations are idenpendent of each other in the timestep itself.

I think, there is some misunderstanding. How I understood this issue, each micro simulation should be called by multiple ranks. Not a multiprocessing of the solve loop. The latter, you kind-of can already achieve now via the domain decomposition.

@steffenger
Copy link

Yes, it would probably have been smarter to make a new issue:D I had something like hybrid parallelization MPI openMP in my mind (although I'm not sure if this makes sense in this context). Maybe you want to have a certain number of microsimulations on an mpiporcess, so that the local adaptivity can still be used to avoid memory requirements and multiprocessing to make the solve loop as fast as possible.

@IshaanDesai
Copy link
Member

The latter, you kind-of can already achieve now via the domain decomposition.

This is correct. In principle the user is free to do multiprocessing (shared-memory parallelization) within the micro simulation file that they write. The effect of this would however be limited if the micro simulation is on one rank. This issue is about distributed-memory parallelization of every micro simulation. For a large machine this could also mean that we assign a single compute node for one micro simulation.

Maybe you want to have a certain number of microsimulations on an mpiporcess, so that the local adaptivity can still be used to avoid memory requirements and multiprocessing to make the solve loop as fast as possible.

Also a separate discussion. Lets open separate issues for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants