IMTEK-Simulation / NuMPI

Utilities for MPI-parallel numerical calculations with Python
MIT License
2 stars 1 forks source link

Implement `mean` reduction method #50

Open pastewka opened 3 years ago

pastewka commented 3 years ago

This would allow simple parallelization of many of the scalar parameters implemented in SurfaceTopography

sannant commented 3 years ago

I think the reason it is not implemented is that you need the size of the global array.

Options:

Of course another option is to compute the total nb of entries on the fly in pnp.mean (i.e. making two reductions)

i.e. pnp.mean(array) = pnp.sum(array) / pnp.sum(len(array))