summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/spack/docs/build_systems/cudapackage.rst2
-rw-r--r--var/spack/repos/builtin/packages/amgx/package.py2
-rw-r--r--var/spack/repos/builtin/packages/lammps/package.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/spack/docs/build_systems/cudapackage.rst b/lib/spack/docs/build_systems/cudapackage.rst
index b4561c69ed..15150599d3 100644
--- a/lib/spack/docs/build_systems/cudapackage.rst
+++ b/lib/spack/docs/build_systems/cudapackage.rst
@@ -37,7 +37,7 @@ In order to use it, just add another base class to your package, for example:
if '+cuda' in spec:
options.append('-DWITH_CUDA=ON')
cuda_arch = spec.variants['cuda_arch'].value
- if cuda_arch is not None:
+ if cuda_arch != 'none':
options.append('-DCUDA_FLAGS=-arch=sm_{0}'.format(cuda_arch[0]))
else:
options.append('-DWITH_CUDA=OFF')
diff --git a/var/spack/repos/builtin/packages/amgx/package.py b/var/spack/repos/builtin/packages/amgx/package.py
index ece1d67ee2..c03f3599df 100644
--- a/var/spack/repos/builtin/packages/amgx/package.py
+++ b/var/spack/repos/builtin/packages/amgx/package.py
@@ -42,7 +42,7 @@ class Amgx(CMakePackage, CudaPackage):
if '+cuda' in self.spec:
args.append('-DWITH_CUDA=ON')
cuda_arch = self.spec.variants['cuda_arch'].value
- if cuda_arch is not None:
+ if cuda_arch != 'none':
args.append('-DCUDA_ARCH={0}'.format(cuda_arch[0]))
else:
args.append('-DWITH_CUDA=OFF')
diff --git a/var/spack/repos/builtin/packages/lammps/package.py b/var/spack/repos/builtin/packages/lammps/package.py
index 2320cf0050..5bf2986858 100644
--- a/var/spack/repos/builtin/packages/lammps/package.py
+++ b/var/spack/repos/builtin/packages/lammps/package.py
@@ -150,7 +150,7 @@ class Lammps(CMakePackage, CudaPackage):
args.append('-DPKG_GPU=ON')
args.append('-DGPU_API=cuda')
cuda_arch = spec.variants['cuda_arch'].value
- if cuda_arch is not None:
+ if cuda_arch != 'none':
args.append('-DGPU_ARCH=sm_{0}'.format(cuda_arch[0]))
args.append('-DCUDA_MPS_SUPPORT={0}'.format(
'ON' if '+cuda_mps' in spec else 'OFF'))