<div dir="ltr"><div>Yes, that is an infinite loop. But users can terminate the program at any time with Control+C provided by the OS.</div>
<div> </div>
<div>I just want to show the memory cost keeps increasing if the program is not stopped. Sorry for the confusing.</div>
<div> </div>
<div>Thanks,</div>
<div>yaqi<br><br></div>
<div class="gmail_quote">On Tue, Oct 14, 2008 at 11:12 AM, Jayesh Krishna <span dir="ltr"><<a href="mailto:jayesh@mcs.anl.gov">jayesh@mcs.anl.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>
<div dir="ltr" align="left"><font face="Arial" color="#0000ff" size="2"><span>Hi,</span></font></div>
<div dir="ltr" align="left"><font face="Arial" color="#0000ff" size="2"><span> I am not a Fortran expert but what is the exit condition for the while loop ?</span></font></div>
<div dir="ltr" align="left"><font face="Arial" color="#0000ff" size="2"><span></span></font> </div>
<div dir="ltr" align="left"><font face="Arial" color="#0000ff" size="2"><span>=====================================</span></font></div>
<div class="Ih2E3d">
<div dir="ltr" align="left"><font size="+0"><span> do while (.true.) <br> call mpi_display_real_array(myid, a) <br> enddo </span></font></div></div>
<div dir="ltr" align="left"><font size="+0"><span>
<div dir="ltr" align="left"><font face="Arial" color="#0000ff" size="2"><span>=====================================</span></font></div>
<div dir="ltr" align="left"><font face="Arial" color="#0000ff" size="2"><span> Looks like an infinite loop to me.</span></font></div>
<div dir="ltr" align="left"><font face="Arial" color="#0000ff" size="2"><span></span></font><font face="Arial" color="#0000ff" size="2"><span></span></font> </div>
<div dir="ltr" align="left"><font face="Arial" color="#0000ff" size="2"><span>Regards,</span></font></div>
<div dir="ltr" align="left"><font face="Arial" color="#0000ff" size="2"><span>Jayesh</span></font></div></span></font></div>
<div dir="ltr" align="left"><font face="Arial" color="#0000ff" size="2"><span></span></font> </div>
<div dir="ltr" align="left"><font face="Arial" color="#0000ff" size="2"><span> </span></font></div>
<div lang="en-us" dir="ltr" align="left">
<hr>
<font face="Tahoma" size="2"><b>From:</b> <a href="mailto:owner-mpich-discuss@mcs.anl.gov" target="_blank">owner-mpich-discuss@mcs.anl.gov</a> [mailto:<a href="mailto:owner-mpich-discuss@mcs.anl.gov" target="_blank">owner-mpich-discuss@mcs.anl.gov</a>] <b>On Behalf Of </b>Yaqi Wang<br>
<b>Sent:</b> Friday, October 10, 2008 8:28 PM<br><b>To:</b> <a href="mailto:mpich-discuss@mcs.anl.gov" target="_blank">mpich-discuss@mcs.anl.gov</a><br><b>Subject:</b> [mpich-discuss] Memory issue of MPICH2 when displaying a real array<br>
</font><br></div>
<div>
<div></div>
<div class="Wj3C7c">
<div></div>
<div dir="ltr">
<div><a name="11cfc21b221d6111_msg_119703f22a1c428b"></a>I am using MPICH2 1.0.7 with Windows XP SP3. The compiler is Intel <br>Visual Fortran 10.1. <br>
<p>I compiled the following code. <br>====================== <br>
<p>program aaa <br> use MPI <br> implicit none <br> integer :: ierr, myid, numprocs <br> integer :: i <br> real(8) :: a(10) <br>
<p> ! initialization of MPI <br> CALL MPI_INIT( ierr ) <br> CALL MPI_COMM_RANK( MPI_COMM_WORLD, myid, ierr ) <br> CALL MPI_COMM_SIZE( MPI_COMM_WORLD, numprocs, ierr ) <br>
<p> a = 0.0_8 <br>
<p> do while (.true.) <br> call mpi_display_real_array(myid, a) <br> enddo <br>
<p> CALL MPI_FINALIZE(ierr) <br>contains <br>
<p> SUBROUTINE mpi_display_real_array(myid, num) <br> integer myid <br> REAL(8) :: num(:) <br> WRITE(*,*) myid, num <br> RETURN <br> END SUBROUTINE mpi_display_real_array <br>end program aaa <br>
<p>================== <br>
<p>And be able to run it with 'mpiexec -n 1 test.exe' on my local <br>computer. test.f90 is the name of the source code. Number of <br>processors here is irrelavant, I used 1. <br>
<p>I noticed after running it, the memory cost of the 'smpd' process <br>kept increasing, which I did not expect. Anybody knows what I did <br>wrong here? <br>
<p>Thanks. <br></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p></p></p></p></p></p></p></p></p></p></p></div></div></div></div></div></blockquote></div><br></div>