Hey guys,

I need to write an implementation of a 4D array with a variable 4th dimension based on where in 3D you are. So it's basically like a normal rectangular prism, except for each unit it might have a variable number of values. The program is also supposed to communicate by sending ghost nodes between each slice, in order for the actual data-modifying code to work. The data-modifying code is to be added by others depending on what they need to do with this 4d array.

 So what I am really asking is how does MPI work when you have different objects on different computers and you try sending stuff between the objects? 

Just some explanations for my code, which is attached, in case you can give some code-specific tips:

I am also a bit confused with when do you have to call MPI_Finaliza(). I mean, for it to run, the program required me to put it into the constructor, and if I call print() at the and of the constructor, it would tell me this:

job aborted:
rank: node: exit code[: error message]
0: C7June2010: 123
1: C7June2010: -1073740777: process 1 exited without calling finalize
2: C7June2010: -1073740777: process 2 exited without calling finalize

If i would place it after Finalize() nothing would show when i run the exe.


I just finished grade 12, and got a summer job at a research lab, and this is my project. Thanks a lot for your help.

Alex