LAM/MPI logo

LAM/MPI General User's Mailing List Archives

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

From: dburbano_at_[hidden]
Date: 2002-09-17 14:39:12


I want to send an string and put it in a vector, with the function
MPI_Allgather. How can I do?

The strings are of diferent size.

char ** ArrayString;
size p = 10;
ArrayString = (char **) malloc (p * sizeof (char *));

Or I do my array by this way, but I can :(:

char * ArrayString [10];
char *strings;
int longString;

ArrayString[0]= "house";
ArrayString[1]= "dealer";
...

I use the function:

MPI_Allgather(strings,longString,MPI_CHAR,ArrayString,100,MPI_CHAR,MPI_COMM_WORLD);

so, I need to put together the strings of each process in a vector, in my
case ArrayString, Can some body help me?

Thanks,

Daniel Burbano

My variable is:

_______________________________________________
This list is archived at http://www.lam-mpi.org/MailArchives/lam/