summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Loiseau <contact@julien-loiseau.fr>2019-10-31 10:32:54 -0700
committerAdam J. Stewart <ajstewart426@gmail.com>2019-10-31 12:32:54 -0500
commit738f2e14cefb1e35bbc973564343386188ead06d (patch)
tree90022e66601929dd535d93429418c3dd67ed8d9e
parent3d60c3ec10b2aa755f1eceda8c97da9b9fe495f8 (diff)
downloadspack-738f2e14cefb1e35bbc973564343386188ead06d.tar.gz
spack-738f2e14cefb1e35bbc973564343386188ead06d.tar.bz2
spack-738f2e14cefb1e35bbc973564343386188ead06d.tar.xz
spack-738f2e14cefb1e35bbc973564343386188ead06d.zip
MeshToolKit package (#12870)
* Adding flecsph package * Correcting header * Boost version update * Correcting Flake8 errors * Correcting headers * Develop preferred in FleCSI * Removing FleCSPH branch of FleCSI * MeshToolKit package * formatting * Formatting * Correcting MSTK package * Format * Update var/spack/repos/builtin/packages/mstk/package.py Co-Authored-By: Adam J. Stewart <ajstewart426@gmail.com> * Update var/spack/repos/builtin/packages/mstk/package.py Co-Authored-By: Adam J. Stewart <ajstewart426@gmail.com> * Update var/spack/repos/builtin/packages/mstk/package.py Co-Authored-By: Adam J. Stewart <ajstewart426@gmail.com> * Update var/spack/repos/builtin/packages/mstk/package.py Co-Authored-By: Adam J. Stewart <ajstewart426@gmail.com> * Update var/spack/repos/builtin/packages/mstk/package.py Co-Authored-By: Adam J. Stewart <ajstewart426@gmail.com> * Update var/spack/repos/builtin/packages/mstk/package.py Co-Authored-By: Adam J. Stewart <ajstewart426@gmail.com> * Update var/spack/repos/builtin/packages/mstk/package.py Co-Authored-By: Adam J. Stewart <ajstewart426@gmail.com> * Update var/spack/repos/builtin/packages/mstk/package.py Co-Authored-By: Adam J. Stewart <ajstewart426@gmail.com> * Update var/spack/repos/builtin/packages/mstk/package.py Co-Authored-By: Adam J. Stewart <ajstewart426@gmail.com> * Update var/spack/repos/builtin/packages/mstk/package.py Co-Authored-By: Adam J. Stewart <ajstewart426@gmail.com> * Update package.py * Format * Format * Correcting package behavior * Correcting format * Corrections * Update var/spack/repos/builtin/packages/mstk/package.py Co-Authored-By: Adam J. Stewart <ajstewart426@gmail.com> * Multiline
-rw-r--r--var/spack/repos/builtin/packages/mstk/package.py93
1 files changed, 93 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/mstk/package.py b/var/spack/repos/builtin/packages/mstk/package.py
new file mode 100644
index 0000000000..53c3d3333b
--- /dev/null
+++ b/var/spack/repos/builtin/packages/mstk/package.py
@@ -0,0 +1,93 @@
+# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+from spack import *
+
+
+class Mstk(CMakePackage):
+ """MSTK is a mesh framework that allows users to represent,
+ manipulate and query unstructured 3D arbitrary topology meshes
+ in a general manner without the need to code their own data
+ structures. MSTK is a flexible framework in that it allows a
+ variety of underlying representations for the mesh while
+ maintaining a common interface. It allows users to choose from
+ different mesh representations either at initialization (implemented)
+ or during the program execution (not yet implemented) so that the
+ optimal data structures are used for the particular algorithm.
+ The interaction of users and applications with MSTK is through a
+ functional interface that acts as though the mesh always contains
+ vertices, edges, faces and regions and maintains connectivity between
+ all these entities."""
+
+ homepage = "https://github.com/MeshToolkit/MSTK"
+ git = "https://github.com/MeshToolkit/MSTK"
+
+ maintainers = ['julienloiseau']
+
+ version('master', branch='master')
+
+ variant('parallel', default='none', description='Enable Parallel Support',
+ values=('none', 'metis', 'zoltan', 'parmetis'), multi=True)
+ variant('exodusii', default=False, description='Enable ExodusII')
+ variant('use_markers', default=True, description="Enable MSTK to use markers")
+
+ depends_on("cmake@3.8:", type='build')
+
+ # Parallel variant
+ depends_on("mpi", when='parallel=metis')
+ depends_on("mpi", when='parallel=zoltan')
+ depends_on("mpi", when='parallel=parmetis')
+ depends_on("zoltan -fortran", when='parallel=zoltan')
+ depends_on("zoltan -fortran +parmetis", when='parallel=parmetis')
+ depends_on("zoltan -fortran +parmetis", when="parallel=zoltan +exodusii")
+ depends_on("metis", when="parallel=zoltan +exodusii")
+
+ depends_on("metis", when='parallel=metis')
+ depends_on("metis", when='parallel=parmetis')
+
+ # Exodusii variant
+ # The default exodusii build with mpi support
+ # It includes netcdf which includes hdf5
+ depends_on("exodusii", when='+exodusii')
+
+ def cmake_args(self):
+ options = []
+ if '+use_markers' in self.spec:
+ options.append('-DMSTK_USE_MARKERS=ON')
+ else:
+ options.append('-DMSTK_USE_MARKERS=OFF')
+
+ # Parallel variant
+ if not self.spec.satisfies('parallel=none'):
+ # Use mpi for compilation
+ options.append('-DCMAKE_CXX_COMPILER=' + self.spec['mpi'].mpicxx)
+ options.append('-DCMAKE_C_COMPILER=' + self.spec['mpi'].mpicc)
+ options.append('-DENABLE_PARALLEL=ON')
+ else:
+ options.append('-DENABLE_PARALLEL=OFF')
+
+ if ("parmetis" in self.spec or "zoltan" in self.spec and
+ "+exodusii" in self.spec):
+ options.append("-DENABLE_METIS=ON")
+ options.append("-DENABLE_ZOLTAN=ON")
+ options.append('-DZOLTAN_NEEDS_ParMETIS=ON')
+ else:
+ if "zoltan" in self.spec:
+ options.append("-DENABLE_ZOLTAN=ON")
+ else:
+ options.append("-DENABLE_ZOLTAN=OFF")
+ if "metis" in self.spec:
+ options.append("-DENABLE_METIS=ON")
+ else:
+ options.append("-DENABLE_METIS=OFF")
+ options.append('-DZOLTAN_NEEDS_ParMETIS=OFF')
+
+ # ExodusII variant
+ if '+exodusii' in self.spec:
+ options.append('-DENABLE_ExodusII=ON')
+ else:
+ options.append('-DENABLE_ExodusII=OFF')
+
+ return options