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

getVelocityDistribution should make one MPI_Allreduce call #62

Open
alecjohnson opened this issue Feb 23, 2014 · 0 comments
Open

getVelocityDistribution should make one MPI_Allreduce call #62

alecjohnson opened this issue Feb 23, 2014 · 0 comments

Comments

@alecjohnson
Copy link
Contributor

Particles3Dcomm::getVelocityDistribution() sums particle velocity distributions using:
  for (int i = 0; i < nBins; i++) {
    localN = f[i];
    MPI_Allreduce(&localN, &totalN, 1, MPI_LONG_LONG, MPI_SUM, MPI_COMM_WORLD);
    f[i] = totalN;
  } 

This generates thousands of all-reduce calls, which is horribly inefficient and will be unacceptable on DEEP's Booster. These lines can be replaced with a single call:

  MPI_Allreduce(MPI_IN_PLACE, f, nBins, MPI_LONG_LONG, MPI_SUM, MPI_COMM_WORLD);
murci3lag0 added a commit that referenced this issue Oct 13, 2015
The dipole can be calculated using a simpler dipolar function.
CMakeList files have been updated to compile in 'Release' mode by default, using optimization flags at compilation.
Erasing the 'siamo qua' line that appears at the begining of the runs.
Corrected issue #62 : efficient MPI_allreduce call.
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

1 participant