Empacotamento e Desempacotamento de Dados
MPI_Pack(n_ptr, 1, MPI_INT, buffer, 100, &position,MPI_COMM_WORLD);
/* Position has been incremented again. */
/* Now broadcast contents of buffer */
MPI_Bcast(buffer, 100, MPI_PACKED, 0,MPI_COMM_WORLD);
MPI_Bcast(buffer, 100, MPI_PACKED, 0,MPI_COMM_WORLD);
/* Now unpack the contents of buffer */
MPI_Unpack(buffer, 100, &position, a_ptr, 1,
MPI_FLOAT, MPI_COMM_WORLD);
/* Once again position has been incremented: */
/* it now references the beginning of b. */