2 # the string NEWORLD is just a label could be whatever you want
3 CW = MPI_Comm_Load("NEWORLD");
4 my_rank = MPI_Comm_rank(CW);
6 # tag[0] ----> type of octave_value
7 # tag[1] ----> array of three elements 1) num of rows 2) number of columns 3) number of non zero elements
8 # tag[2] ----> vector of rowindex
9 # tag[3] ----> vector of columnindex
10 # tag[4] ----> vector of non zero elements
11 # These tags will be generated after mytag by the MPI_Send and MPI_Recv (see source code)
18 # This is just to fill the sparse matrix
22 message = sprand (M, N, D);
29 # rankvect is the vector containing the list of rank destination process
31 [info] = MPI_Send(message,rankvect,mytag,CW);
32 disp("This is flag for sending the message --")
37 disp("We are at rank 0 that is master etc..");
38 [messager, info] = MPI_Recv(source,mytag,CW);
39 disp("Rank 0 is the master receiving ... :");