2012-02-16 16:26:16 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Mpich2 < Formula
|
|
|
|
homepage 'http://www.mcs.anl.gov/research/projects/mpich2/index.php'
|
|
|
|
url 'http://www.mcs.anl.gov/research/projects/mpich2/downloads/tarballs/1.4.1p1/mpich2-1.4.1p1.tar.gz'
|
|
|
|
version '1.4.1p1'
|
|
|
|
md5 'b470666749bcb4a0449a072a18e2c204'
|
|
|
|
|
2012-05-17 18:29:38 +00:00
|
|
|
def options
|
|
|
|
[
|
|
|
|
['--disable-fortran', "Do not attempt to build Fortran bindings"],
|
|
|
|
]
|
|
|
|
end
|
|
|
|
|
2012-02-16 16:26:16 +00:00
|
|
|
def install
|
2012-05-17 18:29:38 +00:00
|
|
|
args = [
|
|
|
|
"--prefix=#{prefix}",
|
|
|
|
"--mandir=#{man}",
|
|
|
|
"--enable-shared"
|
|
|
|
]
|
|
|
|
if ARGV.include? '--disable-fortran'
|
|
|
|
args << "--disable-f77" << "--disable-fc"
|
|
|
|
else
|
|
|
|
ENV.fortran
|
|
|
|
end
|
|
|
|
|
|
|
|
system "./configure", *args
|
2012-02-16 16:26:16 +00:00
|
|
|
system "make"
|
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
|
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
Please be aware that installing this formula along with the OpenMPI
|
|
|
|
formula will cause neither MPI installation to work correctly as
|
|
|
|
both packages install their own versions of mpicc/mpicxx and mpirun.
|
|
|
|
EOS
|
|
|
|
end
|
2012-05-17 23:05:49 +00:00
|
|
|
|
|
|
|
def test
|
|
|
|
# a better test would be to build and run a small MPI program
|
|
|
|
system "#{bin}/mpicc", "-show"
|
|
|
|
end
|
2012-02-16 16:26:16 +00:00
|
|
|
end
|