summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorMiroslav Stoyanov <30537612+mkstoyanov@users.noreply.github.com>2018-07-27 11:10:32 -0400
committerAdam J. Stewart <ajstewart426@gmail.com>2018-07-27 10:10:32 -0500
commit71f85cff2c7198faf7916bc9fa3f05891d0a5787 (patch)
tree448b9df152a4df511cdd21fe80c5eb80ffd61dde /var
parent440a5fbfcb432e294d75eb34e173aa13e1710e29 (diff)
downloadspack-71f85cff2c7198faf7916bc9fa3f05891d0a5787.tar.gz
spack-71f85cff2c7198faf7916bc9fa3f05891d0a5787.tar.bz2
spack-71f85cff2c7198faf7916bc9fa3f05891d0a5787.tar.xz
spack-71f85cff2c7198faf7916bc9fa3f05891d0a5787.zip
added Tasmanian versions 5.1 and development, enabled the Tasmanian options through +~ flags (#8804)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/tasmanian/package.py93
1 files changed, 90 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/tasmanian/package.py b/var/spack/repos/builtin/packages/tasmanian/package.py
index a01781ad7d..71ea84d502 100644
--- a/var/spack/repos/builtin/packages/tasmanian/package.py
+++ b/var/spack/repos/builtin/packages/tasmanian/package.py
@@ -30,7 +30,94 @@ class Tasmanian(CMakePackage):
ApproximatioN is a robust library for high dimensional integration and
interpolation as well as parameter calibration."""
- homepage = "http://tasmanian.ornl.gov"
- url = "http://tasmanian.ornl.gov/documents/Tasmanian_v5.0.zip"
+ homepage = 'http://tasmanian.ornl.gov'
+ url = 'https://github.com/ORNL/TASMANIAN/archive/v5.1.tar.gz'
+ git = 'https://github.com/ORNL/TASMANIAN.git'
- version('5.0', '4bf131841d786033863d271739be0f7a')
+ version('xsdk-0.3.0', branch='master')
+ version('develop', branch='master')
+
+ version('5.1', '5d904029a24470a6acf4a87d3339846e')
+
+ version('5.0', '4bf131841d786033863d271739be0f7a',
+ url='http://tasmanian.ornl.gov/documents/Tasmanian_v5.0.zip')
+
+ variant('xsdkflags', default=False,
+ description='enable XSDK defaults for Tasmanian')
+
+ variant('openmp', default=True,
+ description='add OpenMP support to Tasmanian')
+ # tested with OpenMP 3.1 (clang4) through 4.0-4.5 (gcc 5 - 8)
+
+ variant('blas', default=False,
+ description='add BLAS support to Tasmanian')
+
+ variant('mpi', default=False,
+ description='add MPI support to Tasmanian')
+
+ variant('cuda', default=False,
+ description='add CUDA support to Tasmanian')
+
+ variant('magma', default=False,
+ description='add UTK MAGMA support to Tasmanian')
+
+ variant('python', default=False,
+ description='add Python binding for Tasmanian')
+
+ depends_on('cmake@3.5.0:', type='build')
+
+ depends_on('python@2.7:', when='+python', type=('build', 'run'))
+ depends_on('py-numpy', when='+python', type=('build', 'run'))
+
+ extends('python', when='+python')
+
+ depends_on('mpi', when="+mpi") # openmpi 2 and 3 tested
+
+ depends_on('blas', when="+blas") # openblas 0.2.18 or newer
+
+ depends_on('cuda@9.1', when='+cuda', type=('build', 'run'))
+ depends_on('cuda@9.1', when='+magma', type=('build', 'run'))
+
+ depends_on('magma@2.3.0', when='+magma', type=('build', 'run'))
+
+ def cmake_args(self):
+ spec = self.spec
+
+ if '+xsdkflags' in spec:
+ args = [
+ '-DUSE_XSDK_DEFAULTS:BOOL=ON',
+ '-DXSDK_ENABLE_PYTHON:BOOL={0}'.format(
+ 'ON' if '+python' in spec else 'OFF'),
+ '-DTasmanian_ENABLE_MPI:BOOL={0}'.format(
+ 'ON' if '+mpi' in spec else 'OFF'),
+ '-DXSDK_ENABLE_OPENMP:BOOL={0}'.format(
+ 'ON' if '+openmp' in spec else 'OFF'),
+ '-DTPL_ENABLE_BLAS:BOOL={0}'.format(
+ 'ON' if '+blas' in spec else 'OFF'),
+ '-DXSDK_ENABLE_CUDA:BOOL={0}'.format(
+ 'ON' if '+cuda' in spec else 'OFF'),
+ '-DXSDK_ENABLE_CUDA:BOOL={0}'.format(
+ 'ON' if '+magma' in spec else 'OFF'),
+ '-DTPL_ENABLE_MAGMA:BOOL={0}'.format(
+ 'ON' if '+magma' in spec else 'OFF'), ]
+ else:
+ args = [
+ '-DTasmanian_ENABLE_OPENMP:BOOL={0}'.format(
+ 'ON' if '+openmp' in spec else 'OFF'),
+ '-DTasmanian_ENABLE_BLAS:BOOL={0}'.format(
+ 'ON' if '+blas' in spec else 'OFF'),
+ '-DTasmanian_ENABLE_PYTHON:BOOL={0}'.format(
+ 'ON' if '+python' in spec else 'OFF'),
+ '-DTasmanian_ENABLE_MPI:BOOL={0}'.format(
+ 'ON' if '+mpi' in spec else 'OFF'),
+ '-DTasmanian_ENABLE_CUDA:BOOL={0}'.format(
+ 'ON' if '+cuda' in spec else 'OFF'),
+ '-DTasmanian_ENABLE_CUDA:BOOL={0}'.format(
+ 'ON' if '+magma' in spec else 'OFF'),
+ '-DTasmanian_ENABLE_MAGMA:BOOL={0}'.format(
+ 'ON' if '+magma' in spec else 'OFF'), ]
+
+ if spec.satisfies('+python'):
+ args.append('-DPYTHON_EXECUTABLE:FILEPATH={0}'.format(
+ self.spec['python'].command.path))
+ return args