Problems? Is your data what you think it is? | |
PerlMonks |
Parallel system callsby nikhil150585 (Initiate) |
on Sep 26, 2011 at 21:53 UTC ( [id://927961]=perlquestion: print w/replies, xml ) | Need Help?? |
nikhil150585 has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I have around 2000 system calls to execute. I want to execute 50 of these parallely at once and then wait on any of these to finish and then start the next one. In a way, I should see 50 system calls executing on my system at any given time. I have tried using the fork spawning 8 process, each process executing one system call on my local machine at once and then use wait() function to wait on any of these process to get completed before forking/spawning the next one. This worked fine for me, but now I am running the same on the grid of machines where I am trying to fork 50 parallel process, and I am seeing now that more than one process can complete at a single time. so if let's say two process complete at the same time, I come out of wait() and fork a single process. I am seeing that the number of process that I am executing at some later point of time is less than 50. Can you please help me, to keep the number of process/system calls constant to what I define. Thanks, Nikhil
Back to
Seekers of Perl Wisdom
|
|