Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Trouble with fork()

by sundialsvc4 (Abbot)
on May 22, 2017 at 21:26 UTC ( [id://1190893]=note: print w/replies, xml ) Need Help??


in reply to Trouble with fork()

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re^2: Trouble with fork()
by phonybone_monk (Initiate) on May 22, 2017 at 22:03 UTC

    I glossed over the initial processing of the file because I didn't think it was relevant to the problem at hand for two reasons, but I'll expand.

    The input file is processed by open-software bio-informatics tools called "bowtie2" and "samtools". They are invoked by use of a system() call, and they write temporary files. All of that seems to work fine.

    After those programs are finished, my program (which I inheritied, btw) does its forking and further processing.

    So here's the funny thing. This program is running successfully on a MacPro with 48Gb of RAM and 24 CPU cores. On my linux box, with 128Gb of RAM and 40 CPU cores, the program fails as I've described. I'm assuming, because of the way that it's failing (some of the child processes die immediately with an error code of 11 (EAGAIN), that I'm running out of some critial resource and my fork is failing. What I can't figure out, and the answer that I'm seeking, is which resource? Is it memory? Swap space? Open file descriptors? Something else? How do I figure this out, other than trial-and-error raising of each limit in turn, which is what I've been trying to do.

    So am I entirely confident my algorithms are correct? Given that they're running just fine on a smaller machine, I'm reasonably confident that they are, and that my problem is somehow related to the number of forks I'm running (one per logical CPU core).

      (some of the child processes die immediately with an error code of 11 (EAGAIN)
      The bottom 7 bits of $? contain the signal number the process died with. 11 is usually a SEGV.

      Dave.

      You should be roughly aware of the per-process memory requirements (size of work). Do you have enough swap to cover it all?

      Is memory overcommit enabled on your linux box? Check it with sysctl vm.overcommit_memory

Re^2: Trouble with fork()
by 1nickt (Canon) on May 22, 2017 at 21:36 UTC

    Sigh. It's beer o'clock in Tennessee, I guess. Isn't there a Facebook that needs you, Mike?


    The way forward always starts with a minimal test.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1190893]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2024-04-23 22:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found