Newsgroups: comp.parallel.pvm
From: jking@cv.HP.COM (Jonathan King)
Subject: fr_new memory error
Organization: Hewlett-Packard Company, Corvallis, OR
Date: Mon, 21 Aug 1995 23:47:35 GMT
Message-ID: <DDoq3B.J8y@hpcvsnz.cv.hp.com>

I posted a message last week detailing by problems with fr_new.  Namely, after running for a couple of days, my PVM app crashes unable to fr_new any additional memory.  I want to thank those who responded with suggestions, I did try them all.  Most suggested that I probably had unreceived messages that slowly accumulated, and never freed.  I have verified (by installing counters, and by performing a barrier at the beginning of each new iteration, and ensuring that there are no pending messages) that all me
ssages sent are received.  So that can't be the problem.  Since I was first using psend and precv, to avoid having to pack all the bytes, I also tried changing to send and recv, to no avail.  Finally, it was suggested that I try using PvmRouteDirect, which also didn't work.  Stumped again am I.

I'm wondering if I have a basic conceptual misunderstanding of how and when PVM frees it's memory buffers, and am hoping that someone who knows more can post a nice description for me.  I was under the impression that PVM allocated a buffer for each message, and that once that message was received, the memory was freed.  The manual includes a description of PVM's databuf struct, but I don't see any reason why these databufs wouldn't be freed.  I assumed, however, that the refcount field implied how many re
ceives need to happen on that message before it can be freed.  So in a mcast, where two logical processors reside on the same physical processor, refcount would be 2.  Is this wrong?  Am I "on the right page" or totally lost?  I don't need to do anything special (read, another function call) to free the PVM's memory, do I?  Any other reason the databufs might be hanging around?

Finally, anybody know of a function or program that will tell you how much memory your process(s) are consuming?  It would be interesting to print used memory each iteration, and see if it grows slowly over time, and whether or not it is being consumed by my user process or pvmd.

Thanks again,
Jon King
 

