MPICH memory growth problem.

Geoffrey D. Jacobs jacobsgd21 at BrandonU.CA
Mon Jun 3 10:47:58 PDT 2002


I have a piece of code which goes like this:

<MPI STUFF INITIALIZED HERE>

       real diff(36,72,1000,4),dbuf(1000,4)
       integer p,q,k,tag
       do k=1,10
         do ii=1,MPI_WORLD_SIZE
           call MPI_IRECV(dbuf,4000,MPI_REAL,ii,tag,MPI_COMM_WORLD,REQUEST,CERROR)
           do p=1,36
             do q=1,72
               do ii=1,4000
                 diff(p,q,ii)=diff(p,q,ii)+dbuf
               enddo
             enddo
           enddo
         enddo
       enddo

       real diff(36,72,1000,4),dbuf(1000,4)
       integer p,q,k,tag
<MASTER SIDE>
       do k=1,10
         do p=1,36
           do q=1,72
             do ii=1,MPI_WORLD_SIZE
               call MPI_IRECV(dbuf,4000,MPI_REAL,ii,tag,MPI_COMM_WORLD,REQUEST,CERROR)
               call MPI_WAIT(REQUEST,STATUS,CERROR)
               do ii=1,4000
                 diff(p,q,ii)=diff(p,q,ii)+dbuf
               enddo
             enddo
           enddo
         enddo
       enddo
<SLAVE SIDE>
       do k=1,10
         do p-1,36
           do q=1,72
             <generate diff>
             call MPI_ISEND(diff(p,q),4000,MPI_REAL,0,tag,MPI_COMM_WORLD,REQUEST,CERROR)
           enddo
         enddo
       enddo


Why would this type of code use massive amounts of memory. I've checked 
using debuggers, and the memory use increases only at the call to IRECV, 
only on the master process.  Also, the more slave nodes I use, the 
faster memory use increases.
Does anyone have an idea of what the problem is here, or failing that, 
know any really good (free) memory profilers which will work with an 
mpich program?

thx,
G




More information about the Beowulf mailing list