Navigation

Operators and Keywords

Function List:

C++ API

Function File: = hellostruct ()

This function demonstrates sending and receiving a struct over MPI. Each process will send a a struct to process with rank 0, which will then display it. 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; hellostruct ()'

Demonstration 1

The following code

 system ("mpirun --hostfile $HOSTFILE -np $NUMBER_OF_MPI_NODES octave -q --eval 'pkg load mpi; hellostruct ()'");

gives an example of how 'hellostruct' is used.

Package: mpi