summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrus Harrison <cyrush@llnl.gov>2019-11-17 12:36:14 -0700
committerAdam J. Stewart <ajstewart426@gmail.com>2019-11-17 12:36:14 -0700
commitd3c1547dbaee2f9cc08b60b4cab244c5d8fe5f79 (patch)
tree7e78ba2de48c8e41dbfc52d1b900334b403beaf5
parent02f27fc45d7dd016b5c764a808d6ffce413d54bb (diff)
downloadspack-d3c1547dbaee2f9cc08b60b4cab244c5d8fe5f79.tar.gz
spack-d3c1547dbaee2f9cc08b60b4cab244c5d8fe5f79.tar.bz2
spack-d3c1547dbaee2f9cc08b60b4cab244c5d8fe5f79.tar.xz
spack-d3c1547dbaee2f9cc08b60b4cab244c5d8fe5f79.zip
update to add ascent 0.5.0 release (#13709)
* fix metis src dl url * update ascent, vtk-h and vtk-m recipes * update conduit package * fix vtk-m shas * mfem conduit fix * use vtk-h develop * fix issue with stripped include paths in mfem * more metis fixes * simpler fix for mfem conduit include issue * finish mfem changes * pin to cmake 3.14, since we hit cuda issues with 3.15 * add rtd theme as dep for ascent * add vtk-h 0.5.0 release, update ascent to use it * add ascent 0.5.0 release * fix cmake pin to allow all vers of 3.14 * fix format string error in mfem pkg * review fixes for mfem pkg * review fixes for vtk-h and vtk-m packages * address review comments for ascent pkg * changing default off of develop broke downstream use * revert prefed
-rw-r--r--var/spack/repos/builtin/packages/ascent/package.py61
-rw-r--r--var/spack/repos/builtin/packages/conduit/package.py2
-rw-r--r--var/spack/repos/builtin/packages/metis/package.py19
-rw-r--r--var/spack/repos/builtin/packages/mfem/package.py29
-rw-r--r--var/spack/repos/builtin/packages/vtk-h/package.py105
-rw-r--r--var/spack/repos/builtin/packages/vtk-m/package.py24
6 files changed, 155 insertions, 85 deletions
diff --git a/var/spack/repos/builtin/packages/ascent/package.py b/var/spack/repos/builtin/packages/ascent/package.py
index 4e31fa051e..be50f8254a 100644
--- a/var/spack/repos/builtin/packages/ascent/package.py
+++ b/var/spack/repos/builtin/packages/ascent/package.py
@@ -28,13 +28,14 @@ def cmake_cache_entry(name, value, vtype=None):
return 'set({0} "{1}" CACHE {2} "")\n\n'.format(name, value, vtype)
-class Ascent(Package):
+class Ascent(Package, CudaPackage):
"""Ascent is an open source many-core capable lightweight in situ
visualization and analysis infrastructure for multi-physics HPC
simulations."""
homepage = "https://github.com/Alpine-DAV/ascent"
git = "https://github.com/Alpine-DAV/ascent.git"
+ url = "https://github.com/Alpine-DAV/ascent/releases/download/v0.5.0/ascent-v0.5.0-src-with-blt.tar.gz"
maintainers = ['cyrush']
@@ -42,6 +43,8 @@ class Ascent(Package):
branch='develop',
submodules=True)
+ version('0.5.0', sha256='2837b7371db3ac1bcc31a479d7cf0eb62a503cacadfa4187061502b3c4a89fa0')
+
###########################################################################
# package variants
###########################################################################
@@ -50,6 +53,7 @@ class Ascent(Package):
variant('test', default=True, description='Enable Ascent unit tests')
variant("mpi", default=True, description="Build Ascent MPI Support")
+ variant("serial", default=True, description="build serial (non-mpi) libraries")
# variants for language support
variant("python", default=True, description="Build Ascent Python support")
@@ -72,10 +76,15 @@ class Ascent(Package):
# package dependencies
###########################################################################
- depends_on("cmake@3.14:", type='build')
+ # use cmake 3.14, newest that provides proper cuda support
+ # and we have seen errors with cuda in 3.15
+ depends_on("cmake@3.14.1:3.14.99", type='build')
depends_on("conduit~python", when="~python")
depends_on("conduit+python", when="+python+shared")
depends_on("conduit~shared~python", when="~shared")
+ depends_on("conduit~python~mpi", when="~python~mpi")
+ depends_on("conduit+python~mpi", when="+python+shared~mpi")
+ depends_on("conduit~shared~python~mpi", when="~shared~mpi")
#######################
# Python
@@ -85,6 +94,7 @@ class Ascent(Package):
depends_on("python+shared", when="+python+shared")
extends("python", when="+python+shared")
depends_on("py-numpy", when="+python+shared", type=('build', 'run'))
+ depends_on("py-pip", when="+python+shared", type=('build', 'run'))
#######################
# MPI
@@ -96,24 +106,22 @@ class Ascent(Package):
# TPLs for Runtime Features
#############################
- depends_on("vtk-m", when="+vtkh")
-
- depends_on("vtk-h@develop", when="+vtkh")
- depends_on("vtk-h@develop~openmp", when="+vtkh~openmp")
- depends_on("vtk-h@develop+cuda+openmp", when="+vtkh+cuda+openmp")
- depends_on("vtk-h@develop+cuda~openmp", when="+vtkh+cuda~openmp")
+ depends_on("vtk-h@0.5.0", when="+vtkh")
+ depends_on("vtk-h@0.5.0~openmp", when="+vtkh~openmp")
+ depends_on("vtk-h@0.5.0+cuda+openmp", when="+vtkh+cuda+openmp")
+ depends_on("vtk-h@0.5.0+cuda~openmp", when="+vtkh+cuda~openmp")
- depends_on("vtk-h@develop~shared", when="~shared+vtkh")
- depends_on("vtk-h@develop~shared~openmp", when="~shared+vtkh~openmp")
- depends_on("vtk-h@develop~shared+cuda", when="~shared+vtkh+cuda")
- depends_on("vtk-h@develop~shared+cuda~openmp", when="~shared+vtkh+cuda~openmp")
+ depends_on("vtk-h@0.5.0~shared", when="~shared+vtkh")
+ depends_on("vtk-h@0.5.0~shared~openmp", when="~shared+vtkh~openmp")
+ depends_on("vtk-h@0.5.0~shared+cuda", when="~shared+vtkh+cuda")
+ depends_on("vtk-h@0.5.0~shared+cuda~openmp", when="~shared+vtkh+cuda~openmp")
# mfem
- depends_on("mfem+shared+mpi+conduit", when="+shared+mfem+mpi")
- depends_on("mfem~shared+mpi+conduit", when="~shared+mfem+mpi")
+ depends_on("mfem+threadsafe+shared+mpi+conduit", when="+shared+mfem+mpi")
+ depends_on("mfem+threadsafe~shared+mpi+conduit", when="~shared+mfem+mpi")
- depends_on("mfem+shared~mpi+conduit", when="+shared+mfem~mpi")
- depends_on("mfem~shared~mpi+conduit", when="~shared+mfem~mpi")
+ depends_on("mfem+threadsafe+shared~mpi+conduit", when="+shared+mfem~mpi")
+ depends_on("mfem+threadsafe~shared~mpi+conduit", when="~shared+mfem~mpi")
depends_on("adios", when="+adios")
@@ -121,6 +129,7 @@ class Ascent(Package):
# Documentation related
#######################
depends_on("py-sphinx", when="+python+doc", type='build')
+ depends_on("py-sphinx-rtd-theme", when="+python+doc", type='build')
def setup_build_environment(self, env):
env.set('CTEST_OUTPUT_ON_FAILURE', '1')
@@ -229,7 +238,7 @@ class Ascent(Package):
if self.compiler.fc:
# even if this is set, it may not exist so do one more sanity check
- f_compiler = which(env["SPACK_FC"])
+ f_compiler = env["SPACK_FC"]
#######################################################################
# By directly fetching the names of the actual compilers we appear
@@ -285,7 +294,7 @@ class Ascent(Package):
if "+fortran" in spec and f_compiler is not None:
cfg.write(cmake_cache_entry("ENABLE_FORTRAN", "ON"))
cfg.write(cmake_cache_entry("CMAKE_Fortran_COMPILER",
- f_compiler.path))
+ f_compiler))
else:
cfg.write("# no fortran compiler found\n\n")
cfg.write(cmake_cache_entry("ENABLE_FORTRAN", "OFF"))
@@ -349,6 +358,15 @@ class Ascent(Package):
cfg.write(cmake_cache_entry("ENABLE_DOCS", "OFF"))
#######################
+ # Serial
+ #######################
+
+ if "+serial" in spec:
+ cfg.write(cmake_cache_entry("ENABLE_SERIAL", "ON"))
+ else:
+ cfg.write(cmake_cache_entry("ENABLE_SERIAL", "OFF"))
+
+ #######################
# MPI
#######################
@@ -412,6 +430,13 @@ class Ascent(Package):
cfg.write("# vtk-h from spack\n")
cfg.write(cmake_cache_entry("VTKH_DIR", spec['vtk-h'].prefix))
+ if "+cuda" in spec:
+ cfg.write(cmake_cache_entry("VTKm_ENABLE_CUDA", "ON"))
+ cfg.write(cmake_cache_entry("CMAKE_CUDA_HOST_COMPILER",
+ env["SPACK_CXX"]))
+ else:
+ cfg.write(cmake_cache_entry("VTKm_ENABLE_CUDA", "OFF"))
+
else:
cfg.write("# vtk-h not built by spack \n")
diff --git a/var/spack/repos/builtin/packages/conduit/package.py b/var/spack/repos/builtin/packages/conduit/package.py
index acc1498b70..93acb633f3 100644
--- a/var/spack/repos/builtin/packages/conduit/package.py
+++ b/var/spack/repos/builtin/packages/conduit/package.py
@@ -68,7 +68,7 @@ class Conduit(Package):
variant("adios", default=False, description="Build Conduit ADIOS support")
# zfp compression
- variant("zfp", default=True, description="Build Conduit ZFP support")
+ variant("zfp", default=False, description="Build Conduit ZFP support")
# variants for dev-tools (docs, etc)
variant("doc", default=False, description="Build Conduit's documentation")
diff --git a/var/spack/repos/builtin/packages/metis/package.py b/var/spack/repos/builtin/packages/metis/package.py
index 4e64f43b40..2dae35ac8f 100644
--- a/var/spack/repos/builtin/packages/metis/package.py
+++ b/var/spack/repos/builtin/packages/metis/package.py
@@ -17,13 +17,15 @@ class Metis(Package):
multilevel recursive-bisection, multilevel k-way, and multi-constraint
partitioning schemes."""
- homepage = "http://glaros.dtc.umn.edu/gkhome/metis/metis/overview"
- url = "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz"
- list_url = "http://glaros.dtc.umn.edu/gkhome/fsroot/sw/metis/OLD"
+ #
+ # the previous metis website http://glaros.dtc.umn.edu/gkhome/metis/metis
+ # no longer exists. This is a github mirror that provides metis 5.1.0
+ #
+
+ homepage = "https://github.com/scivision/METIS/"
+ url = "https://github.com/scivision/METIS/raw/master/metis-5.1.0.tar.gz"
version('5.1.0', sha256='76faebe03f6c963127dbb73c13eab58c9a3faeae48779f049066a21c087c5db2')
- version('5.0.2', sha256='f79790676ca2ce3dfa9d5e2d74801e91d92415664ede2c2fc18fc49d4a161981')
- version('4.0.3', sha256='5efa35de80703c1b2c4d0de080fafbcf4e0d363a21149a1ad2f96e0144841a55')
variant('shared', default=True, description='Enables the build of shared libraries.')
variant('gdb', default=False, description='Enables gdb support (version 5+).')
@@ -50,13 +52,6 @@ class Metis(Package):
patch('install_gklib_defs_rename.patch', when='@5:')
patch('gklib_nomisleadingindentation_warning.patch', when='@5: %gcc@6:')
- def url_for_version(self, version):
- url = "http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis"
- if version < Version('4.0.3'):
- url += "/OLD"
- url += "/metis-{0}.tar.gz".format(version)
- return url
-
@when('@5:')
def patch(self):
source_path = self.stage.source_path
diff --git a/var/spack/repos/builtin/packages/mfem/package.py b/var/spack/repos/builtin/packages/mfem/package.py
index 747fe707cd..e61b672cd5 100644
--- a/var/spack/repos/builtin/packages/mfem/package.py
+++ b/var/spack/repos/builtin/packages/mfem/package.py
@@ -439,8 +439,35 @@ class Mfem(Package):
hdf5 = conduit['hdf5']
headers += find_headers('hdf5', hdf5.prefix.include)
libs += hdf5.libs
+
+ ##################
+ # cyrush note:
+ ##################
+ # spack's HeaderList is applying too much magic, undermining us:
+ #
+ # It applies a regex to strip back to the last "include" dir
+ # in the path. In our case we need to pass the following
+ # as part of the CONDUIT_OPT flags:
+ #
+ # -I<install_path>/include/conduit
+ #
+ # I tried several ways to present this path to the HeaderList,
+ # but the regex always kills the trailing conduit dir
+ # breaking build.
+ #
+ # To resolve the issue, we simply join our own string with
+ # the headers results (which are important b/c they handle
+ # hdf5 paths when enabled).
+ ##################
+
+ # construct proper include path
+ conduit_include_path = conduit.prefix.include.conduit
+ # add this path to the found flags
+ conduit_opt_flags = "-I{0} {1}".format(conduit_include_path,
+ headers.cpp_flags)
+
options += [
- 'CONDUIT_OPT=%s' % headers.cpp_flags,
+ 'CONDUIT_OPT=%s' % conduit_opt_flags,
'CONDUIT_LIB=%s' % ld_flags_from_library_list(libs)]
make('config', *options, parallel=False)
diff --git a/var/spack/repos/builtin/packages/vtk-h/package.py b/var/spack/repos/builtin/packages/vtk-h/package.py
index e3c1bd4031..abfbbdd0fb 100644
--- a/var/spack/repos/builtin/packages/vtk-h/package.py
+++ b/var/spack/repos/builtin/packages/vtk-h/package.py
@@ -28,49 +28,45 @@ def cmake_cache_entry(name, value, vtype=None):
return 'set({0} "{1}" CACHE {2} "")\n\n'.format(name, value, vtype)
-class VtkH(Package):
+class VtkH(Package, CudaPackage):
"""VTK-h is a toolkit of scientific visualization algorithms for emerging
processor architectures. VTK-h brings together several projects like VTK-m
and DIY2 to provide a toolkit with hybrid parallel capabilities."""
homepage = "https://github.com/Alpine-DAV/vtk-h"
+ url = "https://github.com/Alpine-DAV/vtk-h/releases/download/v0.5.0/vtkh-v0.5.0.tar.gz"
git = "https://github.com/Alpine-DAV/vtk-h.git"
+
maintainers = ['cyrush']
version('develop', branch='develop', submodules=True)
- version('0.1.0', branch='develop', tag='v0.1.0', submodules=True)
+ version('0.5.0', sha256="9014a8a61a8d7ff636866c6e3b1ebb918ff23fa67cf8d4de801c4a2981de8c96")
variant("shared", default=True, description="Build vtk-h as shared libs")
variant("mpi", default=True, description="build mpi support")
- variant("tbb", default=False, description="build tbb support")
+ variant("serial", default=True, description="build serial (non-mpi) libraries")
variant("cuda", default=False, description="build cuda support")
variant("openmp", default=(sys.platform != 'darwin'),
description="build openmp support")
- depends_on("cmake@3.8.2:", type='build')
+ # use cmake 3.14, newest that provides proper cuda support
+ # and we have seen errors with cuda in 3.15
+ depends_on("cmake@3.14.1:3.14.99", type='build')
depends_on("mpi", when="+mpi")
- depends_on("intel-tbb", when="@0.1.0+tbb")
depends_on("cuda", when="+cuda")
- depends_on("vtk-m@1.2.0", when="@0.1.0")
- depends_on("vtk-m@1.2.0+tbb", when="@0.1.0+tbb")
- depends_on("vtk-m@1.2.0+cuda", when="@0.1.0+cuda")
- depends_on("vtk-m@1.2.0~shared", when="@0.1.0~shared")
-
- depends_on("vtk-m@master~tbb+openmp", when="@develop+openmp")
- depends_on("vtk-m@master~tbb~openmp", when="@develop~openmp")
-
- depends_on("vtk-m@master+cuda~tbb+openmp", when="@develop+cuda+openmp")
- depends_on("vtk-m@master+cuda~tbb~openmp", when="@develop+cuda~openmp")
+ depends_on("vtk-m@1.5.0~tbb+openmp", when="+openmp")
+ depends_on("vtk-m@1.5.0~tbb~openmp", when="~openmp")
- depends_on("vtk-m@master~tbb+openmp~shared", when="@develop+openmp~shared")
- depends_on("vtk-m@master~tbb~openmp~shared", when="@develop~openmp~shared")
+ depends_on("vtk-m@1.5.0+cuda~tbb+openmp", when="+cuda+openmp")
+ depends_on("vtk-m@1.5.0+cuda~tbb~openmp", when="+cuda~openmp")
- depends_on("vtk-m@master+cuda~tbb+openmp~shared", when="@develop+cuda+openmp~shared")
- depends_on("vtk-m@master+cuda~tbb~openmp~shared", when="@develop+cuda~openmp~shared")
+ depends_on("vtk-m@1.5.0~tbb+openmp~shared", when="+openmp~shared")
+ depends_on("vtk-m@1.5.0~tbb~openmp~shared", when="~openmp~shared")
- patch('vtkm_lagrange_cuda_fix.patch')
+ depends_on("vtk-m@1.5.0+cuda~tbb+openmp~shared", when="+cuda+openmp~shared")
+ depends_on("vtk-m@1.5.0+cuda~tbb~openmp~shared", when="+cuda~openmp~shared")
def install(self, spec, prefix):
with working_dir('spack-build', create=True):
@@ -79,11 +75,15 @@ class VtkH(Package):
"-DENABLE_TESTS=OFF",
"-DBUILD_TESTING=OFF"]
- # shared vs static libs
- if "+shared" in spec:
- cmake_args.append('-DBUILD_SHARED_LIBS=ON')
- else:
+ # shared vs static libs logic
+ # force static when building with cuda
+ if "+cuda" in spec:
cmake_args.append('-DBUILD_SHARED_LIBS=OFF')
+ else:
+ if "+shared" in spec:
+ cmake_args.append('-DBUILD_SHARED_LIBS=ON')
+ else:
+ cmake_args.append('-DBUILD_SHARED_LIBS=OFF')
# mpi support
if "+mpi" in spec:
@@ -94,9 +94,6 @@ class VtkH(Package):
mpiexe_bin = join_path(spec['mpi'].prefix.bin, 'mpiexec')
if os.path.isfile(mpiexe_bin):
cmake_args.append("-DMPIEXEC={0}".format(mpiexe_bin))
- # tbb support
- if "+tbb" in spec:
- cmake_args.append("-DTBB_DIR={0}".format(spec["tbb"].prefix))
# openmp support
if "+openmp" in spec:
@@ -104,12 +101,13 @@ class VtkH(Package):
# cuda support
if "+cuda" in spec:
- cmake_args.append("-DENABLE_CUDA=ON")
- # this fix is necessary if compiling platform has cuda, but
- # no devices (this common for front end nodes on hpc clusters)
- # we choose kepler as a lowest common denominator
- cmake_args.append("-DVTKm_CUDA_Architecture=kepler")
-
+ cmake_args.append("-DVTKm_ENABLE_CUDA:BOOL=ON")
+ cmake_args.append("-DENABLE_CUDA:BOOL=ON")
+ cmake_args.append("-DCMAKE_CUDA_HOST_COMPILER={0}".format(
+ env["SPACK_CXX"]))
+ else:
+ cmake_args.append("-DVTKm_ENABLE_CUDA:BOOL=OFF")
+ cmake_args.append("-DENABLE_CUDA:BOOL=OFF")
# use release, instead of release with debug symbols b/c vtkh libs
# can overwhelm compilers with too many symbols
for arg in std_cmake_args:
@@ -117,15 +115,14 @@ class VtkH(Package):
cmake_args.extend(std_cmake_args)
cmake_args.append("-DCMAKE_BUILD_TYPE=Release")
cmake(*cmake_args)
- if "+cuda" in spec:
- # avoid issues with make -j and FindCuda deps
- # likely a ordering issue that needs to be resolved
- # in vtk-h
- make(parallel=False)
- else:
- make()
+ make()
make("install")
+ host_cfg_fname = self.create_host_config(spec,
+ prefix)
+
+ install(host_cfg_fname, prefix)
+
def create_host_config(self, spec, prefix, py_site_pkgs_dir=None):
"""
This method creates a 'host-config' file that specifies
@@ -210,18 +207,36 @@ class VtkH(Package):
#######################################################################
#######################
+ # Serial
+ #######################
+
+ if "+serial" in spec:
+ cfg.write(cmake_cache_entry("ENABLE_SERIAL", "ON"))
+ else:
+ cfg.write(cmake_cache_entry("ENABLE_SERIAL", "OFF"))
+
+ #######################
# MPI
#######################
cfg.write("# MPI Support\n")
if "+mpi" in spec:
+ mpicc_path = spec['mpi'].mpicc
+ mpicxx_path = spec['mpi'].mpicxx
+ mpifc_path = spec['mpi'].mpifc
+ # if we are using compiler wrappers on cray systems
+ # use those for mpi wrappers, b/c spec['mpi'].mpicxx
+ # etc make return the spack compiler wrappers
+ # which can trip up mpi detection in CMake 3.14
+ if cpp_compiler == "CC":
+ mpicc_path = "cc"
+ mpicxx_path = "CC"
+ mpifc_path = "ftn"
cfg.write(cmake_cache_entry("ENABLE_MPI", "ON"))
- cfg.write(cmake_cache_entry("MPI_C_COMPILER", spec['mpi'].mpicc))
- cfg.write(cmake_cache_entry("MPI_CXX_COMPILER",
- spec['mpi'].mpicxx))
- cfg.write(cmake_cache_entry("MPI_Fortran_COMPILER",
- spec['mpi'].mpifc))
+ cfg.write(cmake_cache_entry("MPI_C_COMPILER", mpicc_path))
+ cfg.write(cmake_cache_entry("MPI_CXX_COMPILER", mpicxx_path))
+ cfg.write(cmake_cache_entry("MPI_Fortran_COMPILER", mpifc_path))
mpiexe_bin = join_path(spec['mpi'].prefix.bin, 'mpiexec')
if os.path.isfile(mpiexe_bin):
# starting with cmake 3.10, FindMPI expects MPIEXEC_EXECUTABLE
diff --git a/var/spack/repos/builtin/packages/vtk-m/package.py b/var/spack/repos/builtin/packages/vtk-m/package.py
index 8c763ed426..2146a051c4 100644
--- a/var/spack/repos/builtin/packages/vtk-m/package.py
+++ b/var/spack/repos/builtin/packages/vtk-m/package.py
@@ -22,7 +22,7 @@ class VtkM(CMakePackage, CudaPackage):
git = "https://gitlab.kitware.com/vtk/vtk-m.git"
version('master', branch='master')
- version('1.5.0', sha256="cd38957bb552e28b5197e4f738d5bb0b2c6f4025c3e17a66c8b19ee501273fbe")
+ version('1.5.0', sha256="b1b13715c7fcc8d17f5c7166ff5b3e9025f6865dc33eb9b06a63471c21349aa8")
version('1.4.0', sha256="8d83cca7cd5e204d10da151ce4f1846c1f7414c7c1e579173d15c5ea0631555a")
version('1.3.0', sha256="f88c1b0a1980f695240eeed9bcccfa420cc089e631dc2917c9728a2eb906df2e")
version('1.2.0', sha256="607272992e05f8398d196f0acdcb4af025a4a96cd4f66614c6341f31d4561763")
@@ -61,19 +61,27 @@ class VtkM(CMakePackage, CudaPackage):
'70': 'turing', '72': 'turing', '75': 'turing'}
with working_dir('spack-build', create=True):
options = ["-DVTKm_ENABLE_TESTING:BOOL=OFF"]
- # shared vs static libs
- if "+shared" in spec:
- options.append('-DBUILD_SHARED_LIBS=ON')
- else:
+ # shared vs static libs logic
+ # force building statically with cuda
+ if "+cuda" in spec:
options.append('-DBUILD_SHARED_LIBS=OFF')
+ else:
+ if "+shared" in spec:
+ options.append('-DBUILD_SHARED_LIBS=ON')
+ else:
+ options.append('-DBUILD_SHARED_LIBS=OFF')
# cuda support
if "+cuda" in spec:
options.append("-DVTKm_ENABLE_CUDA:BOOL=ON")
+ options.append("-DCMAKE_CUDA_HOST_COMPILER={0}".format(
+ env["SPACK_CXX"]))
if 'cuda_arch' in spec.variants:
cuda_value = spec.variants['cuda_arch'].value
- name = gpu_name_table[cuda_value[0]]
- options.append(
- '-DVTKm_CUDA_Architecture={0}'.format(name))
+ cuda_arch = cuda_value[0]
+ if cuda_arch in gpu_name_table:
+ vtkm_cuda_arch = gpu_name_table[cuda_arch]
+ options.append('-DVTKm_CUDA_Architecture={0}'.format(
+ vtkm_cuda_arch))
else:
# this fix is necessary if compiling platform has cuda, but
# no devices (this's common for front end nodes on hpc clus