in reply to Re: My First POE - Simple Parallel Programming
in thread My First POE - Simple Parallel Programming

However, unless you have multiple CPUs, that will not run any faster than simply doing the two sequentially.
Dear BrowserUK,
Indeed using threads is much simpler than POE. Thanks for introducing it to me. BTW does the forking feature of that code above automatically take effect if I run that code of yours in a Linux Cluster?

I mean I have a Linux Cluster with 40 CPUs. Can I run your code above with the forking effect just by saving this in bash script (let's call it my_bash.sh):
perl junk6.pl
Then run it the following way with qsub command:
my_home_node $ qsub my_bash.sh
It will submit the job into a particular node of the 40 CPUs. Or is there any other way to do it?

Regards,
Edward

Replies are listed 'Best First'.
Re^3: My First POE - Simple Parallel Programming
by BrowserUk (Patriarch) on Feb 03, 2006 at 20:06 UTC

    No it won't. Had you mentioned clustering in your OP I would not have offered a threaded solution.

    That said, a clustering solution based around threads would be far simpler to both implement and use, but I do not have one to offer you so for your situation, POE is the right (only) Perl solution.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.