Re: residue_rmsd.tcl segmentation fault

From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Fri Apr 04 2014 - 03:03:55 CDT

On Fri, Apr 4, 2014 at 3:53 AM, Norman Geist <norman.geist_at_uni-greifswald.de
> wrote:

> Hi john,
>
>
>
> unfortunately you can't use swap like additional memory. The system will
> kill processes for being that hungry for memory as swap is only useful to
> swap out inactive pages. Additionally if the tcl script contains "exec",
> you got another problem as TCL does need to
>

if you are willing to live with a massive performance drop, then you *can*
use swap like RAM. if you put swap space on a RAID-0 made from SSDs, the
performance drop is not that massive at all and when you have exploited the
maximum RAM capacity of a mainboard, this may be the only option without
having to go for an extremely expensive option.

> fork() to "exec" which duplicates the memory of the parent process. You
> might want to reduce the number of frames, a stride of 2 can already half
> the memory usage.
>

that is not quite true. on Linux allocated memory is generally flagged as
copy-on-write, thus a fork will not cost you that much unless you modify
that RAM.

axel.

>
>
> PS: Are you sure that this question is NAMD related?
>
>
>
> Norman Geist.
>
>
>
> *Von:* owner-namd-l_at_ks.uiuc.edu [mailto:owner-namd-l_at_ks.uiuc.edu] *Im
> Auftrag von *John Xi
> *Gesendet:* Freitag, 4. April 2014 04:49
> *An:* namd-l_at_ks.uiuc.edu
> *Betreff:* namd-l: residue_rmsd.tcl segmentation fault
>
>
>
> Hi,
>
>
>
> I am getting segmentation fault running residue-rmsd.tcl script on a 5.2GB
> dcd file on a Linux box. After some googling, I feel it may be related to
> system memory issue as suggested previously . Our system has only 4GB of
> memory and 2GB of swap space. So 2GB more swap space was added to the
> system. And the output from free command is as following:
>
>
>
> total used free shared buffers
> cached
>
> Mem: 3838388 109476 3728912 0 2176 29400
>
> -/+ buffers/cache: 77900 3760488
>
> Swap: 4088204 263952 3824252
>
>
>
> So, about 7.5GB of memory could be available for the system.
>
>
>
> When the script was run, same problem Segmentation fault came out.
>
>
>
> To try to figure out what causes this problem, I monitored the memory
> usage of system during the reading of dcd file. When the memory was down
> to ~20MB, the swap space was called on. I did see the drop of swap space,
> but only by ~0.2GB, then the segmentation fault came out. The output from
> free command right before the problem is as following:
>
>
>
> total used free shared buffers
> cached
>
> Mem: 3838388 3817844 20544 0 712 25260
>
> -/+ buffers/cache: 3791872 46516
>
> Swap: 4088204 429500 3658704
>
>
>
> This seems to suggest the system works fine and the memory for this
> particular run should be enough (7.5GB vs 5.2GB). Given the exact same
> script works fine on a 3.2GB dcd file, I have no idea what could be wrong.
> Can somebody help me out?
>
>
>
> Thanks,
>
>
>
> John
>
>
>
>
> ------------------------------
> <http://www.avast.com/>
>
> Diese E-Mail ist frei von Viren und Malware, denn der avast! Antivirus<http://www.avast.com/>Schutz ist aktiv.
>
>

-- 
Dr. Axel Kohlmeyer  akohlmey_at_gmail.com  http://goo.gl/1wk0
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.

This archive was generated by hypermail 2.1.6 : Wed Dec 31 2014 - 23:22:17 CST