[mpich-discuss] new problem

guchonglin-6 guchonglin-6 at 163.com
Sat Apr 3 21:58:10 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/e2912b74/attachment.htm>


More information about the mpich-discuss mailing list