Hi all,
I am a newbie to perl programming and am already loving it.. I have a problem with my code in research and am trying to improve the performance by parallel processing some blocks of code.
I have a perl module where I consecutively process data even though there are not dependent on each other.
For example,
my $i= 4;
.
.
for (my $j=0;$j<$i;++$j )
{
## some statements for variable initializations
open(FH1, "./GraphGen.pm $j $fld stoplist .....## list of arguments##...| ");
}
## block of statements##
Now my problem is that I need to parallel process the GraphGen.pm module since each run is independent but the threads must wait until execution of all the threads are completed since the block of statements called after the completion of the loop depends on the outputs of the GraphGen module of each run.
If I can model this using threads and using threads->join() command, can you please tell me how to do it exactly as I am a little confused after reading the perl thread tutorial.
Thanks in advace!!!
perl really rocks.......... ....
I am a newbie to perl programming and am already loving it.. I have a problem with my code in research and am trying to improve the performance by parallel processing some blocks of code.
I have a perl module where I consecutively process data even though there are not dependent on each other.
For example,
my $i= 4;
.
.
for (my $j=0;$j<$i;++$j )
{
## some statements for variable initializations
open(FH1, "./GraphGen.pm $j $fld stoplist .....## list of arguments##...| ");
}
## block of statements##
Now my problem is that I need to parallel process the GraphGen.pm module since each run is independent but the threads must wait until execution of all the threads are completed since the block of statements called after the completion of the loop depends on the outputs of the GraphGen module of each run.
If I can model this using threads and using threads->join() command, can you please tell me how to do it exactly as I am a little confused after reading the perl thread tutorial.
Thanks in advace!!!
perl really rocks.......... ....
Comment