From d343f2fb233e5b2e3c29373295dcc05cf8246e2e Mon Sep 17 00:00:00 2001 From: Alex Gough Date: Mon, 6 Jun 2011 05:29:12 +0100 Subject: [PATCH] fail quietly on systems we cannot run on top of --- Makefile.PL | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Makefile.PL b/Makefile.PL index b6e60a4..20a85d5 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -20,6 +20,14 @@ Also, this module is very new so if you manage to get it working on one of the systems not listed in INSTALL I'd love to hear about it. ENDOFMESSAGE +# do we have mpirun? +my $test = join("",`mpirun -n 1 echo test`); +if ($! =~ /No such file or directory/ && !$ENV{FORCE_MPIRUN}) { + print STDERR "Failed to run `mpirun -n 1 echo test`: $!\n"; + print STDERR "It looks like you don't have mpi installed, re-run build with env: FORCE_MPIRUN=1 to ignore\n"; + exit(0); +} + my ($libs, $ccflags) = ("", ""); # try to get this information from mpicc, should quietly fail if not { -- 2.39.5