From: Alex Gough Date: Mon, 6 Jun 2011 03:45:28 +0000 (+0100) Subject: automatically detect mpicc and use it X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=88973a1551f0b0f1bdecbe6d99473b5bf240b175;p=libparallel-mpi-simple-perl.git automatically detect mpicc and use it --- diff --git a/Makefile.PL b/Makefile.PL index ad78530..b6e60a4 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -7,6 +7,10 @@ use ExtUtils::MakeMaker; print < 'Parallel::MPI::Simple', 'VERSION_FROM' => 'Simple.pm', # finds $VERSION 'PREREQ_PM' => {Storable => 0}, - 'LIBS' => "-lmpi", + 'LIBS' => $libs || "-lmpi", + 'CCFLAGS' => $ccflags || "", ); diff --git a/test.pl b/test.pl index 4832eb3..ea085ff 100644 --- a/test.pl +++ b/test.pl @@ -3,5 +3,8 @@ $incs .= " -I$_" foreach @INC; my @newout = sort { (($a =~ /(\d+)/g)[0] <=> ($b =~ /(\d+)/g)[0]) } `mpirun -np 2 $^X $incs ic.pl`; -print "1..".scalar(@newout)."\n"; +print "1..24"; +if (@newout < 24) { + print "not ok 1 # mpirun failed. Do you need to start mpd?\n"; +} print @newout;