49 lines
1.7 KiB
Ruby
49 lines
1.7 KiB
Ruby
class Hypre < Formula
|
|
desc "Library featuring parallel multigrid methods for grid problems"
|
|
homepage "https://computation.llnl.gov/casc/hypre/software.html"
|
|
url "https://computation.llnl.gov/projects/hypre-scalable-linear-solvers-multigrid-methods/download/hypre-2.11.2.tar.gz"
|
|
sha256 "25b6c1226411593f71bb5cf3891431afaa8c3fd487bdfe4faeeb55c6fdfb269e"
|
|
revision 3
|
|
head "https://github.com/LLNL/hypre.git"
|
|
|
|
bottle do
|
|
cellar :any_skip_relocation
|
|
sha256 "7b0ee7e6a754e583739aa29b055d812a4d77834c0871e38c38f931731c860818" => :high_sierra
|
|
sha256 "1702f97e71696f76192e2be7719020999810984515e777964053c2f6d2541ddb" => :sierra
|
|
sha256 "9f8162b5b6119c7a1015388a054415c5d77fae6cf37a24b4bd58b7e3d0ef885b" => :el_capitan
|
|
end
|
|
|
|
depends_on "gcc" # for gfortran
|
|
depends_on "open-mpi"
|
|
depends_on "veclibfort"
|
|
|
|
def install
|
|
cd "src" do
|
|
ENV["CC"] = ENV["MPICC"]
|
|
ENV["CXX"] = ENV["MPICXX"]
|
|
|
|
system "./configure", "--prefix=#{prefix}",
|
|
"--with-blas=yes",
|
|
"--with-blas-libs=blas cblas",
|
|
"--with-blas-lib-dirs=/usr/lib",
|
|
"--with-lapack=yes",
|
|
"--with-lapack-libs=lapack clapack f77lapack",
|
|
"--with-lapack-lib-dirs=/usr/lib",
|
|
"--with-MPI",
|
|
"--enable-bigint"
|
|
system "make", "install"
|
|
end
|
|
end
|
|
|
|
test do
|
|
(testpath/"test.cpp").write <<~EOS
|
|
#include "HYPRE_struct_ls.h"
|
|
int main(int argc, char* argv[]) {
|
|
HYPRE_StructGrid grid;
|
|
}
|
|
EOS
|
|
|
|
system ENV.cc, "test.cpp", "-o", "test"
|
|
system "./test"
|
|
end
|
|
end
|