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

Gib Bogle g.bogle at auckland.ac.nz
Tue Oct 14 15:51:20 CDT 2008


What happens to the memory usage if the loop is executed a large but  
finite number of times? e.g.

do k = 1,100
    call mpi_display_real_array(myid, a)
enddo


Quoting Yaqi Wang <yaqiwang at gmail.com>:

> 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.
>>
>>
>



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.




More information about the mpich-discuss mailing list