]> git.donarmstrong.com Git - libparallel-mpi-simple-perl.git/blob - test.pl
require libopenpmi-dev
[libparallel-mpi-simple-perl.git] / test.pl
1 my $mpirun = "";
2 foreach my $mpi_try (qw(mpiexec mpirun)) {
3     my $test = join("",`$mpi_try -n 1 perl -e "print qq{honk},qq{honk\n}"`);
4     $mpirun = $mpi_try if $test =~ /honkhonk/;
5     last if $mpirun;
6 }
7 $mpirun = $mpirun || "mpirun"; # fallback
8 my $incs;
9 $incs .= " -I$_" foreach @INC;
10 my @newout = sort {
11     (($a =~ /(\d+)/g)[0] <=> ($b =~ /(\d+)/g)[0])
12 } `$mpirun -np 2 $^X $incs ic.pl`;
13 print "1..26\n";
14 if (@newout < 25) {
15     print "not ok 1 # mpirun failed.  Do you need to start mpd?\n";
16 }
17 print @newout;