Perl Fork options

B

BryanBBFan

I have an application which uses PBS to allocates 32 nodes on a Linux
Cluster. A Perl script needs to spawn off 100+ completely independent
processes from this job. The Perl use fork to do this. The script
came from a shared memory machine where ther was plenty of memory each
node could access. The system it needs to run on is not a shared
memory system, where each node has its own memory. The problem is
that although 32 nodes have been allocated for this job, each "fork"
spawns off a process on the same node, and therefore runs out of
memory.

My question is: Is there any option to the "fork" command to tell the
child process to go to particular nodes?

Thanks
 
X

xhoster

I have an application which uses PBS to allocates 32 nodes on a Linux
Cluster.

Phosphate Buffered Saline?
A Perl script needs to spawn off 100+ completely independent
processes from this job. The Perl use fork to do this. The script
came from a shared memory machine where ther was plenty of memory each
node could access. The system it needs to run on is not a shared
memory system, where each node has its own memory. The problem is
that although 32 nodes have been allocated for this job, each "fork"
spawns off a process on the same node, and therefore runs out of
memory.

And even if it didn't, wouldn't they all be using the same node's CPU
and not spreading out? Or does "PBS" take care of that (but without
taking care of the memory)?
My question is: Is there any option to the "fork" command to tell the
child process to go to particular nodes?

Perl's fork is basically just a wrapper around the OS's fork, at least
if your OS has a fork.

Do you know how you would accomplish what you want in C or something other
than Perl? If you do and you tell us how you would do it, we might be able
to help you translate that into Perl.

Otherwise, the first thing that comes to my mind is to try system rather
than fork. The second thing that comes to my mind is that when I use
a grid with SunGridEngine I found that the best way was to learn all the
quirks of SGE and then tell SGE I wanted 100 Perl jobs, not tell Perl I
wanted 100 Perl jobs. Maybe SGE is so different from "PBS" that this
answer doesn't port.

Xho

--
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Fork (and exec) in a threaded script. 4
Fork Example 1
fork and hanging 1
fork() & pipe() 3
problem with fork 8
fork process in Unix 0
FAQ 8.36 How do I fork a daemon process? 0
Chatbot 0

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top