4 # the string NEWORLD is just a label could be whatever you want
5 CW = MPI_Comm_Load("NEWORLD");
6 my_rank = MPI_Comm_rank(CW);
13 # Generate a random matrix
14 message=rand(444440,8);
16 # rankvect is the vector containing the list of rank destination process
18 [info] = MPI_Send(message,rankvect,mytag,CW);
21 disp("We are at rank 0 that is master etc..");
22 [messager, info] = MPI_Recv(source,mytag,CW);
24 # You could also save each result and make comparisons if you don't trust MPI
25 disp("Rank 0 is the master receiving ... :");
26 if (info == MPI_SUCCESS)