<commit_before>from spack import *

class Petsc(Package):
    """PETSc is a suite of data structures and routines for the
       scalable (parallel) solution of scientific applications modeled by
       partial differential equations."""

    homepage = "http://www.mcs.anl.gov/petsc/index.html"
    url      = "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-3.5.3.tar.gz"

    version('3.5.3', 'd4fd2734661e89f18ac6014b5dd1ef2f')
    version('3.5.2', 'ad<PASSWORD>02b3b0<PASSWORD>f<PASSWORD>e<PASSWORD>')
    version('3.5.1', '<PASSWORD>')

    depends_on("boost")
    depends_on("blas")
    depends_on("lapack")
    depends_on("hypre")
    depends_on("parmetis")
    depends_on("metis")
    depends_on("hdf5+mpi")
    depends_on("mpi")

    def install(self, spec, prefix):
        configure("--prefix=%s" % prefix,
                  "CC=cc",
                  "CXX=c++",
                  "FC=f90",
                  "--with-blas-lib=%s/libblas.a"     % spec['blas'].prefix.lib,
                  "--with-lapack-lib=%s/liblapack.a" % spec['lapack'].prefix.lib,
                  "--with-boost-dir=%s"              % spec['boost'].prefix,
                  "--with-hypre-dir=%s"              % spec['hypre'].prefix,
                  "--with-parmetis-dir=%s"           % spec['parmetis'].prefix,
                  "--with-metis-dir=%s"              % spec['metis'].prefix,
                  "--with-hdf5-dir=%s"               % spec['hdf5'].prefix,
                  "--with-shared-libraries=0")

        # PETSc has its own way of doing parallel make.
        make('MAKE_NP=%s' % make_jobs, parallel=False)
        make("install")<commit_msg>Make PETSc build with OpenMPI<commit_after>from spack import *

class Petsc(Package):
    """PETSc is a suite of data structures and routines for the
       scalable (parallel) solution of scientific applications modeled by
       partial differential equations."""

    homepage = "http://www.mcs.anl.gov/petsc/index.html"
    url      = "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-3.5.3.tar.gz"

    version('3.5.3', 'd<PASSWORD>34661e89f18ac6014b5dd1ef2f')
    version('3.5.2', '<PASSWORD>')
    version('3.5.1', 'a557e029711ebf425544e117ffa44d8f')

    depends_on("boost")
    depends_on("blas")
    depends_on("lapack")
    depends_on("hypre")
    depends_on("parmetis")
    depends_on("metis")
    depends_on("hdf5+mpi")
    depends_on("mpi")

    def install(self, spec, prefix):
        configure("--prefix=%s" % prefix,
                  "--with-blas-lib=%s/libblas.a"     % spec['blas'].prefix.lib,
                  "--with-lapack-lib=%s/liblapack.a" % spec['lapack'].prefix.lib,
                  "--with-boost-dir=%s"              % spec['boost'].prefix,
                  "--with-hypre-dir=%s"              % spec['hypre'].prefix,
                  "--with-parmetis-dir=%s"           % spec['parmetis'].prefix,
                  "--with-metis-dir=%s"              % spec['metis'].prefix,
                  "--with-hdf5-dir=%s"               % spec['hdf5'].prefix,
                  "--with-mpi-dir=%s"                % spec['mpi'].prefix,
                  "--with-shared-libraries=0")

        # PETSc has its own way of doing parallel make.
        make('MAKE_NP=%s' % make_jobs, parallel=False)
        make("install")
{'fraction_non_alphanumeric': 0.1673728813559322, 'fraction_numerical': 0.028450363196125907, 'mean_word_length': 2.0127620783956246, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7302578', 'n_tokens_mistral': 1165, 'n_tokens_neox': 1092, 'n_words': 166}