-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzoltan.rb
56 lines (45 loc) · 1.5 KB
/
zoltan.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
class Zoltan < Formula
homepage "http://www.cs.sandia.gov/Zoltan"
url "http://www.cs.sandia.gov/~kddevin/Zoltan_Distributions/zoltan_distrib_v3.81.tar.gz"
sha256 "9d6f2f9e2b37456cab7fe6714d51cd6d613374e915e6cc9f7fddcd72e3f38780"
option "without-check", "Skip build-time tests (not recommended)"
depends_on 'parmetis'
depends_on :fortran
mpilang = [:cc, :cxx, :f90]
depends_on :mpi => mpilang
bottle do
root_url "https://github.com/FluidityProject/homebrew-supportingsoftware/releases/download/v1.0/"
sha256 "7ecf099174c6e0687921605777f2a4c666aa83a1f8e8970678156f2dcc8eae90" => :mavericks
end
fails_with :llvm
fails_with :gcc_4_0
ENV["OMPI_FC"] = ENV["FC"]
def oprefix(f)
Formula[f].opt_prefix
end
def install
ENV.deparallelize
args = [
"--prefix=#{prefix}",
"CC=#{ENV["MPICC"]}",
"CXX=#{ENV["MPICXX"]}",
]
args << "--with-parmetis"
args << "--enable-zoltan-cppdriver"
args << "--enable-mpi"
args << "--with-mpi-compilers=yes"
args << "--with-gnumake"
args << "--enable-zoltan-cppdriver"
args << "--disable-examples"
args << "--with-parmetis-libdir=#{oprefix("parmetis")}/lib/"
args << "--with-parmetis-incdir=#{oprefix("parmetis")}/include"
args << "--enable-f90interface"
args << "FC=#{ENV["MPIFC"]}"
mkdir "zoltan-build" do
system "../configure", *args
system "make", "everything"
system "make", "check" if build.with? "check"
system "make", "install"
end
end
end