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

Made MPI calls in exchangeStateVectors non-blocking #380

Merged
merged 1 commit into from
Sep 21, 2023

Conversation

jjacobx
Copy link

@jjacobx jjacobx commented Sep 18, 2023

The function exchangeStateVectors was modified to take advantage of non-blocking MPI communication.

Currently, QuEST uses blocking communication calls to exchange the statevector in chunks of 2GB. On large systems, which feature high memory and a fast interconnect, this caused a noticeable slowdown. By changing the communication to non-blocking, up to 10% speedup was achieved on ARCHER2, as described in the following paper: https://arxiv.org/abs/2308.07402.

Ideally the request array would not be allocated and freed in this function, however, placing it elsewhere would require introducing MPI headers in areas of the code in which they are not currently required, for example in QuESTEnv.

@TysonRayJones
Copy link
Member

Hi there,

Thanks for an excellent contribution! Absolutely kicking myself that the chunks were ever sent serially.
I'm running the unit tests on some beefy distributed hardware, and have confirmed the code works for few chunks.

I think the requests malloc is fine. The number of messages depends on the Qureg size, and even the extreme case of a 1 TB RAM node exchanging a RAM-filling statevector, requests has only ~2000 elements.

Do you have a preferred name to be referred to as a QuEST contributor? (examples here)

@jjacobx
Copy link
Author

jjacobx commented Sep 20, 2023

Hi Tyson, thank you for accepting my contribution! You can refer to me as Jakub Adamski.

@TysonRayJones TysonRayJones merged commit aa5ccd1 into QuEST-Kit:develop Sep 21, 2023
6 checks passed
TysonRayJones added a commit that referenced this pull request Sep 21, 2023
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.

2 participants