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
This commit is contained in:
parent
02f27fc45d
commit
d3c1547dba
@ -28,13 +28,14 @@ def cmake_cache_entry(name, value, vtype=None):
|
|||||||
return 'set({0} "{1}" CACHE {2} "")\n\n'.format(name, value, vtype)
|
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
|
"""Ascent is an open source many-core capable lightweight in situ
|
||||||
visualization and analysis infrastructure for multi-physics HPC
|
visualization and analysis infrastructure for multi-physics HPC
|
||||||
simulations."""
|
simulations."""
|
||||||
|
|
||||||
homepage = "https://github.com/Alpine-DAV/ascent"
|
homepage = "https://github.com/Alpine-DAV/ascent"
|
||||||
git = "https://github.com/Alpine-DAV/ascent.git"
|
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']
|
maintainers = ['cyrush']
|
||||||
|
|
||||||
@ -42,6 +43,8 @@ class Ascent(Package):
|
|||||||
branch='develop',
|
branch='develop',
|
||||||
submodules=True)
|
submodules=True)
|
||||||
|
|
||||||
|
version('0.5.0', sha256='2837b7371db3ac1bcc31a479d7cf0eb62a503cacadfa4187061502b3c4a89fa0')
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
# package variants
|
# package variants
|
||||||
###########################################################################
|
###########################################################################
|
||||||
@ -50,6 +53,7 @@ class Ascent(Package):
|
|||||||
variant('test', default=True, description='Enable Ascent unit tests')
|
variant('test', default=True, description='Enable Ascent unit tests')
|
||||||
|
|
||||||
variant("mpi", default=True, description="Build Ascent MPI Support")
|
variant("mpi", default=True, description="Build Ascent MPI Support")
|
||||||
|
variant("serial", default=True, description="build serial (non-mpi) libraries")
|
||||||
|
|
||||||
# variants for language support
|
# variants for language support
|
||||||
variant("python", default=True, description="Build Ascent Python support")
|
variant("python", default=True, description="Build Ascent Python support")
|
||||||
@ -72,10 +76,15 @@ class Ascent(Package):
|
|||||||
# package dependencies
|
# 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")
|
||||||
depends_on("conduit+python", when="+python+shared")
|
depends_on("conduit+python", when="+python+shared")
|
||||||
depends_on("conduit~shared~python", when="~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
|
# Python
|
||||||
@ -85,6 +94,7 @@ class Ascent(Package):
|
|||||||
depends_on("python+shared", when="+python+shared")
|
depends_on("python+shared", when="+python+shared")
|
||||||
extends("python", when="+python+shared")
|
extends("python", when="+python+shared")
|
||||||
depends_on("py-numpy", when="+python+shared", type=('build', 'run'))
|
depends_on("py-numpy", when="+python+shared", type=('build', 'run'))
|
||||||
|
depends_on("py-pip", when="+python+shared", type=('build', 'run'))
|
||||||
|
|
||||||
#######################
|
#######################
|
||||||
# MPI
|
# MPI
|
||||||
@ -96,24 +106,22 @@ class Ascent(Package):
|
|||||||
# TPLs for Runtime Features
|
# TPLs for Runtime Features
|
||||||
#############################
|
#############################
|
||||||
|
|
||||||
depends_on("vtk-m", when="+vtkh")
|
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", when="+vtkh")
|
depends_on("vtk-h@0.5.0~shared", when="~shared+vtkh")
|
||||||
depends_on("vtk-h@develop~openmp", when="+vtkh~openmp")
|
depends_on("vtk-h@0.5.0~shared~openmp", when="~shared+vtkh~openmp")
|
||||||
depends_on("vtk-h@develop+cuda+openmp", when="+vtkh+cuda+openmp")
|
depends_on("vtk-h@0.5.0~shared+cuda", when="~shared+vtkh+cuda")
|
||||||
depends_on("vtk-h@develop+cuda~openmp", when="+vtkh+cuda~openmp")
|
depends_on("vtk-h@0.5.0~shared+cuda~openmp", when="~shared+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")
|
|
||||||
|
|
||||||
# mfem
|
# mfem
|
||||||
depends_on("mfem+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+threadsafe~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~shared~mpi+conduit", when="~shared+mfem~mpi")
|
depends_on("mfem+threadsafe~shared~mpi+conduit", when="~shared+mfem~mpi")
|
||||||
|
|
||||||
depends_on("adios", when="+adios")
|
depends_on("adios", when="+adios")
|
||||||
|
|
||||||
@ -121,6 +129,7 @@ class Ascent(Package):
|
|||||||
# Documentation related
|
# Documentation related
|
||||||
#######################
|
#######################
|
||||||
depends_on("py-sphinx", when="+python+doc", type='build')
|
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):
|
def setup_build_environment(self, env):
|
||||||
env.set('CTEST_OUTPUT_ON_FAILURE', '1')
|
env.set('CTEST_OUTPUT_ON_FAILURE', '1')
|
||||||
@ -229,7 +238,7 @@ def create_host_config(self, spec, prefix, py_site_pkgs_dir=None):
|
|||||||
|
|
||||||
if self.compiler.fc:
|
if self.compiler.fc:
|
||||||
# even if this is set, it may not exist so do one more sanity check
|
# 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
|
# By directly fetching the names of the actual compilers we appear
|
||||||
@ -285,7 +294,7 @@ def create_host_config(self, spec, prefix, py_site_pkgs_dir=None):
|
|||||||
if "+fortran" in spec and f_compiler is not None:
|
if "+fortran" in spec and f_compiler is not None:
|
||||||
cfg.write(cmake_cache_entry("ENABLE_FORTRAN", "ON"))
|
cfg.write(cmake_cache_entry("ENABLE_FORTRAN", "ON"))
|
||||||
cfg.write(cmake_cache_entry("CMAKE_Fortran_COMPILER",
|
cfg.write(cmake_cache_entry("CMAKE_Fortran_COMPILER",
|
||||||
f_compiler.path))
|
f_compiler))
|
||||||
else:
|
else:
|
||||||
cfg.write("# no fortran compiler found\n\n")
|
cfg.write("# no fortran compiler found\n\n")
|
||||||
cfg.write(cmake_cache_entry("ENABLE_FORTRAN", "OFF"))
|
cfg.write(cmake_cache_entry("ENABLE_FORTRAN", "OFF"))
|
||||||
@ -348,6 +357,15 @@ def create_host_config(self, spec, prefix, py_site_pkgs_dir=None):
|
|||||||
else:
|
else:
|
||||||
cfg.write(cmake_cache_entry("ENABLE_DOCS", "OFF"))
|
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
|
# MPI
|
||||||
#######################
|
#######################
|
||||||
@ -412,6 +430,13 @@ def create_host_config(self, spec, prefix, py_site_pkgs_dir=None):
|
|||||||
cfg.write("# vtk-h from spack\n")
|
cfg.write("# vtk-h from spack\n")
|
||||||
cfg.write(cmake_cache_entry("VTKH_DIR", spec['vtk-h'].prefix))
|
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:
|
else:
|
||||||
cfg.write("# vtk-h not built by spack \n")
|
cfg.write("# vtk-h not built by spack \n")
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ class Conduit(Package):
|
|||||||
variant("adios", default=False, description="Build Conduit ADIOS support")
|
variant("adios", default=False, description="Build Conduit ADIOS support")
|
||||||
|
|
||||||
# zfp compression
|
# 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)
|
# variants for dev-tools (docs, etc)
|
||||||
variant("doc", default=False, description="Build Conduit's documentation")
|
variant("doc", default=False, description="Build Conduit's documentation")
|
||||||
|
@ -17,13 +17,15 @@ class Metis(Package):
|
|||||||
multilevel recursive-bisection, multilevel k-way, and multi-constraint
|
multilevel recursive-bisection, multilevel k-way, and multi-constraint
|
||||||
partitioning schemes."""
|
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"
|
# the previous metis website http://glaros.dtc.umn.edu/gkhome/metis/metis
|
||||||
list_url = "http://glaros.dtc.umn.edu/gkhome/fsroot/sw/metis/OLD"
|
# 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.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('shared', default=True, description='Enables the build of shared libraries.')
|
||||||
variant('gdb', default=False, description='Enables gdb support (version 5+).')
|
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('install_gklib_defs_rename.patch', when='@5:')
|
||||||
patch('gklib_nomisleadingindentation_warning.patch', when='@5: %gcc@6:')
|
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:')
|
@when('@5:')
|
||||||
def patch(self):
|
def patch(self):
|
||||||
source_path = self.stage.source_path
|
source_path = self.stage.source_path
|
||||||
|
@ -439,8 +439,35 @@ def find_optional_library(name, prefix):
|
|||||||
hdf5 = conduit['hdf5']
|
hdf5 = conduit['hdf5']
|
||||||
headers += find_headers('hdf5', hdf5.prefix.include)
|
headers += find_headers('hdf5', hdf5.prefix.include)
|
||||||
libs += hdf5.libs
|
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 += [
|
options += [
|
||||||
'CONDUIT_OPT=%s' % headers.cpp_flags,
|
'CONDUIT_OPT=%s' % conduit_opt_flags,
|
||||||
'CONDUIT_LIB=%s' % ld_flags_from_library_list(libs)]
|
'CONDUIT_LIB=%s' % ld_flags_from_library_list(libs)]
|
||||||
|
|
||||||
make('config', *options, parallel=False)
|
make('config', *options, parallel=False)
|
||||||
|
@ -28,49 +28,45 @@ def cmake_cache_entry(name, value, vtype=None):
|
|||||||
return 'set({0} "{1}" CACHE {2} "")\n\n'.format(name, value, vtype)
|
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
|
"""VTK-h is a toolkit of scientific visualization algorithms for emerging
|
||||||
processor architectures. VTK-h brings together several projects like VTK-m
|
processor architectures. VTK-h brings together several projects like VTK-m
|
||||||
and DIY2 to provide a toolkit with hybrid parallel capabilities."""
|
and DIY2 to provide a toolkit with hybrid parallel capabilities."""
|
||||||
|
|
||||||
homepage = "https://github.com/Alpine-DAV/vtk-h"
|
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"
|
git = "https://github.com/Alpine-DAV/vtk-h.git"
|
||||||
|
|
||||||
maintainers = ['cyrush']
|
maintainers = ['cyrush']
|
||||||
|
|
||||||
version('develop', branch='develop', submodules=True)
|
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("shared", default=True, description="Build vtk-h as shared libs")
|
||||||
variant("mpi", default=True, description="build mpi support")
|
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("cuda", default=False, description="build cuda support")
|
||||||
variant("openmp", default=(sys.platform != 'darwin'),
|
variant("openmp", default=(sys.platform != 'darwin'),
|
||||||
description="build openmp support")
|
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("mpi", when="+mpi")
|
||||||
depends_on("intel-tbb", when="@0.1.0+tbb")
|
|
||||||
depends_on("cuda", when="+cuda")
|
depends_on("cuda", when="+cuda")
|
||||||
|
|
||||||
depends_on("vtk-m@1.2.0", when="@0.1.0")
|
depends_on("vtk-m@1.5.0~tbb+openmp", when="+openmp")
|
||||||
depends_on("vtk-m@1.2.0+tbb", when="@0.1.0+tbb")
|
depends_on("vtk-m@1.5.0~tbb~openmp", when="~openmp")
|
||||||
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@1.5.0+cuda~tbb+openmp", when="+cuda+openmp")
|
||||||
depends_on("vtk-m@master~tbb~openmp", when="@develop~openmp")
|
depends_on("vtk-m@1.5.0+cuda~tbb~openmp", when="+cuda~openmp")
|
||||||
|
|
||||||
depends_on("vtk-m@master+cuda~tbb+openmp", when="@develop+cuda+openmp")
|
depends_on("vtk-m@1.5.0~tbb+openmp~shared", when="+openmp~shared")
|
||||||
depends_on("vtk-m@master+cuda~tbb~openmp", when="@develop+cuda~openmp")
|
depends_on("vtk-m@1.5.0~tbb~openmp~shared", when="~openmp~shared")
|
||||||
|
|
||||||
depends_on("vtk-m@master~tbb+openmp~shared", when="@develop+openmp~shared")
|
depends_on("vtk-m@1.5.0+cuda~tbb+openmp~shared", when="+cuda+openmp~shared")
|
||||||
depends_on("vtk-m@master~tbb~openmp~shared", when="@develop~openmp~shared")
|
depends_on("vtk-m@1.5.0+cuda~tbb~openmp~shared", when="+cuda~openmp~shared")
|
||||||
|
|
||||||
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")
|
|
||||||
|
|
||||||
patch('vtkm_lagrange_cuda_fix.patch')
|
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
with working_dir('spack-build', create=True):
|
with working_dir('spack-build', create=True):
|
||||||
@ -79,11 +75,15 @@ def install(self, spec, prefix):
|
|||||||
"-DENABLE_TESTS=OFF",
|
"-DENABLE_TESTS=OFF",
|
||||||
"-DBUILD_TESTING=OFF"]
|
"-DBUILD_TESTING=OFF"]
|
||||||
|
|
||||||
# shared vs static libs
|
# shared vs static libs logic
|
||||||
if "+shared" in spec:
|
# force static when building with cuda
|
||||||
cmake_args.append('-DBUILD_SHARED_LIBS=ON')
|
if "+cuda" in spec:
|
||||||
else:
|
|
||||||
cmake_args.append('-DBUILD_SHARED_LIBS=OFF')
|
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
|
# mpi support
|
||||||
if "+mpi" in spec:
|
if "+mpi" in spec:
|
||||||
@ -94,9 +94,6 @@ def install(self, spec, prefix):
|
|||||||
mpiexe_bin = join_path(spec['mpi'].prefix.bin, 'mpiexec')
|
mpiexe_bin = join_path(spec['mpi'].prefix.bin, 'mpiexec')
|
||||||
if os.path.isfile(mpiexe_bin):
|
if os.path.isfile(mpiexe_bin):
|
||||||
cmake_args.append("-DMPIEXEC={0}".format(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
|
# openmp support
|
||||||
if "+openmp" in spec:
|
if "+openmp" in spec:
|
||||||
@ -104,12 +101,13 @@ def install(self, spec, prefix):
|
|||||||
|
|
||||||
# cuda support
|
# cuda support
|
||||||
if "+cuda" in spec:
|
if "+cuda" in spec:
|
||||||
cmake_args.append("-DENABLE_CUDA=ON")
|
cmake_args.append("-DVTKm_ENABLE_CUDA:BOOL=ON")
|
||||||
# this fix is necessary if compiling platform has cuda, but
|
cmake_args.append("-DENABLE_CUDA:BOOL=ON")
|
||||||
# no devices (this common for front end nodes on hpc clusters)
|
cmake_args.append("-DCMAKE_CUDA_HOST_COMPILER={0}".format(
|
||||||
# we choose kepler as a lowest common denominator
|
env["SPACK_CXX"]))
|
||||||
cmake_args.append("-DVTKm_CUDA_Architecture=kepler")
|
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
|
# use release, instead of release with debug symbols b/c vtkh libs
|
||||||
# can overwhelm compilers with too many symbols
|
# can overwhelm compilers with too many symbols
|
||||||
for arg in std_cmake_args:
|
for arg in std_cmake_args:
|
||||||
@ -117,15 +115,14 @@ def install(self, spec, prefix):
|
|||||||
cmake_args.extend(std_cmake_args)
|
cmake_args.extend(std_cmake_args)
|
||||||
cmake_args.append("-DCMAKE_BUILD_TYPE=Release")
|
cmake_args.append("-DCMAKE_BUILD_TYPE=Release")
|
||||||
cmake(*cmake_args)
|
cmake(*cmake_args)
|
||||||
if "+cuda" in spec:
|
make()
|
||||||
# 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("install")
|
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):
|
def create_host_config(self, spec, prefix, py_site_pkgs_dir=None):
|
||||||
"""
|
"""
|
||||||
This method creates a 'host-config' file that specifies
|
This method creates a 'host-config' file that specifies
|
||||||
@ -209,6 +206,15 @@ def create_host_config(self, spec, prefix, py_site_pkgs_dir=None):
|
|||||||
# Optional Dependencies
|
# Optional Dependencies
|
||||||
#######################################################################
|
#######################################################################
|
||||||
|
|
||||||
|
#######################
|
||||||
|
# Serial
|
||||||
|
#######################
|
||||||
|
|
||||||
|
if "+serial" in spec:
|
||||||
|
cfg.write(cmake_cache_entry("ENABLE_SERIAL", "ON"))
|
||||||
|
else:
|
||||||
|
cfg.write(cmake_cache_entry("ENABLE_SERIAL", "OFF"))
|
||||||
|
|
||||||
#######################
|
#######################
|
||||||
# MPI
|
# MPI
|
||||||
#######################
|
#######################
|
||||||
@ -216,12 +222,21 @@ def create_host_config(self, spec, prefix, py_site_pkgs_dir=None):
|
|||||||
cfg.write("# MPI Support\n")
|
cfg.write("# MPI Support\n")
|
||||||
|
|
||||||
if "+mpi" in spec:
|
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("ENABLE_MPI", "ON"))
|
||||||
cfg.write(cmake_cache_entry("MPI_C_COMPILER", spec['mpi'].mpicc))
|
cfg.write(cmake_cache_entry("MPI_C_COMPILER", mpicc_path))
|
||||||
cfg.write(cmake_cache_entry("MPI_CXX_COMPILER",
|
cfg.write(cmake_cache_entry("MPI_CXX_COMPILER", mpicxx_path))
|
||||||
spec['mpi'].mpicxx))
|
cfg.write(cmake_cache_entry("MPI_Fortran_COMPILER", mpifc_path))
|
||||||
cfg.write(cmake_cache_entry("MPI_Fortran_COMPILER",
|
|
||||||
spec['mpi'].mpifc))
|
|
||||||
mpiexe_bin = join_path(spec['mpi'].prefix.bin, 'mpiexec')
|
mpiexe_bin = join_path(spec['mpi'].prefix.bin, 'mpiexec')
|
||||||
if os.path.isfile(mpiexe_bin):
|
if os.path.isfile(mpiexe_bin):
|
||||||
# starting with cmake 3.10, FindMPI expects MPIEXEC_EXECUTABLE
|
# starting with cmake 3.10, FindMPI expects MPIEXEC_EXECUTABLE
|
||||||
|
@ -22,7 +22,7 @@ class VtkM(CMakePackage, CudaPackage):
|
|||||||
git = "https://gitlab.kitware.com/vtk/vtk-m.git"
|
git = "https://gitlab.kitware.com/vtk/vtk-m.git"
|
||||||
|
|
||||||
version('master', branch='master')
|
version('master', branch='master')
|
||||||
version('1.5.0', sha256="cd38957bb552e28b5197e4f738d5bb0b2c6f4025c3e17a66c8b19ee501273fbe")
|
version('1.5.0', sha256="b1b13715c7fcc8d17f5c7166ff5b3e9025f6865dc33eb9b06a63471c21349aa8")
|
||||||
version('1.4.0', sha256="8d83cca7cd5e204d10da151ce4f1846c1f7414c7c1e579173d15c5ea0631555a")
|
version('1.4.0', sha256="8d83cca7cd5e204d10da151ce4f1846c1f7414c7c1e579173d15c5ea0631555a")
|
||||||
version('1.3.0', sha256="f88c1b0a1980f695240eeed9bcccfa420cc089e631dc2917c9728a2eb906df2e")
|
version('1.3.0', sha256="f88c1b0a1980f695240eeed9bcccfa420cc089e631dc2917c9728a2eb906df2e")
|
||||||
version('1.2.0', sha256="607272992e05f8398d196f0acdcb4af025a4a96cd4f66614c6341f31d4561763")
|
version('1.2.0', sha256="607272992e05f8398d196f0acdcb4af025a4a96cd4f66614c6341f31d4561763")
|
||||||
@ -61,19 +61,27 @@ def cmake_args(self):
|
|||||||
'70': 'turing', '72': 'turing', '75': 'turing'}
|
'70': 'turing', '72': 'turing', '75': 'turing'}
|
||||||
with working_dir('spack-build', create=True):
|
with working_dir('spack-build', create=True):
|
||||||
options = ["-DVTKm_ENABLE_TESTING:BOOL=OFF"]
|
options = ["-DVTKm_ENABLE_TESTING:BOOL=OFF"]
|
||||||
# shared vs static libs
|
# shared vs static libs logic
|
||||||
if "+shared" in spec:
|
# force building statically with cuda
|
||||||
options.append('-DBUILD_SHARED_LIBS=ON')
|
if "+cuda" in spec:
|
||||||
else:
|
|
||||||
options.append('-DBUILD_SHARED_LIBS=OFF')
|
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
|
# cuda support
|
||||||
if "+cuda" in spec:
|
if "+cuda" in spec:
|
||||||
options.append("-DVTKm_ENABLE_CUDA:BOOL=ON")
|
options.append("-DVTKm_ENABLE_CUDA:BOOL=ON")
|
||||||
|
options.append("-DCMAKE_CUDA_HOST_COMPILER={0}".format(
|
||||||
|
env["SPACK_CXX"]))
|
||||||
if 'cuda_arch' in spec.variants:
|
if 'cuda_arch' in spec.variants:
|
||||||
cuda_value = spec.variants['cuda_arch'].value
|
cuda_value = spec.variants['cuda_arch'].value
|
||||||
name = gpu_name_table[cuda_value[0]]
|
cuda_arch = cuda_value[0]
|
||||||
options.append(
|
if cuda_arch in gpu_name_table:
|
||||||
'-DVTKm_CUDA_Architecture={0}'.format(name))
|
vtkm_cuda_arch = gpu_name_table[cuda_arch]
|
||||||
|
options.append('-DVTKm_CUDA_Architecture={0}'.format(
|
||||||
|
vtkm_cuda_arch))
|
||||||
else:
|
else:
|
||||||
# this fix is necessary if compiling platform has cuda, but
|
# this fix is necessary if compiling platform has cuda, but
|
||||||
# no devices (this's common for front end nodes on hpc clus
|
# no devices (this's common for front end nodes on hpc clus
|
||||||
|
Loading…
Reference in New Issue
Block a user