diff --git a/.github/workflows/build-containers.yml b/.github/workflows/build-containers.yml index 940e9d965fbf13..fc612d1622842c 100644 --- a/.github/workflows/build-containers.yml +++ b/.github/workflows/build-containers.yml @@ -106,7 +106,7 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build & Deploy ${{ matrix.dockerfile[0] }} - uses: docker/build-push-action@c84f38281176d4c9cdb1626ffafcd6b3911b5d94 # @v2 + uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5 # @v2 with: context: dockerfiles/${{ matrix.dockerfile[0] }} platforms: ${{ matrix.dockerfile[1] }} diff --git a/var/spack/repos/builtin/packages/zfp/package.py b/var/spack/repos/builtin/packages/zfp/package.py index 1ef972aa9b278d..2f7b9b88226096 100644 --- a/var/spack/repos/builtin/packages/zfp/package.py +++ b/var/spack/repos/builtin/packages/zfp/package.py @@ -18,86 +18,141 @@ class Zfp(CMakePackage, CudaPackage): # Package info homepage = "https://zfp.llnl.gov" - url = "https://github.com/LLNL/zfp/releases/download/0.5.5/zfp-0.5.5.tar.gz" + url = "https://github.com/LLNL/zfp/releases/download/1.0.0/zfp-1.0.0.tar.gz" git = "https://github.com/LLNL/zfp.git" maintainers = ["lindstro", "GarrettDMorrison"] tags = ["radiuss", "e4s"] # Versions version("develop", branch="develop") + version("1.0.0", sha256="0ea08ae3e50e3c92f8b8cf41ba5b6e2de8892bc4a4ca0c59b8945b6c2ab617c4") version("0.5.5", sha256="fdf7b948bab1f4e5dccfe2c2048fd98c24e417ad8fb8a51ed3463d04147393c5") version("0.5.4", sha256="746e17aaa401c67dcffd273d6e6f95c76adfbbd5cf523dcad56d09e9d3b71196") version("0.5.3", sha256="a5d2f8e5b47a7c92e2a5775b82cbfb3a76c87d0ac83d25abb4ac10ea75a2856e") - version( - "0.5.2", - sha256="9c738ec525cc76b4bb80b2b3f7c9f07507eeda3a341470e5942cda97efbe9a4f", - url="https://github.com/LLNL/zfp/archive/0.5.2/zfp-0.5.2.tar.gz", - ) - version( - "0.5.1", - sha256="f255dd1708c9ae4dc6a56dd2614e8b47a10d833c87fd349cbd47545a19c2b779", - url="https://github.com/LLNL/zfp/archive/0.5.1/zfp-0.5.1.tar.gz", - ) + + version("0.5.2", sha256="9c738ec525cc76b4bb80b2b3f7c9f07507eeda3a341470e5942cda97efbe9a4f", + url="https://github.com/LLNL/zfp/archive/0.5.2/zfp-0.5.2.tar.gz") + version("0.5.1", sha256="f255dd1708c9ae4dc6a56dd2614e8b47a10d833c87fd349cbd47545a19c2b779", + url="https://github.com/LLNL/zfp/archive/0.5.1/zfp-0.5.1.tar.gz") + + # Dependencies + depends_on("cmake@3.9.0:", + type = "build") + + depends_on("cuda@7:", + type = ("build", "test", "run"), + when = "+cuda") + + depends_on("python", + type = ("build", "test", "run"), + when = "+python") + + depends_on("py-numpy", + type = ("build", "test", "run"), + when = "+python") + + depends_on("py-cython", + type = "build", + when = "+python") # Build targets - # TODO: variant('utilities', default=True, description='Build utilities') - variant("shared", default=True, description="Build shared libraries") + variant("shared", + default = True, + description = "Build shared libraries") + + variant("utilities", + default = True, + description = "Build zfp utilities") # Language bindings - variant("c", default=False, description="Enable C bindings") - variant("python", default=False, description="Enable Python bindings") - variant("fortran", default=False, description="Enable Fortran bindings") + variant("c", + default = False, + when = "@0.5.4:", + description = "Enable compressed array C bindings") + + variant("python", + default = False, + when = "@0.5.5:", + description = "Enable Python bindings") + + variant("fortran", + default = False, + when = "@0.5.5:", + description = "Enable Fortran bindings") # Execution policies - variant("openmp", default=False, description="Enable OpenMP execution") - variant("cuda", default=False, description="Enable CUDA execution") - - # Advanced options - variant( - "bsws", - default="64", - values=("8", "16", "32", "64"), - multi=False, - description="Bit stream word size: " - "use smaller for finer rate granularity. " - "Use 8 for H5Z-ZFP filter.", - ) - variant( - "strided", default=False, description="Enable strided access for progressive zfp streams" - ) - variant("aligned", default=False, description="Enable aligned memory allocation") - variant("twoway", default=False, description="Use two-way skew-associative cache") - variant( - "fasthash", - default=False, - description="Use a faster but more collision prone hash function", - ) - variant("profile", default=False, description="Count cache misses") + variant("openmp", + default = False, + when = "@0.5.3:", + description="Enable OpenMP execution") + + variant("cuda", + default = False, + when = "@0.5.4:", + description = "Enable CUDA execution") + + # Advanced settings + variant("aligned", + default = False, + description = "Enable aligned memory allocation") + + variant("bsws", + default = "64", + values = ("8", "16", "32", "64"), + multi = False, + description = "Bit stream word size: " + "use smaller for finer rate granularity. " + "Use 8 for H5Z-ZFP filter.") + + variant("daz", + default = False, + when = "@1.0.0:", + description = "Denormals are zero: " + "Treat denormal-only blocks as containing " + "all zeroes") + + variant("fasthash", + default = False, + description = "Use a faster but more collision prone hash function") + + variant("profile", + default = False, + description = "Count cache misses") + + variant("round", + default = "ZFP_ROUND_NEVER", + values = ("ZFP_ROUND_NEVER", "ZFP_ROUND_FIRST", "ZFP_ROUND_LAST"), + multi = False, + when = "@1.0.0:", + description = "EXPERIMENTAL: Set coefficient rounding method") + + variant("strided", + default = False, + description = "Enable strided access for progressive zfp streams") + + variant("tight_error", + default = False, + when = "@1.0.0:", + description = "EXPERIMENTAL: Enable rounding-based error reduction") + + variant("twoway", + default = False, + description = "Use two-way skew-associative cache") # Conflicts - conflicts("+c", when="@:0.5.3", msg="+c requires zfp 0.5.4 or later") - conflicts("+python", when="@:0.5.4", msg="+python requires zfp 0.5.5 or later") - conflicts("+fortran", when="@:0.5.4", msg="+fortran requires zfp 0.5.5 or later") - conflicts("+openmp", when="@:0.5.2", msg="+openmp requires zfp 0.5.3 or later") - conflicts("+cuda", when="@:0.5.3", msg="+cuda requires zfp 0.5.4 or later") - conflicts("+fasthash", when="@:0.5.1", msg="+fasthash requires zfp 0.5.2 or later") - conflicts("+profile", when="@:0.5.1", msg="+profile requires zfp 0.5.2 or later") - - # Dependencies - depends_on("cmake@3.4.0:", type="build") - depends_on("cuda@7:", type=("build", "test", "run"), when="+cuda") - depends_on("python", type=("build", "test", "run"), when="+python") - depends_on("py-numpy", type=("build", "test", "run"), when="+python") - depends_on("py-cython", type="build", when="+python") + conflicts("+tight_error", + when = "round=ZFP_ROUND_NEVER", + msg = "Using zfp with tight error requires a rounding " + "mode other than ZFP_ROUND_NEVER") def cmake_args(self): spec = self.spec # CMake options args = [ - # TODO: self.define_from_variant('BUILD_UTILITIES', 'utilities'), self.define("BUILD_TESTING", self.run_tests), self.define_from_variant("BUILD_SHARED_LIBS", "shared"), + self.define_from_variant('BUILD_UTILITIES', 'utilities'), self.define_from_variant("BUILD_CFP", "c"), self.define_from_variant("BUILD_ZFPY", "python"), self.define_from_variant("BUILD_ZFORP", "fortran"), @@ -109,6 +164,9 @@ def cmake_args(self): self.define_from_variant("ZFP_WITH_CACHE_TWOWAY", "twoway"), self.define_from_variant("ZFP_WITH_CACHE_FAST_HASH", "fasthash"), self.define_from_variant("ZFP_WITH_CACHE_PROFILE", "profile"), + self.define("ZFP_ROUNDING_MODE", spec.variants["round"].value), + self.define_from_variant("ZFP_WITH_TIGHT_ERROR", "tight_error"), + self.define_from_variant("ZFP_WITH_DAZ", "daz"), ] if "+cuda" in spec: