Function File: = hello2dimmat ()
This function demonstrates sending and receiving of a 2-dimensional matrix over MPI. Each process in the pool will create a random 90x90 matrix and send it to process with rank 0. To run this example, set the variables HOSTFILE and NUMBER_OF_MPI_NODES to appropriate values, then type the following command in your shell:
mpirun --hostfile $HOSTFILE -np $NUMBER_OF_MPI_NODES octave --eval 'pkg load mpi; hello2dimmat ()'
The following code
system ("mpirun --hostfile $HOSTFILE -np $NUMBER_OF_MPI_NODES octave -q --eval 'pkg load mpi; hello2dimmat ()'");
gives an example of how 'hello2dimmat' is used.
Package: mpi