Jump to content
Science Forums

Recommended Posts

Posted

A program I modified and I run on the cluster of my uni goes in error because it uses too much memory.

If I go on the processors calculating for me then I type top I see that it gently grows up to RES=2Gb (i.e %MEM=100%) where the processors shut it down.

Now, I was wondering is there a way to see exactly what it is calculating? I mean top tells me it is running mc_general which is the whole program I'm running so not much help...

Posted

the total footprint of the program. if you want to get more specific and see what exactly is growing, i would gdb the app and see which part of your code is not cleaning up after itself.... i can almost bet that you can stop it from using that much ram if you start dereferencing unused pointers :confused:

 

top just tells you which process is running and how much ram and processor it uses (btw i prefer htop for its coloring features)...

 

if you have problems with seeing all the procs running, like it only shows you user processes, i would sudo it :naughty:

Posted

Well, yes eventually I found those pointers...it was so stupid, there was a function finish() which call a function ridofpointerA() I expanded the program and added a pointerB and a function finish1() which still called ridofpointerA() :eek2:

Took me two days to figure that out!:)

Posted
...i would gdb the app and ...start dereferencing unused pointers...top just tells you ...if you have problems with seeing all the procs running...i would sudo it :)

 

god I love it when you talk dirty

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...