blib/script/parallelparser.pl untested

filter: Statementstmt 0.0% 0 / 26 Branchbran 0.0% 0 / 12 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 0.0% 0 / 38 SCAR -
1 #!/usr/bin/env perl
2 #===============================================================================
3 #
4 # FILE: mcerunner.pl
5 #
6 # USAGE: ./mcerunner.pl
7 #
8 # DESCRIPTION: Run jobs use MCE
9 #===============================================================================
10  
11 #package Main;
12  
13 my $cmd = "";
14 my $x = 1;
15  
16 foreach $line ( <STDIN> ) {
17 chomp( $line );
18 next unless $line;
19 next unless $line =~ m/\S/;
20 next if $line =~ m/^#/;
21  
22 if($cmd){
23 if($line =~ m/\\$/){
24 $line =~ s/\\$//;
25 $cmd .= $line;
26 next;
27 }
28 else{
29 $cmd .= $line;
30 system("export SEQNUM=$x");
31 print "$cmd\n";
32 $x++;
33 $cmd = "";
34 }
35 }
36 else{
37 if($line =~ m/\\$/){
38 $line =~ s/\\$//;
39 $cmd = $line;
40 next;
41 }
42 else{
43 $cmd = $line;
44 system("export SEQNUM=$x");
45 print "$cmd\n";
46 $x++;
47 $cmd = "";
48 }
49 }
50 }