sources/core/tools/trace_collect/mpiwrap
raw| 1 | #!/usr/bin/perl |
| 2 | |
| 3 | use Getopt::Long; |
| 4 | |
| 5 | |
| 6 | |
| 7 | #Getopt::Long::Configure("gnu_getopt"); |
| 8 | #$GetOptions("n=i" =>\$Numres,"hostfile=s" => \$hostfile,"mca=s"=>\$mca); |
| 9 | |
| 10 | $cont=0; |
| 11 | foreach (@ARGV) |
| 12 | { |
| 13 | #print $_."\n"; |
| 14 | if( -B $_ ){ |
| 15 | if(( -s $_)){ |
| 16 | #print "its binary \n"; |
| 17 | $ind=$cont; |
| 18 | } |
| 19 | } |
| 20 | $cont++; |
| 21 | } |
| 22 | splice(@ARGV,$ind,0,"mpi_trace"); |
| 23 | system("/usr/bin/mpirun @ARGV"); |
| 24 | #print " @ARGV \n"; |
| 25 |