Skip to content

Refactors spin-wave calculation for parallelism #43

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

alexhroom
Copy link
Collaborator

@alexhroom alexhroom commented May 8, 2025

This PR refactors the spin-wave calculation so that it can be parallelised over q. Currently it seems that the parallelism slows things down, so I've put it behind a global flag PARALLEL while we're still testing things - I'll put some benchmarks together to see if it's faster for a large example. We also get a modest speed improvement as it avoids recalculating the C matrix for every q-value (it is q-independent) and also factors out the coupling-independent terms over sites.

@alexhroom alexhroom force-pushed the 42-parallelise-spinwave branch from 2ded2f6 to 3ecded8 Compare May 8, 2025 10:22
@alexhroom alexhroom changed the title Parallelises spin-wave calculation with concurrent.futures.ProcessPoolExecutor Refactors spin-wave calculation for parallelism May 8, 2025
@alexhroom alexhroom force-pushed the 42-parallelise-spinwave branch from 3ecded8 to f4b61c8 Compare May 8, 2025 12:26
@alexhroom alexhroom force-pushed the 42-parallelise-spinwave branch from 99c02a8 to 023195d Compare May 12, 2025 10:53
@alexhroom alexhroom marked this pull request as ready for review May 14, 2025 12:39
@alexhroom alexhroom requested a review from lucas-wilkins May 14, 2025 12:39
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

Successfully merging this pull request may close these issues.

1 participant