ofb/c — pull request #1 by geppettodivacin (2013-06-28 01:47:33+00:00)
Title: MPI Initial Work

I've added MPI initialization and set it up to work on only those p-index values that, mod the number of processors, is equal to its rank. More simply, it will run if

n % nprocs == rank

evaluates to true.

I have also added file output to your print function. By necessity, I also removed some of your output to cout regarding the separation of two values of p. If I understand correctly, each value of p has one and only one matrix associated with it, and so each value of p should be able to have its own file.

This will, of course, mean that you won't have output via the terminal, but instead you'll have to check your files for the output. This is typically better in HPC situations, where you run a job and it only finishes hours later, when you go back to see your output.

I haven't yet implemented OpenMP, so currently each value of p is only run on one thread. Also, there are further optimizations that can be done with MPI later if they're needed.

Let me know if you have any questions before merging my changes. I believe you should be able to edit my changes before pulling, also.