diff options
author | Miroslav Stoyanov <30537612+mkstoyanov@users.noreply.github.com> | 2020-09-22 15:05:00 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-22 15:05:00 -0400 |
commit | acf4dc2e12df65aab265a6f5a8374cf356b740bd (patch) | |
tree | e103be8a852ef993228d54d977b4f804e3039a43 /var | |
parent | a23d67f7eae4175f86abb754482e1f35dcfd12b5 (diff) | |
download | spack-acf4dc2e12df65aab265a6f5a8374cf356b740bd.tar.gz spack-acf4dc2e12df65aab265a6f5a8374cf356b740bd.tar.bz2 spack-acf4dc2e12df65aab265a6f5a8374cf356b740bd.tar.xz spack-acf4dc2e12df65aab265a6f5a8374cf356b740bd.zip |
Heffte: add magma variant (#18849)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/heffte/package.py | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/var/spack/repos/builtin/packages/heffte/package.py b/var/spack/repos/builtin/packages/heffte/package.py index 45f9b1ee8c..0caabab239 100644 --- a/var/spack/repos/builtin/packages/heffte/package.py +++ b/var/spack/repos/builtin/packages/heffte/package.py @@ -26,27 +26,28 @@ class Heffte(CMakePackage): variant('fftw', default=False, description='Builds with support for FFTW backend') variant('mkl', default=False, description='Builds with support for MKL backend') variant('cuda', default=False, description='Builds with support for GPUs via CUDA') + variant('magma', default=False, description='Use helper methods from the UTK MAGMA library') conflicts('~fftw', when='~mkl~cuda') # requires at least one backend - conflicts('+fftw', when='+mkl') # old API supports at most one CPU backend + conflicts('+fftw', when='+mkl@:1.0') # old API supports at most one CPU backend conflicts('openmpi~cuda', when='+cuda') # +cuda requires CUDA enabled OpenMPI + conflicts('~cuda', when='+magma') # magma requires CUDA or HIP + conflicts('+magma', when="@:1.0") # magma support was added post v1.0 depends_on('mpi', type=('build', 'run')) depends_on('fftw@3.3.8:', when="+fftw", type=('build', 'run')) depends_on('intel@16.0:', when="+mkl", type=('build', 'run')) depends_on('cuda@8.0:', when="+cuda", type=('build', 'run')) + depends_on('magma@2.5.3:', when="+cuda+magma", type=('build', 'run')) def cmake_args(self): return [ - '-DBUILD_SHARED_LIBS={0:1s}'.format( - 'ON' if '+shared' in self.spec else 'OFF'), + self.define_from_variant('BUILD_SHARED_LIBS', 'shared'), + self.define_from_variant('Heffte_ENABLE_CUDA', 'cuda'), + self.define_from_variant('Heffte_ENABLE_FFTW', 'fftw'), + self.define_from_variant('Heffte_ENABLE_MKL', 'mkl'), + self.define_from_variant('Heffte_ENABLE_MAGMA', 'magma'), '-DBUILD_GPU={0:1s}'.format( 'ON' if ('+cuda' in self.spec and - '+fftw' in self.spec) else 'OFF'), - '-DHeffte_ENABLE_CUDA={0:1s}'.format( - 'ON' if '+cuda' in self.spec else 'OFF'), - '-DHeffte_ENABLE_FFTW={0:1s}'.format( - 'ON' if '+fftw' in self.spec else 'OFF'), - '-DHeffte_ENABLE_MKL={0:1s}'.format( - 'ON' if '+mkl' in self.spec else 'OFF'), ] + '+fftw' in self.spec) else 'OFF'), ] |