[mpich-discuss] new problem
guchonglin-6
guchonglin-6 at 163.com
Sat Apr 3 21:59:41 CDT 2010
Hello:
Now my problem changes to the following:
I use the function MPI_Comm_rank anf MPI_Comm_size。but the reslut is
The code is the following, so I want to know why like this:
#include <stdio.h>
#include "mpi.h"
int main(int argc,char **argv)
{
int myid,numprocs;
int namelen;
char processor_name[MPI_MAX_PROCESSOR_NAME];
MPI_Init(&argc,&argv);
MPI_Comm_rank(MPI_COMM_WORLD,&myid);
MPI_Comm_size(MPI_COMM_WORLD,&numprocs);
MPI_Get_processor_name(processor_name,&namelen);
printf("HELLOWORLD!process%d of %d on %s\n",myid,numprocs,processor_name);
MPI_Finalize();
return 0;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20100404/007d248f/attachment.htm>
More information about the mpich-discuss
mailing list