LAM/MPI logo

LAM/MPI General User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: Elias SantAna (lordcinneris_at_[hidden])
Date: 2009-10-28 14:07:08


To measure time, just write "time" in the command line when you execute your application:

time mpirun -np 16 myapplication

I'm not sure how you'd do what you want with MPI_Gather, but since only the root process will have the 2 dimensinal array, you could do it using MPI_Send in all the processes and various MPI_Recv on the root process, according to the rank of the sending process you can identify in which position of the 2 dimensional array the data will be placed.

example (supposing you hava an array of int):

//root process
if (my_rank==0){
  for (i = 1; i<array_size; i++){
    MPI_Recv(&matrix[i][0], array_size, MPI_INT, i, 0, MPI_COMM_WORLD, &status)
  }

}else{ //every other process
  MPI_Send(array, array_size, MPI_INT, 0, 0, MPI_COMM_WORLD)
}

Good luck!

--- Em qua, 28/10/09, lam-request_at_[hidden] <lam-request_at_[hidden]> escreveu:

De: lam-request_at_[hidden] <lam-request_at_[hidden]>
Assunto: lam Digest, Vol 1285, Issue 1
Para: lam_at_[hidden]
Data: Quarta-feira, 28 de Outubro de 2009, 14:00

Send lam mailing list submissions to
    lam_at_[hidden]

To subscribe or unsubscribe via the World Wide Web, visit
    http://www.lam-mpi.org/mailman/listinfo.cgi/lam
or, via email, send a message with subject or body 'help' to
    lam-request_at_[hidden]

You can reach the person managing the list at
    lam-owner_at_[hidden]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of lam digest..."
Today's Topics:

   1. (no subject) (madhuri gupta)
   2. Re: (no subject) (Eugene Loh)