<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-2022-jp" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18904"></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=453551015-04042010><FONT color=#0000ff
size=2 face=Arial>Make sure you are running it with the mpiexec from the same
MPI implementation that you used to compile the program. Give the full paths to
mpicc and mpiexec and try.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=453551015-04042010><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=453551015-04042010><FONT color=#0000ff
size=2 face=Arial>Rajeev</FONT></SPAN></DIV><BR>
<BLOCKQUOTE
style="BORDER-LEFT: #0000ff 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
<DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> mpich-discuss-bounces@mcs.anl.gov
[mailto:mpich-discuss-bounces@mcs.anl.gov] <B>On Behalf Of
</B>guchonglin-6<BR><B>Sent:</B> Saturday, April 03, 2010 10:20
PM<BR><B>To:</B> mpich-discuss@mcs.anl.gov<BR><B>Subject:</B> [mpich-discuss]
help<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV>
<P>Hello:</P>
<P> Now my problem changes to the
following:</P>
<P> I use the function MPI_Comm_rank anf
MPI_Comm_size。but the reslut is</P>
<P> node1:/usr/cluster # mpiexec -n 2
./d<BR> HELLOWORLD!process0 of 1 on
node1<BR> HELLOWORLD!process0 of 1 on node2</P>
<P> The problem is it should show process0
of 2 on node1 and process 1 of 2 on node2</P>
<P> So,please help me.</P>
<P>The code is the following, so I want to know why like this:</P>
<P>#include <stdio.h><BR>#include "mpi.h"</P>
<P>int main(int argc,char **argv)<BR>{<BR> int
myid,numprocs;<BR> int namelen;<BR> char
processor_name[MPI_MAX_PROCESSOR_NAME];<BR>
MPI_Init(&argc,&argv);<BR> <BR>
MPI_Comm_rank(MPI_COMM_WORLD,&myid);<BR>
MPI_Comm_size(MPI_COMM_WORLD,&numprocs);<BR>
MPI_Get_processor_name(processor_name,&namelen);<BR>
printf("HELLOWORLD!process%d of %d on
%s\n",myid,numprocs,processor_name);<BR> MPI_Finalize();<BR>return
0;<BR>}</P>
<P> Thank you!</P>
<P>
Gugu</P><BR><BR></DIV>
<P><BR><BR><SPAN
title=neteasefooter></SPAN><BR><BR> </P><BR><BR></BLOCKQUOTE><SPAN
title=neteasefooter></SPAN></BODY></HTML>