[mpich-discuss] Memory issue of MPICH2 when displaying a real array

Jayesh Krishna jayesh at mcs.anl.gov
Tue Oct 14 15:14:12 CDT 2008


Hi,
 Are you running out of memory ? Do you run out of memory when you comment
out WRITE statements (The process manager might have to buffer some of the
stdout before redirecting it to proc with rank=0) ?
 
Regards,
Jayesh

  _____  

From: Yaqi Wang [mailto:yaqiwang at gmail.com] 
Sent: Tuesday, October 14, 2008 2:55 PM
To: Jayesh Krishna
Cc: mpich-discuss at mcs.anl.gov
Subject: Re: [mpich-discuss] Memory issue of MPICH2 when displaying a real
array


Yes, that is an infinite loop. But users can terminate the program at any
time with Control+C provided by the OS.
 
I just want to show the memory cost keeps increasing if the program is not
stopped. Sorry for the confusing.
 
Thanks,
yaqi


On Tue, Oct 14, 2008 at 11:12 AM, Jayesh Krishna <jayesh at mcs.anl.gov>
wrote:


Hi,
 I am not a Fortran expert but what is the exit condition for the while
loop ?
 
=====================================
  do while (.true.) 
     call mpi_display_real_array(myid, a) 
  enddo 

=====================================
 Looks like an infinite loop to me.
 
Regards,
Jayesh
 
 
  _____  

From: owner-mpich-discuss at mcs.anl.gov
[mailto:owner-mpich-discuss at mcs.anl.gov] On Behalf Of Yaqi Wang
Sent: Friday, October 10, 2008 8:28 PM
To: mpich-discuss at mcs.anl.gov
Subject: [mpich-discuss] Memory issue of MPICH2 when displaying a real
array


I am using MPICH2 1.0.7 with Windows XP SP3. The compiler is Intel 
Visual Fortran 10.1. 


I compiled the following code. 
====================== 



program aaa 
  use MPI 
  implicit none 
  integer :: ierr, myid, numprocs 
  integer :: i 
  real(8) :: a(10) 



  ! initialization of MPI 
  CALL MPI_INIT( ierr ) 
  CALL MPI_COMM_RANK( MPI_COMM_WORLD, myid, ierr ) 
  CALL MPI_COMM_SIZE( MPI_COMM_WORLD, numprocs, ierr ) 



  a = 0.0_8 



  do while (.true.) 
     call mpi_display_real_array(myid, a) 
  enddo 



  CALL MPI_FINALIZE(ierr) 
contains 



    SUBROUTINE mpi_display_real_array(myid, num) 
      integer myid 
      REAL(8) :: num(:) 
      WRITE(*,*) myid, num 
      RETURN 
    END SUBROUTINE mpi_display_real_array 
end program aaa 



================== 



And be able to run it with 'mpiexec -n 1 test.exe' on my local 
computer. test.f90 is the name of the source code. Number of 
processors here is irrelavant, I used 1. 



I noticed after running it, the memory cost of the 'smpd' process 
kept increasing, which I did not expect. Anybody knows what I did 
wrong here? 



Thanks. 































































-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20081014/8aee40cb/attachment.htm>


More information about the mpich-discuss mailing list