<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><BR><BR>
<BLOCKQUOTE style="BORDER-LEFT: rgb(16,16,255) 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px">
<DIV id=yiv1759175984>
<DIV class=yiv1759175984gmail_quote>
<DIV class=yiv1759175984gmail_quote>
<DIV class=yiv1759175984gmail_quote>
<DIV class=yiv1759175984gmail_quote>
<DIV class=yiv1759175984gmail_quote>
<DIV class=yiv1759175984gmail_quote>
<DIV>
<DIV>
<DIV class=yiv1759175984gmail_quote>
<DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 10pt" class=yiv1759175984MsoNormal><FONT face=Calibri><SPAN style="FONT-SIZE: 12pt" lang=EN-US>Dear all,</SPAN><SPAN style="FONT-SIZE: 12pt" lang=EN-US></SPAN></FONT></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 10pt" class=yiv1759175984MsoNormal><SPAN style="FONT-SIZE: 12pt" lang=EN-US>Is MPI developed for Fortran as well as C?</SPAN></DIV>
<DIV>
<DIV></DIV>
<DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 10pt" class=yiv1759175984MsoNormal><SPAN style="FONT-SIZE: 12pt" lang=EN-US>I work on a Fortran project and I want to do massage passing works between nodes with MPI routines. </SPAN><SPAN style="FONT-SIZE: 12pt" lang=EN-US>I was able to send and receive simple arrays but for sending and receiving an array of data type, it did not work. In the attached files I have sent&nbsp;my previous Email that I had sent to MPICH <SPAN style="LINE-HEIGHT: 115%; FONT-SIZE: 11pt" lang=EN-US>Discuss mailing list</SPAN>. In the Email I have reported examination result of an example that I have gotten from Prof. zkovacs. In that Email someone else, also have discussed. Prof. zkovacs had wanted to send and receive an array of data type in C programming language. I want to do similar work in Fortran.</SPAN></DIV>
<DIV>
<DIV></DIV>
<DIV>
<DIV>
<DIV></DIV>
<DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 10pt" class=yiv1759175984MsoNormal><SPAN style="FONT-SIZE: 12pt" lang=EN-US>Please give your opinion or in case that development of MPICH for Fortran is not completed, introduce&nbsp;other implementation of&nbsp;MPI&nbsp;for Fortran.</SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 10pt" class=yiv1759175984MsoNormal><SPAN style="FONT-SIZE: 12pt" lang=EN-US></SPAN><SPAN style="FONT-SIZE: 12pt" lang=EN-US><SPAN style="FONT-SIZE: 12pt" lang=EN-US>Another question. I want to write equivalent code of following C code in Fortran. C code works truly but Fortran code does not. What is the problem?</SPAN></SPAN></DIV><SPAN style="FONT-SIZE: 12pt" lang=EN-US><SPAN style="FONT-SIZE: 12pt" lang=EN-US>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 10pt" class=yiv1759175984MsoNormal><SPAN style="FONT-SIZE: 12pt" lang=EN-US>Attached files contain *.pdf file of previous Email and following example. Also source code files are attached.</SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 10pt" class=yiv1759175984MsoNormal>&nbsp;</DIV></SPAN></SPAN></DIV></DIV></DIV></DIV></DIV></DIV></DIV>
<DIV>
<DIV></DIV>
<DIV>
<DIV>
<DIV></DIV>
<DIV>
<DIV>
<DIV></DIV>
<DIV>
<BLOCKQUOTE style="BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex" class=yiv1759175984gmail_quote>
<DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt" lang=EN-US>#include</SPAN><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US> <SPAN style="COLOR: rgb(163,21,21)">"mpi.h"</SPAN></SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt" lang=EN-US>#include</SPAN><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US> <SPAN style="COLOR: rgb(163,21,21)">&lt;stdio.h&gt;</SPAN></SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt" lang=EN-US>#include</SPAN><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US> <SPAN style="COLOR: rgb(163,21,21)">&lt;stdlib.h&gt;</SPAN></SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US>&nbsp;</SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt" lang=EN-US>int</SPAN><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US> main (<SPAN style="COLOR: blue">int</SPAN> argc, <SPAN style="COLOR: blue">char</SPAN> *argv[])</SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US>{</SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt" lang=EN-US>int</SPAN><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US> position, i, j, a[2], myrank, num_proc;</SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt" lang=EN-US>char</SPAN><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US> buff[1000];</SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US>MPI_Status stat;</SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US>MPI_Init(&amp;argc, &amp;argv);</SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US>MPI_Comm_size(MPI_COMM_WORLD, &amp;num_proc );</SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US>MPI_Comm_rank(MPI_COMM_WORLD, &amp;myrank);</SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt" lang=EN-US>if</SPAN><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US> (myrank == 0)</SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US>{</SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US>/* SENDER CODE */</SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>i = 1; j = 2; a[0] = 3;</SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>printf( <SPAN style="COLOR: rgb(163,21,21)">"Proc %d: sending %u %u %<A href="http://u.th/" rel=nofollow target=_blank>u.th</A> portion to proc 0.\n"</SPAN>, myrank, i, j, a );</SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US>position = 0;</SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US>MPI_Pack(&amp;i, 1, MPI_INT, buff, 1000, &amp;position, MPI_COMM_WORLD);</SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US>MPI_Pack(&amp;j, 1, MPI_INT, buff, 1000, &amp;position, MPI_COMM_WORLD);</SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US>MPI_Send( buff, position, MPI_PACKED, 1, 0, MPI_COMM_WORLD);</SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US>}</SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt" lang=EN-US>else</SPAN><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US> <SPAN style="COLOR: green">/* RECEIVER CODE */</SPAN></SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US>{</SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>MPI_Recv( a, 2, MPI_INT, 0, 0, MPI_COMM_WORLD,&amp;stat);</SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US><SPAN>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN>printf( <SPAN style="COLOR: rgb(163,21,21)">"Proc %d: reciving %u %u %<A href="http://u.th/" rel=nofollow target=_blank>u.th</A> portion to proc 0.\n"</SPAN>, myrank, i, j, a[0] );</SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt">}</SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt">MPI_Finalize();</SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">return</SPAN><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"> 0;</SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt">}</SPAN></DIV>
<DIV style="BORDER-BOTTOM: 1pt solid; BORDER-LEFT: medium none; PADDING-BOTTOM: 1pt; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0cm">
<P style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; BORDER-TOP: medium none; BORDER-RIGHT: medium none; PADDING-TOP: 0cm" class=yiv1759175984MsoNormal><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt">&nbsp;</SPAN></DIV></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><B><SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt" lang=EN-US>&nbsp;</SPAN></B></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><B><SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt" lang=EN-US>program</SPAN></B><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US> main</SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><B><SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt" lang=EN-US>implicit none</SPAN></B><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US></SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><B><SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt" lang=EN-US>include</SPAN></B><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US> <SPAN style="COLOR: maroon">'mpif.h'</SPAN></SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><B><SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt" lang=EN-US>integer</SPAN></B><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US> a(0:1)</SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><B><SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt" lang=EN-US>integer</SPAN></B><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US> position, i, j, a(0:1), rank, numtasks;</SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><B><SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">character</SPAN></B><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"> buff(0:1000);</SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><B><SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt" lang=EN-US>integer</SPAN></B><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US> stat(MPI_STATUS_SIZE)</SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><B><SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt" lang=EN-US>call</SPAN></B><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US> MPI_INIT(ierr)</SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><B><SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt" lang=EN-US>call</SPAN></B><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US> MPI_COMM_RANK(MPI_COMM_WORLD, rank, ierr)</SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><B><SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt" lang=EN-US>call</SPAN></B><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US> MPI_COMM_SIZE(MPI_COMM_WORLD, numtasks, ierr)</SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><B><SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt" lang=EN-US>if</SPAN></B><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US> (rank == 0) <B><SPAN style="COLOR: blue">then</SPAN></B></SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><SPAN style="FONT-FAMILY: Consolas; COLOR: green; FONT-SIZE: 9.5pt" lang=EN-US>!/* SENDER CODE */</SPAN><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US></SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US>position = 0;</SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US>i=1;j=2;</SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><B><SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt" lang=EN-US>CALL</SPAN></B><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US> MPI_Pack(i, 1, MPI_INTEGER, buff, 1000, position, MPI_COMM_WORLD, ierr);</SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><B><SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt" lang=EN-US>CALL</SPAN></B><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US> MPI_Pack(j, 1, MPI_INTEGER, buff, 1000, position, MPI_COMM_WORLD, ierr);</SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><B><SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt" lang=EN-US>CALL</SPAN></B><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US> MPI_Send( buff, position, MPI_PACKED, 1, 0, MPI_COMM_WORLD, ierr);</SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><B><SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt" lang=EN-US>else</SPAN></B><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US> <SPAN style="COLOR: green">!/* RECEIVER CODE */</SPAN></SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><B><SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt" lang=EN-US>CALL</SPAN></B><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US> MPI_Recv( a, 2, MPI_INTEGER, 0, 0, MPI_COMM_WORLD, ierr);</SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US>position = 0;</SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><B><SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt" lang=EN-US>CALL</SPAN></B><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US> MPI_Unpack(a, 2, position, i, 1, MPI_INTEGER, MPI_COMM_WORLD, ierr);</SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><B><SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt" lang=EN-US>CALL</SPAN></B><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US> MPI_Unpack(a, 2, position, j, 1, MPI_INTEGER, MPI_COMM_WORLD, ierr);</SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><B><SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt" lang=EN-US>Write</SPAN></B><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US>(*,*) <SPAN style="COLOR: maroon">'i , j = '</SPAN> , i,j</SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><B><SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt" lang=EN-US>END IF</SPAN></B><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US></SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><B><SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt" lang=EN-US>call</SPAN></B><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt" lang=EN-US> MPI_FINALIZE(ierr)</SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal><B><SPAN style="FONT-FAMILY: Consolas; COLOR: blue; FONT-SIZE: 9.5pt">end</SPAN></B><SPAN style="FONT-FAMILY: Consolas; FONT-SIZE: 9.5pt"> <B><SPAN style="COLOR: blue">program</SPAN></B> main</SPAN></DIV>
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal></DIV>&nbsp; 
<P style="LINE-HEIGHT: normal; MARGIN: 0cm 0cm 0pt" class=yiv1759175984MsoNormal>&nbsp;</DIV></DIV></BLOCKQUOTE></DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV>
<DIV>&nbsp;</DIV>
<DIV>Best Regards,</DIV>
<DIV>-- <BR><FONT size=2><I style="FONT-FAMILY: arial narrow, sans-serif"><B><SPAN style="COLOR: rgb(102,102,102)">Hossein Beyrami </SPAN></B></I></FONT><BR></DIV></DIV></DIV></DIV></DIV></DIV></DIV></BLOCKQUOTE></td></tr></table><br>