summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/ascent/package.py25
-rw-r--r--var/spack/repos/builtin/packages/conduit/package.py92
2 files changed, 92 insertions, 25 deletions
diff --git a/var/spack/repos/builtin/packages/ascent/package.py b/var/spack/repos/builtin/packages/ascent/package.py
index d837e51010..8d8210edd1 100644
--- a/var/spack/repos/builtin/packages/ascent/package.py
+++ b/var/spack/repos/builtin/packages/ascent/package.py
@@ -72,7 +72,7 @@ class Ascent(Package):
# package dependencies
###########################################################################
- depends_on("cmake@3.9.2:3.9.999", type='build')
+ depends_on("cmake@3.14:", type='build')
depends_on("conduit~python", when="~python")
depends_on("conduit+python", when="+python+shared")
depends_on("conduit~shared~python", when="~shared")
@@ -120,8 +120,8 @@ class Ascent(Package):
#######################
depends_on("py-sphinx", when="+python+doc", type='build')
- def setup_environment(self, spack_env, run_env):
- spack_env.set('CTEST_OUTPUT_ON_FAILURE', '1')
+ def setup_build_environment(self, env):
+ env.set('CTEST_OUTPUT_ON_FAILURE', '1')
def install(self, spec, prefix):
"""
@@ -353,12 +353,21 @@ class Ascent(Package):
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/conduit/package.py b/var/spack/repos/builtin/packages/conduit/package.py
index af1cc70c85..acc1498b70 100644
--- a/var/spack/repos/builtin/packages/conduit/package.py
+++ b/var/spack/repos/builtin/packages/conduit/package.py
@@ -38,6 +38,7 @@ class Conduit(Package):
git = "https://github.com/LLNL/conduit.git"
version('master', branch='master', submodules=True, preferred=True)
+ version('0.5.0', sha256='7efac668763d02bd0a2c0c1b134d9f5ee27e99008183905bb0512e5502b8b4fe')
version('0.4.0', sha256='c228e6f0ce5a9c0ffb98e0b3d886f2758ace1a4b40d00f3f118542c0747c1f52')
version('0.3.1', sha256='7b358ca03bb179876291d4a55d6a1c944b7407a80a588795b9e47940b1990521')
version('0.3.0', sha256='52e9cf5720560e5f7492876c39ef2ea20ae73187338361d2744bdf67567da155')
@@ -66,6 +67,9 @@ class Conduit(Package):
variant("silo", default=False, description="Build Conduit Silo support")
variant("adios", default=False, description="Build Conduit ADIOS support")
+ # zfp compression
+ variant("zfp", default=True, description="Build Conduit ZFP support")
+
# variants for dev-tools (docs, etc)
variant("doc", default=False, description="Build Conduit's documentation")
# doxygen support is wip, since doxygen has several dependencies
@@ -94,6 +98,10 @@ class Conduit(Package):
#######################
# I/O Packages
#######################
+
+ ###############
+ # HDF5
+ ###############
# TODO: cxx variant is disabled due to build issue Cyrus
# experienced on BGQ. When on, the static build tries
# to link against shared libs.
@@ -105,16 +113,27 @@ class Conduit(Package):
depends_on("hdf5~cxx~mpi~fortran", when="+hdf5~hdf5_compat+shared")
depends_on("hdf5~shared~cxx~mpi~fortran", when="+hdf5~hdf5_compat~shared")
+ ###############
+ # Silo
+ ###############
# we are not using silo's fortran features
depends_on("silo~fortran", when="+silo+shared")
depends_on("silo~shared~fortran", when="+silo~shared")
+ ###############
+ # ADIOS
+ ###############
depends_on("adios+mpi~hdf5+shared", when="+adios+mpi+shared")
depends_on("adios+mpi~hdf5~shared~blosc", when="+adios+mpi~shared")
depends_on("adios~mpi~hdf5+shared", when="+adios~mpi+shared")
depends_on("adios~mpi~hdf5~shared~blosc", when="+adios~mpi~shared")
#######################
+ # ZFP
+ #######################
+ depends_on("zfp", when="+zfp")
+
+ #######################
# MPI
#######################
depends_on("mpi", when="+mpi")
@@ -123,10 +142,14 @@ class Conduit(Package):
# Documentation related
#######################
depends_on("py-sphinx", when="+python+doc", type='build')
+ depends_on("py-sphinx-rtd-theme", when="+python+doc", type='build')
depends_on("doxygen", when="+doc+doxygen")
- def setup_environment(self, spack_env, run_env):
- spack_env.set('CTEST_OUTPUT_ON_FAILURE', '1')
+ # build phases used by this package
+ phases = ["configure", "build", "install"]
+
+ def setup_build_environment(self, env):
+ env.set('CTEST_OUTPUT_ON_FAILURE', '1')
def url_for_version(self, version):
"""
@@ -145,9 +168,9 @@ class Conduit(Package):
return "https://github.com/LLNL/conduit/releases/download/v{0}/conduit-v{1}-src-with-blt.tar.gz".format(v, v)
return url
- def install(self, spec, prefix):
+ def configure(self, spec, prefix):
"""
- Build and install Conduit.
+ Configure Conduit.
"""
with working_dir('spack-build', create=True):
py_site_pkgs_dir = None
@@ -157,6 +180,9 @@ class Conduit(Package):
host_cfg_fname = self.create_host_config(spec,
prefix,
py_site_pkgs_dir)
+ # save this filename for
+ # other package recipe steps to access
+ self.host_cfg_fname = host_cfg_fname
cmake_args = []
# if we have a static build, we need to avoid any of
# spack's default cmake settings related to rpaths
@@ -170,17 +196,31 @@ class Conduit(Package):
cmake_args.extend(["-C", host_cfg_fname, "../src"])
print("Configuring Conduit...")
cmake(*cmake_args)
+
+ def build(self, spec, prefix):
+ """
+ Build Conduit.
+ """
+ with working_dir('spack-build'):
print("Building Conduit...")
make()
- # run unit tests if requested
- if "+test" in spec and self.run_tests:
- print("Running Conduit Unit Tests...")
- make("test")
- print("Installing Conduit...")
+
+ @run_after('build')
+ @on_package_attributes(run_tests=True)
+ def test(self):
+ with working_dir('spack-build'):
+ print("Running Conduit Unit Tests...")
+ make("test")
+
+ def install(self, spec, prefix):
+ """
+ Install Conduit.
+ """
+ with working_dir('spack-build'):
make("install")
# install copy of host config for provenance
print("Installing Conduit CMake Host Config File...")
- install(host_cfg_fname, prefix)
+ install(self.host_cfg_fname, prefix)
@run_after('install')
@on_package_attributes(run_tests=True)
@@ -203,7 +243,7 @@ class Conduit(Package):
example_src_dir]
cmake(*cmake_args)
make()
- example = Executable('./example')
+ example = Executable('./conduit_example')
example()
print("Checking using-with-make example...")
example_src_dir = join_path(install_prefix,
@@ -216,7 +256,7 @@ class Conduit(Package):
for example_file in example_files:
shutil.copy(example_file, ".")
make("CONDUIT_DIR={0}".format(install_prefix))
- example = Executable('./example')
+ example = Executable('./conduit_example')
example()
def create_host_config(self, spec, prefix, py_site_pkgs_dir=None):
@@ -366,12 +406,21 @@ class Conduit(Package):
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
@@ -385,6 +434,15 @@ class Conduit(Package):
else:
cfg.write(cmake_cache_entry("ENABLE_MPI", "OFF"))
+ #######################
+ # ZFP
+ #######################
+ cfg.write("# zfp from spack \n")
+ if "+zfp" in spec:
+ cfg.write(cmake_cache_entry("ZFP_DIR", spec['zfp'].prefix))
+ else:
+ cfg.write("# zfp not built by spack \n")
+
#######################################################################
# I/O Packages
#######################################################################