summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/portage/package.py
diff options
context:
space:
mode:
Diffstat (limited to 'var/spack/repos/builtin/packages/portage/package.py')
-rw-r--r--var/spack/repos/builtin/packages/portage/package.py112
1 files changed, 76 insertions, 36 deletions
diff --git a/var/spack/repos/builtin/packages/portage/package.py b/var/spack/repos/builtin/packages/portage/package.py
index 95c881ae6c..331e4aed48 100644
--- a/var/spack/repos/builtin/packages/portage/package.py
+++ b/var/spack/repos/builtin/packages/portage/package.py
@@ -1,4 +1,4 @@
-# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
+# Copyright 2013-2021 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)
@@ -12,54 +12,94 @@ class Portage(CMakePackage):
to build a highly customized, hybrid parallel (MPI+X) conservative
remapping library for transfer of field data between meshes.
"""
- homepage = "http://portage.lanl.gov/"
+ homepage = "https://portage.lanl.gov/"
git = "https://github.com/laristra/portage.git"
+ url = "https://github.com/laristra/portage/releases/download/3.0.0/portage-3.0.0.tar.gz"
+
+ maintainers = ['raovgarimella']
# tarballs don't have submodules, so use git tags
- version('develop', branch='master', submodules=True)
- version('1.2.2', tag='v1.2.2', submodules=True)
- version('1.1.1', tag='v1.1.1', submodules=True)
- version('1.1.0', tag='v1.1.0', submodules=True)
-
- # fabs() needs math.h for gcc-7, got fixed in
- # versions above 1.2.2
- patch('gcc-7.patch', when='@:1.2.2 %gcc@7:')
- # part of https://github.com/laristra/cinch/commit/f87f848269fac25aa5b8d0bd5d9c9b2d2d6fb0ad
- # fixed in version above 1.2.2
- patch('p_lapacke_config.patch', when='@1.2.2')
- # don't enable debug prints in RelWithDebInfo build
- # fixed in version above 1.2.2
- patch('rel-with-deb-info.patch', when='@1.2.2')
-
- # intel/19.0.4 got an ICE (internal compiler error) compiling pairs.cc
- patch('p_intel_ice.patch', when='@1.2.2')
+ version('3.0.0', sha256='7a5a21ffbc35fa54a5136d937cfda6f836c7496ff2b5adf54deb4107501333da')
+ version('master', branch='master', submodules=True)
variant('mpi', default=True, description='Support MPI')
+ variant('tangram', default=False, description='Use Tangram interface reconstruction package')
+ variant('jali', default=False, description='Include support for Jali mesh framework')
+ variant('flecsisp', default=False, description='Include support for FleCSI mesh framework')
+ variant('thrust', default=False, description='Enable on-node parallelism using NVidia Thrust library')
+ variant('kokkos', default=False, description='Enable on-node or device parallelism with Kokkos')
+ variant('openmp', default=False, description="Enable on-node parallelism using OpenMP")
+ variant('cuda', default=False, description="Enable GPU parallelism using CUDA")
+
+ depends_on("cmake@3.13:", type='build')
- depends_on("cmake@3.1:", type='build')
depends_on('mpi', when='+mpi')
- depends_on('lapack')
- depends_on('boost')
+
+ depends_on('tangram', when='+tangram')
+ depends_on('tangram+mpi', when='+tangram+mpi')
+ depends_on('tangram+jali', when='+tangram+jali')
+ depends_on('tangram+flecsisp', when='+tangram+flecsisp')
+ depends_on('tangram+thrust', when='+tangram+thrust')
+ depends_on('tangram+kokkos', when='+tangram+kokkos')
+ depends_on('tangram+cuda', when='+tangram+cuda')
+
+ depends_on('wonton')
+ depends_on('wonton+mpi', when='+mpi')
+ depends_on('wonton+jali', when='+jali')
+ depends_on('wonton+flecsisp', when='+flecsisp')
+ depends_on('wonton+thrust', when='+thrust')
+ depends_on('wonton+kokkos', when='+kokkos')
+ depends_on('wonton+openmp', when='+openmp')
+ depends_on('wonton+cuda', when='+cuda')
+
+ # Jali needs MPI
+ conflicts('+jali ~mpi')
+
+ # Thrust with CUDA does not work as yet
+ conflicts('+thrust +cuda')
+
+ # Don't enable Kokkos and Thrust simultaneously
+ conflicts('+thrust +kokkos')
def cmake_args(self):
- options = ['-DENABLE_UNIT_TESTS=ON', '-DENABLE_APP_TESTS=ON']
+ options = []
if '+mpi' in self.spec:
- options.extend([
- '-DENABLE_MPI=ON',
- '-DENABLE_MPI_CXX_BINDINGS=ON',
- '-DCMAKE_CXX_COMPILER=%s' % self.spec['mpi'].mpicxx,
- '-DCMAKE_C_COMPILER=%s' % self.spec['mpi'].mpicc,
- ])
+ options.append('-DPORTAGE_ENABLE_MPI=ON')
else:
- options.append('-DENABLE_MPI=OFF')
+ options.append('-DPORTAGE_ENABLE_MPI=OFF')
- options.append('-DBLA_VENDOR=' + self.spec['blas'].name.upper())
- options.append('-DBLAS_LIBRARIES=' + self.spec['blas'].libs.joined())
- options.append('-DLAPACK_LIBRARIES=' +
- self.spec['lapack'].libs.joined())
+ if '+thrust' in self.spec:
+ options.append('-DPORTAGE_ENABLE_THRUST=ON')
+ else:
+ options.append('-DPORTAGE_ENABLE_THRUST=OFF')
- options.append("-DLAPACKE_LIBRARY=" +
- self.spec["lapack:c"].libs.joined(";"))
+ if '+kokkos' in self.spec:
+ options.append('-DPORTAGE_ENABLE_Kokkos=ON')
+ else:
+ options.append('-DPORTAGE_ENABLE_Kokkos=OFF')
+
+ if '+jali' in self.spec:
+ options.append('-DPORTAGE_ENABLE_Jali=ON')
+ else:
+ options.append('-DPORTAGE_ENABLE_Jali=OFF')
+
+ if '+flecsi' in self.spec:
+ options.append('-DPORTAGE_ENABLE_FleCSI=ON')
+ else:
+ options.append('-DPORTAGE_ENABLE_FleCSI=OFF')
+
+ if '+tangram' in self.spec:
+ options.append('-DPORTAGE_ENABLE_TANGRAM=ON')
+ else:
+ options.append('-DPORTAGE_ENABLE_TANGRAM=OFF')
+
+ # Unit test variant
+ if self.run_tests:
+ options.append('-DENABLE_UNIT_TESTS=ON')
+ options.append('-DENABLE_APP_TESTS=ON')
+ else:
+ options.append('-DENABLE_UNIT_TESTS=OFF')
+ options.append('-DENABLE_APP_TESTS=OFF')
return options