I’m trying to do some simple MPI calculations but have had some difficulty finding good tutorials online. For this implementation we cannot use threading, because of some interface issues with other codes (most advice I see appears to be, just use threading for problems like this).
Ok, how exactly do I do a simple calculation with mpi, preferably using scatter, and gather.
I have an array of inputs, we’ll call A and an array of outputs which I’ll call B
and a function f that takes an input A and provides an output B.
I want to parallelize over the input array A.
This is probably the easiest MPI implementation I can think of, yet I’ve had difficulty figuring out how to implement it. I couldn’t even find any simple example implementation of mpi_scatter and mpi_gather online.
Thanks for any advice.