2010-02-26 09:50:15 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class OpenMpi < Formula
|
2011-03-15 19:41:49 +00:00
|
|
|
homepage 'http://www.open-mpi.org/'
|
2013-02-27 12:39:24 +00:00
|
|
|
url 'http://www.open-mpi.org/software/ompi/v1.6/downloads/openmpi-1.6.4.tar.bz2'
|
|
|
|
sha1 '38095d3453519177272f488d5058a98f7ebdbf10'
|
|
|
|
|
|
|
|
devel do
|
2013-02-28 06:55:47 +00:00
|
|
|
url 'http://www.open-mpi.org/software/ompi/v1.7/downloads/openmpi-1.7rc8.tar.bz2'
|
|
|
|
sha1 '38b6f2598a071311ae6f5ccaf13dffd6154ccfff'
|
2013-02-27 12:39:24 +00:00
|
|
|
end
|
2012-05-17 20:57:36 +00:00
|
|
|
|
2013-03-26 05:31:24 +00:00
|
|
|
option 'disable-fortran', 'Do not build the Fortran bindings'
|
|
|
|
option 'test', 'Verify the build with make check'
|
|
|
|
option 'enable-mpi-thread-multiple', 'Enable MPI_THREAD_MULTIPLE'
|
|
|
|
|
|
|
|
conflicts_with 'mpich2', :because => 'both install mpi__ compiler wrappers'
|
|
|
|
|
2012-08-03 06:33:49 +00:00
|
|
|
# Reported upstream at version 1.6, both issues
|
2012-05-17 20:57:36 +00:00
|
|
|
# http://www.open-mpi.org/community/lists/devel/2012/05/11003.php
|
2012-08-03 06:33:49 +00:00
|
|
|
# http://www.open-mpi.org/community/lists/devel/2012/08/11362.php
|
2012-05-17 20:57:36 +00:00
|
|
|
fails_with :clang do
|
2012-08-03 06:33:49 +00:00
|
|
|
build 421
|
2012-10-10 09:22:53 +00:00
|
|
|
cause 'fails make check on Lion and ML'
|
2013-02-27 12:39:24 +00:00
|
|
|
end if not build.devel?
|
2012-05-17 20:57:36 +00:00
|
|
|
|
2010-02-26 09:50:15 +00:00
|
|
|
def install
|
2012-05-17 20:57:36 +00:00
|
|
|
args = %W[
|
|
|
|
--prefix=#{prefix}
|
|
|
|
--disable-dependency-tracking
|
|
|
|
--enable-ipv6
|
|
|
|
]
|
2012-10-21 19:47:53 +00:00
|
|
|
if build.include? 'disable-fortran'
|
2012-05-17 20:57:36 +00:00
|
|
|
args << '--disable-mpi-f77' << '--disable-mpi-f90'
|
|
|
|
else
|
|
|
|
ENV.fortran
|
|
|
|
end
|
2012-06-20 09:58:29 +00:00
|
|
|
|
2013-01-08 15:46:02 +00:00
|
|
|
if build.include? 'enable-mpi-thread-multiple'
|
|
|
|
args << '--enable-mpi-thread-multiple'
|
|
|
|
end
|
|
|
|
|
2012-05-17 20:57:36 +00:00
|
|
|
system './configure', *args
|
2012-12-04 08:26:25 +00:00
|
|
|
system 'make V=1 all'
|
|
|
|
system 'make V=1 check' if build.include? 'test'
|
2012-05-17 20:57:36 +00:00
|
|
|
system 'make install'
|
2012-06-20 09:58:29 +00:00
|
|
|
|
|
|
|
# If Fortran bindings were built, there will be a stray `.mod` file
|
|
|
|
# (Fortran header) in `lib` that needs to be moved to `include`.
|
2012-08-07 18:20:52 +00:00
|
|
|
include.install lib/'mpi.mod' if File.exists? "#{lib}/mpi.mod"
|
2012-06-20 09:58:29 +00:00
|
|
|
|
2012-08-07 18:20:52 +00:00
|
|
|
# Not sure why the wrapped script has a jar extension - adamv
|
|
|
|
libexec.install bin/'vtsetup.jar'
|
|
|
|
bin.write_jar_script libexec/'vtsetup.jar', 'vtsetup.jar'
|
2010-02-26 09:50:15 +00:00
|
|
|
end
|
|
|
|
end
|