<commit_before>from spack import *
import os, sys, glob

# Trilinos is complicated to build, as an inspiration a couple of links to other repositories which build it:
# https://github.com/hpcugent/easybuild-easyblocks/blob/master/easybuild/easyblocks/t/trilinos.py#L111
# https://github.com/koecher/candi/blob/master/deal.II-toolchain/packages/trilinos.package
# https://gitlab.com/configurations/cluster-config/blob/master/trilinos.sh
# https://github.com/Homebrew/homebrew-science/blob/master/trilinos.rb
# and some relevant documentation/examples:
# https://trilinos.org/docs/dev/packages/amesos2/doc/html/classAmesos2_1_1MUMPS.html
# https://github.com/trilinos/Trilinos/issues/175
class Trilinos(Package):
    """The Trilinos Project is an effort to develop algorithms and enabling technologies within an object-oriented
    software framework for the solution of large-scale, complex multi-physics engineering and scientific problems.
    A unique design feature of Trilinos is its focus on packages.
    """
    homepage = "https://trilinos.org/"
    url = "http://trilinos.csbsju.edu/download/files/trilinos-12.2.1-Source.tar.gz"

    version('12.6.1', 'adcf2d3aab74cdda98f88fee19cd1442604199b0515ee3da4d80cbe8f37d00e4')
    version('12.4.2', '7c830f7f0f68b8ad324690603baf404e')
    version('12.2.1', '6161926ea247863c690e927687f83be9')
    version('12.0.1', 'bd99741d047471e127b8296b2ec08017')
    version('11.14.3', '2f4f83f8333e4233c57d0f01c4b57426')
    version('11.14.2', 'a43590cf896c677890d75bfe75bc6254')
    version('11.14.1', '40febc57f76668be8b6a77b7607bb67f')

    variant('metis',        default=True,  description='Compile with METIS and ParMETIS')
    variant('mumps',        default=True,  description='Compile with support for MUMPS solvers')
    variant('superlu-dist', default=True,  description='Compile with SuperluDist solvers')
    variant('hypre',        default=True,  description='Compile with Hypre preconditioner')
    variant('hdf5',         default=True,  description='Compile with HDF5')
    variant('suite-sparse', default=True,  description='Compile with SuiteSparse solvers')
    variant('python',       default=True,  description='Build python wrappers')
    variant('shared',       default=True,  description='Enables the build of shared libraries')
    variant('debug',        default=False, description='Builds a debug version of the libraries')

    # Everything should be compiled with -fpic
    depends_on('blas')
    depends_on('lapack')
    depends_on('boost')
    depends_on('matio')
    depends_on('glm')
    depends_on('swig')
    depends_on('metis',when='+metis')
    depends_on('suite-sparse',when='+suite-sparse')

    # MPI related dependencies
    depends_on('mpi')
    depends_on('netcdf+mpi')
    depends_on('parmetis',when='+metis')
    depends_on('mumps@5.0:+mpi+shared',when='+mumps') # Amesos link errors with static: "__gfortran_adjustl", referenced from: _dmumps_ in libdmumps.a(dmumps_driver.o) "_mpi_abort_", referenced from: _mumps_abort_ in libmumps_common.a(tools_common.o)
    depends_on('scalapack',when='+mumps')
    depends_on('superlu-dist',when='+superlu-dist')
    depends_on('hypre~internal-superlu',when='+hypre')
    depends_on('hdf5+mpi',when='+hdf5')

    depends_on('python',when='+python') #  Needs py-numpy activated

    patch('umfpack_from_suitesparse.patch')
<commit_msg>turn off python by default<commit_after>from spack import *
import os, sys, glob

# Trilinos is complicated to build, as an inspiration a couple of links to other repositories which build it:
# https://github.com/hpcugent/easybuild-easyblocks/blob/master/easybuild/easyblocks/t/trilinos.py#L111
# https://github.com/koecher/candi/blob/master/deal.II-toolchain/packages/trilinos.package
# https://gitlab.com/configurations/cluster-config/blob/master/trilinos.sh
# https://github.com/Homebrew/homebrew-science/blob/master/trilinos.rb
# and some relevant documentation/examples:
# https://trilinos.org/docs/dev/packages/amesos2/doc/html/classAmesos2_1_1MUMPS.html
# https://github.com/trilinos/Trilinos/issues/175
class Trilinos(Package):
    """The Trilinos Project is an effort to develop algorithms and enabling technologies within an object-oriented
    software framework for the solution of large-scale, complex multi-physics engineering and scientific problems.
    A unique design feature of Trilinos is its focus on packages.
    """
    homepage = "https://trilinos.org/"
    url = "http://trilinos.csbsju.edu/download/files/trilinos-12.2.1-Source.tar.gz"

    version('12.6.1', 'adcf2d3aab74cdda98f88fee19cd1442604199b0515ee3da4d80cbe8f37d00e4')
    version('12.4.2', '7c830f7f0f68b8ad324690603baf404e')
    version('12.2.1', '6161926ea247863c690e927687f83be9')
    version('12.0.1', 'bd99741d047471e127b8296b2ec08017')
    version('11.14.3', '2f4f83f8333e4233c57d0f01c4b57426')
    version('11.14.2', 'a43590cf896c677890d75bfe75bc6254')
    version('11.14.1', '40febc57f76668be8b6a77b7607bb67f')

    variant('metis',        default=True,  description='Compile with METIS and ParMETIS')
    variant('mumps',        default=True,  description='Compile with support for MUMPS solvers')
    variant('superlu-dist', default=True,  description='Compile with SuperluDist solvers')
    variant('hypre',        default=True,  description='Compile with Hypre preconditioner')
    variant('hdf5',         default=True,  description='Compile with HDF5')
    variant('suite-sparse', default=True,  description='Compile with SuiteSparse solvers')
    # not everyone has py-numpy activated, keep it disabled by default to avoid configure errors
    variant('python',       default=False, description='Build python wrappers')
    variant('shared',       default=True,  description='Enables the build of shared libraries')
    variant('debug',        default=False, description='Builds a debug version of the libraries')

    # Everything should be compiled with -fpic
    depends_on('blas')
    depends_on('lapack')
    depends_on('boost')
    depends_on('matio')
    depends_on('glm')
    depends_on('swig')
    depends_on('metis',when='+metis')
    depends_on('suite-sparse',when='+suite-sparse')

    # MPI related dependencies
    depends_on('mpi')
    depends_on('netcdf+mpi')
    depends_on('parmetis',when='+metis')
    depends_on('mumps@5.0:+mpi+shared',when='+mumps') # Amesos link errors with static: "__gfortran_adjustl", referenced from: _dmumps_ in libdmumps.a(dmumps_driver.o) "_mpi_abort_", referenced from: _mumps_abort_ in libmumps_common.a(tools_common.o)
    depends_on('scalapack',when='+mumps')
    depends_on('superlu-dist',when='+superlu-dist')
    depends_on('hypre~internal-superlu',when='+hypre')
    depends_on('hdf5+mpi',when='+hdf5')

    depends_on('python',when='+python')

    patch('umfpack_from_suitesparse.patch')

{'fraction_non_alphanumeric': 0.12889476778365666, 'fraction_numerical': 0.06437389770723104, 'mean_word_length': 4.927700348432055, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 14, 'lorem ipsum': 0, 'www.': 0, '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': '4622280', 'n_tokens_mistral': 2566, 'n_tokens_neox': 2331, 'n_words': 417}