<commit_before>class Petsc < Formula
  desc "Scalable solution of models that use partial differential equations"
  homepage "http://www.mcs.anl.gov/petsc/index.html"
  url "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-lite-3.7.3.tar.gz"
  sha256 "7509281536ab7b908ee77ce5e999bb196f1a9e6ac5515f4518e1c3331e27128a"
  revision 3

  head "https://bitbucket.org/petsc/petsc", :using => :git

  bottle do
    sha256 "1fe915cd5e2bd916bcdde5ec0976be4aecb1d3827bfedeaf455187d25b0ff5d9" => :sierra
    sha256 "a2e24274b1360e890fc947fa14e56d7ea37176eddb7e8f6740f0a22d4d9bba7c" => :el_capitan
    sha256 "d55c425717e452ca9857a444c9a105a6d5c43b1bcfbcaee4cbc03326d4547ab9" => :yosemite
  end

  option "without-test", "Skip build-time tests (not recommended)"
  option "with-complex", "Link complex version of PETSc by default."
  option "with-debug", "Build debug version"
  option "with-ml", "Download and build ML (will not symlink if Trilinos is installed)"

  deprecated_option "without-check" => "without-test"
  deprecated_option "complex" => "with-complex"
  deprecated_option "debug"   => "with-debug"

  depends_on :mpi => [:cc, :cxx, :f77, :f90]
  depends_on :fortran
  depends_on :x11 => :optional
  depends_on "cmake" => :build

  depends_on "openblas" => :optional
  openblasdep = (build.with? "openblas") ? ["with-openblas"] : []

  depends_on "superlu"      => [:recommended] + openblasdep
  depends_on "superlu_dist" => [:recommended] + openblasdep
  depends_on "metis"        => :recommended
  depends_on "parmetis"     => :recommended
  depends_on "scalapack"    => [:recommended] + openblasdep
  depends_on "mumps"        => [:recommended] + openblasdep # mumps is built with mpi by default
  depends_on "hypre"        => [:recommended] + openblasdep
  depends_on "sundials"     => [:recommended] + openblasdep
  depends_on "hdf5"         => ["with-mpi", :recommended]
  depends_on "hwloc"        => :recommended
  depends_on "suite-sparse" => [:recommended] + openblasdep
  depends_on "netcdf"       => ["with-fortran", :recommended]
  depends_on "fftw"         => ["with-mpi", "with-fortran", :recommended]

  # TODO: YAML dependencies when the formulae are available

  def oprefix(f)
    Formula[f].opt_prefix
  end

  def install
    ENV.deparallelize

    arch_real="real"<commit_msg>petsc 3.7.4<commit_after>class SundialsNoConflictRequirement < Requirement
  fatal true

  satisfy(:build_env => false) { !Tab.for_name("sundials").with?("petsc") }

  def message; <<-EOS.undent
    Sundials must not be compiled with PETSc support to avoid circular dependency:
      brew uninstall sundials
    This formula will build sundials with appropriate options.
    EOS
  end
end

class Petsc < Formula
  desc "Scalable solution of models that use partial differential equations"
  homepage "http://www.mcs.anl.gov/petsc/index.html"
  url "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-lite-3.7.4.tar.gz"
  sha256 "92aab64b7fd9c8491eefffd4ccebe5c8a0ba90a464e766db453e8fe96fd332e9"

  head "https://bitbucket.org/petsc/petsc", :using => :git

  bottle do
    sha256 "1fe915cd5e2bd916bcdde5ec0976be4aecb1d3827bfedeaf455187d25b0ff5d9" => :sierra
    sha256 "a2e24274b1360e890fc947fa14e56d7ea37176eddb7e8f6740f0a22d4d9bba7c" => :el_capitan
    sha256 "d55c425717e452ca9857a444c9a105a6d5c43b1bcfbcaee4cbc03326d4547ab9" => :yosemite
  end

  option "without-test", "Skip build-time tests (not recommended)"
  option "with-complex", "Link complex version of PETSc by default."
  option "with-debug", "Build debug version"
  option "with-ml", "Download and build ML (will not symlink if Trilinos is installed)"

  deprecated_option "without-check" => "without-test"
  deprecated_option "complex" => "with-complex"
  deprecated_option "debug"   => "with-debug"

  depends_on :mpi => [:cc, :cxx, :f77, :f90]
  depends_on :fortran
  depends_on :x11 => :optional
  depends_on "cmake" => :build

  depends_on "openblas" => :optional
  openblasdep = (build.with? "openblas") ? ["with-openblas"] : []

  depends_on "superlu"      => [:recommended] + openblasdep
  depends_on "superlu_dist" => [:recommended] + openblasdep
  depends_on "metis"        => :recommended
  depends_on "parmetis"     => :recommended
  depends_on "scalapack"    => [:recommended] + openblasdep
  depends_on "mumps"        => [:recommended] + openblasdep # mumps is built with mpi by default
  depends_on "hypre"        => [:recommended] + openblasdep
  depends_on "sundials"     => [:recommended] + openblasdep
  depends_on "hdf5"         => ["with-mpi", :recommended]
  depends_on "hwloc"        => :recommended
  depends_on "suite-sparse" => [:recommended] + openblasdep
  depends_on "netcdf"       => ["with-fortran", :recommended]
  depends_on "fftw"         => ["with-mpi", "with-fortran", :recommended]

  depends_on SundialsNoConflictRequirement if build.with? "sundials"

  # TODO: YAML dependencies when the formulae are available

  def oprefix(f)
    Formula[f].opt_prefix
  end

  def install
    ENV.deparallelize

    arch_real="real"
{'fraction_non_alphanumeric': 0.1184994045256054, 'fraction_numerical': 0.06709011512504963, 'mean_word_length': 4.248958333333333, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 52, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1802829', 'n_tokens_mistral': 2088, 'n_tokens_neox': 1918, 'n_words': 388}