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

Adding shared- and distributed-memory parallelization? #294

Open
millerk123 opened this issue Sep 7, 2022 · 7 comments
Open

Adding shared- and distributed-memory parallelization? #294

millerk123 opened this issue Sep 7, 2022 · 7 comments

Comments

@millerk123
Copy link

Hello,

We are interested in extending this software to include shared- and distributed-memory parallelization for execution of large problems on many CPUs. Before looking into this, I was wondering if you are aware of any serious roadblocks or challenges to doing this. Is it something that in principle should be doable?

Thanks,
Kyle

@chrisbrahms
Copy link
Collaborator

Hi Kyle,

I don't think there are any serious roadblocks. For the specific case of multi-mode guided simulations, there is even the long-languishing pull request #159 which implements this. So far we haven't bothered much with parallelising individual simulations, because most of the time we want to run many smaller and completely independent propagations rather than a single huge one, and of course parallelising that through multiple processes is trivial. See here for example:

struct QueueExec <: AbstractExec

When you say "large problem", what do you mean? Specifically, are we talking about guided or free-space geometry?

@millerk123
Copy link
Author

millerk123 commented Sep 8, 2022

Great to hear, and thanks for pointing me to that pull request.

For the large problems, we are interested in free-space propagation over multiple meters in a situation where the power can be much larger than the critical power and harmonic generation will be important

@jtravs
Copy link
Contributor

jtravs commented Sep 8, 2022

That PR also parallelised free space propagation too. But it needs updating and testing.

@chrisbrahms
Copy link
Collaborator

That PR also parallelised free space propagation too. But it needs updating and testing.

So it does. Sorry, been a while since I looked at that code 😁

@jtravs
Copy link
Contributor

jtravs commented Sep 8, 2022

To be honest, this is a rather trivial amount of code to update. There were issues with the performance scaling of the free-space code, but since Julia introduced dynamic scheduling (see here https://docs.julialang.org/en/v1/base/multi-threading/) it may have improved much more.

@millerk123
Copy link
Author

millerk123 commented Sep 8, 2022

Is the implementation in PR #159 for multi-threading or distributed computing?

@jtravs
Copy link
Contributor

jtravs commented Sep 8, 2022

It is for multi-threading. It would need a bit of work for distributed computing, but should be possible. But the code is heavily FFT dependent, which doesn't scale brilliantly with distributed computing.

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

3 participants