summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Duckworth <quackmaster@protonmail.com>2017-12-13 13:30:38 -0500
committerscheibelp <scheibel1@llnl.gov>2017-12-13 10:30:38 -0800
commit5a66065dfaf9a68303cf05d70ea323848506af34 (patch)
tree86a9f7032a5c554f830e869916458819f7cd1a09
parentc0aa12111befbc6a5779be6a0111f7b80027082d (diff)
downloadspack-5a66065dfaf9a68303cf05d70ea323848506af34.tar.gz
spack-5a66065dfaf9a68303cf05d70ea323848506af34.tar.bz2
spack-5a66065dfaf9a68303cf05d70ea323848506af34.tar.xz
spack-5a66065dfaf9a68303cf05d70ea323848506af34.zip
relion: add version and cuda arch variant (#6317)
Add preferred version 2.0.3. Added beta version. Added conflict with gcc versions >= 5 when building with cuda@8 (which is currently the only supported cuda version). Added cuda architecture variant. Added comment about current lack of cuda@9 support.
-rw-r--r--var/spack/repos/builtin/packages/relion/package.py21
1 files changed, 20 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/relion/package.py b/var/spack/repos/builtin/packages/relion/package.py
index 16f5c35726..c20d2637a6 100644
--- a/var/spack/repos/builtin/packages/relion/package.py
+++ b/var/spack/repos/builtin/packages/relion/package.py
@@ -34,10 +34,19 @@ class Relion(CMakePackage):
homepage = "http://http://www2.mrc-lmb.cam.ac.uk/relion"
url = "https://github.com/3dem/relion"
+ version('2.1-beta-1', git='https://github.com/3dem/relion.git',
+ commit='e7607a869687b636d3c39e0d5b6a9cba930fc3b2')
+ version('2.0.3', git='https://github.com/3dem/relion.git',
+ preferred='true')
+
version('develop', git='https://github.com/3dem/relion.git')
variant('gui', default=True, description="build the gui")
variant('cuda', default=True, description="enable compute on gpu")
+ variant('cuda_arch', default=None, description='CUDA architecture',
+ values=('20', '30', '32', '35', '50', '52', '53', '60', '61', '62'
+ '70'),
+ multi=True)
variant('double', default=True, description="double precision (cpu) code")
variant('double-gpu', default=False, description="double precision (gpu) code")
variant('build_type', default='RelWithDebInfo',
@@ -48,7 +57,11 @@ class Relion(CMakePackage):
depends_on('mpi')
depends_on('fftw+float+double')
depends_on('fltk', when='+gui')
+ # cuda 9 not yet supported
+ # https://github.com/3dem/relion/issues/296
depends_on('cuda@8.0:8.99', when='+cuda')
+ # use gcc < 5 when compiled with cuda 8
+ conflicts('%gcc@5:', when='+cuda')
def cmake_args(self):
args = [
@@ -61,6 +74,12 @@ class Relion(CMakePackage):
if '+cuda' in self.spec:
args += [
'-DCUDA=on',
- '-DCUFFT=on',
+ ]
+
+ carch = self.spec.variants['cuda_arch'].value
+
+ if carch is not None:
+ args += [
+ '-DCUDA_ARCH=%s' % (carch),
]
return args