From ef7837410e32dac1c892a62a5deae10bc0c08da6 Mon Sep 17 00:00:00 2001 From: Roman Briskine Date: Fri, 27 Mar 2020 03:32:19 +0000 Subject: [PATCH 001/138] Fix non-root installations; update homepage (#15701) --- var/spack/repos/builtin/packages/util-linux/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/util-linux/package.py b/var/spack/repos/builtin/packages/util-linux/package.py index b95f8222e2f..d4887601a06 100644 --- a/var/spack/repos/builtin/packages/util-linux/package.py +++ b/var/spack/repos/builtin/packages/util-linux/package.py @@ -9,7 +9,7 @@ class UtilLinux(AutotoolsPackage): """Util-linux is a suite of essential utilities for any Linux system.""" - homepage = "http://freecode.com/projects/util-linux" + homepage = "https://github.com/karelzak/util-linux" url = "https://www.kernel.org/pub/linux/utils/util-linux/v2.29/util-linux-2.29.2.tar.gz" list_url = "https://www.kernel.org/pub/linux/utils/util-linux" list_depth = 1 @@ -36,6 +36,7 @@ def url_for_version(self, version): def configure_args(self): config_args = [ '--disable-use-tty-group', + '--disable-makeinstall-chown', ] config_args.extend(self.enable_or_disable('libuuid')) return config_args From 640df9c20b98eb3e6d0c3d1828a21b5659ae11b8 Mon Sep 17 00:00:00 2001 From: iarspider Date: Fri, 27 Mar 2020 04:36:24 +0100 Subject: [PATCH 002/138] range-v3: add new version (0.10.0) (#15697) --- var/spack/repos/builtin/packages/range-v3/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/range-v3/package.py b/var/spack/repos/builtin/packages/range-v3/package.py index 261922ceb79..9c7a9cd6a32 100644 --- a/var/spack/repos/builtin/packages/range-v3/package.py +++ b/var/spack/repos/builtin/packages/range-v3/package.py @@ -22,6 +22,7 @@ class RangeV3(CMakePackage): maintainers = ['chissg'] version('develop', branch='master') + version('0.10.0', sha256='5a1cd44e7315d0e8dcb1eee4df6802221456a9d1dbeac53da02ac7bd4ea150cd') version('0.5.0', sha256='32e30b3be042246030f31d40394115b751431d9d2b4e0f6d58834b2fd5594280') version('0.4.0', sha256='5dbc878b7dfc500fb04b6b9f99d63993a2731ea34b0a4b8d5f670a5a71a18e39') version('0.3.7', sha256='e6b0fb33bfd07ec32d54bcddd3e8d62e995a3cf0b64b34788ec264da62581207') From bbc76c35517b88cda0af6405c04b3accd40cb67e Mon Sep 17 00:00:00 2001 From: iarspider Date: Fri, 27 Mar 2020 04:37:33 +0100 Subject: [PATCH 003/138] fmt: new version (6.1.2) (#15695) --- var/spack/repos/builtin/packages/fmt/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/fmt/package.py b/var/spack/repos/builtin/packages/fmt/package.py index 8cba74d000a..be39f6cc838 100644 --- a/var/spack/repos/builtin/packages/fmt/package.py +++ b/var/spack/repos/builtin/packages/fmt/package.py @@ -14,6 +14,7 @@ class Fmt(CMakePackage): homepage = "http://fmtlib.net/latest/index.html" url = "https://github.com/fmtlib/fmt/releases/download/5.2.1/fmt-5.2.1.zip" + version('6.1.2', sha256='63650f3c39a96371f5810c4e41d6f9b0bb10305064e6faf201cbafe297ea30e8') version('5.3.0', sha256='4c0741e10183f75d7d6f730b8708a99b329b2f942dad5a9da3385ab92bb4a15c') version('5.2.1', sha256='43894ab8fe561fc9e523a8024efc23018431fa86b95d45b06dbe6ddb29ffb6cd') version('5.2.0', sha256='c016db7f825bce487a7929e1edb747b9902a2935057af6512cad3df3a080a027') From 209c7e3ddd4e0883c4c17515c801b78032059abe Mon Sep 17 00:00:00 2001 From: iarspider Date: Fri, 27 Mar 2020 04:37:56 +0100 Subject: [PATCH 004/138] xrootd: new version (4.11.2) (#15694) --- var/spack/repos/builtin/packages/xrootd/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/xrootd/package.py b/var/spack/repos/builtin/packages/xrootd/package.py index 6f0f9268c13..438e5d385b1 100644 --- a/var/spack/repos/builtin/packages/xrootd/package.py +++ b/var/spack/repos/builtin/packages/xrootd/package.py @@ -13,6 +13,7 @@ class Xrootd(CMakePackage): homepage = "http://xrootd.org" url = "http://xrootd.org/download/v4.6.0/xrootd-4.6.0.tar.gz" + version('4.11.2', sha256='4620824db97fcc37dc3dd26110da8e5c3aab1d8302e4921d4f32e83207060603') version('4.10.0', sha256='f07f85e27d72e9e8ff124173c7b53619aed8fcd36f9d6234c33f8f7fd511995b') version('4.8.5', sha256='42e4d2cc6f8b442135f09bcc12c7be38b1a0c623a005cb5e69ff3d27997bdf73') version('4.8.4', sha256='f148d55b16525567c0f893edf9bb2975f7c09f87f0599463e19e1b456a9d95ba') From e989c05cd0e249be41cd7a4a24f2b126c3ce6f8d Mon Sep 17 00:00:00 2001 From: "Seth R. Johnson" Date: Thu, 26 Mar 2020 23:38:56 -0400 Subject: [PATCH 005/138] Add include-what-you-use (#15691) --- .../packages/iwyu/iwyu-013-cmake.patch | 34 +++++++++++++++++++ .../repos/builtin/packages/iwyu/package.py | 27 +++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 var/spack/repos/builtin/packages/iwyu/iwyu-013-cmake.patch create mode 100644 var/spack/repos/builtin/packages/iwyu/package.py diff --git a/var/spack/repos/builtin/packages/iwyu/iwyu-013-cmake.patch b/var/spack/repos/builtin/packages/iwyu/iwyu-013-cmake.patch new file mode 100644 index 00000000000..78cb1a2d101 --- /dev/null +++ b/var/spack/repos/builtin/packages/iwyu/iwyu-013-cmake.patch @@ -0,0 +1,34 @@ +--- include-what-you-use/CMakeLists.txt 2019-10-24 15:47:52.000000000 -0400 ++++ spack-src/CMakeLists.txt 2020-03-26 07:16:53.284593661 -0400 +@@ -60,21 +60,22 @@ + # Use only major.minor.patch for the resource directory structure; some + # platforms include suffix in LLVM_VERSION. + set(llvm_ver ${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}) +- set(clang_headers_src ${CMAKE_PREFIX_PATH}/lib/clang/${llvm_ver}/include) +- set(clang_headers_dst ${CMAKE_BINARY_DIR}/lib/clang/${llvm_ver}/include) ++ set(clang_headers_src "${LLVM_INSTALL_PREFIX}/lib/clang/${llvm_ver}/include") ++ set(clang_headers_dst "${CMAKE_BINARY_DIR}/lib/clang/${llvm_ver}/include") + +- file(GLOB_RECURSE in_files RELATIVE ${clang_headers_src} ${clang_headers_src}/*) ++ file(GLOB_RECURSE in_files RELATIVE "${clang_headers_src}" ++ "${clang_headers_src}/*") + + set(out_files) + foreach (file ${in_files}) +- set(src ${clang_headers_src}/${file}) +- set(dst ${clang_headers_dst}/${file}) ++ set(src "${clang_headers_src}/${file}") ++ set(dst "${clang_headers_dst}/${file}") + +- add_custom_command(OUTPUT ${dst} +- DEPENDS ${src} +- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst} ++ add_custom_command(OUTPUT "${dst}" ++ DEPENDS "${src}" ++ COMMAND ${CMAKE_COMMAND} -E copy_if_different "${src}" "${dst}" + COMMENT "Copying clang's ${file}...") +- list(APPEND out_files ${dst}) ++ list(APPEND out_files "${dst}") + endforeach() + + add_custom_target(clang-resource-headers ALL DEPENDS ${out_files}) diff --git a/var/spack/repos/builtin/packages/iwyu/package.py b/var/spack/repos/builtin/packages/iwyu/package.py new file mode 100644 index 00000000000..a05ff073b7b --- /dev/null +++ b/var/spack/repos/builtin/packages/iwyu/package.py @@ -0,0 +1,27 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Iwyu(CMakePackage): + """include-what-you-use: A tool for use with clang to analyze #includes in + C and C++ source files + """ + + homepage = "https://include-what-you-use.org" + url = "https://include-what-you-use.org/downloads/include-what-you-use-0.13.src.tar.gz" + + maintainers = ['sethrj'] + + version('0.13', sha256='49294270aa64e8c04182369212cd919f3b3e0e47601b1f935f038c761c265bc9') + version('0.12', sha256='a5892fb0abccb820c394e4e245c00ef30fc94e4ae58a048b23f94047c0816025') + version('0.11', sha256='2d2877726c4aed9518cbb37673ffbc2b7da9c239bf8fe29432da35c1c0ec367a') + + patch('iwyu-013-cmake.patch', when='@0.13') + + depends_on('llvm+clang@9.0:9.999', when='@0.13') + depends_on('llvm+clang@8.0:8.999', when='@0.12') + depends_on('llvm+clang@7.0:7.999', when='@0.11') From 82936602172c76da3832f69bc45d5c93e7f16a85 Mon Sep 17 00:00:00 2001 From: Toyohisa Kameyama Date: Fri, 27 Mar 2020 12:40:22 +0900 Subject: [PATCH 006/138] ppOpen-MATH/MP: New package. (#15690) * ppOpen-MATH/MP: New package. * Fix quote. --- .../packages/ppopen-math-mp/package.py | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 var/spack/repos/builtin/packages/ppopen-math-mp/package.py diff --git a/var/spack/repos/builtin/packages/ppopen-math-mp/package.py b/var/spack/repos/builtin/packages/ppopen-math-mp/package.py new file mode 100644 index 00000000000..8f622644850 --- /dev/null +++ b/var/spack/repos/builtin/packages/ppopen-math-mp/package.py @@ -0,0 +1,51 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + + +from spack import * +import os + + +class PpopenMathMp(MakefilePackage): + """ + ppOpen-Math/MP ia a coupling library that enables weak coupling on various + simulation models, such as an atmospheric model and an ocean model, + a seismic model and a structure model. For getting very wide applicability, + ppOpen-Math/MP is designed so as that it is independent from grid + structure. Instead of grid structure, PpohMATHMP requires a data set + called 'mapping table'. Mapping table is composed of a correspondence + table of grid indexes between a send model and a receive model and + interpolation coefficients. A subroutine for making a mapping table + file is provided by ppOpen-Math/MP API. + + Current version of ppOpen-Math/MP is ver.1.0 which targets scalar + data exchange. An exchange code of vector data which requires rotation + calculation is under development and will be released the next version. + """ + + homepage = "http://ppopenhpc.cc.u-tokyo.ac.jp/ppopenhpc/" + url = "file://{0}/ppohMATHMP_1.0.0.tar.gz".format(os.getcwd()) + + version('1.0.0', sha256='eb85a181286e4e7d071bd7c106fa547d38cfd16df87753e9d4e38da1a84a8f22') + + depends_on('mpi') + + build_directory = 'src' + build_targets = ['FC_XXX=spack'] + parallel = False + + def edit(self, spec, prefix): + flags = ['-I.'] + if spec.satisfies('%gcc'): + flags.append('-ffree-line-length-none') + with open('src/Makefile', 'a') as makefile: + makefile.write('FC_spack = {0}\n'.format(spec['mpi'].mpifc)) + makefile.write('FFLAGS_spack = {0}\n'.format(' '.join(flags))) + makefile.write('AR_spack = ar cr\n') + + def install(self, spec, prefix): + for d in ['include', 'lib', 'doc', 'test']: + mkdir(join_path(prefix, d)) + copy_tree(d, join_path(prefix, d)) From 5cb4db8570d42267d209f50778d062e0c72bb4d6 Mon Sep 17 00:00:00 2001 From: noguchi-k <55966120+noguchi-k@users.noreply.github.com> Date: Fri, 27 Mar 2020 12:41:25 +0900 Subject: [PATCH 007/138] gtkorvo-dill: fix argument type of clear_cache (#15689) --- .../gtkorvo-dill/2.1-fix-clear_cache.patch | 148 ++++++++++++++++++ .../gtkorvo-dill/2.4-fix-clear_cache.patch | 148 ++++++++++++++++++ .../builtin/packages/gtkorvo-dill/package.py | 4 + 3 files changed, 300 insertions(+) create mode 100644 var/spack/repos/builtin/packages/gtkorvo-dill/2.1-fix-clear_cache.patch create mode 100644 var/spack/repos/builtin/packages/gtkorvo-dill/2.4-fix-clear_cache.patch diff --git a/var/spack/repos/builtin/packages/gtkorvo-dill/2.1-fix-clear_cache.patch b/var/spack/repos/builtin/packages/gtkorvo-dill/2.1-fix-clear_cache.patch new file mode 100644 index 00000000000..cfab7234149 --- /dev/null +++ b/var/spack/repos/builtin/packages/gtkorvo-dill/2.1-fix-clear_cache.patch @@ -0,0 +1,148 @@ +diff -ur spack-src.org/CMakeLists.txt spack-src/CMakeLists.txt +--- spack-src.org/CMakeLists.txt 2020-03-26 16:38:53.358339744 +0900 ++++ spack-src/CMakeLists.txt 2020-03-26 16:44:04.581014766 +0900 +@@ -184,6 +184,9 @@ + CHECK_INCLUDE_FILES(malloc.h HAVE_MALLOC_H) + CHECK_INCLUDE_FILES(memory.h HAVE_MEMORY_H) + INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) ++include(CheckSymbolExists) ++check_symbol_exists(__clear_cache "" CLEAR_CACHE_DEFINED) ++message(STATUS "Clear cache defined is ${CLEAR_CACHE_DEFINED}") + + set (NO_DISASSEMBLER TRUE) + if (ENABLE_DISASSEMBLY) +diff -ur spack-src.org/arm6.c spack-src/arm6.c +--- spack-src.org/arm6.c 2020-03-26 16:38:53.358339744 +0900 ++++ spack-src/arm6.c 2020-03-26 16:45:20.428978615 +0900 +@@ -1524,22 +1524,9 @@ + } + + +-/* Clear the instruction cache from `beg' to `end'. This makes an +- inline system call to SYS_cacheflush. */ +-#define CLEAR_INSN_CACHE(BEG, END) \ +-{ \ +- register unsigned long _beg __asm ("a1") = (unsigned long) (BEG); \ +- register unsigned long _end __asm ("a2") = (unsigned long) (END); \ +- register unsigned long _flg __asm ("a3") = 0; \ +- __asm __volatile ("swi 0x9f0002 @ sys_cacheflush" \ +- : "=r" (_beg) \ +- : "0" (_beg), "r" (_end), "r" (_flg)); \ +-} +-/* +- * Cache flush code grabbed from a Dec 1999 posting on libc-hacker +- * mailing list +- */ +-extern void __clear_cache(char*, char *); ++#ifndef CLEAR_CACHE_DEFINED ++extern void __clear_cache(void *, void *); ++#endif + + static void + arm6_flush(void *base, void *limit) +diff -ur spack-src.org/arm6_rt.c spack-src/arm6_rt.c +--- spack-src.org/arm6_rt.c 2020-03-26 16:38:53.358339744 +0900 ++++ spack-src/arm6_rt.c 2020-03-26 16:48:18.927720543 +0900 +@@ -109,22 +109,9 @@ + } + } + +-/* Clear the instruction cache from `beg' to `end'. This makes an +- inline system call to SYS_cacheflush. */ +-#define CLEAR_INSN_CACHE(BEG, END) \ +-{ \ +- register unsigned long _beg __asm ("a1") = (unsigned long) (BEG); \ +- register unsigned long _end __asm ("a2") = (unsigned long) (END); \ +- register unsigned long _flg __asm ("a3") = 0; \ +- __asm __volatile ("swi 0x9f0002 @ sys_cacheflush" \ +- : "=r" (_beg) \ +- : "0" (_beg), "r" (_end), "r" (_flg)); \ +-} +-/* +- * Cache flush code grabbed from a Dec 1999 posting on libc-hacker +- * mailing list +- */ +-extern void __clear_cache(char*, char *); ++#ifndef CLEAR_CACHE_DEFINED ++extern void __clear_cache(void *, void *); ++#endif + + static void + arm6_flush(void *base, void *limit) +diff -ur spack-src.org/arm8.c spack-src/arm8.c +--- spack-src.org/arm8.c 2020-03-26 16:38:53.358339744 +0900 ++++ spack-src/arm8.c 2020-03-26 16:49:38.386063473 +0900 +@@ -1524,22 +1524,9 @@ + } + + +-/* Clear the instruction cache from `beg' to `end'. This makes an +- inline system call to SYS_cacheflush. */ +-#define CLEAR_INSN_CACHE(BEG, END) \ +-{ \ +- register unsigned long _beg __asm ("a1") = (unsigned long) (BEG); \ +- register unsigned long _end __asm ("a2") = (unsigned long) (END); \ +- register unsigned long _flg __asm ("a3") = 0; \ +- __asm __volatile ("swi 0x9f0002 @ sys_cacheflush" \ +- : "=r" (_beg) \ +- : "0" (_beg), "r" (_end), "r" (_flg)); \ +-} +-/* +- * Cache flush code grabbed from a Dec 1999 posting on libc-hacker +- * mailing list +- */ +-extern void __clear_cache(char*, char *); ++#ifndef CLEAR_CACHE_DEFINED ++extern void __clear_cache(void *, void *); ++#endif + + static void + arm8_flush(void *base, void *limit) +diff -ur spack-src.org/arm8_rt.c spack-src/arm8_rt.c +--- spack-src.org/arm8_rt.c 2020-03-26 16:38:53.358339744 +0900 ++++ spack-src/arm8_rt.c 2020-03-26 16:50:37.902312532 +0900 +@@ -109,22 +109,9 @@ + } + } + +-/* Clear the instruction cache from `beg' to `end'. This makes an +- inline system call to SYS_cacheflush. */ +-#define CLEAR_INSN_CACHE(BEG, END) \ +-{ \ +- register unsigned long _beg __asm ("a1") = (unsigned long) (BEG); \ +- register unsigned long _end __asm ("a2") = (unsigned long) (END); \ +- register unsigned long _flg __asm ("a3") = 0; \ +- __asm __volatile ("swi 0x9f0002 @ sys_cacheflush" \ +- : "=r" (_beg) \ +- : "0" (_beg), "r" (_end), "r" (_flg)); \ +-} +-/* +- * Cache flush code grabbed from a Dec 1999 posting on libc-hacker +- * mailing list +- */ +-extern void __clear_cache(char*, char *); ++#ifndef CLEAR_CACHE_DEFINED ++extern void __clear_cache(void *, void *); ++#endif + + static void + arm8_flush(void *base, void *limit) +diff -ur spack-src.org/config.h.cmake spack-src/config.h.cmake +--- spack-src.org/config.h.cmake 2020-03-26 16:38:53.358339744 +0900 ++++ spack-src/config.h.cmake 2020-03-26 16:52:52.256419382 +0900 +@@ -13,10 +13,13 @@ + #cmakedefine HAVE_DIS_ASM_H + + /* Define to 1 if you have the header file. */ +-#undef HAVE_DLFCN_H ++#cmakedefine HAVE_DLFCN_H + + /* Define to 1 if you have the header file. */ +-#undef HAVE_INTTYPES_H ++#cmakedefine HAVE_INTTYPES_H ++ ++/* Define to 1 if you have __clear_cache is defined */ ++#cmakedefine CLEAR_CACHE_DEFINED + + /* Define to 1 if you have the header file. */ + #cmakedefine HAVE_MALLOC_H diff --git a/var/spack/repos/builtin/packages/gtkorvo-dill/2.4-fix-clear_cache.patch b/var/spack/repos/builtin/packages/gtkorvo-dill/2.4-fix-clear_cache.patch new file mode 100644 index 00000000000..7f47fba9529 --- /dev/null +++ b/var/spack/repos/builtin/packages/gtkorvo-dill/2.4-fix-clear_cache.patch @@ -0,0 +1,148 @@ +diff -ur spack-src.org/CMakeLists.txt spack-src/CMakeLists.txt +--- spack-src.org/CMakeLists.txt 2020-03-26 09:35:43.403836842 +0900 ++++ spack-src/CMakeLists.txt 2020-03-26 09:37:57.397837929 +0900 +@@ -267,6 +267,9 @@ + CHECK_INCLUDE_FILES(stdarg.h STDC_HEADERS) + CHECK_INCLUDE_FILES(malloc.h HAVE_MALLOC_H) + CHECK_INCLUDE_FILES(memory.h HAVE_MEMORY_H) ++include(CheckSymbolExists) ++check_symbol_exists(__clear_cache "" CLEAR_CACHE_DEFINED) ++message(STATUS "Clear cache defined is ${CLEAR_CACHE_DEFINED}") + + set (NO_DISASSEMBLER TRUE) + if (DILL_ENABLE_DISASSEMBLY) +diff -ur spack-src.org/arm6.c spack-src/arm6.c +--- spack-src.org/arm6.c 2020-03-26 09:35:43.403836842 +0900 ++++ spack-src/arm6.c 2020-03-26 09:40:06.021306329 +0900 +@@ -1526,22 +1526,9 @@ + } + + +-/* Clear the instruction cache from `beg' to `end'. This makes an +- inline system call to SYS_cacheflush. */ +-#define CLEAR_INSN_CACHE(BEG, END) \ +-{ \ +- register unsigned long _beg __asm ("a1") = (unsigned long) (BEG); \ +- register unsigned long _end __asm ("a2") = (unsigned long) (END); \ +- register unsigned long _flg __asm ("a3") = 0; \ +- __asm __volatile ("swi 0x9f0002 @ sys_cacheflush" \ +- : "=r" (_beg) \ +- : "0" (_beg), "r" (_end), "r" (_flg)); \ +-} +-/* +- * Cache flush code grabbed from a Dec 1999 posting on libc-hacker +- * mailing list +- */ +-extern void __clear_cache(char*, char *); ++#ifndef CLEAR_CACHE_DEFINED ++extern void __clear_cache(void *, void *); ++#endif + + static void + arm6_flush(void *base, void *limit) +diff -ur spack-src.org/arm6_rt.c spack-src/arm6_rt.c +--- spack-src.org/arm6_rt.c 2020-03-26 09:35:43.403836842 +0900 ++++ spack-src/arm6_rt.c 2020-03-26 09:41:59.823222738 +0900 +@@ -109,22 +109,9 @@ + } + } + +-/* Clear the instruction cache from `beg' to `end'. This makes an +- inline system call to SYS_cacheflush. */ +-#define CLEAR_INSN_CACHE(BEG, END) \ +-{ \ +- register unsigned long _beg __asm ("a1") = (unsigned long) (BEG); \ +- register unsigned long _end __asm ("a2") = (unsigned long) (END); \ +- register unsigned long _flg __asm ("a3") = 0; \ +- __asm __volatile ("swi 0x9f0002 @ sys_cacheflush" \ +- : "=r" (_beg) \ +- : "0" (_beg), "r" (_end), "r" (_flg)); \ +-} +-/* +- * Cache flush code grabbed from a Dec 1999 posting on libc-hacker +- * mailing list +- */ +-extern void __clear_cache(char*, char *); ++#ifndef CLEAR_CACHE_DEFINED ++extern void __clear_cache(void *, void *); ++#endif + + static void + arm6_flush(void *base, void *limit) +diff -ur spack-src.org/arm8.c spack-src/arm8.c +--- spack-src.org/arm8.c 2020-03-26 09:35:43.403836842 +0900 ++++ spack-src/arm8.c 2020-03-26 09:43:04.630008776 +0900 +@@ -1524,22 +1524,9 @@ + } + + +-/* Clear the instruction cache from `beg' to `end'. This makes an +- inline system call to SYS_cacheflush. */ +-#define CLEAR_INSN_CACHE(BEG, END) \ +-{ \ +- register unsigned long _beg __asm ("a1") = (unsigned long) (BEG); \ +- register unsigned long _end __asm ("a2") = (unsigned long) (END); \ +- register unsigned long _flg __asm ("a3") = 0; \ +- __asm __volatile ("swi 0x9f0002 @ sys_cacheflush" \ +- : "=r" (_beg) \ +- : "0" (_beg), "r" (_end), "r" (_flg)); \ +-} +-/* +- * Cache flush code grabbed from a Dec 1999 posting on libc-hacker +- * mailing list +- */ +-extern void __clear_cache(char*, char *); ++#ifndef CLEAR_CACHE_DEFINED ++extern void __clear_cache(void *, void *); ++#endif + + static void + arm8_flush(void *base, void *limit) +diff -ur spack-src.org/arm8_rt.c spack-src/arm8_rt.c +--- spack-src.org/arm8_rt.c 2020-03-26 09:35:43.403836842 +0900 ++++ spack-src/arm8_rt.c 2020-03-26 09:44:19.027799105 +0900 +@@ -109,22 +109,9 @@ + } + } + +-/* Clear the instruction cache from `beg' to `end'. This makes an +- inline system call to SYS_cacheflush. */ +-#define CLEAR_INSN_CACHE(BEG, END) \ +-{ \ +- register unsigned long _beg __asm ("a1") = (unsigned long) (BEG); \ +- register unsigned long _end __asm ("a2") = (unsigned long) (END); \ +- register unsigned long _flg __asm ("a3") = 0; \ +- __asm __volatile ("swi 0x9f0002 @ sys_cacheflush" \ +- : "=r" (_beg) \ +- : "0" (_beg), "r" (_end), "r" (_flg)); \ +-} +-/* +- * Cache flush code grabbed from a Dec 1999 posting on libc-hacker +- * mailing list +- */ +-extern void __clear_cache(char*, char *); ++#ifndef CLEAR_CACHE_DEFINED ++extern void __clear_cache(void *, void *); ++#endif + + static void + arm8_flush(void *base, void *limit) +diff -ur spack-src.org/config.h.cmake spack-src/config.h.cmake +--- spack-src.org/config.h.cmake 2020-03-26 09:35:43.403836842 +0900 ++++ spack-src/config.h.cmake 2020-03-26 09:46:56.124248964 +0900 +@@ -16,10 +16,13 @@ + #cmakedefine HAVE_DIS_ASM_H + + /* Define to 1 if you have the header file. */ +-#undef HAVE_DLFCN_H ++#cmakedefine HAVE_DLFCN_H + + /* Define to 1 if you have the header file. */ +-#undef HAVE_INTTYPES_H ++#cmakedefine HAVE_INTTYPES_H ++ ++/* Define to 1 if you have __clear_cache is defined */ ++#cmakedefine CLEAR_CACHE_DEFINED + + /* Define to 1 if you have the header file. */ + #cmakedefine HAVE_MALLOC_H diff --git a/var/spack/repos/builtin/packages/gtkorvo-dill/package.py b/var/spack/repos/builtin/packages/gtkorvo-dill/package.py index cb5920ae5b5..b708666d4fe 100644 --- a/var/spack/repos/builtin/packages/gtkorvo-dill/package.py +++ b/var/spack/repos/builtin/packages/gtkorvo-dill/package.py @@ -20,6 +20,10 @@ class GtkorvoDill(CMakePackage): version('2.4', sha256='ed7745d13e8c6a556f324dcc0e48a807fc993bdd5bb1daa94c1df116cb7e81fa') version('2.1', sha256='7671e1f3c25ac6a4ec2320cec2c342a2f668efb170e3dba186718ed17d2cf084') + # Ref: https://github.com/GTkorvo/dill/commit/dac6dfcc7fdaceeb4c157f9ecdf5ecc28f20477f + patch('2.4-fix-clear_cache.patch', when='@2.4') + patch('2.1-fix-clear_cache.patch', when='@2.1') + def cmake_args(self): args = [] if self.spec.satisfies('@2.4:'): From 2828815a4942181207ef13fe0f6e080f0ec86616 Mon Sep 17 00:00:00 2001 From: Sinan Date: Thu, 26 Mar 2020 20:41:57 -0700 Subject: [PATCH 008/138] add new versions (#15688) Co-authored-by: Sinan81 --- var/spack/repos/builtin/packages/qca/package.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/qca/package.py b/var/spack/repos/builtin/packages/qca/package.py index cbf1da89329..9a040bc6674 100644 --- a/var/spack/repos/builtin/packages/qca/package.py +++ b/var/spack/repos/builtin/packages/qca/package.py @@ -20,8 +20,10 @@ class Qca(CMakePackage): homepage = "https://userbase.kde.org/QCA" url = "https://github.com/KDE/qca/archive/v2.1.3.tar.gz" - version('2.2.1', sha256='c67fc0fa8ae6cb3d0ba0fbd8fca8ee8e4c5061b99f1fd685fd7d9800cef17f6b') - version('2.1.3', sha256='a5135ffb0250a40e9c361eb10cd3fe28293f0cf4e5c69d3761481eafd7968067') + version('2.3.0', sha256='39aa18f0985d82949f4dccce04af3eb8d4b6b64e0c71785786738d38d8183b0a') + version('2.2.90', sha256='074ac753b51a6fa15503be9418f7430effe368fd31dc41567942d832e539b17e') + version('2.2.1', sha256='c67fc0fa8ae6cb3d0ba0fbd8fca8ee8e4c5061b99f1fd685fd7d9800cef17f6b') + version('2.1.3', sha256='a5135ffb0250a40e9c361eb10cd3fe28293f0cf4e5c69d3761481eafd7968067') depends_on('qt@4.2:') From 0ebed5a6184ea7090e501487944382904de6846c Mon Sep 17 00:00:00 2001 From: Hector <10837193+he-b@users.noreply.github.com> Date: Thu, 26 Mar 2020 22:45:47 -0500 Subject: [PATCH 009/138] fix gdb installation (#15679) * fix gdb installation * add reference url --- var/spack/repos/builtin/packages/python/package.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py index b35584d2c9d..3b675a02b64 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -670,6 +670,11 @@ def libs(self): # to ask Python where its LIBDIR is. libdir = self.get_config_var('LIBDIR') + # In Ubuntu 16.04.6 and python 2.7.12 from the system, lib could be + # in LBPL + # https://mail.python.org/pipermail/python-dev/2013-April/125733.html + libpl = self.get_config_var('LIBPL') + # The system Python installation on macOS and Homebrew installations # install libraries into a Frameworks directory frameworkprefix = self.get_config_var('PYTHONFRAMEWORKPREFIX') @@ -679,6 +684,8 @@ def libs(self): if os.path.exists(os.path.join(libdir, ldlibrary)): return LibraryList(os.path.join(libdir, ldlibrary)) + elif os.path.exists(os.path.join(libpl, ldlibrary)): + return LibraryList(os.path.join(libpl, ldlibrary)) elif os.path.exists(os.path.join(frameworkprefix, ldlibrary)): return LibraryList(os.path.join(frameworkprefix, ldlibrary)) else: From 5f06e50902b3c839ef1d87fefefbf31eadf0e79d Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Fri, 27 Mar 2020 04:50:20 +0100 Subject: [PATCH 010/138] meson: Add 0.53.2 and fix setuptools dependency (#15674) py-setuptools is actually required for running meson. --- var/spack/repos/builtin/packages/meson/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/meson/package.py b/var/spack/repos/builtin/packages/meson/package.py index 2878c712fcb..59edec8167f 100644 --- a/var/spack/repos/builtin/packages/meson/package.py +++ b/var/spack/repos/builtin/packages/meson/package.py @@ -14,6 +14,7 @@ class Meson(PythonPackage): homepage = "http://mesonbuild.com/" url = "https://github.com/mesonbuild/meson/archive/0.49.0.tar.gz" + version('0.53.2', sha256='eab4f5d5dde12d002b7ddd958a9a0658589b63622b6cea2715e0235b95917888') version('0.49.1', sha256='a944e7f25a2bc8e4ba3502ab5835d8a8b8f2530415c9d6fcffb53e0abaea2ced') version('0.49.0', sha256='11bc959e7173e714e4a4e85dd2bd9d0149b0a51c8ba82d5f44cc63735f603c74') version('0.42.0', sha256='6c318a2da3859326a37f8a380e3c50e97aaabff6990067218dffffea674ed76f') @@ -23,7 +24,7 @@ class Meson(PythonPackage): variant('ninjabuild', default=True) depends_on('python@3:', type=('build', 'run')) - depends_on('py-setuptools', type='build') + depends_on('py-setuptools', type=('build', 'run')) depends_on('ninja', when='+ninjabuild', type=('build', 'run')) # By default, Meson strips the rpath on installation. This patch disables From dcc4aabce1d14dfa02b92fff34fba89eacd3ea71 Mon Sep 17 00:00:00 2001 From: Fabian Brandt Date: Fri, 27 Mar 2020 04:55:27 +0100 Subject: [PATCH 011/138] New package libtlx (#15650) * New package libtlx * Replaced dash characters with ascii dash --- .../repos/builtin/packages/libtlx/package.py | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 var/spack/repos/builtin/packages/libtlx/package.py diff --git a/var/spack/repos/builtin/packages/libtlx/package.py b/var/spack/repos/builtin/packages/libtlx/package.py new file mode 100644 index 00000000000..619f90dfb54 --- /dev/null +++ b/var/spack/repos/builtin/packages/libtlx/package.py @@ -0,0 +1,28 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Libtlx(CMakePackage): + """ tlx is a collection of C++ helpers and extensions universally needed, + but not found in the STL. + The most important design goals and conventions are: + 1) high modularity with as little dependencies between + modules as possible. + 2) attempt to never break existing interfaces. + 3) compile on all platforms with C++ - smartphones, supercomputers, + windows, etc. + 4) zero external dependencies: no additional libraries are required. + 5) warning and bug-freeness on all compilers. + 6) keep overhead down - small overall size such that is can be included + without bloating applications.""" + + homepage = "https://tlx.github.io/" + url = "https://github.com/tlx/tlx/archive/v0.5.20191212.tar.gz" + + maintainers = ['fabratu'] + + version('0.5.20191212', sha256='5e67d3042a390dbb831b6d46437e3c7fadf738bff362aa7376b210b10ecd532d') From 97c3addad3def86a77054db74316f6ed38003e59 Mon Sep 17 00:00:00 2001 From: iarspider Date: Fri, 27 Mar 2020 08:42:50 +0100 Subject: [PATCH 012/138] cppgsl: added v2.1.0 (#15696) Co-authored-by: Adam J. Stewart --- var/spack/repos/builtin/packages/cppgsl/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/cppgsl/package.py b/var/spack/repos/builtin/packages/cppgsl/package.py index 4f4c68841fd..ce045a7c687 100644 --- a/var/spack/repos/builtin/packages/cppgsl/package.py +++ b/var/spack/repos/builtin/packages/cppgsl/package.py @@ -13,7 +13,8 @@ class Cppgsl(CMakePackage): url = "https://github.com/Microsoft/GSL/archive/v2.0.0.tar.gz" git = "https://github.com/Microsoft/GSL.git" - version('develop', branch='master') + version('master', branch='master') + version('2.1.0', sha256='ef73814657b073e1be86c8f7353718771bf4149b482b6cb54f99e79b23ff899d') version('2.0.0', sha256='6cce6fb16b651e62711a4f58e484931013c33979b795d1b1f7646f640cfa9c8e') version('1.0.0', sha256='9694b04cd78e5b1a769868f19fdd9eea2002de3d4c3a81a1b769209364543c36') From 6a33c269bddda4cdce941930aa834aad05770d62 Mon Sep 17 00:00:00 2001 From: darmac Date: Fri, 27 Mar 2020 15:44:41 +0800 Subject: [PATCH 013/138] sshpass: added new package (#15704) --- .../repos/builtin/packages/sshpass/package.py | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 var/spack/repos/builtin/packages/sshpass/package.py diff --git a/var/spack/repos/builtin/packages/sshpass/package.py b/var/spack/repos/builtin/packages/sshpass/package.py new file mode 100644 index 00000000000..499761a867d --- /dev/null +++ b/var/spack/repos/builtin/packages/sshpass/package.py @@ -0,0 +1,29 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Sshpass(AutotoolsPackage): + """Sshpass is a tool for non-interactivly performing password + authentication with SSH's so called "interactive keyboard + password authentication". Most user should use SSH's more + secure public key authentiaction instead.""" + + homepage = "https://sourceforge.net/projects/sshpass/" + url = "https://sourceforge.net/projects/sshpass/files/sshpass/1.06/sshpass-1.06.tar.gz" + + version('1.06', sha256='c6324fcee608b99a58f9870157dfa754837f8c48be3df0f5e2f3accf145dee60') + version('1.05', sha256='c3f78752a68a0c3f62efb3332cceea0c8a1f04f7cf6b46e00ec0c3000bc8483e') + version('1.04', sha256='e8abb9a409f25928722251a5855a74854f6d64af3eb136b804a04fd630d70c80') + version('1.03', sha256='5e8082343f5eae43598bb5723fa11bf49d3c9864dc58c7513fe1a90658e52b2f') + version('1.02', sha256='e580d999eefbd847c5cd0b36315cb6cd187315c4e7d1cb182b9f94c12c7c6a86') + version('1.01', sha256='e2adc378d61b72e63b4381fe123de3c63bd4093c9553d3219e83878f379754f4') + version('1.00', sha256='71d4be85a464a8ce2ae308bc04dcb342918f3989b6a81c74217b5df7f11471f8') + + depends_on('m4', type='build') + depends_on('autoconf', type='build') + depends_on('automake', type='build') + depends_on('libtool', type='build') From e1238bae9053d3c283c1721f85af78f3539f473d Mon Sep 17 00:00:00 2001 From: darmac Date: Fri, 27 Mar 2020 17:21:16 +0800 Subject: [PATCH 014/138] dpdk: added new package at v20.02 (#15635) --- .../repos/builtin/packages/dpdk/package.py | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 var/spack/repos/builtin/packages/dpdk/package.py diff --git a/var/spack/repos/builtin/packages/dpdk/package.py b/var/spack/repos/builtin/packages/dpdk/package.py new file mode 100644 index 00000000000..c25b32c8d7b --- /dev/null +++ b/var/spack/repos/builtin/packages/dpdk/package.py @@ -0,0 +1,29 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Dpdk(MakefilePackage): + """DPDK is a set of libraries and drivers for fast packet processing. + It supports many processor architectures and both FreeBSD and Linux.""" + + homepage = "https://github.com/DPDK/dpdk" + url = "https://github.com/DPDK/dpdk/archive/v19.11.tar.gz" + + version('20.02', sha256='29e56ea8e47e30110ecb881fa5a37125a865dd2d45b61f68e93e334caaab16b7') + version('19.11', sha256='ce1befb20a5e5c5399b326a39cfa23314a5229c0ced2553f53b09b1ae630706b') + version('19.08', sha256='1ceff1a6f4f8d5f6f62c1682097249227ac5225ccd9638e0af09f5411c681038') + version('19.05', sha256='5fea95cb726e6adaa506dab330e79563ccd4dacf03f126c826aabdced605d32b') + version('19.02', sha256='04885d32c86fff5aefcfffdb8257fed405233602dbcd22f8298be13c2e285a50') + + depends_on('numactl') + + def build(self, spec, prefix): + make('defconfig') + make() + + def install(self, spec, prefix): + install_tree('.', prefix) From 420b5dd4b96135f219cd15c67c929fe0109e75b1 Mon Sep 17 00:00:00 2001 From: Brian Homerding Date: Fri, 27 Mar 2020 06:07:57 -0500 Subject: [PATCH 015/138] MpiP: adding variant to build shared libraries (#10410) --- var/spack/repos/builtin/packages/mpip/package.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/var/spack/repos/builtin/packages/mpip/package.py b/var/spack/repos/builtin/packages/mpip/package.py index 36fe6e31a7a..ceaaba05b64 100644 --- a/var/spack/repos/builtin/packages/mpip/package.py +++ b/var/spack/repos/builtin/packages/mpip/package.py @@ -16,11 +16,21 @@ class Mpip(AutotoolsPackage): version('master', branch='master') version("3.4.1", sha256="688bf37d73211e6a915f9fc59c358282a266d166c0a10af07a38a01a473296f0") + variant('shared', default=False, description="Build the shared library") + depends_on("elf") depends_on("libdwarf") depends_on('libunwind', when=os.uname()[4] == "x86_64") depends_on("mpi") + @property + def build_targets(self): + targets = [] + if '+shared' in self.spec: + targets.append('shared') + + return targets + def configure_args(self): config_args = ['--without-f77'] config_args.append("--with-cc=%s" % self.spec['mpi'].mpicc) From 7df7b65cecd793ad867288191940714c16aad0b0 Mon Sep 17 00:00:00 2001 From: Toyohisa Kameyama Date: Fri, 27 Mar 2020 22:16:48 +0900 Subject: [PATCH 016/138] ppOpen-AT: New package (#15649) * ppOpen-AT: New package * use install instead of install-after. * use install_tree. * forget remove mkdir. --- .../builtin/packages/ppopen-at/package.py | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 var/spack/repos/builtin/packages/ppopen-at/package.py diff --git a/var/spack/repos/builtin/packages/ppopen-at/package.py b/var/spack/repos/builtin/packages/ppopen-at/package.py new file mode 100644 index 00000000000..92a8c302de6 --- /dev/null +++ b/var/spack/repos/builtin/packages/ppopen-at/package.py @@ -0,0 +1,28 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + + +from spack import * +import os + + +class PpopenAt(MakefilePackage): + """ppOpen-AT is a part of the ppOpenHPC""" + + homepage = "http://ppopenhpc.cc.u-tokyo.ac.jp/ppopenhpc/" + url = "file://{0}/ppohAT_1.0.0.tar.gz".format(os.getcwd()) + + version('1.0.0', sha256='2b5664839762c941e0b2dd7c15416e2dcfd5d909558cf7e4347a79ce535f3887') + + def edit(self, spec, prefix): + makefile_in = FileFilter('Makefile.in') + makefile_in.filter('gcc', spack_cxx) + makefile_in.filter('~/ppohAT_1.0.0', prefix) + makefile_in.filter('mkdir', 'mkdir -p') + + def install(self, spec, prefix): + make('install') + install_tree('examples', prefix.examples) + install_tree('doc', prefix.doc) From 108a0c99f15acceb0c1302cbdbc370bb2a0d75fa Mon Sep 17 00:00:00 2001 From: Andrew W Elble Date: Fri, 27 Mar 2020 11:51:04 -0400 Subject: [PATCH 017/138] TensorFlow: Make horovod compilation work (#15692) * TensorFlow: Clean up/simplify the installation, make sure the headers are installed so that horovod can find them successfully. Fix the 2.0.* builds. * Backport of 837c8b6b upstream "Remove contrib cloud bigtable and storage ops/kernels." Allows 2.0.* releases to build with '--config=nogcp' * comment regarding tensorflow issue #31187 Co-authored-by: Andrew W Elble --- ...loud-bigtable-and-storage-ops-kernel.patch | 76 +++++++++++++++++++ .../builtin/packages/py-tensorflow/package.py | 44 ++++++----- 2 files changed, 100 insertions(+), 20 deletions(-) create mode 100644 var/spack/repos/builtin/packages/py-tensorflow/0001-Remove-contrib-cloud-bigtable-and-storage-ops-kernel.patch diff --git a/var/spack/repos/builtin/packages/py-tensorflow/0001-Remove-contrib-cloud-bigtable-and-storage-ops-kernel.patch b/var/spack/repos/builtin/packages/py-tensorflow/0001-Remove-contrib-cloud-bigtable-and-storage-ops-kernel.patch new file mode 100644 index 00000000000..bb742ff1b42 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-tensorflow/0001-Remove-contrib-cloud-bigtable-and-storage-ops-kernel.patch @@ -0,0 +1,76 @@ +--- a/tensorflow/core/BUILD.orig 2020-01-22 18:43:57.000000000 -0500 ++++ b/tensorflow/core/BUILD 2020-03-26 16:33:17.318229701 -0400 +@@ -107,8 +107,6 @@ + load( + "//tensorflow/core/platform:default/build_config.bzl", + "tf_additional_all_protos", +- "tf_additional_cloud_kernel_deps", +- "tf_additional_cloud_op_deps", + "tf_additional_core_deps", + "tf_additional_cupti_wrapper_deps", + "tf_additional_device_tracer_cuda_deps", +@@ -1427,7 +1425,7 @@ + ]) + if_tensorrt([ + "//tensorflow/compiler/tf2tensorrt:trt_engine_resource_ops_op_lib", + "//tensorflow/compiler/tf2tensorrt:trt_op_libs", +- ]) + tf_additional_cloud_op_deps(), ++ ]), + alwayslink = 1, + ) + +@@ -1590,7 +1588,7 @@ + "//tensorflow/core/kernels:summary_kernels", + "//tensorflow/core/kernels:training_ops", + "//tensorflow/core/kernels:word2vec_kernels", +- ] + tf_additional_cloud_kernel_deps() + if_not_windows([ ++ ] + if_not_windows([ + "//tensorflow/core/kernels:fact_op", + "//tensorflow/core/kernels:array_not_windows", + "//tensorflow/core/kernels:math_not_windows", + +diff --git a/tensorflow/core/platform/default/build_config.bzl b/tensorflow/core/platform/default/build_config.bzl +index b822effa14e5..61a19bdf128f 100644 +--- a/tensorflow/core/platform/default/build_config.bzl ++++ b/tensorflow/core/platform/default/build_config.bzl +@@ -682,38 +682,6 @@ def tf_additional_core_deps(): + ], + }) + +-# TODO(jart, jhseu): Delete when GCP is default on. +-def tf_additional_cloud_op_deps(): +- return select({ +- "//tensorflow:android": [], +- "//tensorflow:ios": [], +- "//tensorflow:linux_s390x": [], +- "//tensorflow:windows": [], +- "//tensorflow:api_version_2": [], +- "//tensorflow:windows_and_api_version_2": [], +- "//tensorflow:no_gcp_support": [], +- "//conditions:default": [ +- "//tensorflow/contrib/cloud:bigquery_reader_ops_op_lib", +- "//tensorflow/contrib/cloud:gcs_config_ops_op_lib", +- ], +- }) +- +-# TODO(jhseu): Delete when GCP is default on. +-def tf_additional_cloud_kernel_deps(): +- return select({ +- "//tensorflow:android": [], +- "//tensorflow:ios": [], +- "//tensorflow:linux_s390x": [], +- "//tensorflow:windows": [], +- "//tensorflow:api_version_2": [], +- "//tensorflow:windows_and_api_version_2": [], +- "//tensorflow:no_gcp_support": [], +- "//conditions:default": [ +- "//tensorflow/contrib/cloud/kernels:bigquery_reader_ops", +- "//tensorflow/contrib/cloud/kernels:gcs_config_ops", +- ], +- }) +- + def tf_lib_proto_parsing_deps(): + return [ + ":protos_all_cc", +-- +2.19.1 + diff --git a/var/spack/repos/builtin/packages/py-tensorflow/package.py b/var/spack/repos/builtin/packages/py-tensorflow/package.py index d493c32283f..0444a2e09af 100644 --- a/var/spack/repos/builtin/packages/py-tensorflow/package.py +++ b/var/spack/repos/builtin/packages/py-tensorflow/package.py @@ -3,8 +3,7 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -import glob -import os +from glob import glob import sys @@ -241,6 +240,11 @@ class PyTensorflow(Package, CudaPackage): patch('io_bazel_rules_docker2.patch', when='@1.15:2.0') # Avoide build error: "name 'new_http_archive' is not defined" patch('http_archive.patch', when='@1.12.3') + # Backport of 837c8b6b upstream + # "Remove contrib cloud bigtable and storage ops/kernels." + # Allows 2.0.* releases to build with '--config=nogcp' + patch('0001-Remove-contrib-cloud-bigtable-and-storage-ops-kernel.patch', + when='@2.0.0:2.0.1') phases = ['configure', 'build', 'install'] @@ -581,6 +585,12 @@ def post_configure_fixes(self): spec['nccl'].prefix.include + '"', '.tf_configure.bazelrc') + # see tensorflow issue #31187 on github + if spec.satisfies('@2.0.0:2.0.1'): + filter_file(r'\#define RUY_DONOTUSEDIRECTLY_AVX512 1', + '#define RUY_DONOTUSEDIRECTLY_AVX512 0', + 'tensorflow/lite/experimental/ruy/platform.h') + if spec.satisfies('+cuda'): libs = spec['cuda'].libs.directories libs.extend(spec['cudnn'].libs.directories) @@ -679,30 +689,24 @@ def build(self, spec, prefix): build_pip_package = Executable( 'bazel-bin/tensorflow/tools/pip_package/build_pip_package') - build_pip_package(tmp_path) + buildpath = join_path(self.stage.source_path, 'spack-build') + build_pip_package('--src', buildpath) def install(self, spec, prefix): - with working_dir('spack-build', create=True): - for fn in glob.iglob(join_path( - '../bazel-bin/tensorflow/tools/pip_package', - 'build_pip_package.runfiles/org_tensorflow/*')): - dst = os.path.basename(fn) - if not os.path.exists(dst): - os.symlink(fn, dst) - for fn in glob.iglob('../tensorflow/tools/pip_package/*'): - dst = os.path.basename(fn) - if not os.path.exists(dst): - os.symlink(fn, dst) - - # macOS is case-insensitive, and BUILD file in directory - # containing setup.py causes the following error message: - # error: could not create 'build': File exists - # Delete BUILD file to prevent this. - os.remove('BUILD') + buildpath = join_path(self.stage.source_path, 'spack-build') + with working_dir(buildpath): setup_py('install', '--prefix={0}'.format(prefix), '--single-version-externally-managed', '--root=/') + site_packages_dir = join_path( + prefix.lib, + ('python' + str(self.spec['python'].version.up_to(2))), + 'site-packages') + fn = glob(join_path(site_packages_dir, "tensorflow-*")) + incpath = join_path(fn[0], "tensorflow/include") + setup_py('install_headers', '--install-dir={0}'.format(incpath)) + @run_after('install') @on_package_attributes(run_tests=True) def import_module_test(self): From 6e82761d4e2ac2dd42482c8e81fa68c8b1b138c8 Mon Sep 17 00:00:00 2001 From: Amjad Kotobi Date: Fri, 27 Mar 2020 16:58:50 +0100 Subject: [PATCH 018/138] New package Anaconda2 (#15676) --- .../builtin/packages/anaconda2/package.py | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 var/spack/repos/builtin/packages/anaconda2/package.py diff --git a/var/spack/repos/builtin/packages/anaconda2/package.py b/var/spack/repos/builtin/packages/anaconda2/package.py new file mode 100644 index 00000000000..e22ab88c8ba --- /dev/null +++ b/var/spack/repos/builtin/packages/anaconda2/package.py @@ -0,0 +1,47 @@ +# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * +from os.path import split + + +class Anaconda2(Package): + """Anaconda is a free and open-source distribution of the Python and + R programming languages for scientific computing, that aims to + simplify package management and deployment. Package versions are + managed by the package management system conda. + """ + + homepage = "https://www.anaconda.com" + url = "https://repo.anaconda.com/archive/Anaconda2-2019.10-Linux-x86_64.sh" + + maintainers = ['ajkotobi'] + + version('2019.10', sha256='8b2e7dea2da7d8cc18e822e8ec1804052102f4eefb94c1b3d0e586e126e8cd2f', expand=False) + version('2019.07', sha256='189e16e7adf9ba4b7b7d06ecdc10ce4ad4153e5e3505b9331f3d142243e18e97', expand=False) + version('2019.03', sha256='cedfee5b5a3f62fcdac0a1d2d12396d0f232d2213d24d6dc893df5d8e64b8773', expand=False) + version('2018.12', sha256='1821d4b623ed449e0acb6df3ecbabd3944cffa98f96a5234b7a102a7c0853dc6', expand=False) + version('5.3.1', sha256='f0650ad2f9ca4ae3f3162d7204a32950bc794f37f322eb47b5ad9412454f998c', expand=False) + version('5.3.0', sha256='50eeaab24bfa2472bc6485fe8f0e612ed67e561eda1ff9fbf07b62c96443c1be', expand=False) + version('5.2.0', sha256='cb0d7a08b0e2cec4372033d3269979b4e72e2353ffd1444f57cb38bc9621219f', expand=False) + version('5.1.0', sha256='5f26ee92860d1dffdcd20910ff2cf75572c39d2892d365f4e867a611cca2af5b', expand=False) + version('5.0.1', sha256='23c676510bc87c95184ecaeb327c0b2c88007278e0d698622e2dd8fb14d9faa4', expand=False) + version('5.0.0.1', sha256='18730808d863a5c194ab3f59dd395c1a63cbd769c9bfb1df65efe61ee62fc6d6', expand=False) + version('5.0.0', sha256='58a7117f89c40275114bf7e824a613a963da2b0fe63f2ec3c1175fea785b468e', expand=False) + version('4.4.0', sha256='2d30b91ed4d215b6b4a15162a3389e9057b15445a0c02da71bd7bd272e7b824e', expand=False) + version('4.3.1', sha256='e9b8f2645df6b1527ba56d61343162e0794acc3ee8dde2a6bba353719e2d878d', expand=False) + version('4.3.0', sha256='7c52e6e99aabb24a49880130615a48e685da444c3c14eb48d6a65f3313bf745c', expand=False) + version('4.2.0', sha256='beee286d24fb37dd6555281bba39b3deb5804baec509a9dc5c69185098cf661a', expand=False) + version('4.1.1', sha256='9413b1d3ca9498ba6f53913df9c43d685dd973440ff10b7fe0c45b1cbdcb582e', expand=False) + version('4.1.0', sha256='3b7e504ca0132fb555d1f10e174cae07007f1bc6898cad0f7d416a68aca01f45', expand=False) + version('4.0.0', sha256='ae312143952ca00e061a656c2080e0e4fd3532721282ba8e2978177cad71a5f0', expand=False) + version('2.5.0', sha256='e10abf459cde4a838bd6fc5ca03023c3401b81ad470627acde5a298d56715321', expand=False) + version('2.4.1', sha256='2de682c96edf8cca2852071a84ff860025fbe8c502218e1995acd5ab47e8c9ac', expand=False) + version('2.4.0', sha256='49d19834da06b1b82b6fa85bc647d2e78fa5957d0cbae3ccd6c695a541befa6b', expand=False) + + def install(self, spec, prefix): + dir, anaconda_script = split(self.stage.archive_file) + bash = which('bash') + bash(anaconda_script, '-b', '-f', '-p', self.prefix) From 16f104aafe2bb780f2d03c04aae0ccff333aa821 Mon Sep 17 00:00:00 2001 From: "Dr. Christian Tacke" <58549698+ChristianTackeGSI@users.noreply.github.com> Date: Fri, 27 Mar 2020 16:59:05 +0100 Subject: [PATCH 019/138] intel-tbb: new download url, fix sha256 (#15675) intel moved the repository around. github changes the prefix inside the tar according to the repository name. So all sha256 have changed! I verified that the tar contents for 2019.4 did not change except for the prefix. --- .../builtin/packages/intel-tbb/package.py | 72 ++++++++++--------- 1 file changed, 37 insertions(+), 35 deletions(-) diff --git a/var/spack/repos/builtin/packages/intel-tbb/package.py b/var/spack/repos/builtin/packages/intel-tbb/package.py index 6dbb1971f5c..20d8a2f9e99 100644 --- a/var/spack/repos/builtin/packages/intel-tbb/package.py +++ b/var/spack/repos/builtin/packages/intel-tbb/package.py @@ -17,45 +17,47 @@ class IntelTbb(Package): portable and composable, and that have future-proof scalability. """ homepage = "http://www.threadingbuildingblocks.org/" + url_prefix = 'https://github.com/oneapi-src/oneTBB/' + url = url_prefix + 'archive/v2020.1.tar.gz' # Note: when adding new versions, please check and update the # patches, filters and url_for_version() below as needed. version('2020.1', sha256='7c96a150ed22bc3c6628bc3fef9ed475c00887b26d37bca61518d76a56510971') - version('2020.0', sha256='8eed2377ac62e6ac10af5a8303ce861e4525ffe491a061b48e8fe094fc741ce9') - version('2019.9', sha256='15652f5328cf00c576f065e5cd3eaf3317422fe82afb67a9bcec0dc065bd2abe') - version('2019.8', sha256='7b1fd8caea14be72ae4175896510bf99c809cd7031306a1917565e6de7382fba') - version('2019.7', sha256='4204a93f4c0fd989fb6f79acae74feb02ee39725c93968773d9b6efeb75c7a6a') - version('2019.6', sha256='2ba197b3964fce8a84429dd15b75eba7434cb89afc54f86d5ee6f726fdbe97fd') - version('2019.5', sha256='2ea82d74dec50e18075b4982b8d360f8bd2bf2950f38e2db483aef82e0047444') - version('2019.4', sha256='342a0a2cd583879850658284b86e9351ea019b4f3fcd731f4c18456f0ce9f900') - version('2019.3', sha256='b2244147bc8159cdd8f06a38afeb42f3237d3fc822555499d7ccfbd4b86f8ece') - version('2019.2', sha256='1245aa394a92099e23ce2f60cdd50c90eb3ddcd61d86cae010ef2f1de61f32d9') - version('2019.1', sha256='a4875c6b6853213083e52ecd303546bdf424568ec67cfc7e51d132a7c037c66a') - version('2019', sha256='4d149895826cea785cd3b9a14f4aa743b6ef0df520eca7ee27d438fdc3d73399') - version('2018.6', sha256='d3e5fbca3cc643d03bf332d576ff85e19aa774b483f148f95cd7d09958372109') - version('2018.5', sha256='c4c2896af527392496c5e01ef8579058a71b6eebbd695924cd138841c13f07be') - version('2018.4', sha256='d5604a04787c8a037d4944eeb89792e7c45f6a83c141b20df7ee89c2fb012ed1') - version('2018.3', sha256='23793c8645480148e9559df96b386b780f92194c80120acce79fcdaae0d81f45') - version('2018.2', sha256='78bb9bae474736d213342f01fe1a6d00c6939d5c75b367e2e43e7bf29a6d8eca') - version('2018.1', sha256='c6462217d4ecef2b44fce63cfdf31f9db4f6ff493869899d497a5aef68b05fc5') - version('2018', sha256='94f643f1edfaccb57d64b503c7c96f00dec64e8635c054bbaa33855d72c5822d') - version('2017.8', sha256='1b1357f280e750d42506212adad02f85ac07c9d3e3c0813104f9122ef350497f') - version('2017.7', sha256='78ad6ec9dd492b9dcc4753938b06716f7458506084adc138ced09aa0aa609b6b') - version('2017.6', sha256='40d5409a6fd7e214a21fd1949df422ba113fa78fde42a6aac40a2fba36e9bcdb') - version('2017.5', sha256='3122c87a35fde759567c8579ba36a36037c6df84c3f9c4df6c9e171f866f352f') - version('2017.4', sha256='ed4f0cfc4acec8a0cf253037e8c555dd32ebe1b80b34fb0e3b2bf54087932562') - version('2017.3', sha256='00a8b2798c498507572e24c2db7bf4896f05b760a38ed9ba566ffd348a7c6cef') - version('2017.2', sha256='85e44041d967ce8c70077dbb57941cfa1d351688855aec47eb14c74eb2075f28') - version('2017.1', sha256='a68bb7926fb9bee2a5f17b293c6d6aa33ccb089c3b321569bd4fe281cf65fa77') - version('2017', sha256='c49139279067df1260dae4f0fe7e4d485898ce45e5f7e314c37eb5da8a0c303a') - version('4.4.6', sha256='1d6b7e7db9141238c70984103f04280605dbcaa7fbcd049d332d2e73deed4f6d') - version('4.4.5', sha256='984308f9dd8a36ff274c124b6f7f7d0ff74d4b7ebdf06511af78e098b5b6e70f') - version('4.4.4', sha256='40e94c1adfd13308d207971629316ae9f76639b24f080bae8757c42d35778f10') - version('4.4.3', sha256='9acb1c4e71edc3d5004ab9f0ed2bbd697ecec28a4315bbd2be8c5365e8214b90') - version('4.4.2', sha256='3f6d7a32ac8b58469de7df3a2fcfe318793241ea39ce73aae1e637dbed833375') - version('4.4.1', sha256='d67c5860ba1116b320b0d60a0ce403b088dc19355ab32c28cdaa3e352609713a') - version('4.4', sha256='88e37f08ffcfaa24a2caf6c1a9084000cce689cc4b11edea7e89b20ab74ceceb') + version('2020.0', sha256='57714f2d2cf33935db33cee93af57eb3ecd5a7bef40c1fb7ca4a41d79684b118') + version('2019.9', sha256='3f5ea81b9caa195f1967a599036b473b2e7c347117330cda99b79cfcf5b77c84') + version('2019.8', sha256='6b540118cbc79f9cbc06a35033c18156c21b84ab7b6cf56d773b168ad2b68566') + version('2019.7', sha256='94847fc627ed081c63ea253e31f23645ed3671548106b095ce303d1da5d76275') + version('2019.6', sha256='21cd496ac768560e70d35e5423878aa3bcf0285f7194be77935d8febf0b18f47') + version('2019.5', sha256='abf9236e6ec9a3675fa59ab56c2192c7ab4f7096a82af118e8efa514b2541578') + version('2019.4', sha256='673e540aba6e526b220cbeacc3e4ff7b19a8689a00d7a09a9dc94396d73b24df') + version('2019.3', sha256='4cb6bde796ae056e7c29f31bfdc6cfd0cfe848925219e9c82a20f09158e81542') + version('2019.2', sha256='3bbe21054bd5b593ef99d4dfe451432cbf1f6f9429cd0dd543e879ef7e4e3327') + version('2019.1', sha256='e6fb8dd1a1ae834b4e5f4ae6c4c87a3362f81a3aaeddfa6325168c6cfee59391') + version('2019', sha256='91f00308a4e431bd9632b439d516134d7084f1eb35f52b7c9b111b46bdfcf093') + version('2018.6', sha256='0ebb5fc877871ef15f7395d6e3c86de4ffedb820dc336383a3ab71fc39426aa7') + version('2018.5', sha256='b8dbab5aea2b70cf07844f86fa413e549e099aa3205b6a04059ca92ead93a372') + version('2018.4', sha256='c973b41b6da3db10efa7e14ce64a850e3fbfbcc16374494a005bf994d53a770a') + version('2018.3', sha256='e5f19d747f6adabfc7daf2cc0a1ddcfab0f26bc083d70ea0a63def4a9f3919c5') + version('2018.2', sha256='733c4dba646573b8285b1923dc106f0d771725bea620baa3659c86ab9312a1f4') + version('2018.1', sha256='a9f51e0d081fbdda441d0150e759c7562318d6d7bc5a0c9a9d8064217d4d8d8d') + version('2018', sha256='d427c58a59863c5f9510fffb3d05cd1bcc7abb94cdde1613407559e88b1263ab') + version('2017.8', sha256='227cc1a8329da67f9957285f0020ad4d73d9ce26cbf88614349b8b74bb189ae1') + version('2017.7', sha256='f487243e5931e967479189ef75946f02e3bb666ea73dcc19ac2828edd5550746') + version('2017.6', sha256='b0f40edd010b90ce2519c1cebfa6f33216a1828d4fba19291b5cd23bd7fe809b') + version('2017.5', sha256='b785e7181317350f0bb20f7bffda20bdecde7e82b824d2e5eb6d408a3b9cbeaf') + version('2017.4', sha256='9a70ae3068767bf8c530bf98b9bbc655e36e82a301b347f7de76f99f401df1dd') + version('2017.3', sha256='230ed3ff32bb3e91df1f59e4a3a567bde02639d9970b7e87cee0421b4c0b0f23') + version('2017.2', sha256='dd37c896f95ca2357e828c24c9c4a169c6a6b5c905b3862a6cab09474d164497') + version('2017.1', sha256='9b5b36b6d0ed97a3a1711b9095e78aed79bc998957a4a6b3d8a7af063523f037') + version('2017', sha256='470544b0f374987273cc12e7706353edba8f9547578291d45b5b29358d4e5e81') + version('4.4.6', sha256='65101b3a0eda38320ec3e3603daa79c54e6a60fb59ed2959738eaf4ce6d17f0a') + version('4.4.5', sha256='2e372703fe444442c77760229897f00bb4babff62f7d0861b3f2783883cb257e') + version('4.4.4', sha256='3ed03838c4e368b78305b0561cac48d369919bb4d9d68edd4d8a3becd6f62f5c') + version('4.4.3', sha256='f0ff2e3735c8057b792f29c96f4f7623c1e4c76abfeda88be48645b8338c0f00') + version('4.4.2', sha256='1ab10e70354685cee3ddf614f3e291434cea86c8eb62031e025f4052278152ad') + version('4.4.1', sha256='05737bf6dd220b31aad63d77ca59c742271f81b4cc6643aa6f93d37450ae32b5') + version('4.4', sha256='93c74b6054c69c86fa49d0fce7c50061fc907cb198a7237b8dd058298fd40c0e') provides('tbb') @@ -113,7 +115,7 @@ class IntelTbb(Package): # 4.4.6 --> 4.4.6.tar.gz # def url_for_version(self, version): - url = 'https://github.com/intel/tbb/archive/{0}.tar.gz' + url = self.url_prefix + 'archive/{0}.tar.gz' if version[0] >= 2020: name = 'v{0}'.format(version) elif version[0] >= 2017 and len(version) > 1: From 0f8148b258a2ff0eea08e20876e5f76e842f9e83 Mon Sep 17 00:00:00 2001 From: iarspider Date: Fri, 27 Mar 2020 17:16:40 +0100 Subject: [PATCH 020/138] py-attrs: add version 19.3.0 (#15709) --- var/spack/repos/builtin/packages/py-attrs/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-attrs/package.py b/var/spack/repos/builtin/packages/py-attrs/package.py index cf9950c1ce2..64c8aa5426e 100644 --- a/var/spack/repos/builtin/packages/py-attrs/package.py +++ b/var/spack/repos/builtin/packages/py-attrs/package.py @@ -14,6 +14,7 @@ class PyAttrs(PythonPackage): import_modules = ['attr'] + version('19.3.0', sha256='f7b7ce16570fe9965acd6d30101a28f62fb4a7f9e926b3bbc9b61f8b04247e72') version('19.2.0', sha256='f913492e1663d3c36f502e5e9ba6cd13cf19d7fab50aa13239e420fef95e1396') version('19.1.0', sha256='f0b870f674851ecbfbbbd364d6b5cbdff9dcedbc7f3f5e18a6891057f21fe399') version('18.1.0', sha256='e0d0eb91441a3b53dab4d9b743eafc1ac44476296a2053b6ca3af0b139faf87b') @@ -26,5 +27,6 @@ class PyAttrs(PythonPackage): depends_on('py-hypothesis', type='test') depends_on('py-pympler', type='test') depends_on('py-pytest', type='test') + depends_on('py-pytest@4.3.0:', type='test', when='@19.3.0:') depends_on('py-six', type='test') depends_on('py-zope-interface', type='test') From 953bd04cb375beb745b2993eed815d76ed4e1f9c Mon Sep 17 00:00:00 2001 From: iarspider Date: Fri, 27 Mar 2020 17:21:42 +0100 Subject: [PATCH 021/138] Bison: add version 3.3.2 (#15707) --- var/spack/repos/builtin/packages/bison/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/bison/package.py b/var/spack/repos/builtin/packages/bison/package.py index a0b04062408..0a51dd583e0 100644 --- a/var/spack/repos/builtin/packages/bison/package.py +++ b/var/spack/repos/builtin/packages/bison/package.py @@ -18,6 +18,7 @@ class Bison(AutotoolsPackage, GNUMirrorPackage): version('3.4.2', sha256='ff3922af377d514eca302a6662d470e857bd1a591e96a2050500df5a9d59facf') version('3.4.1', sha256='7007fc89c216fbfaff5525359b02a7e5b612694df5168c74673f67055f015095') + version('3.3.2', sha256='0fda1d034185397430eb7b0c9e140fb37e02fbfc53b90252fa5575e382b6dbd1') version('3.0.5', sha256='cd399d2bee33afa712bac4b1f4434e20379e9b4099bce47189e09a7675a2d566') version('3.0.4', sha256='b67fd2daae7a64b5ba862c66c07c1addb9e6b1b05c5f2049392cfd8a2172952e') version('2.7', sha256='19bbe7374fd602f7a6654c131c21a15aebdc06cc89493e8ff250cb7f9ed0a831') From 0ca5ad237a7ec10a148325b2c3601c024345788c Mon Sep 17 00:00:00 2001 From: noguchi-k <55966120+noguchi-k@users.noreply.github.com> Date: Sat, 28 Mar 2020 01:29:30 +0900 Subject: [PATCH 022/138] denovogear: fixed comparison error (#15638) --- .../builtin/packages/denovogear/newmat6.cpp.patch | 11 +++++++++++ .../repos/builtin/packages/denovogear/package.py | 2 ++ 2 files changed, 13 insertions(+) create mode 100644 var/spack/repos/builtin/packages/denovogear/newmat6.cpp.patch diff --git a/var/spack/repos/builtin/packages/denovogear/newmat6.cpp.patch b/var/spack/repos/builtin/packages/denovogear/newmat6.cpp.patch new file mode 100644 index 00000000000..36d2e240cd8 --- /dev/null +++ b/var/spack/repos/builtin/packages/denovogear/newmat6.cpp.patch @@ -0,0 +1,11 @@ +--- spack-src/src/contrib/newmat/newmat6.cpp.org 2020-03-19 14:06:13.679032667 +0900 ++++ spack-src/src/contrib/newmat/newmat6.cpp 2020-03-19 14:07:34.267492838 +0900 +@@ -428,7 +428,7 @@ + { + if (&gm == this) { REPORT tag_val = -1; return; } + REPORT +- if (indx > 0) { delete [] indx; indx = 0; } ++ if (indx != NULL) { delete [] indx; indx = 0; } + ((CroutMatrix&)gm).get_aux(*this); + Eq(gm); + } diff --git a/var/spack/repos/builtin/packages/denovogear/package.py b/var/spack/repos/builtin/packages/denovogear/package.py index 8f475492c15..bc683febeff 100644 --- a/var/spack/repos/builtin/packages/denovogear/package.py +++ b/var/spack/repos/builtin/packages/denovogear/package.py @@ -25,3 +25,5 @@ class Denovogear(CMakePackage): depends_on('zlib', type=('link')) patch('stream-open.patch', when='@:1.1.1') + # fix: ordered comparison between pointer and zero. + patch('newmat6.cpp.patch') From fb5afb4cb4326c745e147c8b6d1d5473297ebc78 Mon Sep 17 00:00:00 2001 From: Hector <10837193+he-b@users.noreply.github.com> Date: Fri, 27 Mar 2020 11:33:33 -0500 Subject: [PATCH 023/138] add source-highlight variant to gdb (#15634) --- var/spack/repos/builtin/packages/gdb/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/gdb/package.py b/var/spack/repos/builtin/packages/gdb/package.py index 825291feb09..355f59cbdf4 100644 --- a/var/spack/repos/builtin/packages/gdb/package.py +++ b/var/spack/repos/builtin/packages/gdb/package.py @@ -33,6 +33,7 @@ class Gdb(AutotoolsPackage, GNUMirrorPackage): variant('python', default=True, description='Compile with Python support') variant('xz', default=True, description='Compile with lzma support') + variant('source-highlight', default=False, description='Compile with source-highlight support') # Required dependency depends_on('texinfo', type='build') @@ -40,6 +41,7 @@ class Gdb(AutotoolsPackage, GNUMirrorPackage): # Optional dependencies depends_on('python', when='+python') depends_on('xz', when='+xz') + depends_on('source-highlight', when='+source-highlight') build_directory = 'spack-build' From c3e41444ffe39f158412ac3619bc78a750c2dac2 Mon Sep 17 00:00:00 2001 From: darmac Date: Sat, 28 Mar 2020 00:34:03 +0800 Subject: [PATCH 024/138] Add new package: zfs (#15632) --- .../repos/builtin/packages/zfs/package.py | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 var/spack/repos/builtin/packages/zfs/package.py diff --git a/var/spack/repos/builtin/packages/zfs/package.py b/var/spack/repos/builtin/packages/zfs/package.py new file mode 100644 index 00000000000..819dc2d7553 --- /dev/null +++ b/var/spack/repos/builtin/packages/zfs/package.py @@ -0,0 +1,28 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Zfs(AutotoolsPackage): + """OpenZFS is an advanced file system and volume manager which was + originally developed for Solaris and is now maintained by the OpenZFS + community. This repository contains the code for running OpenZFS on + Linux and FreeBSD.""" + + homepage = "https://zfsonlinux.org/" + url = "https://github.com/openzfs/zfs/releases/download/zfs-0.8.3/zfs-0.8.3.tar.gz" + + version('0.8.3', sha256='545a4897ce30c2d2dd9010a0fdb600a0d3d45805e2387093c473efc03aa9d7fd') + version('0.8.2', sha256='47608e257c8ecebb918014ef1da6172c3a45d990885891af18e80f5cc28beab8') + version('0.8.1', sha256='0af79fde44b7b8ecb94d5166ce2e4fff7409c20ed874c2d759db92909e6c2799') + version('0.8.0', sha256='0fd92e87f4b9df9686f18e2ac707c16b2eeaf00f682d41c20ea519f3a0fe4705') + + depends_on('libuuid') + depends_on('libtirpc') + depends_on('util-linux') + + def setup_build_environment(self, env): + env.prepend_path('CPATH', self.spec['util-linux'].prefix.include) From d7454baa558e28bb3135bfeb03510da323a467a9 Mon Sep 17 00:00:00 2001 From: darmac Date: Sat, 28 Mar 2020 00:35:08 +0800 Subject: [PATCH 025/138] util-linux: add libmount variant (#15631) --- var/spack/repos/builtin/packages/util-linux/package.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/var/spack/repos/builtin/packages/util-linux/package.py b/var/spack/repos/builtin/packages/util-linux/package.py index d4887601a06..ccd6bba9aa3 100644 --- a/var/spack/repos/builtin/packages/util-linux/package.py +++ b/var/spack/repos/builtin/packages/util-linux/package.py @@ -24,15 +24,22 @@ class UtilLinux(AutotoolsPackage): depends_on('python@2.7:') depends_on('pkgconfig') + depends_on('gettext', when='+libmount') # Make it possible to disable util-linux's libuuid so that you may # reliably depend_on(`libuuid`). variant('libuuid', default=True, description='Build libuuid') + variant('libmount', default=False, description='Build libmount.so with gettext') def url_for_version(self, version): url = "https://www.kernel.org/pub/linux/utils/util-linux/v{0}/util-linux-{1}.tar.gz" return url.format(version.up_to(2), version) + def setup_build_environment(self, env): + if '+libmount' in self.spec: + env.append_flags('LDFLAGS', '-L{0} -lintl'.format( + self.spec['gettext'].prefix.lib)) + def configure_args(self): config_args = [ '--disable-use-tty-group', From c5e74fef329cbbc715d9087932bda146c8cdf269 Mon Sep 17 00:00:00 2001 From: "Nichols A. Romero" Date: Fri, 27 Mar 2020 11:38:28 -0500 Subject: [PATCH 026/138] QMCPACK Update March 2020 - Part 2 (#15616) * Add some comments explaining the choice of flag_handler. * Fix QMCPACK install method. * Add support for ppconvert. This requires a custom build method. * Fix QMCPACK setup_run_environment. Nexus should be properly supported now. * Cleaner way to check for intel-mkl in spec. * Remove build method and use build_targets property instead. * Additional fixed for install method. Effectively restoring the original install method. * Add the missing backslash to fix directory names. * Update var/spack/repos/builtin/packages/qmcpack/package.py Co-Authored-By: Adam J. Stewart * Update var/spack/repos/builtin/packages/qmcpack/package.py Co-Authored-By: Adam J. Stewart * Update var/spack/repos/builtin/packages/qmcpack/package.py Co-Authored-By: Adam J. Stewart * Omit these conflicts on mkl variants for now, will hopefully be supportted with new concretizer in a couple of months. Co-authored-by: Adam J. Stewart --- .../repos/builtin/packages/qmcpack/package.py | 88 ++++++++----------- .../packages/quantum-espresso/package.py | 9 +- 2 files changed, 44 insertions(+), 53 deletions(-) diff --git a/var/spack/repos/builtin/packages/qmcpack/package.py b/var/spack/repos/builtin/packages/qmcpack/package.py index ba67282c0c2..9484e8a1693 100644 --- a/var/spack/repos/builtin/packages/qmcpack/package.py +++ b/var/spack/repos/builtin/packages/qmcpack/package.py @@ -59,6 +59,8 @@ class Qmcpack(CMakePackage, CudaPackage): variant('afqmc', default=False, description='Install with AFQMC support. NOTE that if used in ' 'combination with CUDA, only AFQMC will have CUDA.') + variant('ppconvert', default=False, + description='Install with pseudopotential converter.') # Notes about CUDA-centric peculiarities: # @@ -92,8 +94,9 @@ class Qmcpack(CMakePackage, CudaPackage): conflicts('^openblas+ilp64', msg='QMCPACK does not support OpenBLAS 64-bit integer variant') - conflicts('^intel-mkl+ilp64', - msg='QMCPACK does not support MKL 64-bit integer variant') + # Omitted for now due to concretizer bug + # conflicts('^intel-mkl+ilp64', + # msg='QMCPACK does not support MKL 64-bit integer variant') # QMCPACK 3.6.0 or later requires support for C++14 compiler_warning = 'QMCPACK 3.6.0 or later requires a ' \ @@ -184,6 +187,8 @@ class Qmcpack(CMakePackage, CudaPackage): patch_checksum = 'c066c79901a612cf8848135e0d544efb114534cca70b90bfccc8ed989d3d9dde' patch(patch_url, sha256=patch_checksum, when='@3.1.0:3.3.0') + # the default flag_handler for Spack causes problems for QMCPACK + # https://spack.readthedocs.io/en/latest/packaging_guide.html#the-build-environment: flag_handler = CMakePackage.build_system_flags @when('@:3.7.0') @@ -194,6 +199,15 @@ def patch(self): '${LIBXML2_HOME}/lib $ENV{LIBXML2_HOME}/lib', 'CMake/FindLibxml2QMC.cmake') + @property + def build_targets(self): + spec = self.spec + targets = ['all'] + if '+ppconvert' in spec: + targets.append('ppconvert') + + return targets + def cmake_args(self): spec = self.spec args = [] @@ -323,21 +337,29 @@ def cmake_args(self): # Next two environment variables were introduced in QMCPACK 3.5.0 # Prior to v3.5.0, these lines should be benign but CMake # may issue a warning. - if 'intel-mkl' in spec: + if '^mkl' in spec: args.append('-DENABLE_MKL=1') args.append('-DMKL_ROOT=%s' % env['MKLROOT']) else: args.append('-DENABLE_MKL=0') + # ppconvert is not build by default because it may exhibit numerical + # issues on some systems + if '+ppconvert' in spec: + args.append('-DBUILD_PPCONVERT=1') + else: + args.append('-DBUILD_PPCONVERT=0') + return args - # QMCPACK 3.6.0 release and later has a functional 'make install', - # the Spack 'def install' is retained for backwards compatiblity. - # Note that the two install methods differ in their directory - # structure. Additionally, we follow the recommendation on the Spack - # website for defining the compilers to be the MPI compiler wrappers. + # QMCPACK needs custom install method for a couple of reasons: + # Firstly, wee follow the recommendation on the Spack website + # for defining the compilers variables to be the MPI compiler wrappers. # https://spack.readthedocs.io/en/latest/packaging_guide.html#compiler-wrappers - @when('@3.6.0:') + # + # Note that 3.6.0 release and later has a functioning 'make install', + # but still does not install nexus, manual, etc. So, there is no compelling + # reason to use QMCPACK's built-in version at this time. def install(self, spec, prefix): if '+mpi' in spec: env['CC'] = spec['mpi'].mpicc @@ -345,57 +367,25 @@ def install(self, spec, prefix): env['F77'] = spec['mpi'].mpif77 env['FC'] = spec['mpi'].mpifc - with working_dir(self.build_directory): - make('install') - - @when('@:3.5.0') - def install(self, spec, prefix): - if '+mpi' in spec: - env['CC'] = spec['mpi'].mpicc - env['CXX'] = spec['mpi'].mpicxx - env['F77'] = spec['mpi'].mpif77 - env['FC'] = spec['mpi'].mpifc - - # QMCPACK 'make install' does nothing, which causes - # Spack to throw an error. - # - # This install method creates the top level directory - # and copies the bin subdirectory into the appropriate - # location. We do not copy include or lib at this time due - # to technical difficulties in qmcpack itself. - + # create top-level directory mkdirp(prefix) - # We assume cwd is self.stage.source_path - - # install manual + # We assume cwd is self.stage.source_path, then + # install manual, labs, and nexus install_tree('manual', prefix.manual) - - # install nexus + install_tree('labs', prefix.labs) install_tree('nexus', prefix.nexus) + # install binaries with working_dir(self.build_directory): - mkdirp(prefix) - - # install binaries install_tree('bin', prefix.bin) - # QMCPACK 3.6.0 install directory structure changed, thus there - # thus are two version of the setup_run_environment method - @when('@:3.5.0') def setup_run_environment(self, env): """Set-up runtime environment for QMCPACK. - Set PYTHONPATH for basic analysis scripts and for Nexus.""" - env.prepend_path('PYTHONPATH', self.prefix.nexus) + Set PATH and PYTHONPATH for basic analysis scripts for Nexus.""" - @when('@3.6.0:') - def setup_run_environment(self, env): - """Set-up runtime environment for QMCPACK. - Set PYTHONPATH for basic analysis scripts and for Nexus. Binaries - are in the 'prefix' directory instead of 'prefix.bin' which is - not set by the default module environment""" - env.prepend_path('PATH', self.prefix) - env.prepend_path('PYTHONPATH', self.prefix) + env.prepend_path('PATH', self.prefix.nexus.bin) + env.prepend_path('PYTHONPATH', self.prefix.nexus.lib) @run_after('build') @on_package_attributes(run_tests=True) diff --git a/var/spack/repos/builtin/packages/quantum-espresso/package.py b/var/spack/repos/builtin/packages/quantum-espresso/package.py index 403a8a3082c..52fb46c7843 100644 --- a/var/spack/repos/builtin/packages/quantum-espresso/package.py +++ b/var/spack/repos/builtin/packages/quantum-espresso/package.py @@ -76,11 +76,12 @@ class QuantumEspresso(Package): patch('dspev_drv_elpa.patch', when='@6.1.0:+patch+elpa ^elpa@2016.05.003') # Conflicts + # Omitted for now due to concretizer bug # MKL with 64-bit integers not supported. - conflicts( - '^mkl+ilp64', - msg='Quantum ESPRESSO does not support MKL 64-bit integer variant' - ) + # conflicts( + # '^mkl+ilp64', + # msg='Quantum ESPRESSO does not support MKL 64-bit integer variant' + # ) # We can't ask for scalapack or elpa if we don't want MPI conflicts( From b397af5d9cfa685d2a41ede488e027561035087c Mon Sep 17 00:00:00 2001 From: Sinan Date: Fri, 27 Mar 2020 09:42:58 -0700 Subject: [PATCH 027/138] Package/qscintilla: python bindings via extend path (#15599) * build python bindings within qscintilla package via extend_path trick * add todo * reflect new setup also in py-pyqt4 package * get rid of qscintilla dependency * also tweak qgis for the new setup * generalize the building of python bindings * generalize building of pythong bindings to all qt versions * add qsci_api variant * add qsci_variant for pyqt4 package as well; add comment * pyqt dependency should build with +qsci_api variant enabled * fix bugs * improve style * reflect recent changes * flake8 * improve style * more flake8 * more flake8 Co-authored-by: Sinan81 --- .../builtin/packages/py-pyqt4/package.py | 64 ++------------- .../builtin/packages/py-pyqt5/package.py | 67 ++-------------- .../repos/builtin/packages/qgis/package.py | 6 +- .../builtin/packages/qscintilla/package.py | 78 ++++++++++++++++++- 4 files changed, 89 insertions(+), 126 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-pyqt4/package.py b/var/spack/repos/builtin/packages/py-pyqt4/package.py index d1a90042d95..6c5af83cb26 100644 --- a/var/spack/repos/builtin/packages/py-pyqt4/package.py +++ b/var/spack/repos/builtin/packages/py-pyqt4/package.py @@ -4,7 +4,6 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * -import os class PyPyqt4(SIPPackage): @@ -29,21 +28,13 @@ class PyPyqt4(SIPPackage): version('4.11.3', sha256='853780dcdbe2e6ba785d703d059b096e1fc49369d3e8d41a060be874b8745686', url='http://sourceforge.net/projects/pyqt/files/PyQt4/PyQt-4.11.3/PyQt-x11-gpl-4.11.3.tar.gz') - variant('qsci', default=False, description='Build with QScintilla python bindings') + # API files can be installed regardless if QScintilla is installed or not + variant('qsci_api', default=False, description='Install PyQt API file for QScintilla') # Supposedly can also be built with Qt 5 compatibility layer depends_on('qt@:4') - depends_on('qscintilla', when='+qsci') depends_on('py-sip module=PyQt4.sip') - # For building Qscintilla python bindings - resource(name='qscintilla', - url='https://www.riverbankcomputing.com/static/Downloads/QScintilla/2.10.2/QScintilla_gpl-2.10.2.tar.gz', - sha256='14b31d20717eed95ea9bea4cd16e5e1b72cee7ebac647cba878e0f6db6a65ed0', - destination='spack-resource-qscintilla', - when='^qscintilla@2.10.2' - ) - # https://www.riverbankcomputing.com/static/Docs/PyQt4/installation.html def configure_file(self): return 'configure-ng.py' @@ -54,52 +45,7 @@ def configure_args(self): '--sipdir', self.prefix.share.sip.PyQt4, '--stubsdir', join_path(site_packages_dir, 'PyQt4') ] - if '+qsci' in self.spec: - args.extend(['--qsci-api-destdir', self.prefix.share.qsci]) + if '+qsci_api' in self.spec: + args.extend(['--qsci-api', + '--qsci-api-destdir', self.prefix.share.qsci]) return args - - @run_after('install') - def make_qsci(self): - if '+qsci' in self.spec: - rsrc_py_path = os.path.join( - self.stage.source_path, - 'spack-resource-qscintilla/QScintilla_gpl-' + - str(self.spec['qscintilla'].version), 'Python') - with working_dir(rsrc_py_path): - pydir = join_path(site_packages_dir, 'PyQt4') - python = self.spec['python'].command - python('configure.py', - '--sip=' + self.spec['py-sip'].prefix.bin.sip, - '--qsci-incdir=' + - self.spec['qscintilla'].prefix.include, - '--qsci-libdir=' + self.spec['qscintilla'].prefix.lib, - '--qsci-sipdir=' + self.prefix.share.sip.PyQt4, - '--apidir=' + self.prefix.share.qsci, - '--destdir=' + pydir, - '--pyqt-sipdir=' + self.prefix.share.sip.PyQt4, - '--sip-incdir=' + - join_path(self.spec['py-sip'].prefix.include, - 'python' + - str(self.spec['python'].version.up_to(2))), - '--stubsdir=' + pydir) - - # Fix build errors - # "QAbstractScrollArea: No such file or directory" - # "qprinter.h: No such file or directory" - # ".../Qsci.so: undefined symbol: _ZTI10Qsci...." - qscipro = FileFilter('Qsci/Qsci.pro') - link_qscilibs = 'LIBS += -L' + self.prefix.lib +\ - ' -lqscintilla2_qt4' - qscipro.filter('TEMPLATE = lib', - 'TEMPLATE = lib\nQT += widgets' + - '\nQT += printsupport\n' + link_qscilibs) - - make() - - # Fix installation prefixes - makefile = FileFilter('Makefile') - makefile.filter(r'\$\(INSTALL_ROOT\)', '') - makefile = FileFilter('Qsci/Makefile') - makefile.filter(r'\$\(INSTALL_ROOT\)', '') - - make('install') diff --git a/var/spack/repos/builtin/packages/py-pyqt5/package.py b/var/spack/repos/builtin/packages/py-pyqt5/package.py index bc37d4dcab1..e26c66a891c 100644 --- a/var/spack/repos/builtin/packages/py-pyqt5/package.py +++ b/var/spack/repos/builtin/packages/py-pyqt5/package.py @@ -4,7 +4,6 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * -import os class PyPyqt5(SIPPackage): @@ -30,7 +29,8 @@ class PyPyqt5(SIPPackage): version('5.13.0', sha256='0cdbffe5135926527b61cc3692dd301cd0328dd87eeaf1313e610787c46faff9') version('5.12.3', sha256='0db0fa37debab147450f9e052286f7a530404e2aaddc438e97a7dcdf56292110') - variant('qsci', default=False, description='Build with QScintilla python bindings') + # API files can be installed regardless if Qscintilla is installed or not + variant('qsci_api', default=False, description='Install PyQt API file for QScintilla') # Without opengl support, I got the following error: # sip: QOpenGLFramebufferObject is undefined @@ -39,15 +39,6 @@ class PyPyqt5(SIPPackage): depends_on('py-enum34', type=('build', 'run'), when='^python@:3.3') depends_on('py-sip module=PyQt5.sip', type=('build', 'run')) depends_on('py-sip@:4.19.18 module=PyQt5.sip', type=('build', 'run'), when='@:5.13.0') - depends_on('qscintilla', when='+qsci') - - # For building Qscintilla python bindings - resource(name='qscintilla', - url='https://www.riverbankcomputing.com/static/Downloads/QScintilla/2.10.2/QScintilla_gpl-2.10.2.tar.gz', - sha256='14b31d20717eed95ea9bea4cd16e5e1b72cee7ebac647cba878e0f6db6a65ed0', - destination='spack-resource-qscintilla', - when='^qscintilla@2.10.2' - ) # https://www.riverbankcomputing.com/static/Docs/PyQt5/installation.html def configure_args(self): @@ -59,55 +50,7 @@ def configure_args(self): self.spec['python'].package.site_packages_dir, 'PyQt5'), ] - if '+qsci' in self.spec: - args.extend(['--qsci-api-destdir', self.prefix.share.qsci]) + if '+qsci_api' in self.spec: + args.extend(['--qsci-api', + '--qsci-api-destdir', self.prefix.share.qsci]) return args - - @run_after('install') - def make_qsci(self): - if '+qsci' in self.spec: - rsrc_py_path = os.path.join( - self.stage.source_path, - 'spack-resource-qscintilla/QScintilla_gpl-' + - str(self.spec['qscintilla'].version), 'Python') - with working_dir(rsrc_py_path): - pydir = join_path( - self.prefix, - self.spec['python'].package.site_packages_dir, - 'PyQt5') - python = self.spec['python'].command - python('configure.py', '--pyqt=PyQt5', - '--sip=' + self.spec['py-sip'].prefix.bin.sip, - '--qsci-incdir=' + - self.spec['qscintilla'].prefix.include, - '--qsci-libdir=' + self.spec['qscintilla'].prefix.lib, - '--qsci-sipdir=' + self.prefix.share.sip.PyQt5, - '--apidir=' + self.prefix.share.qsci, - '--destdir=' + pydir, - '--pyqt-sipdir=' + self.prefix.share.sip.PyQt5, - '--sip-incdir=' + - join_path(self.spec['py-sip'].prefix.include, - 'python' + - str(self.spec['python'].version.up_to(2))), - '--stubsdir=' + pydir) - - # Fix build errors - # "QAbstractScrollArea: No such file or directory" - # "qprinter.h: No such file or directory" - # ".../Qsci.so: undefined symbol: _ZTI10Qsci...." - qscipro = FileFilter('Qsci/Qsci.pro') - link_qscilibs = 'LIBS += -L' + self.prefix.lib +\ - ' -lqscintilla2_qt5' - qscipro.filter('TEMPLATE = lib', - 'TEMPLATE = lib\nQT += widgets' + - '\nQT += printsupport\n' + link_qscilibs) - - make() - - # Fix installation prefixes - makefile = FileFilter('Makefile') - makefile.filter(r'\$\(INSTALL_ROOT\)', '') - makefile = FileFilter('Qsci/Makefile') - makefile.filter(r'\$\(INSTALL_ROOT\)', '') - - make('install') diff --git a/var/spack/repos/builtin/packages/qgis/package.py b/var/spack/repos/builtin/packages/qgis/package.py index 4a6d6a3583b..89536068da2 100644 --- a/var/spack/repos/builtin/packages/qgis/package.py +++ b/var/spack/repos/builtin/packages/qgis/package.py @@ -74,9 +74,9 @@ class Qgis(CMakePackage): depends_on('qwtpolar') depends_on('expat@1.95:') depends_on('qca@2.2.1') - depends_on('py-pyqt4 +qsci', when='@2') - depends_on('py-pyqt5@5.3: +qsci', when='@3') - depends_on('qscintilla') + depends_on('py-pyqt4', when='@2') + depends_on('py-pyqt5@5.3:', when='@3') + depends_on('qscintilla +python') depends_on('qjson') depends_on('py-requests', type=('build', 'run')) # TODO: is build dependency necessary? depends_on('py-psycopg2', type=('build', 'run')) # TODO: is build dependency necessary? diff --git a/var/spack/repos/builtin/packages/qscintilla/package.py b/var/spack/repos/builtin/packages/qscintilla/package.py index 9bee719c136..ec20257676d 100644 --- a/var/spack/repos/builtin/packages/qscintilla/package.py +++ b/var/spack/repos/builtin/packages/qscintilla/package.py @@ -20,10 +20,14 @@ class Qscintilla(QMakePackage): version('2.10.2', sha256='14b31d20717eed95ea9bea4cd16e5e1b72cee7ebac647cba878e0f6db6a65ed0', preferred=True) variant('designer', default=False, description="Enable pluging for Qt-Designer") - # No 'python' variant, since Python bindings will be - # built by PyQt5+qsci instead + variant('python', default=False, description="Build python bindings") depends_on('qt') + depends_on('py-pyqt5 +qsci_api', type=('build', 'run'), when='+python ^qt@5') + depends_on('py-pyqt4 +qsci_api', type=('build', 'run'), when='+python ^qt@4') + depends_on('python', type=('build', 'run'), when='+python') + + extends('python', when='+python') @run_before('qmake') def chdir(self): @@ -66,3 +70,73 @@ def postinstall(self): makefile.filter(r'\$\(INSTALL_ROOT\)' + self.spec['qt'].prefix, '$(INSTALL_ROOT)') make('install') + + @run_after('install') + def make_qsci(self): + if '+python' in self.spec: + if '^py-pyqt4' in self.spec: + py_pyqtx = 'py-pyqt4' + pyqtx = 'PyQt4' + elif '^py-pyqt5' in self.spec: + py_pyqtx = 'py-pyqt5' + pyqtx = 'PyQt5' + + with working_dir(join_path(self.stage.source_path, 'Python')): + pydir = join_path( + self.prefix, + self.spec['python'].package.site_packages_dir, + pyqtx) + mkdirp(os.path.join(self.prefix.share.sip, pyqtx)) + python = self.spec['python'].command + python('configure.py', '--pyqt=' + pyqtx, + '--sip=' + self.spec['py-sip'].prefix.bin.sip, + '--qsci-incdir=' + self.spec.prefix.include, + '--qsci-libdir=' + self.spec.prefix.lib, + '--qsci-sipdir=' + + os.path.join(self.prefix.share.sip, pyqtx), + '--apidir=' + self.prefix.share.qsci, + '--destdir=' + pydir, + '--pyqt-sipdir=' + os.path.join( + self.spec[py_pyqtx].prefix.share.sip, pyqtx), + '--sip-incdir=' + + join_path(self.spec['py-sip'].prefix.include, + 'python' + + str(self.spec['python'].version.up_to(2))), + '--stubsdir=' + pydir) + + # Fix build errors + # "QAbstractScrollArea: No such file or directory" + # "qprinter.h: No such file or directory" + # ".../Qsci.so: undefined symbol: _ZTI10Qsci...." + qscipro = FileFilter('Qsci/Qsci.pro') + if '^qt@4' in self.spec: + qtx = 'qt4' + elif '^qt@5' in self.spec: + qtx = 'qt5' + + link_qscilibs = 'LIBS += -L' + self.prefix.lib +\ + ' -lqscintilla2_' + qtx + qscipro.filter('TEMPLATE = lib', + 'TEMPLATE = lib\nQT += widgets' + + '\nQT += printsupport\n' + link_qscilibs) + + make() + + # Fix installation prefixes + makefile = FileFilter('Makefile') + makefile.filter(r'\$\(INSTALL_ROOT\)', '') + makefile = FileFilter('Qsci/Makefile') + makefile.filter(r'\$\(INSTALL_ROOT\)', '') + + make('install') + + @run_after('install') + def extend_path_setup(self): + # See github issue #14121 and PR #15297 + module = self.spec['py-sip'].variants['module'].value + if module != 'sip': + module = module.split('.')[0] + with working_dir(site_packages_dir): + with open(os.path.join(module, '__init__.py'), 'w') as f: + f.write('from pkgutil import extend_path\n') + f.write('__path__ = extend_path(__path__, __name__)\n') From b6d2abf8856c1c19d92ce73e81e643e720694493 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 27 Mar 2020 11:43:16 -0500 Subject: [PATCH 028/138] py-grpcio: add new version (#15713) --- var/spack/repos/builtin/packages/py-grpcio/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-grpcio/package.py b/var/spack/repos/builtin/packages/py-grpcio/package.py index bdda7c85e37..18981f20e45 100644 --- a/var/spack/repos/builtin/packages/py-grpcio/package.py +++ b/var/spack/repos/builtin/packages/py-grpcio/package.py @@ -10,8 +10,9 @@ class PyGrpcio(PythonPackage): """HTTP/2-based RPC framework.""" homepage = "https://grpc.io/" - url = "https://pypi.io/packages/source/g/grpcio/grpcio-1.25.0.tar.gz" + url = "https://pypi.io/packages/source/g/grpcio/grpcio-1.27.2.tar.gz" + version('1.27.2', sha256='5ae532b93cf9ce5a2a549b74a2c35e3b690b171ece9358519b3039c7b84c887e') version('1.25.0', sha256='c948c034d8997526011960db54f512756fb0b4be1b81140a15b4ef094c6594a4') depends_on('py-setuptools', type='build') From f40080934e7817e8f7ba370c0e5dce86b3651f25 Mon Sep 17 00:00:00 2001 From: "Daryl W. Grunau" Date: Fri, 27 Mar 2020 11:57:04 -0600 Subject: [PATCH 029/138] New package lesstif (#15703) * new package lesstif * incorporate more of the Homebrew build recipe Co-authored-by: Daryl W. Grunau --- .../repos/builtin/packages/lesstif/package.py | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 var/spack/repos/builtin/packages/lesstif/package.py diff --git a/var/spack/repos/builtin/packages/lesstif/package.py b/var/spack/repos/builtin/packages/lesstif/package.py new file mode 100644 index 00000000000..c36b90e9b70 --- /dev/null +++ b/var/spack/repos/builtin/packages/lesstif/package.py @@ -0,0 +1,51 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Lesstif(AutotoolsPackage): + """LessTif is the Hungry Programmers' version of OSF/Motif.""" + + homepage = "https://sourceforge.net/projects/lesstif" + url = "https://sourceforge.net/projects/lesstif/files/lesstif/0.95.2/lesstif-0.95.2.tar.bz2/download" + + version('0.95.2', sha256='eb4aa38858c29a4a3bcf605cfe7d91ca41f4522d78d770f69721e6e3a4ecf7e3') + + variant('shared', default=True, description='Build shared libraries') + variant('static', default=False, description='Build static libraries') + + depends_on('libice') + depends_on('libsm') + depends_on('libxt') + + def patch(self): + filter_file("ACLOCALDIR=.*", + "ACLOCALDIR='${datarootdir}/aclocal'", + "configure") + + def setup_build_environment(self, env): + # 'sed' fails if LANG=en_US.UTF-8 as is often the case on Macs. + # The configure script finds our superenv sed wrapper, sets + # SED, but then doesn't use that variable. + env.set('LANG', 'C') + + def configure_args(self): + spec = self.spec + + args = [ + '--disable-debug', + '--enable-production', + '--disable-dependency-tracking', + '--enable-shared' if '+shared' in spec else '--disable-shared', + '--enable-static' if '+static' in spec else '--disable-static', + ] + + return args + + # LessTif won't install in parallel 'cause several parts of the + # Makefile will try to make the same directory and `mkdir` will fail. + def install(self, spec, prefix): + make('install', parallel=False) From cd82228c788d74a0be66135a5b3afc2bb800ceb5 Mon Sep 17 00:00:00 2001 From: iarspider Date: Fri, 27 Mar 2020 18:57:29 +0100 Subject: [PATCH 030/138] py-multiprocess: add new version (0.70.9) and dependencies (#15710) * py-multiprocess: add new version (0.70.9) and dependencies * Add new version of py-dill * Update package.py * Update package.py --- var/spack/repos/builtin/packages/py-dill/package.py | 2 ++ var/spack/repos/builtin/packages/py-multiprocess/package.py | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-dill/package.py b/var/spack/repos/builtin/packages/py-dill/package.py index 485dfd9d668..0afa8d329ce 100644 --- a/var/spack/repos/builtin/packages/py-dill/package.py +++ b/var/spack/repos/builtin/packages/py-dill/package.py @@ -12,6 +12,7 @@ class PyDill(PythonPackage): homepage = "https://github.com/uqfoundation/dill" url = "https://pypi.io/packages/source/d/dill/dill-0.2.7.tar.gz" + version('0.3.1', sha256='d3ddddf2806a7bc9858b20c02dc174396795545e9d62f243b34481fd26eb3e2c') version('0.2.9', sha256='f6d6046f9f9195206063dd0415dff185ad593d6ee8b0e67f12597c0f4df4986f') version('0.2.7', sha256='ddda0107e68e4eb1772a9f434f62a513c080c7171bd0dd6fb65d992788509812') version('0.2.6', sha256='6c1ccca68be483fa8c66e85a89ffc850206c26373aa77a97b83d8d0994e7f1fd') @@ -23,6 +24,7 @@ class PyDill(PythonPackage): version('0.2', sha256='aba8d4c81c4136310e6ce333bd6f4f3ea2d53bd367e2f69c864428f260c0308c') depends_on('python@2.5:2.8,3.1:', type=('build', 'run')) + depends_on('python@2.6:2.8,3.1:', type=('build', 'run'), when='@0.3.0:') depends_on('py-setuptools@0.6:', type='build') diff --git a/var/spack/repos/builtin/packages/py-multiprocess/package.py b/var/spack/repos/builtin/packages/py-multiprocess/package.py index 97a58a905d9..f382ff050fa 100644 --- a/var/spack/repos/builtin/packages/py-multiprocess/package.py +++ b/var/spack/repos/builtin/packages/py-multiprocess/package.py @@ -12,15 +12,17 @@ class PyMultiprocess(PythonPackage): homepage = "https://github.com/uqfoundation/multiprocess" url = "https://pypi.io/packages/source/m/multiprocess/multiprocess-0.70.5.zip" + version('0.70.9', sha256='9fd5bd990132da77e73dec6e9613408602a4612e1d73caf2e2b813d2b61508e5') version('0.70.7', sha256='3394f1fbd0d87112690a877e49eb7917d851ee8d822294d522dd4deae12febdb') version('0.70.5', sha256='c4c196f3c4561dc1d78139c3e73709906a222d2fc166ef3eef895d8623df7267') version('0.70.4', sha256='a692c6dc8392c25b29391abb58a9fbdc1ac38bca73c6f27d787774201e68e12c') - depends_on('python@2.6:2.8,3.1:') + depends_on('python@2.5:2.8,3.1:', type=('build', 'run')) depends_on('py-setuptools@0.6:', type='build') depends_on('py-dill@0.2.6:', type=('build', 'run')) depends_on('py-dill@0.2.9:', type=('build', 'run'), when='@0.70.7:') + depends_on('py-dill@0.3.1:', type=('build', 'run'), when='@0.70.9:') def url_for_version(self, version): url = self.url.rsplit('/', 1)[0] From 2b915dc517707f801f7bb5117b39280b6569a890 Mon Sep 17 00:00:00 2001 From: JeromeDuboisPro <59056395+JeromeDuboisPro@users.noreply.github.com> Date: Fri, 27 Mar 2020 20:28:51 +0100 Subject: [PATCH 031/138] Adding mesa-glu 9.0.1 (2019) (#15705) Adding mesa-glu 9.0.1 (2019) --- var/spack/repos/builtin/packages/mesa-glu/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/mesa-glu/package.py b/var/spack/repos/builtin/packages/mesa-glu/package.py index 9593c562711..bd3c90b0203 100644 --- a/var/spack/repos/builtin/packages/mesa-glu/package.py +++ b/var/spack/repos/builtin/packages/mesa-glu/package.py @@ -12,6 +12,7 @@ class MesaGlu(AutotoolsPackage): homepage = "https://www.mesa3d.org" url = "https://www.mesa3d.org/archive/glu/glu-9.0.0.tar.gz" + version('9.0.1', sha256='f6f484cfcd51e489afe88031afdea1e173aa652697e4c19ddbcb8260579a10f7') version('9.0.0', sha256='4387476a1933f36fec1531178ea204057bbeb04cc2d8396c9ea32720a1f7e264') depends_on('gl@3:') From d909c6d89d382773152d0c5320babb98d665296a Mon Sep 17 00:00:00 2001 From: Benjamin Fovet <45510885+bfovet@users.noreply.github.com> Date: Fri, 27 Mar 2020 20:29:49 +0100 Subject: [PATCH 032/138] Add new package CMinpack (#15606) * Add new package CMinpack * Add link to CMinpack PR#21 --- .../cminpack/link_with_blas_pr_21.patch | 267 ++++++++++++++++++ .../builtin/packages/cminpack/package.py | 39 +++ 2 files changed, 306 insertions(+) create mode 100644 var/spack/repos/builtin/packages/cminpack/link_with_blas_pr_21.patch create mode 100644 var/spack/repos/builtin/packages/cminpack/package.py diff --git a/var/spack/repos/builtin/packages/cminpack/link_with_blas_pr_21.patch b/var/spack/repos/builtin/packages/cminpack/link_with_blas_pr_21.patch new file mode 100644 index 00000000000..a28d67ea0f9 --- /dev/null +++ b/var/spack/repos/builtin/packages/cminpack/link_with_blas_pr_21.patch @@ -0,0 +1,267 @@ +From 3b386a0ed507a9923f942098a4dcf2df2bcde7d7 Mon Sep 17 00:00:00 2001 +From: Michel Zou +Date: Thu, 6 Dec 2018 23:38:07 +0100 +Subject: [PATCH] cmake to link to cblas + +--- + CMakeLists.txt | 30 ++++--- + cmake/CMakeLists.txt | 2 +- + cmake/FindCBLAS.cmake | 180 ++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 201 insertions(+), 11 deletions(-) + create mode 100644 cmake/FindCBLAS.cmake + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 6c8d16b..f22039f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -5,6 +5,8 @@ cmake_minimum_required (VERSION 2.8.9) + project (CMINPACK) + string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER) + ++set (CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) ++ + include(${PROJECT_SOURCE_DIR}/cmake/cminpack_utils.cmake) + # Set version and OS-specific settings + set(CMINPACK_VERSION 1.3.6 CACHE STRING "CMinpack version") +@@ -34,7 +36,7 @@ else () + endif(WIN32) + endif () + +-option(USE_BLAS "Compile cminpack using a blas library if possible" ON) ++option(USE_BLAS "Compile cminpack using cblas library if possible" ON) + + #set(CMAKE_INSTALL_PREFIX ${PROJECT_SOURCE_DIR}/../build) + +@@ -61,16 +63,24 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") + TARGET_LINK_LIBRARIES(cminpack m) + endif() + +-# Link with a BLAS library if requested +-if (USE_BLAS) +- if (NOT BUILD_SHARED_LIBS) +- set(BLA_STATIC True) ++ ++include (CheckLibraryExists) ++include (CheckFunctionExists) ++check_function_exists (sqrt HAVE_SQRT_NO_LIBM) ++if (NOT HAVE_SQRT_NO_LIBM) ++ check_library_exists ("m" sqrt "" HAVE_LIBM) ++ if (HAVE_LIBM) ++ target_link_libraries(cminpack PUBLIC m) + endif() +- find_package(BLAS) +- if (BLAS_FOUND) +- target_link_libraries(cminpack PUBLIC ${BLAS_LIBRARIES}) +- set_target_properties(cminpack PROPERTIES LINK_FLAGS "${BLAS_LINKER_FLAGS}") +- target_compile_definitions(cminpack PUBLIC -DUSE_CBLAS) ++endif () ++ ++# Link with CBLAS library if requested ++if (USE_BLAS) ++ find_package (CBLAS) ++ if (CBLAS_FOUND) ++ target_link_libraries(cminpack PUBLIC ${CBLAS_LIBRARIES}) ++ set_target_properties(cminpack PROPERTIES LINK_FLAGS "${CBLAS_LINKER_FLAGS}") ++ target_compile_definitions(cminpack PUBLIC USE_CBLAS) + endif() + endif() + +diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt +index 058a89b..d8277bc 100644 +--- a/cmake/CMakeLists.txt ++++ b/cmake/CMakeLists.txt +@@ -1,7 +1,7 @@ + set(PKG_DESC "CMinPack") + set(PKG_EXTERNAL_DEPS "") + set(pkg_conf_file ${CMAKE_CURRENT_BINARY_DIR}/cminpack.pc) +-if (USE_BLAS AND BLAS_FOUND) ++if (USE_BLAS AND CBLAS_FOUND) + set(PC_CMINPACK_CFLAGS "-DUSE_CBLAS") + if (NOT "${BLAS_LIBRARIES}" STREQUAL "") + string(REPLACE ";" " -l" PC_CMINPACK_LIBRARIES "${BLAS_LIBRARIES}") +diff --git a/cmake/FindCBLAS.cmake b/cmake/FindCBLAS.cmake +new file mode 100644 +index 0000000..e4fb422 +--- /dev/null ++++ b/cmake/FindCBLAS.cmake +@@ -0,0 +1,180 @@ ++# - Find CBLAS library ++# ++# This module finds an installed fortran library that implements the CBLAS ++# linear-algebra interface (see http://www.netlib.org/blas/), with CBLAS ++# interface. ++# ++# This module sets the following variables: ++# CBLAS_FOUND - set to true if a library implementing the CBLAS interface is found ++# CBLAS_LIBRARIES - list of libraries (using full path name) to link against to use CBLAS ++# CBLAS_INCLUDE_DIR - path to includes ++# CBLAS_INCLUDE_FILE - the file to be included to use CBLAS ++# ++ ++SET(CBLAS_LIBRARIES) ++SET(CBLAS_INCLUDE_DIR) ++SET(CBLAS_INCLUDE_FILE) ++ ++# CBLAS in Intel mkl ++FIND_PACKAGE(MKL) ++IF (MKL_FOUND AND NOT CBLAS_LIBRARIES) ++ SET(CBLAS_LIBRARIES ${MKL_LIBRARIES}) ++ SET(CBLAS_INCLUDE_DIR ${MKL_INCLUDE_DIR}) ++ SET(CBLAS_INCLUDE_FILE "mkl_cblas.h") ++ENDIF (MKL_FOUND AND NOT CBLAS_LIBRARIES) ++ ++# Old CBLAS search ++SET(_verbose TRUE) ++INCLUDE(CheckFunctionExists) ++INCLUDE(CheckIncludeFile) ++ ++MACRO(CHECK_ALL_LIBRARIES LIBRARIES _prefix _name _flags _list _include _search_include) ++ # This macro checks for the existence of the combination of fortran libraries ++ # given by _list. If the combination is found, this macro checks (using the ++ # Check_Fortran_Function_Exists macro) whether can link against that library ++ # combination using the name of a routine given by _name using the linker ++ # flags given by _flags. If the combination of libraries is found and passes ++ # the link test, LIBRARIES is set to the list of complete library paths that ++ # have been found. Otherwise, LIBRARIES is set to FALSE. ++ # N.B. _prefix is the prefix applied to the names of all cached variables that ++ # are generated internally and marked advanced by this macro. ++ SET(__list) ++ FOREACH(_elem ${_list}) ++ IF(__list) ++ SET(__list "${__list} - ${_elem}") ++ ELSE(__list) ++ SET(__list "${_elem}") ++ ENDIF(__list) ++ ENDFOREACH(_elem) ++ IF(_verbose) ++ MESSAGE(STATUS "Checking for [${__list}]") ++ ENDIF(_verbose) ++ SET(_libraries_work TRUE) ++ SET(${LIBRARIES}) ++ SET(_combined_name) ++ SET(_paths) ++ FOREACH(_library ${_list}) ++ SET(_combined_name ${_combined_name}_${_library}) ++ # did we find all the libraries in the _list until now? ++ # (we stop at the first unfound one) ++ IF(_libraries_work) ++ IF(APPLE) ++ FIND_LIBRARY(${_prefix}_${_library}_LIBRARY ++ NAMES ${_library} ++ PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV ++ DYLD_LIBRARY_PATH ++ ) ++ ELSE(APPLE) ++ FIND_LIBRARY(${_prefix}_${_library}_LIBRARY ++ NAMES ${_library} ++ PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64 ENV ++ LD_LIBRARY_PATH ++ ) ++ ENDIF(APPLE) ++ MARK_AS_ADVANCED(${_prefix}_${_library}_LIBRARY) ++ IF(${_prefix}_${_library}_LIBRARY) ++ GET_FILENAME_COMPONENT(_path ${${_prefix}_${_library}_LIBRARY} PATH) ++ LIST(APPEND _paths ${_path}/../include ${_path}/../../include) ++ ENDIF(${_prefix}_${_library}_LIBRARY) ++ SET(${LIBRARIES} ${${LIBRARIES}} ${${_prefix}_${_library}_LIBRARY}) ++ SET(_libraries_work ${${_prefix}_${_library}_LIBRARY}) ++ ENDIF(_libraries_work) ++ ENDFOREACH(_library ${_list}) ++ # Test include ++ SET(_bug_search_include ${_search_include}) #CMAKE BUG!!! SHOULD NOT BE THAT ++ IF(_bug_search_include) ++ FIND_PATH(${_prefix}${_combined_name}_INCLUDE ${_include} ${_paths}) ++ MARK_AS_ADVANCED(${_prefix}${_combined_name}_INCLUDE) ++ IF(${_prefix}${_combined_name}_INCLUDE) ++ IF (_verbose) ++ MESSAGE(STATUS "Includes found") ++ ENDIF (_verbose) ++ SET(${_prefix}_INCLUDE_DIR ${${_prefix}${_combined_name}_INCLUDE}) ++ SET(${_prefix}_INCLUDE_FILE ${_include}) ++ ELSE(${_prefix}${_combined_name}_INCLUDE) ++ SET(_libraries_work FALSE) ++ ENDIF(${_prefix}${_combined_name}_INCLUDE) ++ ELSE(_bug_search_include) ++ SET(${_prefix}_INCLUDE_DIR) ++ SET(${_prefix}_INCLUDE_FILE ${_include}) ++ ENDIF(_bug_search_include) ++ # Test this combination of libraries. ++ IF(_libraries_work) ++ SET(CMAKE_REQUIRED_LIBRARIES ${_flags} ${${LIBRARIES}}) ++ CHECK_FUNCTION_EXISTS(${_name} ${_prefix}${_combined_name}_WORKS) ++ SET(CMAKE_REQUIRED_LIBRARIES) ++ MARK_AS_ADVANCED(${_prefix}${_combined_name}_WORKS) ++ SET(_libraries_work ${${_prefix}${_combined_name}_WORKS}) ++ IF(_verbose AND _libraries_work) ++ MESSAGE(STATUS "Libraries found") ++ ENDIF(_verbose AND _libraries_work) ++ ENDIF(_libraries_work) ++ # Fin ++ IF(NOT _libraries_work) ++ SET(${LIBRARIES} NOTFOUND) ++ ENDIF(NOT _libraries_work) ++ENDMACRO(CHECK_ALL_LIBRARIES) ++ ++# Generic CBLAS library ++IF(NOT CBLAS_LIBRARIES) ++ CHECK_ALL_LIBRARIES( ++ CBLAS_LIBRARIES ++ CBLAS ++ cblas_dgemm ++ "" ++ "cblas" ++ "cblas.h" ++ TRUE ) ++ENDIF() ++ ++# CBLAS in ATLAS library? (http://math-atlas.sourceforge.net/) ++IF(NOT CBLAS_LIBRARIES) ++ CHECK_ALL_LIBRARIES( ++ CBLAS_LIBRARIES ++ CBLAS ++ cblas_dgemm ++ "" ++ "cblas;atlas" ++ "cblas.h" ++ TRUE ) ++ENDIF() ++ ++# CBLAS in BLAS library ++IF(NOT CBLAS_LIBRARIES) ++ CHECK_ALL_LIBRARIES( ++ CBLAS_LIBRARIES ++ CBLAS ++ cblas_dgemm ++ "" ++ "blas" ++ "cblas.h" ++ TRUE ) ++ENDIF() ++ ++# Apple CBLAS library? ++IF(NOT CBLAS_LIBRARIES) ++ CHECK_ALL_LIBRARIES( ++ CBLAS_LIBRARIES ++ CBLAS ++ cblas_dgemm ++ "" ++ "Accelerate" ++ "Accelerate/Accelerate.h" ++ FALSE ) ++ENDIF() ++ ++IF( NOT CBLAS_LIBRARIES ) ++ CHECK_ALL_LIBRARIES( ++ CBLAS_LIBRARIES ++ CBLAS ++ cblas_dgemm ++ "" ++ "vecLib" ++ "vecLib/vecLib.h" ++ FALSE ) ++ENDIF() ++ ++include ( FindPackageHandleStandardArgs ) ++find_package_handle_standard_args ( CBLAS DEFAULT_MSG CBLAS_LIBRARIES ++) ++ diff --git a/var/spack/repos/builtin/packages/cminpack/package.py b/var/spack/repos/builtin/packages/cminpack/package.py new file mode 100644 index 00000000000..e269accabf7 --- /dev/null +++ b/var/spack/repos/builtin/packages/cminpack/package.py @@ -0,0 +1,39 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Cminpack(CMakePackage): + """This is a C version of the minpack minimization package. + Minpack includes software for solving nonlinear equations + and nonlinear least squares problems. + """ + + homepage = "http://devernay.free.fr/hacks/cminpack" + url = "https://github.com/devernay/cminpack/archive/v1.3.6.tar.gz" + git = 'https://github.com/devernay/cminpack.git' + + version('master', branch='master') + version('1.3.6', sha256='3c07fd21308c96477a2c900032e21d937739c233ee273b4347a0d4a84a32d09f') + + variant('shared', default=False, description='Build shared libraries') + variant('blas', default=True, description='Compile with BLAS') + + depends_on('blas', when='+blas') + + # Backport a pull request for correctly linking blas. + # See https://github.com/devernay/cminpack/pull/21 + patch('link_with_blas_pr_21.patch', when='@:1.3.6') + + def cmake_args(self): + args = [ + '-DBUILD_SHARED_LIBS=%s' % ( + 'ON' if '+shared' in self.spec else 'OFF'), + '-DUSE_BLAS=%s' % ( + 'ON' if 'blas' in self.spec else 'OFF') + ] + + return args From 829bfb578814d076000d6d0ad8339143322e28ee Mon Sep 17 00:00:00 2001 From: Sinan Date: Fri, 27 Mar 2020 13:28:54 -0700 Subject: [PATCH 033/138] magma now extends CudaPackage class, taking care of the gcc conflicts (#14471) * magma now extends CudaPackage class, taking care of the gcc conflicts * enforce +cuda; thus cuda is dependency via CudaPackage class * add conflict * use cuda_arch to set GPU_TARGET build option * get rid of unnecessary constraint * flake8 * impose cuda version dependency found empirically * add variant description * add conflict Co-authored-by: Sinan81 Co-authored-by: Sinan81 --- .../repos/builtin/packages/magma/package.py | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/var/spack/repos/builtin/packages/magma/package.py b/var/spack/repos/builtin/packages/magma/package.py index 27f2f438e97..2e864630188 100644 --- a/var/spack/repos/builtin/packages/magma/package.py +++ b/var/spack/repos/builtin/packages/magma/package.py @@ -7,10 +7,10 @@ from spack import * -class Magma(CMakePackage): - """The MAGMA project aims to develop a dense linear algebra library similar to - LAPACK but for heterogeneous/hybrid architectures, starting with current - "Multicore+GPU" systems. +class Magma(CMakePackage, CudaPackage): + """The MAGMA project aims to develop a dense linear algebra library similar + to LAPACK but for heterogeneous/hybrid architectures, starting with + current "Multicore+GPU" systems. """ homepage = "http://icl.cs.utk.edu/magma/" @@ -28,13 +28,15 @@ class Magma(CMakePackage): description='Enable Fortran bindings support') variant('shared', default=True, description='Enable shared library') + variant('cuda', default=True, description='Build with CUDA') depends_on('blas') depends_on('lapack') - depends_on('cuda') + depends_on('cuda@8:', when='@2.5.1:') # See PR #14471 - conflicts('%gcc@6:', when='^cuda@:8') - conflicts('%gcc@7:', when='^cuda@:9') + conflicts('~cuda', msg='Magma requires cuda') + conflicts('cuda_arch=none', + msg='Please indicate a CUDA arch value or values') patch('ibm-xl.patch', when='@2.2:2.5.0%xl') patch('ibm-xl.patch', when='@2.2:2.5.0%xl_r') @@ -69,11 +71,14 @@ def cmake_args(self): '-DCMAKE_Fortran_COMPILER=%s' % self.compiler.f77 ]) - if spec.satisfies('^cuda@9.0:'): + if spec.satisfies('^cuda'): + cuda_arch = self.spec.variants['cuda_arch'].value if '@:2.2.0' in spec: - options.extend(['-DGPU_TARGET=sm30']) + capabilities = ' '.join('sm{0}'.format(i) for i in cuda_arch) + options.extend(['-DGPU_TARGET=' + capabilities]) else: - options.extend(['-DGPU_TARGET=sm_30']) + capabilities = ' '.join('sm_{0}'.format(i) for i in cuda_arch) + options.extend(['-DGPU_TARGET=' + capabilities]) if '@2.5.0' in spec: options.extend(['-DMAGMA_SPARSE=OFF']) From aed516ad56c855afa65a8aea847fdf64330e797e Mon Sep 17 00:00:00 2001 From: Andrew W Elble Date: Fri, 27 Mar 2020 22:35:13 -0400 Subject: [PATCH 034/138] TensorFlow: let install take care of the headers (#15718) * TensorFlow: let install take care of the headers we don't need to manually install them. * no longer need to import glob --- .../repos/builtin/packages/py-tensorflow/package.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-tensorflow/package.py b/var/spack/repos/builtin/packages/py-tensorflow/package.py index 0444a2e09af..64b97b05b26 100644 --- a/var/spack/repos/builtin/packages/py-tensorflow/package.py +++ b/var/spack/repos/builtin/packages/py-tensorflow/package.py @@ -3,7 +3,6 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from glob import glob import sys @@ -699,14 +698,6 @@ def install(self, spec, prefix): setup_py('install', '--prefix={0}'.format(prefix), '--single-version-externally-managed', '--root=/') - site_packages_dir = join_path( - prefix.lib, - ('python' + str(self.spec['python'].version.up_to(2))), - 'site-packages') - fn = glob(join_path(site_packages_dir, "tensorflow-*")) - incpath = join_path(fn[0], "tensorflow/include") - setup_py('install_headers', '--install-dir={0}'.format(incpath)) - @run_after('install') @on_package_attributes(run_tests=True) def import_module_test(self): From f6f5604927aeb7cc2fd96d8e441b22bb706d990d Mon Sep 17 00:00:00 2001 From: Sinan Date: Fri, 27 Mar 2020 19:36:33 -0700 Subject: [PATCH 035/138] Package/qgis add versions 3.10.4 3.12.1 (#15720) * add latest versions * order dependencies alphabetically * flake8 Co-authored-by: Sinan81 --- .../repos/builtin/packages/qgis/package.py | 38 ++++++++++--------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/var/spack/repos/builtin/packages/qgis/package.py b/var/spack/repos/builtin/packages/qgis/package.py index 89536068da2..1edf4c29720 100644 --- a/var/spack/repos/builtin/packages/qgis/package.py +++ b/var/spack/repos/builtin/packages/qgis/package.py @@ -17,9 +17,11 @@ class Qgis(CMakePackage): maintainers = ['adamjstewart', 'Sinan81'] + version('3.12.1', sha256='a7dc7af768b8960c08ce72a06c1f4ca4664f4197ce29c7fe238429e48b2881a8') version('3.12.0', sha256='19e9c185dfe88cad7ee6e0dcf5ab7b0bbfe1672307868a53bf771e0c8f9d5e9c') # Prefer latest long term release - version('3.10.3', sha256='0869704df9120dd642996ff1ed50213ac8247650aa0640b62f8c9c581c05d7a7', preferred=True) + version('3.10.4', sha256='a032e2b8144c2fd825bc26766f586cfb1bd8574bc72efd1aa8ce18dfff8b6c9f', preferred=True) + version('3.10.3', sha256='0869704df9120dd642996ff1ed50213ac8247650aa0640b62f8c9c581c05d7a7') version('3.10.2', sha256='381cb01a8ac2f5379a915b124e9c830d727d2c67775ec49609c7153fe765a6f7') version('3.10.1', sha256='466ac9fad91f266cf3b9d148f58e2adebd5b9fcfc03e6730eb72251e6c34c8ab') version('3.10.0', sha256='25eb1c41d9fb922ffa337a720dfdceee43cf2d38409923f087c2010c9742f012') @@ -63,28 +65,28 @@ class Qgis(CMakePackage): # Ref. for dependencies: # http://htmlpreview.github.io/?https://raw.github.com/qgis/QGIS/master/doc/INSTALL.html # https://github.com/qgis/QGIS/blob/master/INSTALL - depends_on('qt+dbus') - depends_on('proj@4.4.0:') - depends_on('geos@3.4.0:') - depends_on('sqlite@3.0.0: +column_metadata') - depends_on('libspatialite@4.2.0:') - depends_on('libspatialindex') - depends_on('gdal@2.1.0: +python', type=('build', 'link', 'run')) - depends_on('qwt@5:') - depends_on('qwtpolar') + depends_on('exiv2') depends_on('expat@1.95:') - depends_on('qca@2.2.1') + depends_on('gdal@2.1.0: +python', type=('build', 'link', 'run')) + depends_on('geos@3.4.0:') + depends_on('libspatialindex') + depends_on('libspatialite@4.2.0:') + depends_on('libzip') + depends_on('proj@4.4.0:') + depends_on('py-psycopg2', type=('build', 'run')) # TODO: is build dependency necessary? depends_on('py-pyqt4', when='@2') depends_on('py-pyqt5@5.3:', when='@3') - depends_on('qscintilla +python') - depends_on('qjson') depends_on('py-requests', type=('build', 'run')) # TODO: is build dependency necessary? - depends_on('py-psycopg2', type=('build', 'run')) # TODO: is build dependency necessary? - depends_on('qtkeychain@0.5:', when='@3:') - depends_on('libzip') - depends_on('exiv2') - depends_on('python@3.0.0:', type=('build', 'run'), when='@3') depends_on('python@2.7:2.8', type=('build', 'run'), when='@2') + depends_on('python@3.0.0:', type=('build', 'run'), when='@3') + depends_on('qca@2.2.1') + depends_on('qjson') + depends_on('qscintilla +python') + depends_on('qt+dbus') + depends_on('qtkeychain@0.5:', when='@3:') + depends_on('qwt@5:') + depends_on('qwtpolar') + depends_on('sqlite@3.0.0: +column_metadata') # Runtime python dependencies, not mentioned in install instructions depends_on('py-pyyaml', type='run') From 6e49f5f0e57c827a49737c0df18d50ba1a7cd866 Mon Sep 17 00:00:00 2001 From: Greg Sjaardema Date: Fri, 27 Mar 2020 20:55:04 -0600 Subject: [PATCH 036/138] netcdf-c: remove maxdims and maxvars variant (#15524) * NETCDF: Remove maxdims maxvars variant I'm not sure of the correct protocol to do this, so decided to make a stab and hopefully it works or I'm told the correct way... The `maxdims` and `maxvars` variants for the NetCDF package were, to the best of my knowledge, only ever used for the Exodus library in the SEACAS package. In versions of NetCDF prior to 4.4.0, Exodus required that the `NC_MAX_DIMS` and `NC_MAX_VARS` be increased over the default values. This requirement was removed in 4.4.0 and later. I do not know of any way to make a variant depend on the version and since the `maxdims` and `maxvars` variants are integer values and not boolean, then every build of NetCDF will have these variants. Typically `maxdims=1024 maxvars=8192` and the build will patch the `netcdf.h` include file for every build even though it is (almost) never needed. The SEACAS package has a NetCDF version requirement of >4.6.2, so it no longer specifies the `maxdims` or `maxvars` variant and I could find no other package in spack that uses this variant either, so removal should not break anything *in* spack. However, there is no guarantee that some other external package doesn't use the variant, so I'm not sure of the correct way to remove the variant. For this PR, I simply removed the variants. If there is a way to specify use of the variant tied to a specific version, I couldn't find it anywhere... * Address review comment Removed `is_integral` and `import numbers` since `is_integral` was only place it was used. * Add blank line for flake8 --- .../builtin/packages/netcdf-c/package.py | 40 ------------------- 1 file changed, 40 deletions(-) diff --git a/var/spack/repos/builtin/packages/netcdf-c/package.py b/var/spack/repos/builtin/packages/netcdf-c/package.py index 01f2acf4253..e7ce1696a8b 100644 --- a/var/spack/repos/builtin/packages/netcdf-c/package.py +++ b/var/spack/repos/builtin/packages/netcdf-c/package.py @@ -5,16 +5,6 @@ from spack import * -import numbers - - -def is_integral(x): - """Any integer value""" - try: - return isinstance(int(x), numbers.Integral) and not isinstance(x, bool) - except ValueError: - return False - class NetcdfC(AutotoolsPackage): """NetCDF (network Common Data Form) is a set of software libraries and @@ -76,22 +66,6 @@ def url_for_version(self, version): # variant('cdmremote', default=False, # description='Enable CDM Remote support') - # These variants control the number of dimensions (i.e. coordinates and - # attributes) and variables (e.g. time, entity ID, number of coordinates) - # that can be used in any particular NetCDF file. - variant( - 'maxdims', - default=1024, - description='Defines the maximum dimensions of NetCDF files.', - values=is_integral - ) - variant( - 'maxvars', - default=8192, - description='Defines the maximum variables of NetCDF files.', - values=is_integral - ) - # The patch for 4.7.0 touches configure.ac. See force_autoreconf below. depends_on('autoconf', type='build', when='@4.7.0') depends_on('automake', type='build', when='@4.7.0') @@ -157,20 +131,6 @@ def force_autoreconf(self): # The patch for 4.7.0 touches configure.ac. return self.spec.satisfies('@4.7.0') - def patch(self): - try: - max_dims = int(self.spec.variants['maxdims'].value) - max_vars = int(self.spec.variants['maxvars'].value) - except (ValueError, TypeError): - raise TypeError('NetCDF variant values max[dims|vars] must be ' - 'integer values.') - - ff = FileFilter(join_path('include', 'netcdf.h')) - ff.filter(r'^(#define\s+NC_MAX_DIMS\s+)\d+(.*)$', - r'\1{0}\2'.format(max_dims)) - ff.filter(r'^(#define\s+NC_MAX_VARS\s+)\d+(.*)$', - r'\1{0}\2'.format(max_vars)) - def configure_args(self): cflags = [] cppflags = [] From 33b19e7bf033df198b3dbcae2b58d6e7e68605a1 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 27 Mar 2020 22:20:15 -0500 Subject: [PATCH 037/138] py-diskcache: add new package (#15721) --- .../builtin/packages/py-diskcache/package.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-diskcache/package.py diff --git a/var/spack/repos/builtin/packages/py-diskcache/package.py b/var/spack/repos/builtin/packages/py-diskcache/package.py new file mode 100644 index 00000000000..042183cdf32 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-diskcache/package.py @@ -0,0 +1,16 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + + +class PyDiskcache(PythonPackage): + """Disk Cache -- Disk and file backed persistent cache.""" + + homepage = "http://www.grantjenks.com/docs/diskcache/" + url = "https://pypi.io/packages/source/d/diskcache/diskcache-4.1.0.tar.gz" + + version('4.1.0', sha256='bcee5a59f9c264e2809e58d01be6569a3bbb1e36a1e0fb83f7ef9b2075f95ce0') + + depends_on('py-setuptools', type='build') + depends_on('py-tox', type='test') From db67b78fb9133d45645d2fddcff4cbdc14f84917 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Sat, 28 Mar 2020 00:30:50 -0500 Subject: [PATCH 038/138] py-petastorm: add new package (#15722) --- .../builtin/packages/py-petastorm/package.py | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-petastorm/package.py diff --git a/var/spack/repos/builtin/packages/py-petastorm/package.py b/var/spack/repos/builtin/packages/py-petastorm/package.py new file mode 100644 index 00000000000..2c6cc5e34ff --- /dev/null +++ b/var/spack/repos/builtin/packages/py-petastorm/package.py @@ -0,0 +1,30 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + + +class PyPetastorm(PythonPackage): + """Petastorm is a library enabling the use of Parquet storage from + Tensorflow, Pytorch, and other Python-based ML training frameworks.""" + + homepage = "https://github.com/uber/petastorm" + url = "https://pypi.io/packages/source/p/petastorm/petastorm-0.8.2.tar.gz" + + maintainers = ['adamjstewart'] + + version('0.8.2', sha256='7782c315e1ee8d15c7741e3eea41e77b9efce661cf58aa0220a801db64f52f91') + + depends_on('py-setuptools', type='build') + depends_on('py-dill@0.2.1:', type=('build', 'run')) + depends_on('py-diskcache@3.0.0:', type=('build', 'run')) + depends_on('py-future@0.10.2:', type=('build', 'run')) + depends_on('py-futures@2.0:', type=('build', 'run'), when='^python@:2') + depends_on('py-numpy@1.13.3:', type=('build', 'run')) + depends_on('py-packaging@15.0:', type=('build', 'run')) + depends_on('py-pandas@0.19.0:', type=('build', 'run')) + depends_on('py-psutil@4.0.0:', type=('build', 'run')) + depends_on('py-pyspark@2.1.0:', type=('build', 'run')) + depends_on('py-pyzmq@14.0.0:', type=('build', 'run')) + depends_on('py-pyarrow@0.12.0:', type=('build', 'run')) + depends_on('py-six@1.5.0:', type=('build', 'run')) From 9f7255da71c3bac2ee55d9b172136c6752fe2f4f Mon Sep 17 00:00:00 2001 From: Veselin Dobrev Date: Sat, 28 Mar 2020 03:30:05 -0700 Subject: [PATCH 039/138] mesa: re-introduce the libs property (#15716) They were originally added in #8904 and later removed (why?) in #10482. --- var/spack/repos/builtin/packages/mesa/package.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/var/spack/repos/builtin/packages/mesa/package.py b/var/spack/repos/builtin/packages/mesa/package.py index d46c75796ed..4132ba0ff49 100644 --- a/var/spack/repos/builtin/packages/mesa/package.py +++ b/var/spack/repos/builtin/packages/mesa/package.py @@ -174,3 +174,11 @@ def configure_args(self): args.append('--with-dri-drivers=' + ','.join(args_dri_drivers)) return args + + @property + def libs(self): + for dir in ['lib64', 'lib']: + libs = find_libraries('libGL', join_path(self.prefix, dir), + shared=True, recursive=False) + if libs: + return libs From 27e4a4750dcdabb55e23b4600ef63204c4ea1006 Mon Sep 17 00:00:00 2001 From: iarspider Date: Sat, 28 Mar 2020 15:10:31 +0100 Subject: [PATCH 040/138] Hack to select iconv implementation - libiconv vs. libc iconv (#15437) (re-do of #15213 due to changes in gnupg recipe) --- etc/spack/defaults/packages.yaml | 1 + .../builtin/packages/apr-util/package.py | 4 ++-- .../repos/builtin/packages/bash/package.py | 4 ++-- .../repos/builtin/packages/dcmtk/package.py | 2 +- .../builtin/packages/diffutils/package.py | 2 +- .../repos/builtin/packages/doxygen/package.py | 4 +++- .../repos/builtin/packages/gcc/package.py | 4 ++-- .../repos/builtin/packages/gdal/package.py | 4 ++-- .../repos/builtin/packages/git/package.py | 4 ++-- .../repos/builtin/packages/glib/package.py | 7 +++++-- .../repos/builtin/packages/gnupg/package.py | 4 ++-- .../repos/builtin/packages/gnuplot/package.py | 2 +- .../repos/builtin/packages/grass/package.py | 5 ++++- .../builtin/packages/gtksourceview/package.py | 2 +- .../repos/builtin/packages/lftp/package.py | 4 ++-- .../repos/builtin/packages/libc/package.py | 19 +++++++++++++++++++ .../repos/builtin/packages/libgd/package.py | 2 +- .../builtin/packages/libiconv/package.py | 1 + .../builtin/packages/libspatialite/package.py | 2 +- .../builtin/packages/libunistring/package.py | 2 +- .../repos/builtin/packages/libxml2/package.py | 4 ++-- .../repos/builtin/packages/libxslt/package.py | 2 +- .../repos/builtin/packages/mono/package.py | 4 ++-- .../repos/builtin/packages/ncl/package.py | 4 ++-- .../repos/builtin/packages/poppler/package.py | 2 +- .../repos/builtin/packages/procps/package.py | 4 ++-- .../repos/builtin/packages/tar/package.py | 4 ++-- .../builtin/packages/unixodbc/package.py | 2 +- .../repos/builtin/packages/wget/package.py | 2 +- .../builtin/packages/xerces-c/package.py | 4 ++-- 30 files changed, 70 insertions(+), 41 deletions(-) create mode 100644 var/spack/repos/builtin/packages/libc/package.py diff --git a/etc/spack/defaults/packages.yaml b/etc/spack/defaults/packages.yaml index 46aa5ad9adc..2c91b75e45d 100644 --- a/etc/spack/defaults/packages.yaml +++ b/etc/spack/defaults/packages.yaml @@ -27,6 +27,7 @@ packages: glx: [mesa+glx, opengl] glu: [mesa-glu, openglu] golang: [gcc] + iconv: [libiconv] ipp: [intel-ipp] java: [openjdk, jdk, ibm-java] jpeg: [libjpeg-turbo, libjpeg] diff --git a/var/spack/repos/builtin/packages/apr-util/package.py b/var/spack/repos/builtin/packages/apr-util/package.py index 2d9354e817a..0bb2fecfa66 100644 --- a/var/spack/repos/builtin/packages/apr-util/package.py +++ b/var/spack/repos/builtin/packages/apr-util/package.py @@ -24,7 +24,7 @@ class AprUtil(AutotoolsPackage): depends_on('apr') depends_on('expat') - depends_on('libiconv') + depends_on('iconv') depends_on('openssl', when='+crypto') depends_on('gdbm', when='+gdbm') @@ -38,7 +38,7 @@ def configure_args(self): args = [ '--with-apr={0}'.format(spec['apr'].prefix), '--with-expat={0}'.format(spec['expat'].prefix), - '--with-iconv={0}'.format(spec['libiconv'].prefix), + '--with-iconv={0}'.format(spec['iconv'].prefix), # TODO: Add support for the following database managers '--without-ndbm', '--without-berkeley-db', diff --git a/var/spack/repos/builtin/packages/bash/package.py b/var/spack/repos/builtin/packages/bash/package.py index f6c7da81296..f6901294242 100644 --- a/var/spack/repos/builtin/packages/bash/package.py +++ b/var/spack/repos/builtin/packages/bash/package.py @@ -19,7 +19,7 @@ class Bash(AutotoolsPackage, GNUMirrorPackage): depends_on('ncurses') depends_on('readline@5.0:') - depends_on('libiconv') + depends_on('iconv') patches = [ ('5.0', '001', 'f2fe9e1f0faddf14ab9bfa88d450a75e5d028fedafad23b88716bd657c737289'), @@ -54,7 +54,7 @@ def configure_args(self): '--with-curses', '--enable-readline', '--with-installed-readline', - '--with-libiconv-prefix={0}'.format(spec['libiconv'].prefix), + '--with-libiconv-prefix={0}'.format(spec['iconv'].prefix), ] def check(self): diff --git a/var/spack/repos/builtin/packages/dcmtk/package.py b/var/spack/repos/builtin/packages/dcmtk/package.py index de7a4c6ef26..2bf3db66d14 100644 --- a/var/spack/repos/builtin/packages/dcmtk/package.py +++ b/var/spack/repos/builtin/packages/dcmtk/package.py @@ -32,7 +32,7 @@ class Dcmtk(CMakePackage): depends_on('libxml2', type=('build', 'link'), when='+xml') variant('iconv', default=True, description="Charset conversion support (iconv)") - depends_on('libiconv', type=('build', 'link')) + depends_on('iconv', type=('build', 'link')) variant('cxx11', default=False, description="Enable c++11 features") variant('stl', default=True, description="Use native STL implementation") diff --git a/var/spack/repos/builtin/packages/diffutils/package.py b/var/spack/repos/builtin/packages/diffutils/package.py index c8f2dca83f3..d41086113a5 100644 --- a/var/spack/repos/builtin/packages/diffutils/package.py +++ b/var/spack/repos/builtin/packages/diffutils/package.py @@ -18,7 +18,7 @@ class Diffutils(AutotoolsPackage, GNUMirrorPackage): build_directory = 'spack-build' - depends_on('libiconv') + depends_on('iconv') def setup_build_environment(self, env): if self.spec.satisfies('%fj'): diff --git a/var/spack/repos/builtin/packages/doxygen/package.py b/var/spack/repos/builtin/packages/doxygen/package.py index aa99ca73ee2..c3c80614d5d 100644 --- a/var/spack/repos/builtin/packages/doxygen/package.py +++ b/var/spack/repos/builtin/packages/doxygen/package.py @@ -29,7 +29,7 @@ class Doxygen(CMakePackage): depends_on("cmake@2.8.12:", type='build') depends_on("python", type='build') # 2 or 3 OK; used in CMake build - depends_on("libiconv") + depends_on("iconv") depends_on("flex", type='build') # code.l just checks subminor version <=2.5.4 or >=2.5.33 # but does not recognize 2.6.x as newer...could be patched if needed @@ -45,6 +45,8 @@ class Doxygen(CMakePackage): patch('shared_ptr.patch', when='@1.8.14') def patch(self): + if self.spec['iconv'].name == 'libc': + return # On Linux systems, iconv is provided by libc. Since CMake finds the # symbol in libc, it does not look for libiconv, which leads to linker # errors. This makes sure that CMake always looks for the external diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py index f3891161a2b..b7a08f8538f 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -103,7 +103,7 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage): depends_on('isl@0.15:0.18', when='@6:8.9') depends_on('isl@0.15:0.20', when='@9:') depends_on('zlib', when='@6:') - depends_on('libiconv', when='platform=darwin') + depends_on('iconv', when='platform=darwin') depends_on('gnat', when='languages=ada') depends_on('binutils~libiberty', when='+binutils') depends_on('zip', type='build', when='languages=java') @@ -356,7 +356,7 @@ def configure_args(self): options.extend([ '--with-native-system-header-dir=/usr/include', '--with-sysroot={0}'.format(macos_sdk_path()), - '--with-libiconv-prefix={0}'.format(spec['libiconv'].prefix) + '--with-libiconv-prefix={0}'.format(spec['iconv'].prefix) ]) return options diff --git a/var/spack/repos/builtin/packages/gdal/package.py b/var/spack/repos/builtin/packages/gdal/package.py index 21828112335..b6b78f80200 100644 --- a/var/spack/repos/builtin/packages/gdal/package.py +++ b/var/spack/repos/builtin/packages/gdal/package.py @@ -107,7 +107,7 @@ class Gdal(AutotoolsPackage): # Optional dependencies depends_on('libtool', type='build', when='+libtool') depends_on('zlib', when='+libz') - depends_on('libiconv', when='+libiconv') + depends_on('iconv', when='+libiconv') depends_on('xz', when='+liblzma') depends_on('zstd', when='+zstd @2.3:') depends_on('postgresql', when='+pg') @@ -250,7 +250,7 @@ def configure_args(self): if '+libiconv' in spec: args.append('--with-libiconv-prefix={0}'.format( - spec['libiconv'].prefix)) + spec['iconv'].prefix)) else: args.append('--with-libiconv-prefix=no') diff --git a/var/spack/repos/builtin/packages/git/package.py b/var/spack/repos/builtin/packages/git/package.py index 1bd236051a7..ba842587e24 100644 --- a/var/spack/repos/builtin/packages/git/package.py +++ b/var/spack/repos/builtin/packages/git/package.py @@ -177,7 +177,7 @@ class Git(AutotoolsPackage): depends_on('curl') depends_on('expat') depends_on('gettext') - depends_on('libiconv') + depends_on('iconv') depends_on('libidn2') depends_on('openssl') depends_on('pcre', when='@:2.13') @@ -221,7 +221,7 @@ def configure_args(self): configure_args = [ '--with-curl={0}'.format(spec['curl'].prefix), '--with-expat={0}'.format(spec['expat'].prefix), - '--with-iconv={0}'.format(spec['libiconv'].prefix), + '--with-iconv={0}'.format(spec['iconv'].prefix), '--with-openssl={0}'.format(spec['openssl'].prefix), '--with-perl={0}'.format(spec['perl'].command.path), '--with-zlib={0}'.format(spec['zlib'].prefix), diff --git a/var/spack/repos/builtin/packages/glib/package.py b/var/spack/repos/builtin/packages/glib/package.py index e43a9d17284..43195680086 100644 --- a/var/spack/repos/builtin/packages/glib/package.py +++ b/var/spack/repos/builtin/packages/glib/package.py @@ -46,7 +46,7 @@ class Glib(AutotoolsPackage): depends_on('python', type=('build', 'run'), when='@2.53.4:') depends_on('pcre+utf', when='@2.48:') depends_on('util-linux', when='+libmount') - depends_on('libiconv') + depends_on('iconv') # The following patch is needed for gcc-6.1 patch('g_date_strftime.patch', when='@2.42.1') @@ -70,7 +70,10 @@ def configure_args(self): args.append('--with-python={0}'.format( os.path.basename(self.spec['python'].command.path)) ) - args.append('--with-libiconv=gnu') + if 'libc' in self.spec: + args.append('--with-libiconv=maybe') + else: + args.append('--with-libiconv=gnu') args.extend(self.enable_or_disable('tracing')) # SELinux is not available in Spack, so glib should not use it. args.append('--disable-selinux') diff --git a/var/spack/repos/builtin/packages/gnupg/package.py b/var/spack/repos/builtin/packages/gnupg/package.py index 943f14d31f8..d97aa105695 100644 --- a/var/spack/repos/builtin/packages/gnupg/package.py +++ b/var/spack/repos/builtin/packages/gnupg/package.py @@ -25,7 +25,7 @@ class Gnupg(AutotoolsPackage): depends_on('libassuan@2.4:', when='@:2.2.3') depends_on('libassuan@2.5:', when='@2.2.15:') depends_on('pinentry', type='run') - depends_on('libiconv') + depends_on('iconv') depends_on('zlib') def configure_args(self): @@ -42,7 +42,7 @@ def configure_args(self): '--with-libassuan-prefix=' + self.spec['libassuan'].prefix, '--with-ksba-prefix=' + self.spec['libksba'].prefix, '--with-npth-prefix=' + self.spec['npth'].prefix, - '--with-libiconv-prefix=' + self.spec['libiconv'].prefix, + '--with-libiconv-prefix=' + self.spec['iconv'].prefix, '--with-zlib=' + self.spec['zlib'].prefix, '--without-tar', '--without-libiconv-prefix', diff --git a/var/spack/repos/builtin/packages/gnuplot/package.py b/var/spack/repos/builtin/packages/gnuplot/package.py index 17ee973eee9..9fb79e67466 100644 --- a/var/spack/repos/builtin/packages/gnuplot/package.py +++ b/var/spack/repos/builtin/packages/gnuplot/package.py @@ -55,7 +55,7 @@ class Gnuplot(AutotoolsPackage): depends_on('readline') depends_on('pkgconfig', type='build') depends_on('libxpm') - depends_on('libiconv') + depends_on('iconv') # optional dependencies: depends_on('libcerf', when='+libcerf') diff --git a/var/spack/repos/builtin/packages/grass/package.py b/var/spack/repos/builtin/packages/grass/package.py index c80255fb436..cb83a5cc2ab 100644 --- a/var/spack/repos/builtin/packages/grass/package.py +++ b/var/spack/repos/builtin/packages/grass/package.py @@ -58,7 +58,7 @@ class Grass(AutotoolsPackage): # http://htmlpreview.github.io/?https://github.com/OSGeo/grass/blob/master/REQUIREMENTS.html # General requirements depends_on('gmake@3.81:', type='build') - depends_on('libiconv') + depends_on('iconv') depends_on('zlib') depends_on('flex', type='build') depends_on('bison', type='build') @@ -254,5 +254,8 @@ def configure_args(self): # hence invoke the following function afterwards @run_after('configure') def fix_iconv_linking(self): + if self.spec['iconv'].name != 'libiconv': + return + makefile = FileFilter('include/Make/Platform.make') makefile.filter(r'^ICONVLIB\s*=.*', 'ICONVLIB = -liconv') diff --git a/var/spack/repos/builtin/packages/gtksourceview/package.py b/var/spack/repos/builtin/packages/gtksourceview/package.py index 01876610b2b..ed6737133a4 100644 --- a/var/spack/repos/builtin/packages/gtksourceview/package.py +++ b/var/spack/repos/builtin/packages/gtksourceview/package.py @@ -35,7 +35,7 @@ class Gtksourceview(AutotoolsPackage): depends_on('pango') depends_on('gdk-pixbuf') depends_on('atk') - depends_on('libiconv') + depends_on('iconv') def url_for_version(self, version): url = 'https://download.gnome.org/sources/gtksourceview/' diff --git a/var/spack/repos/builtin/packages/lftp/package.py b/var/spack/repos/builtin/packages/lftp/package.py index 508dbdd5869..b67b79bd5b6 100644 --- a/var/spack/repos/builtin/packages/lftp/package.py +++ b/var/spack/repos/builtin/packages/lftp/package.py @@ -18,7 +18,7 @@ class Lftp(AutotoolsPackage): version('4.6.4', sha256='791e783779d3d6b519d0c23155430b9785f2854023eb834c716f5ba78873b15a') depends_on('expat') - depends_on('libiconv') + depends_on('iconv') depends_on('ncurses') depends_on('openssl') depends_on('readline') @@ -27,7 +27,7 @@ class Lftp(AutotoolsPackage): def configure_args(self): return [ '--with-expat={0}'.format(self.spec['expat'].prefix), - '--with-libiconv={0}'.format(self.spec['libiconv'].prefix), + '--with-libiconv={0}'.format(self.spec['iconv'].prefix), '--with-openssl={0}'.format(self.spec['openssl'].prefix), '--with-readline={0}'.format(self.spec['readline'].prefix), '--with-zlib={0}'.format(self.spec['zlib'].prefix), diff --git a/var/spack/repos/builtin/packages/libc/package.py b/var/spack/repos/builtin/packages/libc/package.py new file mode 100644 index 00000000000..a4fa9ac3a64 --- /dev/null +++ b/var/spack/repos/builtin/packages/libc/package.py @@ -0,0 +1,19 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Libc(Package): + """Dummy libc package to provide `iconv` virtual package""" + + homepage = "https://en.wikipedia.org/wiki/C_standard_library" + url = "" + has_code = False + phases = [] + + version('1.0') # Dummy + variant('iconv', default=False, description='Set to True if libc provides iconv') + provides('iconv', when='+iconv') diff --git a/var/spack/repos/builtin/packages/libgd/package.py b/var/spack/repos/builtin/packages/libgd/package.py index 232b826bbf5..d4907ae3e19 100644 --- a/var/spack/repos/builtin/packages/libgd/package.py +++ b/var/spack/repos/builtin/packages/libgd/package.py @@ -31,7 +31,7 @@ class Libgd(AutotoolsPackage): depends_on('gettext', type='build') depends_on('pkgconfig', type='build') - depends_on('libiconv') + depends_on('iconv') depends_on('libpng') depends_on('jpeg') depends_on('libtiff') diff --git a/var/spack/repos/builtin/packages/libiconv/package.py b/var/spack/repos/builtin/packages/libiconv/package.py index 642ad289fd7..9331dfb399d 100644 --- a/var/spack/repos/builtin/packages/libiconv/package.py +++ b/var/spack/repos/builtin/packages/libiconv/package.py @@ -20,6 +20,7 @@ class Libiconv(AutotoolsPackage, GNUMirrorPackage): # We cannot set up a warning for gets(), since gets() is not part # of C11 any more and thus might not exist. patch('gets.patch', when='@1.14') + provides('iconv') conflicts('@1.14', when='%gcc@5:') diff --git a/var/spack/repos/builtin/packages/libspatialite/package.py b/var/spack/repos/builtin/packages/libspatialite/package.py index e725fdfe0f0..45fe1f6109c 100644 --- a/var/spack/repos/builtin/packages/libspatialite/package.py +++ b/var/spack/repos/builtin/packages/libspatialite/package.py @@ -21,5 +21,5 @@ class Libspatialite(AutotoolsPackage): depends_on('proj@:5') depends_on('geos') depends_on('freexl') - depends_on('libiconv') + depends_on('iconv') depends_on('libxml2') diff --git a/var/spack/repos/builtin/packages/libunistring/package.py b/var/spack/repos/builtin/packages/libunistring/package.py index 94b1c24b984..9812fb32cb1 100644 --- a/var/spack/repos/builtin/packages/libunistring/package.py +++ b/var/spack/repos/builtin/packages/libunistring/package.py @@ -19,7 +19,7 @@ class Libunistring(AutotoolsPackage, GNUMirrorPackage): version('0.9.7', sha256='2e3764512aaf2ce598af5a38818c0ea23dedf1ff5460070d1b6cee5c3336e797') version('0.9.6', sha256='2df42eae46743e3f91201bf5c100041540a7704e8b9abfd57c972b2d544de41b') - depends_on('libiconv') + depends_on('iconv') # glibc 2.28+ removed libio.h and thus _IO_ftrylockfile patch('removed_libio.patch', when='@:0.9.9') diff --git a/var/spack/repos/builtin/packages/libxml2/package.py b/var/spack/repos/builtin/packages/libxml2/package.py index 8c91852ae32..8c024854ea1 100644 --- a/var/spack/repos/builtin/packages/libxml2/package.py +++ b/var/spack/repos/builtin/packages/libxml2/package.py @@ -23,7 +23,7 @@ class Libxml2(AutotoolsPackage): variant('python', default=False, description='Enable Python support') depends_on('pkgconfig@0.9.0:', type='build') - depends_on('libiconv') + depends_on('iconv') depends_on('zlib') depends_on('xz') @@ -49,7 +49,7 @@ def configure_args(self): spec = self.spec args = ['--with-lzma={0}'.format(spec['xz'].prefix), - '--with-iconv={0}'.format(spec['libiconv'].prefix)] + '--with-iconv={0}'.format(spec['iconv'].prefix)] if '+python' in spec: args.extend([ diff --git a/var/spack/repos/builtin/packages/libxslt/package.py b/var/spack/repos/builtin/packages/libxslt/package.py index 7cdb0e41b22..5da6272d833 100644 --- a/var/spack/repos/builtin/packages/libxslt/package.py +++ b/var/spack/repos/builtin/packages/libxslt/package.py @@ -26,7 +26,7 @@ class Libxslt(AutotoolsPackage): variant('python', default=False, description='Build Python bindings') depends_on('pkgconfig@0.9.0:', type='build') - depends_on('libiconv') + depends_on('iconv') depends_on('libxml2') depends_on('libxml2+python', when='+python') depends_on('xz') diff --git a/var/spack/repos/builtin/packages/mono/package.py b/var/spack/repos/builtin/packages/mono/package.py index 73464f0fb94..6a7a96300ac 100644 --- a/var/spack/repos/builtin/packages/mono/package.py +++ b/var/spack/repos/builtin/packages/mono/package.py @@ -25,7 +25,7 @@ class Mono(AutotoolsPackage): # Spack's openssl interacts badly with mono's vendored # "boringssl", don't drag it in w/ cmake depends_on('cmake~openssl', type=('build')) - depends_on('libiconv') + depends_on('iconv') depends_on('perl', type=('build')) version('6.8.0.105', sha256='578799c44c3c86a9eb5daf6dec6c60a24341940fd376371956d4a46cf8612178', @@ -50,6 +50,6 @@ def patch(self): def configure_args(self): args = [] - li = self.spec['libiconv'].prefix + li = self.spec['iconv'].prefix args.append('--with-libiconv-prefix={p}'.format(p=li)) return args diff --git a/var/spack/repos/builtin/packages/ncl/package.py b/var/spack/repos/builtin/packages/ncl/package.py index 0fa063c52cd..e6e09faae1e 100644 --- a/var/spack/repos/builtin/packages/ncl/package.py +++ b/var/spack/repos/builtin/packages/ncl/package.py @@ -48,7 +48,7 @@ class Ncl(Package): # Extra dependencies that may be missing from build system: depends_on('bison', type='build') depends_on('flex+lex') - depends_on('libiconv') + depends_on('iconv') depends_on('tcsh') # Also, the manual says that ncl requires zlib, but that comes as a @@ -57,7 +57,7 @@ class Ncl(Package): # The following dependencies are required, otherwise several components # fail to compile: depends_on('curl') - depends_on('libiconv') + depends_on('iconv') depends_on('libx11') depends_on('libxaw') depends_on('libxmu') diff --git a/var/spack/repos/builtin/packages/poppler/package.py b/var/spack/repos/builtin/packages/poppler/package.py index 8689f817e51..affb9e5359a 100644 --- a/var/spack/repos/builtin/packages/poppler/package.py +++ b/var/spack/repos/builtin/packages/poppler/package.py @@ -49,7 +49,7 @@ class Poppler(CMakePackage): depends_on('qt@4.0:', when='+qt') depends_on('zlib', when='+zlib') depends_on('cairo@1.10.0:', when='+glib') - depends_on('libiconv', when='+iconv') + depends_on('iconv', when='+iconv') depends_on('jpeg', when='+jpeg') depends_on('libpng', when='+png') depends_on('libtiff', when='+tiff') diff --git a/var/spack/repos/builtin/packages/procps/package.py b/var/spack/repos/builtin/packages/procps/package.py index f8b4ed26336..e18d6206cf8 100644 --- a/var/spack/repos/builtin/packages/procps/package.py +++ b/var/spack/repos/builtin/packages/procps/package.py @@ -23,7 +23,7 @@ class Procps(AutotoolsPackage): depends_on('m4', type='build') depends_on('pkgconfig@0.9.0:', type='build') depends_on('dejagnu', type='test') - depends_on('libiconv') + depends_on('iconv') depends_on('gettext') depends_on('ncurses') @@ -35,7 +35,7 @@ def autoreconf(self, spec, prefix): def configure_args(self): return [ - '--with-libiconv-prefix={0}'.format(self.spec['libiconv'].prefix), + '--with-libiconv-prefix={0}'.format(self.spec['iconv'].prefix), '--with-libintl-prefix={0}'.format(self.spec['gettext'].prefix), '--with-ncurses', # Required to avoid libintl linking errors diff --git a/var/spack/repos/builtin/packages/tar/package.py b/var/spack/repos/builtin/packages/tar/package.py index de12fd23447..15c2e4bc0ef 100644 --- a/var/spack/repos/builtin/packages/tar/package.py +++ b/var/spack/repos/builtin/packages/tar/package.py @@ -19,7 +19,7 @@ class Tar(AutotoolsPackage, GNUMirrorPackage): version('1.29', sha256='cae466e6e58c7292355e7080248f244db3a4cf755f33f4fa25ca7f9a7ed09af0') version('1.28', sha256='6a6b65bac00a127a508533c604d5bf1a3d40f82707d56f20cefd38a05e8237de') - depends_on('libiconv') + depends_on('iconv') patch('tar-pgi.patch', when='@1.29') patch('config-pgi.patch', when='@:1.29') @@ -29,5 +29,5 @@ class Tar(AutotoolsPackage, GNUMirrorPackage): def configure_args(self): return [ - '--with-libiconv-prefix={0}'.format(self.spec['libiconv'].prefix), + '--with-libiconv-prefix={0}'.format(self.spec['iconv'].prefix), ] diff --git a/var/spack/repos/builtin/packages/unixodbc/package.py b/var/spack/repos/builtin/packages/unixodbc/package.py index 2802f87aa5e..b93e7eb166d 100644 --- a/var/spack/repos/builtin/packages/unixodbc/package.py +++ b/var/spack/repos/builtin/packages/unixodbc/package.py @@ -16,5 +16,5 @@ class Unixodbc(AutotoolsPackage): version('2.3.4', sha256='2e1509a96bb18d248bf08ead0d74804957304ff7c6f8b2e5965309c632421e39') - depends_on('libiconv') + depends_on('iconv') depends_on('libtool') diff --git a/var/spack/repos/builtin/packages/wget/package.py b/var/spack/repos/builtin/packages/wget/package.py index 122b138d106..c9ef5e9dd81 100644 --- a/var/spack/repos/builtin/packages/wget/package.py +++ b/var/spack/repos/builtin/packages/wget/package.py @@ -43,7 +43,7 @@ class Wget(AutotoolsPackage, GNUMirrorPackage): depends_on('perl@5.12.0:', type='build') depends_on('pkgconfig', type='build') - depends_on('libiconv') + depends_on('iconv') depends_on('valgrind', type='test') diff --git a/var/spack/repos/builtin/packages/xerces-c/package.py b/var/spack/repos/builtin/packages/xerces-c/package.py index 05af3d1a5c9..21caf00e83d 100644 --- a/var/spack/repos/builtin/packages/xerces-c/package.py +++ b/var/spack/repos/builtin/packages/xerces-c/package.py @@ -45,7 +45,7 @@ class XercesC(AutotoolsPackage): multi=False, description='Use the specified transcoder') - depends_on('libiconv', type='link', when='transcoder=gnuiconv') + depends_on('iconv', type='link', when='transcoder=gnuiconv') depends_on('icu4c', type='link', when='transcoder=icu') # Pass flags to configure. This is necessary for CXXFLAGS or else @@ -61,7 +61,7 @@ def flag_handler(self, name, flags): # There is no --with-pkg for gnuiconv. if name == 'ldflags' and 'transcoder=gnuiconv' in spec: - flags.append(spec['libiconv'].libs.ld_flags) + flags.append(spec['iconv'].libs.ld_flags) return (None, None, flags) From 0b1c0bdd6e34172d7beb75387e561815de518074 Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Sat, 28 Mar 2020 08:11:37 -0600 Subject: [PATCH 041/138] xsbench: fix build of v19 (#15715) * xsbench: fix build of v19 * Flake8 --- var/spack/repos/builtin/packages/xsbench/package.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/xsbench/package.py b/var/spack/repos/builtin/packages/xsbench/package.py index 3648edc298a..b6040714d42 100644 --- a/var/spack/repos/builtin/packages/xsbench/package.py +++ b/var/spack/repos/builtin/packages/xsbench/package.py @@ -28,7 +28,12 @@ class Xsbench(MakefilePackage): depends_on('mpi', when='+mpi') - build_directory = 'src' + @property + def build_directory(self): + if self.spec.satisfies('@:18'): + return 'src' + else: + return 'openmp-threading' @property def build_targets(self): @@ -50,4 +55,5 @@ def build_targets(self): def install(self, spec, prefix): mkdir(prefix.bin) - install('src/XSBench', prefix.bin) + with working_dir(self.build_directory): + install('XSBench', prefix.bin) From 33f424ff1de48f76b9b93390209df9d4271bb30a Mon Sep 17 00:00:00 2001 From: iarspider Date: Sat, 28 Mar 2020 15:15:28 +0100 Subject: [PATCH 042/138] Update URL for new py2neo versions (#15324) * Update URL for new py2neo versions * Use pypi for py-py2neo * Add version 4.3.0 * Update py2neo dependencies * Apply suggestions from code review Co-Authored-By: Adam J. Stewart Co-authored-by: Adam J. Stewart --- .../builtin/packages/py-neobolt/package.py | 18 +++++++++++++++ .../builtin/packages/py-neotime/package.py | 20 +++++++++++++++++ .../builtin/packages/py-py2neo/package.py | 22 ++++++++++++++----- 3 files changed, 54 insertions(+), 6 deletions(-) create mode 100644 var/spack/repos/builtin/packages/py-neobolt/package.py create mode 100644 var/spack/repos/builtin/packages/py-neotime/package.py diff --git a/var/spack/repos/builtin/packages/py-neobolt/package.py b/var/spack/repos/builtin/packages/py-neobolt/package.py new file mode 100644 index 00000000000..7e19e529fd9 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-neobolt/package.py @@ -0,0 +1,18 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyNeobolt(PythonPackage): + """Neo4j Bolt connector for Python""" + + homepage = "https://github.com/neo4j-drivers/neobolt" + url = "https://pypi.io/packages/source/n/neobolt/neobolt-1.7.16.tar.gz" + + version('1.7.16', sha256='ca4e87679fe3ed39aec23638658e02dbdc6bbc3289a04e826f332e05ab32275d') + + depends_on('py-setuptools', type='build') + depends_on('python@2.7:2.8,3.4:', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/py-neotime/package.py b/var/spack/repos/builtin/packages/py-neotime/package.py new file mode 100644 index 00000000000..31769361c14 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-neotime/package.py @@ -0,0 +1,20 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyNeotime(PythonPackage): + """Nanosecond resolution temporal types""" + + homepage = "https://neotime.readthedocs.io/" + url = "https://pypi.io/packages/source/n/neotime/neotime-1.7.4.tar.gz" + + version('1.7.4', sha256='4e0477ba0f24e004de2fa79a3236de2bd941f20de0b5db8d976c52a86d7363eb') + + depends_on('python@2.7:2.8,3.4:', type=('build', 'run')) + depends_on('py-setuptools', type='build') + depends_on('py-pytz', type=('build', 'run')) + depends_on('py-six', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/py-py2neo/package.py b/var/spack/repos/builtin/packages/py-py2neo/package.py index ef4ed46cd59..69e98d7b0b6 100644 --- a/var/spack/repos/builtin/packages/py-py2neo/package.py +++ b/var/spack/repos/builtin/packages/py-py2neo/package.py @@ -11,12 +11,22 @@ class PyPy2neo(PythonPackage): within Python applications and from the command line.""" homepage = "http://py2neo.org/" - url = "https://github.com/nigelsmall/py2neo/archive/py2neo-2.0.8.tar.gz" + url = "https://pypi.io/packages/source/p/py2neo/py2neo-2.0.8.tar.gz" - version('2.0.8', sha256='57b4a1c4aa800e03904b2adfd7c8ec467b072bae2d24baf150fd580916255f2e') - version('2.0.7', sha256='aa7c86fec70823111d2f932cb20a978889f1c47c2f58461309f644ecb9a22204') - version('2.0.6', sha256='bcf00ebc82a80c7e2da00288e8f90f81682abfc991e19d92d21726c2deac823f') - version('2.0.5', sha256='024b42261b06e5e2c92a1f24e62398847f090862005add0b5c69a79a7e1e87b5') - version('2.0.4', sha256='19074b7b892f2e989f39eae21fc59b26a05e1a820adad8aa58bc470b70d9056d') + version('4.3.0', sha256='a218ccb4b636e3850faa6b74ebad80f00600217172a57f745cf223d38a219222') + version('2.0.8', sha256='06167f5a91a0d9b9b73431baacd876f2d507650a681fdce1fcf3b383a9b991c1') + version('2.0.7', sha256='9b154053eb93c7f5fb3ebd48b6a5b99df450d3f2e9c6682153c6f8d59369378c') + version('2.0.6', sha256='6bb828d6d3e48b4d095b3f7d79dbb690a47633f0a9812eb62f141b042bab3186') + version('2.0.5', sha256='2c04d4223d2d356c4800c586f30c048757334f9391553c852c29aebf2368d101') + version('2.0.4', sha256='727726b87268ca1e929191b960a5473409e5bd81559ee83a304951104bb6b866') depends_on("py-setuptools", type='build') + depends_on("py-certifi", type=('build', 'run'), when='@4.3.0:') + depends_on("py-click@7.0", type=('build', 'run'), when='@4.3.0:') + depends_on("py-colorama", type=('build', 'run'), when='@4.3.0:') + depends_on("py-neobolt@1.7.12:1.7.999", type=('build', 'run'), when='@4.3.0:') + depends_on("py-neotime@1.7.4:1.7.999", type=('build', 'run'), when='@4.3.0:') + depends_on("py-prompt-toolkit@2.0.7:2.0.999", type=('build', 'run'), when='@4.3.0:') + depends_on("py-pygments@2.3.1:2.3.999", type=('build', 'run'), when='@4.3.0:') + depends_on("py-pytz", type=('build', 'run'), when='@4.3.0:') + depends_on("py-urllib3@1.23:1.24", type=('build', 'run'), when='@4.3.0:') From 8beeeeb74c7e19f0c6146d91e80819701f4d2309 Mon Sep 17 00:00:00 2001 From: "Daryl W. Grunau" Date: Sat, 28 Mar 2020 11:12:49 -0600 Subject: [PATCH 043/138] new package ddd (#15717) * new package ddd * mitigate build/installs on case-insensitive filesystems * add missing variants * flake8 fixes * flake8: E124 closing bracket does not match visual indentation Co-authored-by: Daryl W. Grunau --- .../repos/builtin/packages/ddd/package.py | 75 +++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 var/spack/repos/builtin/packages/ddd/package.py diff --git a/var/spack/repos/builtin/packages/ddd/package.py b/var/spack/repos/builtin/packages/ddd/package.py new file mode 100644 index 00000000000..d0edde042d8 --- /dev/null +++ b/var/spack/repos/builtin/packages/ddd/package.py @@ -0,0 +1,75 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * +import os + + +class Ddd(AutotoolsPackage, GNUMirrorPackage): + """A graphical front-end for command-line debuggers such as GDB, DBX, + WDB, Ladebug, JDB, XDB, the Perl debugger, the bash debugger bashdb, + the GNU Make debugger remake, or the Python debugger pydb.""" + + homepage = "https://www.gnu.org/software/ddd" + gnu_mirror_path = "ddd/ddd-3.3.12.tar.gz" + + version('3.3.12', sha256='3ad6cd67d7f4b1d6b2d38537261564a0d26aaed077bf25c51efc1474d0e8b65c') + + variant('shared', default=True, description='Build shared libraries') + variant('static', default=False, description='Build static libraries') + + depends_on('gdb@4.16:') + depends_on('lesstif@0.89:') + + # Needed for OSX 10.9 DP6 build failure: + # https://savannah.gnu.org/patch/?8178 + patch('https://savannah.gnu.org/patch/download.php?file_id=29114', + sha256='aaacae79ce27446ead3483123abef0f8222ebc13fd61627bfadad96016248af6', + working_dir='ddd') + + # https://savannah.gnu.org/bugs/?41997 + patch('https://savannah.gnu.org/patch/download.php?file_id=31132', + sha256='f3683f23c4b4ff89ba701660031d4b5ef27594076f6ef68814903ff3141f6714') + + # Patch to fix compilation with Xcode 9 + # https://savannah.gnu.org/bugs/?52175 + patch('https://raw.githubusercontent.com/macports/macports-ports/a71fa9f4/devel/ddd/files/patch-unknown-type-name-a_class.diff', + sha256='c187a024825144f186f0cf9cd175f3e972bb84590e62079793d0182cb15ca183', + working_dir='ddd') + + def configure_args(self): + spec = self.spec + + args = [ + '--disable-debug', + '--disable-dependency-tracking', + '--enable-builtin-app-defaults', + '--enable-builtin-manual', + '--enable-shared' if '+shared' in spec else '--disable-shared', + '--enable-static' if '+static' in spec else '--disable-static', + ] + + return args + + # From MacPorts: make will build the executable "ddd" and the X + # resource file "Ddd" in the same directory. As HFS+ is case- + # insensitive by default this will loosely FAIL. Mitigate this by + # building/installing 'dddexe' on Darwin and fixing up post install. + def build(self, spec, prefix): + make('EXEEXT={0}'. + format('exe' if spec.satisfies('platform=darwin') else '')) + + # DDD won't install in parallel + def install(self, spec, prefix): + make('install', + 'EXEEXT={0}'. + format('exe' if spec.satisfies('platform=darwin') else ''), + parallel=False) + + @run_after('install') + def _rename_exe_on_darwin(self): + if self.spec.satisfies('platform=darwin'): + with working_dir(self.prefix.bin): + os.rename('dddexe', 'ddd') From 6969526e0f746a07ad7d9fcd073928ff1cc3a473 Mon Sep 17 00:00:00 2001 From: iarspider Date: Sat, 28 Mar 2020 18:13:47 +0100 Subject: [PATCH 044/138] py-statsmodels: update to 0.102 and fix dependencies (#15708) * py-statsmodels: update to 0.102 and fix dependencies * Update var/spack/repos/builtin/packages/py-statsmodels/package.py Co-Authored-By: Adam J. Stewart Co-authored-by: Adam J. Stewart --- .../packages/py-statsmodels/package.py | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-statsmodels/package.py b/var/spack/repos/builtin/packages/py-statsmodels/package.py index eebc2066406..26c006bccff 100644 --- a/var/spack/repos/builtin/packages/py-statsmodels/package.py +++ b/var/spack/repos/builtin/packages/py-statsmodels/package.py @@ -13,31 +13,32 @@ class PyStatsmodels(PythonPackage): homepage = "http://www.statsmodels.org" url = "https://pypi.io/packages/source/s/statsmodels/statsmodels-0.8.0.tar.gz" + version('0.10.2', sha256='9cd2194c6642a8754e85f9a6e6912cdf996bebf6ff715d3cc67f65dadfd37cc9') version('0.10.1', sha256='320659a80f916c2edf9dfbe83512d9004bb562b72eedb7d9374562038697fa10') version('0.8.0', sha256='26431ab706fbae896db7870a0892743bfbb9f5c83231644692166a31d2d86048') variant('plotting', default=False, description='With matplotlib') - depends_on('python@:3.6', when='@:0.8.0', type=('build', 'run')) + depends_on('python@:3.6', when='@:0.8.0', type=('build', 'run')) + depends_on('python@2.7:2.8,3.4:', when='@0.10.1:', type=('build', 'run')) # according to http://www.statsmodels.org/dev/install.html earlier versions # might work. depends_on('py-setuptools@0.6c5:', type='build') - depends_on('py-numpy@1.7.0:', type=('build', 'run'), when='@0.8.0') - depends_on('py-pandas@0.12:', type=('build', 'run'), when='@0.8.0') - depends_on('py-patsy@0.2.1:', type=('build', 'run'), when='@0.8.0') - depends_on('py-scipy@0.11:', type=('build', 'run'), when='@0.8.0') - depends_on('py-matplotlib@1.3:', type=('build', 'run'), when='@0.8.0 +plotting') - # patsy@0.5.1 works around a Python change # https://github.com/statsmodels/statsmodels/issues/5343 and # https://github.com/pydata/patsy/pull/131 - depends_on('py-numpy', type=('build', 'run'), when='@0.10.1') - depends_on('py-pandas', type=('build', 'run'), when='@0.10.1') - depends_on('py-patsy', type=('build', 'run'), when='@0.10.1') - depends_on('py-scipy@0.5.1:', type=('build', 'run'), when='@0.10.1') - depends_on('py-matplotlib', type=('build', 'run'), when='@0.10.1 +plotting') + + depends_on('py-numpy@1.7.0:', type=('build', 'run'), when='@0.8.0:') + depends_on('py-numpy@1.11.0:', type=('build', 'run'), when='@0.10.1:') + depends_on('py-pandas@0.12:', type=('build', 'run'), when='@0.8.0:') + depends_on('py-pandas@0.19:', type=('build', 'run'), when='@0.10.1:') + depends_on('py-patsy@0.2.1:', type=('build', 'run'), when='@0.8.0:') + depends_on('py-patsy@0.4.0:', type=('build', 'run'), when='@0.10.1:') + depends_on('py-scipy@0.11:', type=('build', 'run'), when='@0.8.0:') + depends_on('py-scipy@0.18:', type=('build', 'run'), when='@0.10.1:') + depends_on('py-matplotlib@1.3:', type=('build', 'run'), when='@0.8.0 +plotting') depends_on('py-pytest', type='test') From c1d111af74355dc911229e05982b60ae77b4d057 Mon Sep 17 00:00:00 2001 From: Amjad Kotobi Date: Sat, 28 Mar 2020 18:14:05 +0100 Subject: [PATCH 045/138] Add package swiftclient (#15700) * Add package swiftclient * Fix on url * Package name changed to py-python-swiftclient and changes on dependencies --- .../packages/py-python-swiftclient/package.py | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-python-swiftclient/package.py diff --git a/var/spack/repos/builtin/packages/py-python-swiftclient/package.py b/var/spack/repos/builtin/packages/py-python-swiftclient/package.py new file mode 100644 index 00000000000..bd8f766624b --- /dev/null +++ b/var/spack/repos/builtin/packages/py-python-swiftclient/package.py @@ -0,0 +1,29 @@ +# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyPythonSwiftclient(PythonPackage): + """This is a python client for the Swift API.""" + + homepage = "https://docs.openstack.org/python-swiftclient" + url = "https://pypi.io/packages/source/p/python-swiftclient/python-swiftclient-3.9.0.tar.gz" + + maintainers = ['ajkotobi'] + + import_modules = ['sys', 'setuptools', 'requests'] + + version('3.9.0', sha256='4f2097492e4c76e948882fc859bfa033ade09bed72f8e6b328e34a3467d9a377') + version('3.8.1', sha256='3a013303643f77a99befa05582dfb93671e1fba1aed9f4a517418129700aedb8') + version('3.8.0', sha256='107a9d5356663365a9f7c0b3a2b55da97a0a9ba7f10da2319b3972481510f33d') + version('3.7.1', sha256='06bda5a6f81ea132e5cb52d0eb0616a0ab0958b4ec0d1cb7f850f04bf178852f') + + depends_on('py-setuptools', type=('build', 'run')) + depends_on('python@2.7:', type=('build', 'run')) + depends_on('py-futures@3:', type=('build', 'run'), when='^python@:2') + depends_on('py-requests@1.1.0:', type=('build', 'run')) + depends_on('py-six@1.9:', type=('build', 'run')) + depends_on('py-pbr', type='build') From f3c2ebbfb82cb9d88c32bb0bd301c529d1a0ee0b Mon Sep 17 00:00:00 2001 From: Kai Germaschewski Date: Sat, 28 Mar 2020 14:06:17 -0400 Subject: [PATCH 046/138] fix gcc@8.4.0 build (#15729) the gcc package.py includes patches for a sanitizer related bug that look like they've been fixed in gcc 8.4.0, which caused `spack install` to fail. This PR excludes patching gcc >= 8.4.0 and < 9.0.0. --- var/spack/repos/builtin/packages/gcc/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py index b7a08f8538f..cf16f1bc8f7 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -237,8 +237,8 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage): # Backport libsanitizer patch for glibc >= 2.31 and 8.1.0 <= gcc <= 9.2.0 # https://bugs.gentoo.org/708346 - patch('glibc-2.31-libsanitizer-1.patch', when='@8.1.0:9.2.0') - patch('glibc-2.31-libsanitizer-2.patch', when='@8.1.0:9.2.0') + patch('glibc-2.31-libsanitizer-1.patch', when='@8.1.0:8.3.99,9.0.0:9.2.0') + patch('glibc-2.31-libsanitizer-2.patch', when='@8.1.0:8.3.99,9.0.0:9.2.0') # Older versions do not compile with newer versions of glibc # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81712 patch('ucontext_t.patch', when='@4.9,5.1:5.4,6.1:6.4,7.1') From a3e1b2bd58d02d43c2dce65b8e0cfc89791486f1 Mon Sep 17 00:00:00 2001 From: Tom Scogland Date: Sat, 28 Mar 2020 13:20:06 -0700 Subject: [PATCH 047/138] llvm: libomptarget support (#14060) This allows the llvm build to support: * clang cuda * libomptarget for: * current host * cuda * bitcode compilation of libomptarget device runtime for inlining by bootstrapping libomptarget * split dwarf information support as an option for debug builds, if you need a debug build, for the love of all that's good in the universe use this flag * adds necessary dependencies for shared library builds and libomp and libomp target to build correctly * new version of z3 to make it sufficient to build recent llvm The actual change is much smaller than the diff, this is because it's been formatted with black. I realize this kinda sucks right now, but I'm hoping it will make future updates here less painful. --- .../repos/builtin/packages/llvm/package.py | 456 +++++++++++------- .../repos/builtin/packages/z3/package.py | 1 + 2 files changed, 287 insertions(+), 170 deletions(-) diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py index 1644a8e7501..588c1cae1dd 100644 --- a/var/spack/repos/builtin/packages/llvm/package.py +++ b/var/spack/repos/builtin/packages/llvm/package.py @@ -15,14 +15,17 @@ class Llvm(CMakePackage): is not an acronym; it is the full name of the project. """ - homepage = 'http://llvm.org/' - url = "https://github.com/llvm/llvm-project/archive/llvmorg-7.1.0.tar.gz" - list_url = 'http://releases.llvm.org/download.html' - git = 'https://github.com/llvm/llvm-project' + homepage = "http://llvm.org/" + url = "https://github.com/llvm/llvm-project/archive/llvmorg-7.1.0.tar.gz" + list_url = "http://releases.llvm.org/download.html" + git = "https://github.com/llvm/llvm-project" + maintainers = ['trws'] - family = 'compiler' # Used by lmod + family = "compiler" # Used by lmod + # fmt: off version('master', branch='master') + version('10.0.0', sha256='b81c96d2f8f40dc61b14a167513d87c0d813aae0251e06e11ae8a4384ca15451') version('9.0.1', sha256='be7b034641a5fda51ffca7f5d840b1a768737779f75f7c4fd18fe2d37820289a') version('9.0.0', sha256='7807fac25330e24e9955ca46cd855dd34bbc9cc4fdba8322366206654d1036f2') version('8.0.0', sha256='d81238b4a69e93e29f74ce56f8107cbfcf0c7d7b40510b7879e98cc031e25167') @@ -43,123 +46,176 @@ class Llvm(CMakePackage): version('3.7.0', sha256='dc00bc230be2006fb87b84f6fe4800ca28bc98e6692811a98195da53c9cb28c6') version('3.6.2', sha256='f75d703a388ba01d607f9cf96180863a5e4a106827ade17b221d43e6db20778a') version('3.5.1', sha256='5d739684170d5b2b304e4fb521532d5c8281492f71e1a8568187bfa38eb5909d') + # fmt: on # NOTE: The debug version of LLVM is an order of magnitude larger than # the release version, and may take up 20-30 GB of space. If you want # to save space, build with `build_type=Release`. - variant('clang', default=True, - description="Build the LLVM C/C++/Objective-C compiler frontend") + variant( + "clang", + default=True, + description="Build the LLVM C/C++/Objective-C compiler frontend", + ) - # TODO: The current version of this package unconditionally disables CUDA. - # Better would be to add a "cuda" variant that: - # - Adds dependency on the "cuda" package when enabled - # - Sets the necessary CMake flags when enabled - # - Disables CUDA (as this current version does) only when the - # variant is also disabled. + variant( + "cuda", + default=False, + description="Build LLVM with CUDA, required for nvptx offload", + ) + variant( + "nvptx_offload_ccs", + default="35,60,70,75", + multi=True, + description="NVIDIA compute cabailities to make inlining capable", + ) - # variant('cuda', default=False, - # description="Build the LLVM with CUDA features enabled") + variant( + "omp_debug", + default=False, + description="Include debugging code in OpenMP runtime libraries", + ) + variant("lldb", default=True, description="Build the LLVM debugger") + variant("lld", default=True, description="Build the LLVM linker") + variant( + "internal_unwind", + default=True, + description="Build the libcxxabi libunwind", + ) + variant( + "polly", + default=True, + description="Build the LLVM polyhedral optimization plugin, " + "only builds for 3.7.0+", + ) + variant( + "libcxx", + default=True, + description="Build the LLVM C++ standard library", + ) + variant( + "compiler-rt", + default=True, + description="Build LLVM compiler runtime, including sanitizers", + ) + variant( + "gold", + default=(sys.platform != "darwin"), + description="Add support for LTO with the gold linker plugin", + ) + variant( + "split_dwarf", + default=False, + description="Build with split dwarf information", + ) + variant( + "shared_libs", + default=False, + description="Build all components as shared libraries, faster, " + "less memory to build, less stable", + ) + variant( + "all_targets", + default=False, + description="Build all supported targets, default targets " + ",NVPTX,AMDGPU,CppBackend", + ) + variant( + "build_type", + default="Release", + description="CMake build type", + values=("Debug", "Release", "RelWithDebInfo", "MinSizeRel"), + ) + variant( + "omp_tsan", + default=False, + description="Build with OpenMP capable thread sanitizer", + ) + variant("python", default=False, description="Install python bindings") + variant( + "flang", + default=False, + description="Build flang branch version instead", + ) - variant('lldb', default=True, description="Build the LLVM debugger") - variant('lld', default=True, description="Build the LLVM linker") - variant('internal_unwind', default=True, - description="Build the libcxxabi libunwind") - variant('polly', default=True, - description="Build the LLVM polyhedral optimization plugin, " - "only builds for 3.7.0+") - variant('libcxx', default=True, - description="Build the LLVM C++ standard library") - variant('compiler-rt', default=True, - description="Build LLVM compiler runtime, including sanitizers") - variant('gold', default=(sys.platform != 'darwin'), - description="Add support for LTO with the gold linker plugin") - variant('shared_libs', default=False, - description="Build all components as shared libraries, faster, " - "less memory to build, less stable") - variant('link_dylib', default=False, - description="Build and link the libLLVM shared library rather " - "than static") - variant('all_targets', default=False, - description="Build all supported targets, default targets " - ",NVPTX,AMDGPU,CppBackend") - variant('build_type', default='Release', - description='CMake build type', - values=('Debug', 'Release', 'RelWithDebInfo', 'MinSizeRel')) - variant('omp_tsan', default=False, - description="Build with OpenMP capable thread sanitizer") - variant('python', default=False, description="Install python bindings") - - extends('python', when='+python') + extends("python", when="+python") # Build dependency - depends_on('cmake@3.4.3:', type='build') - depends_on('python@2.7:2.8', when='@:4.999 ~python', type='build') - depends_on('python', when='@5: ~python', type='build') + depends_on("cmake@3.4.3:", type="build") + depends_on("python@2.7:2.8", when="@:4.999 ~python", type="build") + depends_on("python@2.7:2.8", when="@5: ~python +flang", type="build") + depends_on("python", when="@5: ~python", type="build") # Universal dependency - depends_on('python@2.7:2.8', when='@:4.999+python') - depends_on('python', when='@5:+python') + depends_on("python@2.7:2.8", when="@:4.999+python") + depends_on("python@2.7:2.8", when="@5:+python+flang") + depends_on("python", when="@5:+python") + depends_on("z3", when="@9:") + + # CUDA dependency + depends_on("cuda", when="+cuda") # openmp dependencies - depends_on('perl-data-dumper', type=('build')) + depends_on("perl-data-dumper", type=("build")) + depends_on("hwloc") + depends_on("libelf") # libomptarget + depends_on("libffi") # libomptarget # ncurses dependency - depends_on('ncurses+termlib') + depends_on("ncurses+termlib") # lldb dependencies - depends_on('swig', when='+lldb') - depends_on('libedit', when='+lldb') - depends_on('py-six', when='@5.0.0: +lldb +python') + depends_on("swig", when="+lldb") + depends_on("libedit", when="+lldb") + depends_on("py-six", when="@5.0.0: +lldb +python") - # gold support - depends_on('binutils+gold', when='+gold') + # gold support, required for some features + depends_on("binutils+gold", when="+gold") # polly plugin - depends_on('gmp', when='@:3.6.999 +polly') - depends_on('isl', when='@:3.6.999 +polly') + depends_on("gmp", when="@:3.6.999 +polly") + depends_on("isl", when="@:3.6.999 +polly") - conflicts('+clang_extra', when='~clang') - conflicts('+lldb', when='~clang') - conflicts('+libcxx', when='~clang') - conflicts('+internal_unwind', when='~clang') - conflicts('+compiler-rt', when='~clang') + conflicts("+clang_extra", when="~clang") + conflicts("+lldb", when="~clang") + conflicts("+libcxx", when="~clang") + conflicts("+internal_unwind", when="~clang") + conflicts("+compiler-rt", when="~clang") # LLVM 4 and 5 does not build with GCC 8 - conflicts('%gcc@8:', when='@:5') - conflicts('%gcc@:5.0.999', when='@8:') + conflicts("%gcc@8:", when="@:5") + conflicts("%gcc@:5.0.999", when="@8:") # OMP TSAN exists in > 5.x - conflicts('+omp_tsan', when='@:5.99') + conflicts("+omp_tsan", when="@:5.99") # Github issue #4986 - patch('llvm_gcc7.patch', when='@4.0.0:4.0.1+lldb %gcc@7.0:') + patch("llvm_gcc7.patch", when="@4.0.0:4.0.1+lldb %gcc@7.0:") # Backport from llvm master + additional fix # see https://bugs.llvm.org/show_bug.cgi?id=39696 # for a bug report about this problem in llvm master. - patch('constexpr_longdouble.patch', when='@6:8+libcxx') - patch('constexpr_longdouble_9.0.patch', when='@9+libcxx') + patch("constexpr_longdouble.patch", when="@6:8+libcxx") + patch("constexpr_longdouble_9.0.patch", when="@9+libcxx") # Backport from llvm master; see # https://bugs.llvm.org/show_bug.cgi?id=38233 # for a bug report about this problem in llvm master. - patch('llvm_py37.patch', when='@4:6 ^python@3.7:') + patch("llvm_py37.patch", when="@4:6 ^python@3.7:") # https://bugs.llvm.org/show_bug.cgi?id=39696 - patch('thread-p9.patch', when='@develop+libcxx') + patch("thread-p9.patch", when="@develop+libcxx") - @run_before('cmake') + @run_before("cmake") def check_darwin_lldb_codesign_requirement(self): - if not self.spec.satisfies('+lldb platform=darwin'): + if not self.spec.satisfies("+lldb platform=darwin"): return - codesign = which('codesign') - mkdir('tmp') - llvm_check_file = join_path('tmp', 'llvm_check') - copy('/usr/bin/false', llvm_check_file) + codesign = which("codesign") + mkdir("tmp") + llvm_check_file = join_path("tmp", "llvm_check") + copy("/usr/bin/false", llvm_check_file) try: - codesign('-f', '-s', 'lldb_codesign', '--dryrun', - llvm_check_file) + codesign("-f", "-s", "lldb_codesign", "--dryrun", llvm_check_file) except ProcessError: # Newer LLVM versions have a simple script that sets up @@ -170,140 +226,200 @@ def check_darwin_lldb_codesign_requirement(self): except Exception: raise RuntimeError( 'The "lldb_codesign" identity must be available to build ' - 'LLVM with LLDB. See https://lldb.llvm.org/resources/' - 'build.html#code-signing-on-macos for details on how to ' - 'create this identity.' + "LLVM with LLDB. See https://lldb.llvm.org/resources/" + "build.html#code-signing-on-macos for details on how to " + "create this identity." ) def setup_build_environment(self, env): - env.append_flags('CXXFLAGS', self.compiler.cxx11_flag) + env.append_flags("CXXFLAGS", self.compiler.cxx11_flag) def setup_run_environment(self, env): - if '+clang' in self.spec: - env.set('CC', join_path(self.spec.prefix.bin, 'clang')) - env.set('CXX', join_path(self.spec.prefix.bin, 'clang++')) + if "+clang" in self.spec: + env.set("CC", join_path(self.spec.prefix.bin, "clang")) + env.set("CXX", join_path(self.spec.prefix.bin, "clang++")) - root_cmakelists_dir = 'llvm' + root_cmakelists_dir = "llvm" def cmake_args(self): spec = self.spec cmake_args = [ - '-DLLVM_REQUIRES_RTTI:BOOL=ON', - '-DLLVM_ENABLE_RTTI:BOOL=ON', - '-DLLVM_ENABLE_EH:BOOL=ON', - '-DCLANG_DEFAULT_OPENMP_RUNTIME:STRING=libomp', - '-DPYTHON_EXECUTABLE:PATH={0}'.format(spec['python'].command.path), + "-DLLVM_REQUIRES_RTTI:BOOL=ON", + "-DLLVM_ENABLE_RTTI:BOOL=ON", + "-DLLVM_ENABLE_EH:BOOL=ON", + "-DCLANG_DEFAULT_OPENMP_RUNTIME:STRING=libomp", + "-DPYTHON_EXECUTABLE:PATH={0}".format(spec["python"].command.path), + "-DLIBOMP_USE_HWLOC=On", ] projects = [] - # TODO: Instead of unconditionally disabling CUDA, add a "cuda" variant - # (see TODO above), and set the paths if enabled. - cmake_args.extend([ - '-DCUDA_TOOLKIT_ROOT_DIR:PATH=IGNORE', - '-DCUDA_SDK_ROOT_DIR:PATH=IGNORE', - '-DCUDA_NVCC_EXECUTABLE:FILEPATH=IGNORE', - '-DLIBOMPTARGET_DEP_CUDA_DRIVER_LIBRARIES:STRING=IGNORE']) + if "+cuda" in spec: + cmake_args.extend( + [ + "-DCUDA_TOOLKIT_ROOT_DIR:PATH=" + spec["cuda"].prefix, + "-DLIBOMPTARGET_NVPTX_COMPUTE_CAPABILITIES={0}".format( + ",".join(spec.variants["nvptx_offload_ccs"].value) + ), + "-DCLANG_OPENMP_NVPTX_DEFAULT_ARCH=sm_{0}".format( + spec.variants["nvptx_offload_ccs"].value[-1] + ), + ] + ) + else: + # still build libomptarget but disable cuda + cmake_args.extend( + [ + "-DCUDA_TOOLKIT_ROOT_DIR:PATH=IGNORE", + "-DCUDA_SDK_ROOT_DIR:PATH=IGNORE", + "-DCUDA_NVCC_EXECUTABLE:FILEPATH=IGNORE", + "-DLIBOMPTARGET_DEP_CUDA_DRIVER_LIBRARIES:STRING=IGNORE", + ] + ) - if '+python' in spec and '+lldb' in spec and spec.satisfies('@5.0.0:'): - cmake_args.append('-DLLDB_USE_SYSTEM_SIX:Bool=TRUE') + if "+omp_debug" in spec: + cmake_args.append("-DLIBOMPTARGET_ENABLE_DEBUG:Bool=ON") - if '~python' in spec and '+lldb' in spec: - cmake_args.append('-DLLDB_DISABLE_PYTHON:Bool=TRUE') + if "+python" in spec and "+lldb" in spec and spec.satisfies("@5.0.0:"): + cmake_args.append("-DLLDB_USE_SYSTEM_SIX:Bool=TRUE") - if '+gold' in spec: - cmake_args.append('-DLLVM_BINUTILS_INCDIR=' + - spec['binutils'].prefix.include) + if "~python" in spec and "+lldb" in spec: + cmake_args.append("-DLLDB_DISABLE_PYTHON:Bool=TRUE") - if '+clang' in spec: - projects.append('clang') - projects.append('clang-tools-extra') - projects.append('openmp') - if '+lldb' in spec: - projects.append('lldb') - if '+lld' in spec: - projects.append('lld') - if '+compiler-rt' in spec: - projects.append('compiler-rt') - if '+libcxx' in spec: - projects.append('libcxx') - projects.append('libcxxabi') - if spec.satisfies('@3.9.0:'): - cmake_args.append('-DCLANG_DEFAULT_CXX_STDLIB=libc++') - if '+internal_unwind' in spec: - projects.append('libunwind') - if '+polly' in spec: - projects.append('polly') - cmake_args.append('-DLINK_POLLY_INTO_TOOLS:Bool=ON') + if "+gold" in spec: + cmake_args.append( + "-DLLVM_BINUTILS_INCDIR=" + spec["binutils"].prefix.include + ) - if '+shared_libs' in spec: - cmake_args.append('-DBUILD_SHARED_LIBS:Bool=ON') + if "+clang" in spec: + projects.append("clang") + projects.append("clang-tools-extra") + projects.append("openmp") + if "+lldb" in spec: + projects.append("lldb") + if "+lld" in spec: + projects.append("lld") + if "+compiler-rt" in spec: + projects.append("compiler-rt") + if "+libcxx" in spec: + projects.append("libcxx") + projects.append("libcxxabi") + if spec.satisfies("@3.9.0:"): + cmake_args.append("-DCLANG_DEFAULT_CXX_STDLIB=libc++") + if "+internal_unwind" in spec: + projects.append("libunwind") + if "+polly" in spec: + projects.append("polly") + cmake_args.append("-DLINK_POLLY_INTO_TOOLS:Bool=ON") - if '+link_dylib' in spec: - cmake_args.append('-DLLVM_LINK_LLVM_DYLIB:Bool=ON') + if "+shared_libs" in spec: + cmake_args.append("-DBUILD_SHARED_LIBS:Bool=ON") + if "+omp_debug" in spec: + cmake_args.append("-DLIBOMPTARGET_ENABLE_DEBUG:Bool=ON") - if '+all_targets' not in spec: # all is default on cmake + if "+split_dwarf" in spec: + cmake_args.append("-DLLVM_USE_SPLIT_DWARF:Bool=ON") - targets = ['NVPTX', 'AMDGPU'] - if (spec.version < Version('3.9.0')): + if "+all_targets" not in spec: # all is default on cmake + + targets = ["NVPTX", "AMDGPU"] + if spec.version < Version("3.9.0"): # Starting in 3.9.0 CppBackend is no longer a target (see # LLVM_ALL_TARGETS in llvm's top-level CMakeLists.txt for # the complete list of targets) - targets.append('CppBackend') + targets.append("CppBackend") - if spec.target.family == 'x86' or spec.target.family == 'x86_64': - targets.append('X86') - elif spec.target.family == 'arm': - targets.append('ARM') - elif spec.target.family == 'aarch64': - targets.append('AArch64') - elif (spec.target.family == 'sparc' or - spec.target.family == 'sparc64'): - targets.append('Sparc') - elif (spec.target.family == 'ppc64' or - spec.target.family == 'ppc64le' or - spec.target.family == 'ppc' or - spec.target.family == 'ppcle'): - targets.append('PowerPC') + if spec.target.family == "x86" or spec.target.family == "x86_64": + targets.append("X86") + elif spec.target.family == "arm": + targets.append("ARM") + elif spec.target.family == "aarch64": + targets.append("AArch64") + elif ( + spec.target.family == "sparc" + or spec.target.family == "sparc64" + ): + targets.append("Sparc") + elif ( + spec.target.family == "ppc64" + or spec.target.family == "ppc64le" + or spec.target.family == "ppc" + or spec.target.family == "ppcle" + ): + targets.append("PowerPC") cmake_args.append( - '-DLLVM_TARGETS_TO_BUILD:STRING=' + ';'.join(targets)) + "-DLLVM_TARGETS_TO_BUILD:STRING=" + ";".join(targets) + ) - if '+omp_tsan' in spec: - cmake_args.append('-DLIBOMP_TSAN_SUPPORT=ON') + if "+omp_tsan" in spec: + cmake_args.append("-DLIBOMP_TSAN_SUPPORT=ON") - if self.compiler.name == 'gcc': + if self.compiler.name == "gcc": gcc_prefix = ancestor(self.compiler.cc, 2) - cmake_args.append('-DGCC_INSTALL_PREFIX=' + gcc_prefix) + cmake_args.append("-DGCC_INSTALL_PREFIX=" + gcc_prefix) - if spec.satisfies('@4.0.0:'): - if spec.satisfies('platform=cray') or \ - spec.satisfies('platform=linux'): - cmake_args.append('-DCMAKE_BUILD_WITH_INSTALL_RPATH=1') + if spec.satisfies("@4.0.0:"): + if spec.satisfies("platform=cray") or spec.satisfies( + "platform=linux" + ): + cmake_args.append("-DCMAKE_BUILD_WITH_INSTALL_RPATH=1") # Semicolon seperated list of projects to enable cmake_args.append( - '-DLLVM_ENABLE_PROJECTS:STRING={0}'.format(';'.join(projects))) + "-DLLVM_ENABLE_PROJECTS:STRING={0}".format(";".join(projects)) + ) return cmake_args - @run_before('build') + @run_before("build") def pre_install(self): with working_dir(self.build_directory): # When building shared libraries these need to be installed first - make('install-LLVMTableGen') - if self.spec.version >= Version('4.0.0'): + make("install-LLVMTableGen") + if self.spec.version >= Version("4.0.0"): # LLVMDemangle target was added in 4.0.0 - make('install-LLVMDemangle') - make('install-LLVMSupport') + make("install-LLVMDemangle") + make("install-LLVMSupport") - @run_after('install') + @run_after("install") def post_install(self): - if '+python' in self.spec: - install_tree('llvm/bindings/python', site_packages_dir) + spec = self.spec - if '+clang' in self.spec: - install_tree('clang/bindings/python', site_packages_dir) + # unnecessary if we get bootstrap builds in here + if "+cuda" in self.spec: + ompdir = "build-bootstrapped-omp" + # rebuild libomptarget to get bytecode runtime library files + with working_dir(ompdir, create=True): + cmake_args = [ + self.stage.source_path + "/openmp", + "-DCMAKE_C_COMPILER:PATH={0}".format( + spec.prefix.bin + "/clang" + ), + "-DCMAKE_CXX_COMPILER:PATH={0}".format( + spec.prefix.bin + "/clang++" + ), + "-DCMAKE_INSTALL_PREFIX:PATH={0}".format(spec.prefix), + ] + cmake_args.extend(self.cmake_args()) + cmake_args.append('-DLIBOMPTARGET_NVPTX_ENABLE_BCLIB=true') + + # work around bad libelf detection in libomptarget + cmake_args.append( + "-DCMAKE_CXX_FLAGS:String=-I{0} -I{1}".format( + spec["libelf"].prefix.include, + spec["hwloc"].prefix.include, + ) + ) + + cmake(*cmake_args) + make() + make("install") + if "+python" in self.spec: + install_tree("llvm/bindings/python", site_packages_dir) + + if "+clang" in self.spec: + install_tree("clang/bindings/python", site_packages_dir) with working_dir(self.build_directory): - install_tree('bin', join_path(self.prefix, 'libexec', 'llvm')) + install_tree("bin", join_path(self.prefix, "libexec", "llvm")) diff --git a/var/spack/repos/builtin/packages/z3/package.py b/var/spack/repos/builtin/packages/z3/package.py index bd02c0c0dbd..71eafb0a3b8 100644 --- a/var/spack/repos/builtin/packages/z3/package.py +++ b/var/spack/repos/builtin/packages/z3/package.py @@ -14,6 +14,7 @@ class Z3(MakefilePackage): homepage = "https://github.com/Z3Prover/z3/wiki" url = "https://github.com/Z3Prover/z3/archive/z3-4.5.0.tar.gz" + version('4.8.7', sha256='8c1c49a1eccf5d8b952dadadba3552b0eac67482b8a29eaad62aa7343a0732c3') version('4.5.0', sha256='aeae1d239c5e06ac183be7dd853775b84698db1265cb2258e5918a28372d4a0c') version('4.4.1', sha256='50967cca12c5c6e1612d0ccf8b6ebf5f99840a783d6cf5216336a2b59c37c0ce') version('4.4.0', sha256='65b72f9eb0af50949e504b47080fb3fc95f11c435633041d9a534473f3142cba') From ddccad14c90e8485ee2e87368fc51765a765cf50 Mon Sep 17 00:00:00 2001 From: Daniele Cesarini Date: Sat, 28 Mar 2020 21:49:21 +0100 Subject: [PATCH 048/138] XIOS: add new versions (#15728) * XIOS: add new versions Patch has been removed because it was not applied to any previously existing versions and it actually breaks the new versions added by this PR. * Sort versions from newest to oldest --- .../packages/xios/bld_extern_1.x.patch | 27 ------------------- .../repos/builtin/packages/xios/package.py | 7 +++-- 2 files changed, 5 insertions(+), 29 deletions(-) delete mode 100644 var/spack/repos/builtin/packages/xios/bld_extern_1.x.patch diff --git a/var/spack/repos/builtin/packages/xios/bld_extern_1.x.patch b/var/spack/repos/builtin/packages/xios/bld_extern_1.x.patch deleted file mode 100644 index fe52da11923..00000000000 --- a/var/spack/repos/builtin/packages/xios/bld_extern_1.x.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- a/bld.cfg 2017-12-23 15:21:01.458603785 +1100 -+++ b/bld.cfg 2017-12-23 15:36:36.667684136 +1100 -@@ -24,9 +24,6 @@ - - search_src true - src::zzz . --src::date $PWD/extern/boost/src/date_time --src::blitz $PWD/extern/blitz/src --src::netcdf $PWD/extern/netcdf4 - src::remap $PWD/extern/remap/src - bld::lib xios - bld::target libxios.a -@@ -46,11 +43,11 @@ - bld::tool::fc %FCOMPILER - bld::tool::fpp %FPP - bld::tool::cpp %CPP --bld::tool::cppflags %CBASE_INC -I${PWD}/extern/src_netcdf -I${PWD}/extern/boost/include -I${PWD}/extern/rapidxml/include -I${PWD}/extern/blitz/include --bld::tool::fppflags %BASE_INC -I${PWD}/extern/boost/include -I${PWD}/extern/rapidxml/include -+bld::tool::cppflags %CBASE_INC -I${PWD}/extern/rapidxml/include -+bld::tool::fppflags %BASE_INC -I${PWD}/extern/rapidxml/include - bld::tool::ld %LINKER - bld::tool::ldflags %LD_FLAGS --bld::tool::cflags %CFLAGS %CBASE_INC -I${PWD}/extern/src_netcdf -I${PWD}/extern/boost/include -I${PWD}/extern/rapidxml/include -I${PWD}/extern/blitz/include -+bld::tool::cflags %CFLAGS %CBASE_INC -I${PWD}/extern/rapidxml/include - bld::tool::fflags %FFLAGS %FBASE_INC - bld::tool::cppkeys %CPP_KEY - bld::tool::fppkeys %CPP_KEY diff --git a/var/spack/repos/builtin/packages/xios/package.py b/var/spack/repos/builtin/packages/xios/package.py index 55769026cf1..54eca9fead0 100644 --- a/var/spack/repos/builtin/packages/xios/package.py +++ b/var/spack/repos/builtin/packages/xios/package.py @@ -13,9 +13,13 @@ class Xios(Package): homepage = "https://forge.ipsl.jussieu.fr/ioserver/wiki" + version('develop', svn='http://forge.ipsl.jussieu.fr/ioserver/svn/XIOS/trunk') + version('2.5', revision=1860, + svn='http://forge.ipsl.jussieu.fr/ioserver/svn/XIOS/branchs/xios-2.5') + version('2.0', revision=1627, + svn='http://forge.ipsl.jussieu.fr/ioserver/svn/XIOS/branchs/xios-2.0') version('1.0', revision=910, svn='http://forge.ipsl.jussieu.fr/ioserver/svn/XIOS/branchs/xios-1.0') - version('develop', svn='http://forge.ipsl.jussieu.fr/ioserver/svn/XIOS/trunk') variant('mode', values=('debug', 'dev', 'prod'), default='dev', description='Build for debugging, development or production') @@ -24,7 +28,6 @@ class Xios(Package): # Use spack versions of blitz and netcdf-c for compatibility # with recent compilers and optimised platform libraries: patch('bld_extern_1.0.patch', when='@:1.0') - patch('bld_extern_1.x.patch', when='@1.1:') # Workaround bug #17782 in llvm, where reading a double # followed by a character is broken (e.g. duration '1d'): From beaa4fbe3ce1a9fef95187e8caf7f13dba32c4f7 Mon Sep 17 00:00:00 2001 From: Andrew W Elble Date: Sat, 28 Mar 2020 17:44:23 -0400 Subject: [PATCH 049/138] New package: gdrcopy (#15732) * New package: gdrcopy provides the userspace libraries for gdrcopy. * Update var/spack/repos/builtin/packages/gdrcopy/package.py Co-Authored-By: Adam J. Stewart Co-authored-by: Adam J. Stewart --- .../repos/builtin/packages/gdrcopy/package.py | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 var/spack/repos/builtin/packages/gdrcopy/package.py diff --git a/var/spack/repos/builtin/packages/gdrcopy/package.py b/var/spack/repos/builtin/packages/gdrcopy/package.py new file mode 100644 index 00000000000..e85c8fb0c00 --- /dev/null +++ b/var/spack/repos/builtin/packages/gdrcopy/package.py @@ -0,0 +1,27 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Gdrcopy(MakefilePackage): + """A fast GPU memory copy library based on NVIDIA GPUDirect + RDMA technology.""" + + homepage = "https://github.com/NVIDIA/gdrcopy" + url = "https://github.com/NVIDIA/gdrcopy/archive/v2.0-beta.3.tar.gz" + git = "https://github.com/NVIDIA/gdrcopy" + + version('master', branch='master') + version('2.0', sha256='98320e6e980a7134ebc4eedd6cf23647104f2b3c557f2eaf0d31a02609f5f2b0') + version('1.3', sha256='f11cdfe389b685f6636b80b4a3312dc014a385ad7220179c1318c60e2e28af3a') + + def build(self, spec, prefix): + make('lib') + + def install(self, spec, prefix): + mkdir(prefix.include) + mkdir(prefix.lib64) + make('lib_install', 'PREFIX={0}'.format(self.prefix)) From cbcac722547cae2a25ea4c8503c71adda271c557 Mon Sep 17 00:00:00 2001 From: Patrick Gartung Date: Sat, 28 Mar 2020 16:49:34 -0500 Subject: [PATCH 050/138] Buildcache keys command speed up (#15727) * Limit the spidering to depth=0 for keys * depth=0 is default argument --- lib/spack/spack/binary_distribution.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/spack/spack/binary_distribution.py b/lib/spack/spack/binary_distribution.py index 7902e5fc584..0fb6feae028 100644 --- a/lib/spack/spack/binary_distribution.py +++ b/lib/spack/spack/binary_distribution.py @@ -903,7 +903,7 @@ def get_keys(install=False, trust=False, force=False): url_util.format(fetch_url_build_cache)) # For s3 mirror need to request index.html directly p, links = web_util.spider( - url_util.join(fetch_url_build_cache, 'index.html'), depth=1) + url_util.join(fetch_url_build_cache, 'index.html')) for link in links: if re.search(r'\.key', link) or re.search(r'\.pub', link): From c3d0973c3e34f35453f2d5bdb7b6179cb3ec09fe Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Sun, 29 Mar 2020 10:55:57 -0500 Subject: [PATCH 051/138] motif: add pkgconfig dependency (#15736) --- var/spack/repos/builtin/packages/motif/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/motif/package.py b/var/spack/repos/builtin/packages/motif/package.py index 7a6bc0de8f2..c64d35fc430 100644 --- a/var/spack/repos/builtin/packages/motif/package.py +++ b/var/spack/repos/builtin/packages/motif/package.py @@ -33,6 +33,7 @@ class Motif(AutotoolsPackage): depends_on("autoconf", type="build") depends_on("m4", type="build") depends_on("libtool", type="build") + depends_on("pkgconfig", type="build") patch('add_xbitmaps_dependency.patch') From 4b3b0232847157f3ab1939bb46ba41961053a2b3 Mon Sep 17 00:00:00 2001 From: Jean-Paul Pelteret Date: Sun, 29 Mar 2020 17:56:15 +0200 Subject: [PATCH 052/138] deal.II: Update dependencies and fix target for vectorisation (#15731) * Update ADOL-C homepage url * Update SymEngine to v0.6 * deal.II: Add code to add target vectorisation flags --- var/spack/repos/builtin/packages/adol-c/package.py | 2 +- var/spack/repos/builtin/packages/dealii/package.py | 9 +++++++++ var/spack/repos/builtin/packages/symengine/package.py | 3 ++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/adol-c/package.py b/var/spack/repos/builtin/packages/adol-c/package.py index 741b57773b5..def99d8a4ef 100644 --- a/var/spack/repos/builtin/packages/adol-c/package.py +++ b/var/spack/repos/builtin/packages/adol-c/package.py @@ -11,7 +11,7 @@ class AdolC(AutotoolsPackage): derivatives of vector functions in C and C++ programs by operator overloading.""" - homepage = "https://projects.coin-or.org/ADOL-C" + homepage = "https://github.com/coin-or/ADOL-C" url = "https://github.com/coin-or/ADOL-C/archive/releases/2.7.2.tar.gz" git = "https://github.com/coin-or/ADOL-C.git" version('master', branch='master') diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index 1b9e02c0440..d3a58cb835f 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -5,6 +5,8 @@ from spack import * +import os + class Dealii(CMakePackage, CudaPackage): """C++ software library providing well-documented tools to build finite @@ -459,6 +461,13 @@ def cmake_args(self): ' '.join(cxx_flags)) ]) + # Add flags for machine vectorization, used when tutorials + # and user code is built. + # See https://github.com/dealii/dealii/issues/9164 + options.extend([ + '-DDEAL_II_CXX_FLAGS=%s' % os.environ['SPACK_TARGET_ARGS'] + ]) + return options def setup_run_environment(self, env): diff --git a/var/spack/repos/builtin/packages/symengine/package.py b/var/spack/repos/builtin/packages/symengine/package.py index ceb1b9a5ed4..a9c866edb77 100644 --- a/var/spack/repos/builtin/packages/symengine/package.py +++ b/var/spack/repos/builtin/packages/symengine/package.py @@ -14,7 +14,8 @@ class Symengine(CMakePackage): url = "https://github.com/symengine/symengine/archive/v0.2.0.tar.gz" git = "https://github.com/symengine/symengine.git" - version('develop', branch='master') + version('master', branch='master') + version('0.6.0', sha256='4d2caa86c03eaaa8ed004084d02f87b5c51b6229f8ba70d161227e22d6302f0a') version('0.5.0', sha256='5d02002f00d16a0928d1056e6ecb8f34fd59f3bfd8ed0009a55700334dbae29b') version('0.4.0', sha256='dd755901a9e2a49e53ba3bbe3f565f94265af05299e57a7b592186dd35916a1b') version('0.3.0', sha256='591463cb9e741d59f6dfd39a7943e3865d3afe9eac47d1a9cbf5ca74b9c49476') From df4e89770a0462275628b0a1239f5976ea598d9d Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Sun, 29 Mar 2020 16:34:18 -0500 Subject: [PATCH 053/138] py-traits: add new package (#15741) --- .../repos/builtin/packages/py-traits/package.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-traits/package.py diff --git a/var/spack/repos/builtin/packages/py-traits/package.py b/var/spack/repos/builtin/packages/py-traits/package.py new file mode 100644 index 00000000000..868e1de0a2f --- /dev/null +++ b/var/spack/repos/builtin/packages/py-traits/package.py @@ -0,0 +1,16 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + + +class PyTraits(PythonPackage): + """Explicitly typed attributes for Python.""" + + homepage = "https://docs.enthought.com/traits" + url = "https://pypi.io/packages/source/t/traits/traits-6.0.0.tar.gz" + + version('6.0.0', sha256='dbcd70166feca434130a1193284d5819ca72ffbc8dbce8deeecc0cebb41a3bfb') + + depends_on('python@3.5:', type=('build', 'run')) + depends_on('py-setuptools', type='build') From 4287d2290c581b907b08efabc1e6bccea4019ac6 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Sun, 29 Mar 2020 17:22:24 -0500 Subject: [PATCH 054/138] py-pyface: add new package (#15743) --- .../builtin/packages/py-pyface/package.py | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-pyface/package.py diff --git a/var/spack/repos/builtin/packages/py-pyface/package.py b/var/spack/repos/builtin/packages/py-pyface/package.py new file mode 100644 index 00000000000..197e3d9ab24 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-pyface/package.py @@ -0,0 +1,33 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + + +class PyPyface(PythonPackage): + """The pyface project contains a toolkit-independent GUI abstraction layer, + which is used to support the "visualization" features of the Traits + package. Thus, you can write code in terms of the Traits API (views, items, + editors, etc.), and let pyface and your selected toolkit and back-end take + care of the details of displaying them.""" + + homepage = "https://docs.enthought.com/pyface" + url = "https://pypi.io/packages/source/p/pyface/pyface-6.1.2.tar.gz" + + version('6.1.2', sha256='7c2ac3d5cbec85e8504b3b0b63e9307be12c6d710b46bae372ce6562d41f4fbc') + + variant('backend', default='pyqt5', description='Default backend', + values=('wx', 'pyqt', 'pyqt5', 'pyside'), multi=False) + + depends_on('py-setuptools', type='build') + depends_on('py-traits', type=('build', 'run')) + + # Backends + depends_on('py-wxpython@2.8.10:', when='backend=wx', type=('build', 'run')) + depends_on('py-numpy', when='backend=wx', type=('build', 'run')) + depends_on('py-pyqt4@4.10:', when='backend=pyqt', type=('build', 'run')) + depends_on('py-pygments', when='backend=pyqt', type=('build', 'run')) + depends_on('py-pyqt5@5:', when='backend=pyqt5', type=('build', 'run')) + depends_on('py-pygments', when='backend=pyqt5', type=('build', 'run')) + depends_on('py-pyside@1.2:', when='backend=pyside', type=('build', 'run')) + depends_on('py-pygments', when='backend=pyside', type=('build', 'run')) From f1aab835fe5d77b4ce31c7e6b38ee22f2fb386c5 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Sun, 29 Mar 2020 17:23:21 -0500 Subject: [PATCH 055/138] CitcomS: add maintainer, master version, python dep (#15742) --- var/spack/repos/builtin/packages/citcoms/package.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/var/spack/repos/builtin/packages/citcoms/package.py b/var/spack/repos/builtin/packages/citcoms/package.py index f05c3d7cd60..35fe86b2b4d 100644 --- a/var/spack/repos/builtin/packages/citcoms/package.py +++ b/var/spack/repos/builtin/packages/citcoms/package.py @@ -12,7 +12,11 @@ class Citcoms(AutotoolsPackage): homepage = "https://geodynamics.org/cig/software/citcoms/" url = "https://github.com/geodynamics/citcoms/releases/download/v3.3.1/CitcomS-3.3.1.tar.gz" + git = "https://github.com/geodynamics/citcoms.git" + maintainers = ['adamjstewart'] + + version('master', branch='master', submodules=True) version('3.3.1', sha256='e3520e0a933e4699d31e86fe309b8c154ea6ecb0f42a1cf6f25e8d13d825a4b3') version('3.2.0', sha256='773a14d91ecbb4a4d1e04317635fab79819d83c57b47f19380ff30b9b19cb07a') @@ -23,6 +27,11 @@ class Citcoms(AutotoolsPackage): # Required dependencies depends_on('mpi') depends_on('zlib') + depends_on('python@:2', type='run') # needed for post-processing scripts + depends_on('automake', when='@master', type='build') + depends_on('autoconf', when='@master', type='build') + depends_on('libtool', when='@master', type='build') + depends_on('m4', when='@master', type='build') # Optional dependencies depends_on('hc', when='+ggrd') From 17cd359ddff4cd27217f7bf4671a54af7fbc536d Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Sun, 29 Mar 2020 19:38:02 -0500 Subject: [PATCH 056/138] py-traitsui: add new package (#15744) --- .../builtin/packages/py-traitsui/package.py | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-traitsui/package.py diff --git a/var/spack/repos/builtin/packages/py-traitsui/package.py b/var/spack/repos/builtin/packages/py-traitsui/package.py new file mode 100644 index 00000000000..f77e92cc4fd --- /dev/null +++ b/var/spack/repos/builtin/packages/py-traitsui/package.py @@ -0,0 +1,36 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + + +class PyTraitsui(PythonPackage): + """The TraitsUI project contains a toolkit-independent GUI abstraction + layer, which is used to support the "visualization" features of the Traits + package. Thus, you can write model in terms of the Traits API and specify a + GUI in terms of the primitives supplied by TraitsUI (views, items, editors, + etc.), and let TraitsUI and your selected toolkit and back-end take care of + the details of displaying them.""" + + homepage = "https://docs.enthought.com/traitsui" + url = "https://pypi.io/packages/source/t/traitsui/traitsui-6.1.3.tar.gz" + + version('6.1.3', sha256='48381763b181efc58eaf288431d1d92d028d0d97dfdd33eba7809aae8aef814f') + + variant('backend', default='pyqt5', description='Default backend', + values=('wx', 'pyqt', 'pyqt5', 'pyside'), multi=False) + + depends_on('py-setuptools', type='build') + depends_on('py-traits', type=('build', 'run')) + depends_on('py-pyface@6.0.0:', type=('build', 'run')) + depends_on('py-six', type=('build', 'run')) + + # Backends + depends_on('py-wxpython@2.8.10:', when='backend=wx', type=('build', 'run')) + depends_on('py-numpy', when='backend=wx', type=('build', 'run')) + depends_on('py-pyqt4@4.10:', when='backend=pyqt', type=('build', 'run')) + depends_on('py-pygments', when='backend=pyqt', type=('build', 'run')) + depends_on('py-pyqt5@5:', when='backend=pyqt5', type=('build', 'run')) + depends_on('py-pygments', when='backend=pyqt5', type=('build', 'run')) + depends_on('py-pyside@1.2:', when='backend=pyside', type=('build', 'run')) + depends_on('py-pygments', when='backend=pyside', type=('build', 'run')) From 61c1322430b66ef887af1bd7125e321eb993776c Mon Sep 17 00:00:00 2001 From: Carson Woods Date: Sun, 29 Mar 2020 19:46:16 -0500 Subject: [PATCH 057/138] new package: intel-mpi-benchmarks (#15745) * Add initial attempt at intel-mpi-benchmarks package * Add more checksummed versions * Changes to how makefile is handled * First working install version. Needs tuning to support building specific benchmarks * Add variant for building specific benchmarks rather than all of them * Minor syntax change --- .../packages/intel-mpi-benchmarks/package.py | 81 +++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 var/spack/repos/builtin/packages/intel-mpi-benchmarks/package.py diff --git a/var/spack/repos/builtin/packages/intel-mpi-benchmarks/package.py b/var/spack/repos/builtin/packages/intel-mpi-benchmarks/package.py new file mode 100644 index 00000000000..a619d0d8cbf --- /dev/null +++ b/var/spack/repos/builtin/packages/intel-mpi-benchmarks/package.py @@ -0,0 +1,81 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class IntelMpiBenchmarks(MakefilePackage): + """Intel(R) MPI Benchmarks provides a set of elementary benchmarks + that conform to MPI-1, MPI-2, and MPI-3 standard. + You can run all of the supported benchmarks, or a subset specified + in the command line using one executable file. + Use command-line parameters to specify various settings, such as + time measurement, message lengths, and selection of communicators. """ + + homepage = "https://software.intel.com/en-us/articles/intel-mpi-benchmarks" + url = "https://github.com/intel/mpi-benchmarks/archive/IMB-v2019.5.tar.gz" + + maintainers = ['carsonwoods'] + + version('2019.5', sha256='61f8e872a3c3076af53007a68e4da3a8d66be2ba7a051dc21e626a4e2d26e651') + version('2019.4', sha256='aeb336be10275c1a2f579b491b6631122876b461ac7148b1d0764f13b7552690') + version('2019.3', sha256='4f256d11bfed9ca6166548486d61a062e67be61f13dd9f30690232720e185f31') + version('2019.2', sha256='0bc2224a913073aaa5958f6ae08341e5fcd39cedc6722a09bfd4a3d7591a340b') + + depends_on('mpi') + + variant( + 'benchmark', default='all', + values=('mpi1', 'ext', 'io', 'nbc', + 'p2p', 'rma', 'mt', 'all'), + multi=False, + description='Specify which benchmark to build') + + def build(self, spec, prefix): + env['CC'] = spec['mpi'].mpicc + env['CXX'] = spec['mpi'].mpicxx + + if 'benchmark=mpi1' in spec: + make('IMB-MPI1') + elif 'benchmark=ext' in spec: + make('IMB-EXT') + elif 'benchmark=io' in spec: + make('IMB-IO') + elif 'benchmark=nbc' in spec: + make('IMB-NBC') + elif 'benchmark=p2p' in spec: + make('IMB-P2P') + elif 'benchmark=rma' in spec: + make('IMB-RMA') + elif 'benchmark=mt' in spec: + make('IMB-MT') + else: + make("all") + + def install(self, spec, prefix): + mkdir(prefix.bin) + + if 'benchmark=mpi1' in spec: + install('IMB-MPI1', prefix.bin) + elif 'benchmark=ext' in spec: + install('IMB-EXT', prefix.bin) + elif 'benchmark=io' in spec: + install('IMB-IO', prefix.bin) + elif 'benchmark=nbc' in spec: + install('IMB-NBC', prefix.bin) + elif 'benchmark=p2p' in spec: + install('IMB-P2P', prefix.bin) + elif 'benchmark=rma' in spec: + install('IMB-RMA', prefix.bin) + elif 'benchmark=mt' in spec: + install('IMB-MT', prefix.bin) + else: + install('IMB-EXT', prefix.bin) + install('IMB-IO', prefix.bin) + install('IMB-MPI1', prefix.bin) + install('IMB-MT', prefix.bin) + install('IMB-NBC', prefix.bin) + install('IMB-P2P', prefix.bin) + install('IMB-RMA', prefix.bin) From 0372582bf01a49b977f0c522fe900b73b6ba6658 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Sun, 29 Mar 2020 20:08:52 -0500 Subject: [PATCH 058/138] py-apptools: add new package (#15747) --- .../builtin/packages/py-apptools/package.py | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-apptools/package.py diff --git a/var/spack/repos/builtin/packages/py-apptools/package.py b/var/spack/repos/builtin/packages/py-apptools/package.py new file mode 100644 index 00000000000..4ac8da1c791 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-apptools/package.py @@ -0,0 +1,20 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + + +class PyApptools(PythonPackage): + """The apptools project includes a set of packages that Enthought has found + useful in creating a number of applications. They implement functionality + that is commonly needed by many applications.""" + + homepage = "https://docs.enthought.com/apptools" + url = "https://pypi.io/packages/source/a/apptools/apptools-4.5.0.tar.gz" + + version('4.5.0', sha256='260ae0e2a86cb2df2fede631ab6ac8ece694a58a1def78cd015c890c57140582') + + depends_on('py-setuptools', type='build') + depends_on('py-configobj', type=('build', 'run')) + depends_on('py-six', type=('build', 'run')) + depends_on('py-traitsui', type=('build', 'run')) From 7bed5e7c1ac2b1e4a50f5889a2eeea17320f332b Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Sun, 29 Mar 2020 20:41:24 -0500 Subject: [PATCH 059/138] py-envisage: add new package (#15748) --- .../builtin/packages/py-envisage/package.py | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-envisage/package.py diff --git a/var/spack/repos/builtin/packages/py-envisage/package.py b/var/spack/repos/builtin/packages/py-envisage/package.py new file mode 100644 index 00000000000..06783c8fcb2 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-envisage/package.py @@ -0,0 +1,25 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + + +class PyEnvisage(PythonPackage): + """Envisage is a Python-based framework for building extensible + applications, that is, applications whose functionality can be extended by + adding "plug-ins". Envisage provides a standard mechanism for features to + be added to an application, whether by the original developer or by someone + else. In fact, when you build an application using Envisage, the entire + application consists primarily of plug-ins. In this respect, it is similar + to the Eclipse and Netbeans frameworks for Java applications.""" + + homepage = "https://docs.enthought.com/envisage" + url = "https://pypi.io/packages/source/e/envisage/envisage-4.9.2.tar.gz" + + version('4.9.2', sha256='ed9580ac6ea17b333f1cce5b94656aed584798d56d8bd364f996a06fe1ac32eb') + + depends_on('python@2.7:2.8,3.5:', type=('build', 'run')) + depends_on('py-apptools', type=('build', 'run')) + depends_on('py-setuptools', type=('build', 'run')) + depends_on('py-six', type=('build', 'run')) + depends_on('py-traits', type=('build', 'run')) From 757d768a07ce5829cd63dd3c3c9313503f0b5d00 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Sun, 29 Mar 2020 21:11:13 -0500 Subject: [PATCH 060/138] py-mayavi: add new package (#15751) --- .../builtin/packages/py-mayavi/package.py | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-mayavi/package.py diff --git a/var/spack/repos/builtin/packages/py-mayavi/package.py b/var/spack/repos/builtin/packages/py-mayavi/package.py new file mode 100644 index 00000000000..1fe477bbc70 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-mayavi/package.py @@ -0,0 +1,23 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + + +class PyMayavi(PythonPackage): + """Mayavi: 3D visualization of scientific data in Python.""" + + homepage = "https://docs.enthought.com/mayavi/mayavi/index.html" + url = "https://pypi.io/packages/source/m/mayavi/mayavi-4.7.1.tar.bz2" + + version('4.7.1', sha256='be51fb6f886f304f7c593c907e6a2e88d7919f8f446cdccfcd184fa35b3db724') + + depends_on('py-setuptools', type='build') + depends_on('py-apptools', type=('build', 'run')) + depends_on('py-envisage', type=('build', 'run')) + depends_on('py-numpy', type=('build', 'run')) + depends_on('py-pyface@6.1.1:', type=('build', 'run')) + depends_on('py-pygments', type=('build', 'run')) + depends_on('py-traits@4.6.0:', type=('build', 'run')) + depends_on('py-traitsui@6.0.0:', type=('build', 'run')) + depends_on('vtk+python', type=('build', 'run')) From 3310eaab99e1ceee270a70cac6fe88831d65040a Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Sun, 29 Mar 2020 19:38:15 -0700 Subject: [PATCH 061/138] spack-python should exec `spack python` (#15738) The current implementation of `spack-python` will leave an extra shell around while it runs. That shell should really replace itself with spack. - [x] add exec to spack-python script --- bin/spack-python | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/spack-python b/bin/spack-python index b81c8b7dbb9..22141b46d69 100755 --- a/bin/spack-python +++ b/bin/spack-python @@ -22,4 +22,4 @@ # # This is compatible across platforms. # -/usr/bin/env spack python "$@" +exec /usr/bin/env spack python "$@" From 3cbc26cfa6a3d23148e2ce62d6c80accf7fa3ca6 Mon Sep 17 00:00:00 2001 From: Carson Woods Date: Sun, 29 Mar 2020 23:05:11 -0500 Subject: [PATCH 062/138] Add additional configuration options for binutils (#15753) --- var/spack/repos/builtin/packages/binutils/package.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/var/spack/repos/builtin/packages/binutils/package.py b/var/spack/repos/builtin/packages/binutils/package.py index 4a647e7e888..60cd9563fa1 100644 --- a/var/spack/repos/builtin/packages/binutils/package.py +++ b/var/spack/repos/builtin/packages/binutils/package.py @@ -35,6 +35,9 @@ class Binutils(AutotoolsPackage, GNUMirrorPackage): variant('libiberty', default=False, description='Also install libiberty.') variant('nls', default=True, description='Enable Native Language Support') variant('headers', default=False, description='Install extra headers (e.g. ELF)') + variant('lto', default=False, description='Enable lto.') + variant('ld', default=False, description='Enable ld.') + variant('interwork', default=False, description='Enable interwork.') patch('cr16.patch', when='@:2.29.1') patch('update_symbol-2.26.patch', when='@2.26') @@ -68,6 +71,15 @@ def configure_args(self): '--with-sysroot=/', ] + if '+lto' in spec: + configure_args.append('--enable-lto') + + if '+ld' in spec: + configure_args.append('--enable-ld') + + if '+interwork' in spec: + configure_args.append('--enable-interwork') + if '+gold' in spec: configure_args.append('--enable-gold') From 05b7ec48c5d38b70e4bcd010979869302032cb81 Mon Sep 17 00:00:00 2001 From: Carson Woods Date: Sun, 29 Mar 2020 23:05:24 -0500 Subject: [PATCH 063/138] Add additional config options to gdb (#15754) --- var/spack/repos/builtin/packages/gdb/package.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/var/spack/repos/builtin/packages/gdb/package.py b/var/spack/repos/builtin/packages/gdb/package.py index 355f59cbdf4..e6aef7d6719 100644 --- a/var/spack/repos/builtin/packages/gdb/package.py +++ b/var/spack/repos/builtin/packages/gdb/package.py @@ -34,6 +34,10 @@ class Gdb(AutotoolsPackage, GNUMirrorPackage): variant('python', default=True, description='Compile with Python support') variant('xz', default=True, description='Compile with lzma support') variant('source-highlight', default=False, description='Compile with source-highlight support') + variant('lto', default=False, description='Enable lto') + variant('quad', default=False, description='Enable quad') + variant('gold', default=False, description='Enable gold linker') + variant('ld', default=False, description='Enable ld') # Required dependency depends_on('texinfo', type='build') @@ -51,4 +55,17 @@ def configure_args(self): args.append('--with-python') args.append('LDFLAGS={0}'.format( self.spec['python'].libs.ld_flags)) + + if '+lto' in self.spec: + args.append('--enable-lto') + + if '+quad' in self.spec: + args.append('--with-quad') + + if '+gold' in self.spec: + args.append('--enable-gold') + + if '+ld' in self.spec: + args.append('--enable-ld') + return args From e9d573d1101002b127d5c789d86d3c1e92d81309 Mon Sep 17 00:00:00 2001 From: Carson Woods Date: Mon, 30 Mar 2020 08:14:07 -0500 Subject: [PATCH 064/138] package: add additional configuration options to lmod (#15682) * Add further configuration options * Convert auto-swap to auto_swap. Might eventually switch to key-value pair instead. --- .../repos/builtin/packages/lmod/package.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/var/spack/repos/builtin/packages/lmod/package.py b/var/spack/repos/builtin/packages/lmod/package.py index cf22c80aa27..2f12d47587d 100644 --- a/var/spack/repos/builtin/packages/lmod/package.py +++ b/var/spack/repos/builtin/packages/lmod/package.py @@ -46,6 +46,9 @@ class Lmod(AutotoolsPackage): depends_on('lua-luafilesystem', type=('build', 'run')) depends_on('tcl', type=('build', 'link', 'run')) + variant('auto_swap', default=False, description='Enable auto swapping conflicting modules') + variant('redirect', default=True, description='Enables redirect instead of pager') + patch('fix_tclsh_paths.patch', when='@:6.4.3') patch('0001-fix-problem-with-MODULESHOME-and-issue-271.patch', when='@7.3.28:7.4.10') @@ -65,3 +68,18 @@ def patch(self): if self.spec.version <= Version('6.4.3'): for tclscript in glob('src/*.tcl'): filter_file(r'^#!.*tclsh', '#!@path_to_tclsh@', tclscript) + + def configure_args(self): + args = [] + + if '+auto_swap' in self.spec: + args.append('--with-autoSwap=yes') + else: + args.append('--with-autoSwap=no') + + if '+redirect' in self.spec: + args.append('--with-redirect=yes') + else: + args.append('--with-redirect=no') + + return args From 605b7b5d23968d80dc1b045babc4866db8792f58 Mon Sep 17 00:00:00 2001 From: Fabian Brandt Date: Mon, 30 Mar 2020 15:17:21 +0200 Subject: [PATCH 065/138] New package: libnetworkit (#15714) * New package libnetworkit * Fixed artificial dependency restriction --- ...-Name-agnostic-import-of-tlx-library.patch | 17 +++++++ .../builtin/packages/libnetworkit/package.py | 44 +++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 var/spack/repos/builtin/packages/libnetworkit/0001-Name-agnostic-import-of-tlx-library.patch create mode 100644 var/spack/repos/builtin/packages/libnetworkit/package.py diff --git a/var/spack/repos/builtin/packages/libnetworkit/0001-Name-agnostic-import-of-tlx-library.patch b/var/spack/repos/builtin/packages/libnetworkit/0001-Name-agnostic-import-of-tlx-library.patch new file mode 100644 index 00000000000..900a298d9b4 --- /dev/null +++ b/var/spack/repos/builtin/packages/libnetworkit/0001-Name-agnostic-import-of-tlx-library.patch @@ -0,0 +1,17 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -203,10 +203,11 @@ if(NOT NETWORKIT_EXT_TLX) + "Please run `git submodule update --init` to fetch the submodule.") + endif() + else() ++ file(GLOB tlx_path ${NETWORKIT_EXT_TLX}/lib/**.a) + add_library(tlx STATIC IMPORTED) + set_target_properties(tlx PROPERTIES +- IMPORTED_LOCATION "${NETWORKIT_EXT_TLX}/lib/libtlx.a" +- INTERFACE_INCLUDE_DIRECTORIES "${NETWORKIT_EXT_TLX}/include/") ++ IMPORTED_LOCATION "${tlx_path}" ++ INTERFACE_INCLUDE_DIRECTORIES "${NETWORKIT_EXT_TLX}/include/") + endif() + + ################################################################################ + diff --git a/var/spack/repos/builtin/packages/libnetworkit/package.py b/var/spack/repos/builtin/packages/libnetworkit/package.py new file mode 100644 index 00000000000..5d7f58eb906 --- /dev/null +++ b/var/spack/repos/builtin/packages/libnetworkit/package.py @@ -0,0 +1,44 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Libnetworkit(CMakePackage): + """NetworKit is a growing open-source toolkit for large-scale network + analysis. Its aim is to provide tools for the analysis of large networks + in the size range from thousands to billions of edges. For this purpose, + it implements efficient graph algorithms, many of them parallel to + utilize multicore architectures. These are meant to compute standard + measures of network analysis, such as degree sequences, clustering + coefficients, and centrality measures. In this respect, NetworKit is + comparable to packages such as NetworkX, albeit with a focus on + parallelism and scalability.""" + + homepage = "https://networkit.github.io/" + url = "https://github.com/networkit/networkit/archive/6.1.tar.gz" + + maintainers = ['fabratu'] + + version('6.1', sha256='22c953ea1054c356663b31c77114c2f0c8fec17e0e707aeec23026241beab9b2') + + variant('static', default=False, description='Enables the build of shared libraries') + variant('doc', default=False, description='Enables the build with sphinx documentation') + + depends_on('libtlx') + depends_on('py-sphinx', when='+doc', type='build') + + patch('0001-Name-agnostic-import-of-tlx-library.patch', when='@6.1') + + def cmake_args(self): + spec = self.spec + + tlx_libs = spec['libtlx'].prefix + + args = ['-DNETWORKIT_EXT_TLX=%s' % tlx_libs, + '-DNETWORKIT_STATIC=%s' % + ('ON' if '+static' in spec else 'OFF')] + + return args From abdada03a88b28bfdfe0698a99a977eea4c54bd8 Mon Sep 17 00:00:00 2001 From: Hadrien G Date: Mon, 30 Mar 2020 17:48:36 +0200 Subject: [PATCH 066/138] Add ACTS v0.20 and take move to GitHub into account (#15757) --- var/spack/repos/builtin/packages/acts-core/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/acts-core/package.py b/var/spack/repos/builtin/packages/acts-core/package.py index d6e328352bc..d0c9498d404 100644 --- a/var/spack/repos/builtin/packages/acts-core/package.py +++ b/var/spack/repos/builtin/packages/acts-core/package.py @@ -30,10 +30,11 @@ class ActsCore(CMakePackage): """ homepage = "http://acts.web.cern.ch/ACTS/" - git = "https://gitlab.cern.ch/acts/acts-core.git" + git = "https://github.com/acts-project/acts.git" maintainers = ['HadrienG2'] version('develop', branch='master') + version('0.20.0', commit='1d37a849a9c318e8ca4fa541ef8433c1f004637b') version('0.19.0', commit='408335636486c421c6222a64372250ef12544df6') version('0.18.0', commit='d58a68cf75b52a5e0f563bc237f09250aa9da80c') version('0.17.0', commit='0789f654ff484b013fd27e5023cf342785ea8d97') From 8d1e88658dfc8b0d830a15cbff27d4e3cbcee9dc Mon Sep 17 00:00:00 2001 From: Robert Pavel Date: Mon, 30 Mar 2020 10:56:23 -0600 Subject: [PATCH 067/138] Aded Option to Disable Shared Lua library Generation (#15758) * Aded Option to Disable Shared Lua library Added option to disable generation of shared object library for lua to avoid build issues on static only platforms * Fixed Flake8 Issue with Lua Spackage Fixed indentation issue with lua spackage --- var/spack/repos/builtin/packages/lua/package.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/lua/package.py b/var/spack/repos/builtin/packages/lua/package.py index ea6265e28a0..c8fe652c39d 100644 --- a/var/spack/repos/builtin/packages/lua/package.py +++ b/var/spack/repos/builtin/packages/lua/package.py @@ -27,6 +27,9 @@ class Lua(Package): version('5.1.4', sha256='b038e225eaf2a5b57c9bcc35cd13aa8c6c8288ef493d52970c9545074098af3a') version('5.1.3', sha256='6b5df2edaa5e02bf1a2d85e1442b2e329493b30b0c0780f77199d24f087d296d') + variant('shared', default=True, + description='Builds a shared version of the library') + extendable = True depends_on('ncurses') @@ -58,10 +61,11 @@ def install(self, spec, prefix): make('INSTALL_TOP=%s' % prefix, 'install') - static_to_shared_library(join_path(prefix.lib, 'liblua.a'), - arguments=['-lm', '-ldl'], - version=self.version, - compat_version=self.version.up_to(2)) + if '+shared' in spec: + static_to_shared_library(join_path(prefix.lib, 'liblua.a'), + arguments=['-lm', '-ldl'], + version=self.version, + compat_version=self.version.up_to(2)) # compatibility with ax_lua.m4 from autoconf-archive # https://www.gnu.org/software/autoconf-archive/ax_lua.html From 0c7fff60651ce3c129551e1c1657ccc80ee816f8 Mon Sep 17 00:00:00 2001 From: Amjad Kotobi Date: Mon, 30 Mar 2020 18:56:40 +0200 Subject: [PATCH 068/138] Update git version to 2.26.0 (#15756) * Update git version to 2.26.0 * Fix1 --- var/spack/repos/builtin/packages/git/package.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/var/spack/repos/builtin/packages/git/package.py b/var/spack/repos/builtin/packages/git/package.py index ba842587e24..7b92fb65454 100644 --- a/var/spack/repos/builtin/packages/git/package.py +++ b/var/spack/repos/builtin/packages/git/package.py @@ -24,6 +24,11 @@ class Git(AutotoolsPackage): # You can find the source here: https://mirrors.edge.kernel.org/pub/software/scm/git/sha256sums.asc releases = [ + { + 'version': '2.26.0', + 'sha256': 'aa168c2318e7187cd295a645f7370cc6d71a324aafc932f80f00c780b6a26bed', + 'sha256_manpages': 'c1ffaf0b4cd1e80a0eb0d4039e208c9d411ef94d5da44e38363804e1a7961218' + }, { 'version': '2.25.0', 'sha256': 'a98c9b96d91544b130f13bf846ff080dda2867e77fe08700b793ab14ba5346f6', From 6747ecde166fee0b1d82eb826f3421cc2cf7468b Mon Sep 17 00:00:00 2001 From: Andrew W Elble Date: Mon, 30 Mar 2020 15:58:57 -0400 Subject: [PATCH 069/138] py-onnx: depends on cmake >= 3.1 (#15762) * py-onnx: depends on cmake >= 3.1 * Update var/spack/repos/builtin/packages/py-onnx/package.py Co-Authored-By: Adam J. Stewart Co-authored-by: Adam J. Stewart --- var/spack/repos/builtin/packages/py-onnx/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/py-onnx/package.py b/var/spack/repos/builtin/packages/py-onnx/package.py index c6401d8b007..b92e910db27 100644 --- a/var/spack/repos/builtin/packages/py-onnx/package.py +++ b/var/spack/repos/builtin/packages/py-onnx/package.py @@ -28,6 +28,7 @@ class PyOnnx(PythonPackage): depends_on('py-six', type=('build', 'run')) depends_on('py-typing@3.6.4:', type=('build', 'run')) depends_on('py-typing-extensions@3.6.4:', type=('build', 'run')) + depends_on('cmake@3.1:', type='build') # 'python_out' does not recognize dllexport_decl. patch('remove_dllexport_decl.patch', when='@:1.6.0') From ccc7c9b86de790dd268b530e1cfa7336b596fd04 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 30 Mar 2020 16:09:17 -0500 Subject: [PATCH 070/138] py-horovod: fix compilation of ~cuda (#15719) * py-horovod: fix compilation of ~cuda * Rewrite py-horovod with only 3 variants * Add upstream patch to workaround compilation issue --- .../builtin/packages/py-horovod/fma.patch | 52 +++++++ .../builtin/packages/py-horovod/package.py | 136 ++++++++++-------- 2 files changed, 125 insertions(+), 63 deletions(-) create mode 100644 var/spack/repos/builtin/packages/py-horovod/fma.patch diff --git a/var/spack/repos/builtin/packages/py-horovod/fma.patch b/var/spack/repos/builtin/packages/py-horovod/fma.patch new file mode 100644 index 00000000000..13ccb8c9c5d --- /dev/null +++ b/var/spack/repos/builtin/packages/py-horovod/fma.patch @@ -0,0 +1,52 @@ +From 717e72f91f02d1dc3c859719ef1d804b10f88017 Mon Sep 17 00:00:00 2001 +From: Nicolas V Castet +Date: Mon, 30 Mar 2020 12:47:50 -0500 +Subject: [PATCH] Add extra preprocessor guard for FMA optimization + +Fixes #1832 + +Signed-off-by: Nicolas V Castet +--- + horovod/common/ops/adasum/adasum.h | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/horovod/common/ops/adasum/adasum.h b/horovod/common/ops/adasum/adasum.h +index 0330f5850..876f7f12b 100644 +--- a/horovod/common/ops/adasum/adasum.h ++++ b/horovod/common/ops/adasum/adasum.h +@@ -19,7 +19,7 @@ + #include + #include + +-#if __AVX__ && __F16C__ ++#if __AVX__ && __F16C__ && __FMA__ + #include + #include + #endif +@@ -104,7 +104,7 @@ template class Adasum { + int count, double& dotProduct, + double& anormsq, double& bnormsq, + int layerid) { +-#if __AVX__ && __F16C__ ++#if __AVX__ && __F16C__ && __FMA__ + if (horovod_datatype == DataType::HOROVOD_FLOAT16) { + ComputeDotAndNormSqrdsfp16((uint16_t*)a, (uint16_t*)b, count, dotProduct, + anormsq, bnormsq, layerid); +@@ -125,7 +125,7 @@ template class Adasum { + double acoeff, void* __restrict__ a, + double bcoeff, void* __restrict__ b, + int layerid) { +-#if __AVX__ && __F16C__ ++#if __AVX__ && __F16C__ && __FMA__ + if (horovod_datatype == DataType::HOROVOD_FLOAT16) { + ScaledAddfp16(count, acoeff, (uint16_t*)a, bcoeff, (uint16_t*)b, layerid); + } else +@@ -425,7 +425,7 @@ template class Adasum { + } + + +-#if __AVX__ && __F16C__ ++#if __AVX__ && __F16C__ && __FMA__ + inline void ComputeDotAndNormSqrdsfp16(const uint16_t* __restrict__ a, + const uint16_t* __restrict__ b, + int len, double& dotProduct, diff --git a/var/spack/repos/builtin/packages/py-horovod/package.py b/var/spack/repos/builtin/packages/py-horovod/package.py index 598e01c6f91..c740486853d 100644 --- a/var/spack/repos/builtin/packages/py-horovod/package.py +++ b/var/spack/repos/builtin/packages/py-horovod/package.py @@ -25,96 +25,106 @@ class PyHorovod(PythonPackage): version('0.16.3', tag='v0.16.3', submodules=True) version('0.16.2', tag='v0.16.2', submodules=True) - # Deep learning frameworks - variant('pytorch', default=True, description='Enables PyTorch') - variant('tensorflow', default=False, description='Enables TensorFlow') - variant('mxnet', default=False, description='Enables Apache MXNet') - - # Distributed support - variant('gloo', default=False, description='Enables features related to distributed support') - variant('mpi', default=True, description='Enables MPI build') - - # GPU support - variant('cuda', default=True, description='Enables CUDA build') - variant('gpu_allreduce', default='mpi', - description='Backend to use for GPU_ALLREDUCE', - values=('mpi', 'nccl'), multi=False) # DDL support is deprecated - variant('gpu_allgather', default='mpi', - description='Backend to use for GPU_ALLGATHER', - values=('mpi',), multi=False) - variant('gpu_broadcast', default='mpi', - description='Backend to use for GPU_BROADCAST', - values=('mpi', 'nccl'), multi=False) + # https://github.com/horovod/horovod/blob/master/docs/install.rst + variant('frameworks', default='pytorch', + description='Deep learning frameworks to build support for', + values=('tensorflow', 'pytorch', 'mxnet', 'keras', 'spark'), + multi=True) + variant('controllers', default='mpi', + description='Controllers to coordinate work between processes', + values=('mpi', 'gloo'), multi=True) + variant('tensor_ops', default='nccl', + description='Framework to use for GPU/CPU operations', + values=('nccl', 'mpi', 'gloo', 'ccl'), multi=False) # Required dependencies - depends_on('py-setuptools', type='build') + depends_on('py-setuptools', type='build') depends_on('py-cloudpickle', type=('build', 'run')) - depends_on('py-psutil', type=('build', 'run')) - depends_on('py-pyyaml', type=('build', 'run')) - depends_on('py-six', type=('build', 'run')) + depends_on('py-psutil', type=('build', 'run')) + depends_on('py-pyyaml', type=('build', 'run')) + depends_on('py-six', type=('build', 'run')) - # Deep learning frameworks - depends_on('py-torch@0.4.0:', type=('build', 'run'), when='+pytorch') - depends_on('py-torch+cuda', type=('build', 'run'), when='+pytorch+cuda') - depends_on('py-cffi@1.4.0:', type=('build', 'run'), when='+pytorch') - depends_on('py-tensorflow@1.1.0:', type=('build', 'link', 'run'), when='+tensorflow') - depends_on('mxnet@1.4.0:+python', type=('build', 'link', 'run'), when='+mxnet') - depends_on('mxnet+cuda', type=('build', 'link', 'run'), when='+mxnet+cuda') + # Framework dependencies + depends_on('py-tensorflow@1.1.0:', type=('build', 'link', 'run'), when='frameworks=tensorflow') + depends_on('py-torch@0.4.0:', type=('build', 'run'), when='frameworks=pytorch') + depends_on('py-torchvision', type=('build', 'run'), when='frameworks=pytorch') + depends_on('py-cffi@1.4.0:', type=('build', 'run'), when='frameworks=pytorch') + depends_on('mxnet@1.4.1:+python', type=('build', 'link', 'run'), when='frameworks=mxnet') + depends_on('py-keras@2.0.8,2.1.2:', type=('build', 'run'), when='frameworks=keras') + depends_on('py-h5py@2.9:', type=('build', 'run'), when='frameworks=spark') + depends_on('py-numpy', type=('build', 'run'), when='frameworks=spark') + depends_on('py-petastorm@0.8.2', type=('build', 'run'), when='frameworks=spark') + depends_on('py-pyarrow@0.15.0:', type=('build', 'run'), when='frameworks=spark') + depends_on('py-pyspark@2.3.2:', type=('build', 'run'), when='frameworks=spark') - # Distributed support + # Controller dependencies + depends_on('mpi', when='controllers=mpi') # There does not appear to be a way to use an external Gloo installation - depends_on('cmake', type='build', when='+gloo') - depends_on('mpi', when='+mpi') - depends_on('mpi', when='gpu_allreduce=mpi') - depends_on('mpi', when='gpu_allgather=mpi') - depends_on('mpi', when='gpu_broadcast=mpi') + depends_on('cmake', type='build', when='controllers=gloo') - # GPU support - depends_on('cuda', when='+cuda') - depends_on('nccl@2.0:', when='gpu_allreduce=nccl') - depends_on('nccl@2.0:', when='gpu_broadcast=nccl') + # Tensor Operations dependencies + depends_on('nccl', when='tensor_ops=nccl') + depends_on('mpi', when='tensor_ops=mpi') + # There does not appear to be a way to use an external Gloo installation + depends_on('cmake', type='build', when='tensor_ops=gloo') # Test dependencies depends_on('py-mock', type='test') depends_on('py-pytest', type='test') depends_on('py-pytest-forked', type='test') - conflicts('+gloo', when='platform=darwin', msg='Gloo cannot be compiled on MacOS') - conflicts('~gloo~mpi', msg='One of Gloo or MPI are required for Horovod to run') - conflicts('~pytorch~tensorflow~mxnet', msg='At least one deep learning backend is required') + conflicts('controllers=gloo', when='platform=darwin', msg='Gloo cannot be compiled on MacOS') + + # https://github.com/horovod/horovod/pull/1835 + patch('fma.patch', when='@0.19.0:0.19.1') def setup_build_environment(self, env): - # Deep learning frameworks - if '~pytorch' in self.spec: - env.set('HOROVOD_WITHOUT_PYTORCH', 1) - if '~tensorflow' in self.spec: + # Frameworks + if 'frameworks=tensorflow' in self.spec: + env.set('HOROVOD_WITH_TENSORFLOW', 1) + else: env.set('HOROVOD_WITHOUT_TENSORFLOW', 1) - if '~mxnet' in self.spec: + if 'frameworks=pytorch' in self.spec: + env.set('HOROVOD_WITH_PYTORCH', 1) + else: + env.set('HOROVOD_WITHOUT_PYTORCH', 1) + if 'frameworks=mxnet' in self.spec: + env.set('HOROVOD_WITH_MXNET', 1) + else: env.set('HOROVOD_WITHOUT_MXNET', 1) - # Distributed support - if '~gloo' in self.spec: - env.set('HOROVOD_WITHOUT_GLOO', 1) - if '+mpi' in self.spec: + # Controllers + if 'controllers=mpi' in self.spec: env.set('HOROVOD_WITH_MPI', 1) else: env.set('HOROVOD_WITHOUT_MPI', 1) + if 'controllers=gloo' in self.spec: + env.set('HOROVOD_WITH_GLOO', 1) + else: + env.set('HOROVOD_WITHOUT_GLOO', 1) + + # Tensor Operations + if 'tensor_ops=nccl' in self.spec: + env.set('HOROVOD_GPU', 'CUDA') - # GPU support - if '+cuda' in self.spec: env.set('HOROVOD_CUDA_HOME', self.spec['cuda'].prefix) env.set('HOROVOD_CUDA_INCLUDE', self.spec['cuda'].headers.directories[0]) env.set('HOROVOD_CUDA_LIB', self.spec['cuda'].libs.directories[0]) - if '^nccl' in self.spec: + env.set('HOROVOD_NCCL_HOME', self.spec['nccl'].prefix) env.set('HOROVOD_NCCL_INCLUDE', self.spec['nccl'].headers.directories[0]) env.set('HOROVOD_NCCL_LIB', self.spec['nccl'].libs.directories[0]) - env.set('HOROVOD_GPU_ALLREDUCE', - self.spec.variants['gpu_allreduce'].value.upper()) - env.set('HOROVOD_GPU_ALLGATHER', - self.spec.variants['gpu_allgather'].value.upper()) - env.set('HOROVOD_GPU_BROADCAST', - self.spec.variants['gpu_broadcast'].value.upper()) - env.set('HOROVOD_ALLOW_MIXED_GPU_IMPL', 1) + + env.set('HOROVOD_GPU_ALLREDUCE', 'NCCL') + env.set('HOROVOD_GPU_BROADCAST', 'NCCL') + else: + env.set('HOROVOD_CPU_OPERATIONS', + self.spec.variants['tensor_ops'].value.upper()) + + @run_after('install') + @on_package_attributes(run_tests=True) + def install_test(self): + horovodrun = Executable(self.prefix.bin.horovodrun) + horovodrun('--check-build') From 3f50b9e08dcd16c71946183376cf58414ea9b958 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Mon, 30 Mar 2020 14:24:05 -0700 Subject: [PATCH 071/138] CUDA 10.1+ supports ICC 19.0 (#15764) Fix the CUDA-ICC conflict check. Simplify the XL 17 check. --- lib/spack/spack/build_systems/cuda.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/build_systems/cuda.py b/lib/spack/spack/build_systems/cuda.py index 50a7002dbb3..cbee7100496 100644 --- a/lib/spack/spack/build_systems/cuda.py +++ b/lib/spack/spack/build_systems/cuda.py @@ -140,12 +140,12 @@ def cuda_flags(arch_list): conflicts('%intel@16.0:', when='+cuda ^cuda@:8.0.43') conflicts('%intel@17.0:', when='+cuda ^cuda@:8.0.60') conflicts('%intel@18.0:', when='+cuda ^cuda@:9.9') - conflicts('%intel@19.0:', when='+cuda ^cuda@:10.2.89') + conflicts('%intel@19.0:', when='+cuda ^cuda@:10.0') # XL is mostly relevant for ppc64le Linux conflicts('%xl@:12,14:', when='+cuda ^cuda@:9.1') conflicts('%xl@:12,14:15,17:', when='+cuda ^cuda@9.2') - conflicts('%xl@17:', when='+cuda ^cuda@10.0.130:10.2.89') + conflicts('%xl@17:', when='+cuda ^cuda@:10.2.89') # Mac OS X # platform = ' platform=darwin' From 3c18d2a0e8564443b0bbd87e6f394ef821e69661 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 30 Mar 2020 17:44:58 -0500 Subject: [PATCH 072/138] py-torch: make sure unit tests are registered (#15765) --- var/spack/repos/builtin/packages/py-torch/package.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-torch/package.py b/var/spack/repos/builtin/packages/py-torch/package.py index c0be1176e42..e1dbdccb6df 100644 --- a/var/spack/repos/builtin/packages/py-torch/package.py +++ b/var/spack/repos/builtin/packages/py-torch/package.py @@ -287,9 +287,11 @@ def enable_or_disable(variant, keyword='USE', var=None, newer=False): enable_or_disable('zstd', newer=True) enable_or_disable('tbb', newer=True) - def test(self): - pass - def install_test(self): with working_dir('test'): python('run_test.py') + + # Tests need to be re-added since `phases` was overridden + run_after('install')( + PythonPackage._run_default_install_time_test_callbacks) + run_after('install')(PythonPackage.sanity_check_prefix) From a96b7427971591e24011fd73ddf498331bbc6ab6 Mon Sep 17 00:00:00 2001 From: Satish Balay Date: Mon, 30 Mar 2020 19:50:29 -0500 Subject: [PATCH 073/138] Balay/petsc 3.13.0 (#15767) * petsc: add 3.13.0 (using petsc-lite) and 3.12.5 * petsc@3.13.0: update hdf5 and superlu-dist dependencies * flake8 fix * fixes for comments Co-authored-by: Jed Brown --- .../repos/builtin/packages/petsc/package.py | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/var/spack/repos/builtin/packages/petsc/package.py b/var/spack/repos/builtin/packages/petsc/package.py index 577f53a1636..6c5ab4a5641 100644 --- a/var/spack/repos/builtin/packages/petsc/package.py +++ b/var/spack/repos/builtin/packages/petsc/package.py @@ -16,14 +16,15 @@ class Petsc(Package): """ homepage = "http://www.mcs.anl.gov/petsc/index.html" - url = "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-3.5.3.tar.gz" - git = "https://gitlab.com/petsc/petsc.git" - + url = "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-lite-3.13.0.tar.gz" + git = "https://gitlab.com/petsc/petsc.git" maintainers = ['balay', 'barrysmith', 'jedbrown'] version('develop', branch='master') version('xsdk-0.2.0', tag='xsdk-0.2.0') + version('3.13.0', sha256='f0ea543a54145c5d1387e25b121c3fd1b1ca834032c5a33f6f1d929e95bdf0e5') + version('3.12.5', sha256='d676eb67e79314d6cca6422d7c477d2b192c830b89d5edc6b46934f7453bcfc0') version('3.12.4', sha256='56a941130da93bbacb3cfa74dcacea1e3cd8e36a0341f9ced09977b1457084c3') version('3.12.3', sha256='91f77d7b0f54056f085b9e27938922db3d9bb1734a2e2a6d26f43d3e6c0cf631') version('3.12.2', sha256='d874b2e198c4cb73551c2eca1d2c5d27da710be4d00517adb8f9eb3d6d0375e8') @@ -146,7 +147,8 @@ class Petsc(Package): depends_on('metis@5:~int64', when='@3.8:+metis~int64') depends_on('metis@5:+int64', when='@3.8:+metis+int64') - depends_on('hdf5@:1.10.99+mpi+hl+fortran', when='+hdf5+mpi') + depends_on('hdf5@:1.10.99+mpi+hl+fortran', when='@:3.12.99+hdf5+mpi') + depends_on('hdf5+mpi+hl+fortran', when='@3.13:+hdf5+mpi') depends_on('zlib', when='+hdf5') depends_on('parmetis', when='+metis+mpi') depends_on('valgrind', when='+valgrind') @@ -172,6 +174,8 @@ class Petsc(Package): depends_on('superlu-dist@5.4:5.4.99+int64', when='@3.10:3.10.2+superlu-dist+mpi+int64') depends_on('superlu-dist@6.1:6.1.99~int64', when='@3.10.3:3.12.99+superlu-dist+mpi~int64') depends_on('superlu-dist@6.1:6.1.99+int64', when='@3.10.3:3.12.99+superlu-dist+mpi+int64') + depends_on('superlu-dist@6.1:6.3.99~int64', when='@3.13.0:3.13.99+superlu-dist+mpi~int64') + depends_on('superlu-dist@6.1:6.3.99+int64', when='@3.13.0:3.13.99+superlu-dist+mpi+int64') depends_on('superlu-dist@xsdk-0.2.0~int64', when='@xsdk-0.2.0+superlu-dist+mpi~int64') depends_on('superlu-dist@xsdk-0.2.0+int64', when='@xsdk-0.2.0+superlu-dist+mpi+int64') depends_on('superlu-dist@develop~int64', when='@develop+superlu-dist+mpi~int64') @@ -185,6 +189,13 @@ class Petsc(Package): depends_on('suite-sparse', when='+suite-sparse') depends_on('libx11', when='+X') + def url_for_version(self, version): + if version >= Version('3.13.0'): + # petsc-lite tarballs are smaller by skipping docs + return "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-lite-{0}.tar.gz".format(version) + else: + return "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-{0}.tar.gz".format(version) + def mpi_dependent_options(self): if '~mpi' in self.spec: compiler_opts = [ From 8bc6b290e53f26807fee42a23f7a7ba9861d9cdd Mon Sep 17 00:00:00 2001 From: Ryan Mast Date: Mon, 30 Mar 2020 17:50:53 -0700 Subject: [PATCH 074/138] helics: add new package (#15763) * helics: add new package * Remove FIXME boilerplate * Use open @master: verison range for git dependency and remove mpi fix branch version * Add blank line after spack import --- .../repos/builtin/packages/helics/package.py | 105 ++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 var/spack/repos/builtin/packages/helics/package.py diff --git a/var/spack/repos/builtin/packages/helics/package.py b/var/spack/repos/builtin/packages/helics/package.py new file mode 100644 index 00000000000..7aa4a06c466 --- /dev/null +++ b/var/spack/repos/builtin/packages/helics/package.py @@ -0,0 +1,105 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Helics(CMakePackage): + """HELICS is a general-purpose, modular, highly-scalable co-simulation + framework that runs cross-platform (Linux, Windows, and Mac OS X) and + supports both event driven and time series simulation.""" + + homepage = "https://github.com/GMLC-TDC/HELICS" + url = "https://github.com/GMLC-TDC/HELICS/releases/download/v2.4.1/Helics-v2.4.1-source.tar.gz" + git = "https://github.com/GMLC-TDC/HELICS.git" + + maintainers = ['nightlark'] + + version('develop', branch='develop', submodules=True) + version('master', branch='master', submodules=True) + version('2.4.2', sha256='957856f06ed6d622f05dfe53df7768bba8fe2336d841252f5fac8345070fa5cb') + version('2.4.1', sha256='ac077e9efe466881ea366721cb31fb37ea0e72a881a717323ba4f3cdda338be4') + + variant('build_type', default='Release', + description='CMake build type', + values=('Debug', 'Release', 'RelWithDebInfo', 'MinSizeRel')) + variant('apps', default=True, description="Install the HELICS apps") + variant('c_shared', default=True, description="Install the C shared library") + variant('cxx_shared', default=True, description="Install the CXX shared library") + variant('zmq', default=True, description="Enable ZeroMQ core types") + variant('tcp', default=True, description="Enable TCP core types") + variant('udp', default=True, description="Enable UDP core type") + variant('ipc', default=True, description="Enable IPC core type") + variant('inproc', default=True, description="Enable in-process core type") + variant('mpi', default=False, description="Enable MPI core type") + variant('boost', default=True, description="Compile with Boost libraries") + variant('asio', default=True, description="Compile with ASIO libraries") + variant('swig', default=False, description="Build language bindings with SWIG") + variant('webserver', default=True, description="Enable the integrated webserver in the HELICS broker server") + + # Build dependency + depends_on('git', type='build', when='@master:') + depends_on('cmake@3.4:', type='build') + depends_on('boost@1.70: ~atomic ~chrono ~date_time ~exception ~filesystem ~graph ~iostreams ~locale ~log ~math ~program_options ~random ~regex ~serialization ~signals ~system ~test ~thread ~timer ~wave', type='build', when='+boost') + depends_on('swig@3.0:', type='build', when='+swig') + + depends_on('libzmq@4.3:', when='+zmq') + depends_on('mpi@2', when='+mpi') + + # OpenMPI doesn't work with HELICS <=2.4.1 + conflicts('^openmpi', when='@:2.4.1 +mpi') + + # Boost is required for ipc and webserver options + conflicts('+ipc', when='~boost') + conflicts('+webserver', when='~boost') + + # ASIO (vendored in HELICS repo) is required for tcp and udp options + conflicts('+tcp', when='~asio') + conflicts('+udp', when='~asio') + + def cmake_args(self): + spec = self.spec + args = [ + '-DHELICS_BUILD_EXAMPLES=OFF', + '-DHELICS_BUILD_TESTS=OFF', + ] + + # HELICS core type CMake options + args.append('-DENABLE_ZMQ_CORE={0}'.format( + 'ON' if '+zmq' in spec else 'OFF')) + args.append('-DENABLE_TCP_CORE={0}'.format( + 'ON' if '+tcp' in spec else 'OFF')) + args.append('-DENABLE_UDP_CORE={0}'.format( + 'ON' if '+udp' in spec else 'OFF')) + args.append('-DENABLE_IPC_CORE={0}'.format( + 'ON' if '+ipc' in spec else 'OFF')) + args.append('-DENABLE_INPROC_CORE={0}'.format( + 'ON' if '+inproc' in spec else 'OFF')) + args.append('-DENABLE_MPI_CORE={0}'.format( + 'ON' if '+mpi' in spec else 'OFF')) + + # HELICS shared library options + args.append('-DHELICS_DISABLE_C_SHARED_LIB={0}'.format( + 'OFF' if '+c_shared' in spec else 'ON')) + args.append('-DHELICS_BUILD_CXX_SHARED_LIB={0}'.format( + 'ON' if '+cxx_shared' in spec else 'OFF')) + + # HELICS executable app options + args.append('-DHELICS_BUILD_APP_EXECUTABLES={0}'.format( + 'ON' if '+apps' in spec else 'OFF')) + args.append('-DHELICS_DISABLE_WEBSERVER={0}'.format( + 'OFF' if '+webserver' in spec else 'ON')) + + # Extra HELICS library dependencies + args.append('-DHELICS_DISABLE_BOOST={0}'.format( + 'OFF' if '+boost' in spec else 'ON')) + args.append('-DHELICS_DISABLE_ASIO={0}'.format( + 'OFF' if '+asio' in spec else 'ON')) + + # SWIG + args.append('-DHELICS_ENABLE_SWIG={0}'.format( + 'ON' if '+swig' in spec else 'OFF')) + + return args From 864960937dfdc7e65faba99fd12ece6578b0b490 Mon Sep 17 00:00:00 2001 From: Satish Balay Date: Mon, 30 Mar 2020 19:52:31 -0500 Subject: [PATCH 075/138] superlu-dist: add new version 6.3.0 (#15766) --- var/spack/repos/builtin/packages/superlu-dist/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/superlu-dist/package.py b/var/spack/repos/builtin/packages/superlu-dist/package.py index 989158356d8..799b413f7d3 100644 --- a/var/spack/repos/builtin/packages/superlu-dist/package.py +++ b/var/spack/repos/builtin/packages/superlu-dist/package.py @@ -18,6 +18,7 @@ class SuperluDist(CMakePackage): version('develop', branch='master') version('xsdk-0.2.0', tag='xsdk-0.2.0') + version('6.3.0', sha256='daf3264706caccae2b8fd5a572e40275f1e128fa235cb7c21ee2f8051c11af95') version('6.1.1', sha256='35d25cff592c724439870444ed45e1d1d15ca2c65f02ccd4b83a6d3c9d220bd1') version('6.1.0', sha256='92c6d1424dd830ee2d1e7396a418a5f6645160aea8472e558c4e4bfe006593c4') version('6.0.0', sha256='ff6cdfa0263d595708bbb6d11fb780915d8cfddab438db651e246ea292f37ee4') From 628516c7611126f2a1b1f72d57e4cfd95535cf30 Mon Sep 17 00:00:00 2001 From: Toyohisa Kameyama Date: Tue, 31 Mar 2020 13:02:14 +0900 Subject: [PATCH 076/138] ppOpen-APPL/FVM: new package. (#15772) * ppOpen-APPL/FVM: new package. * copy_tree -> install_tree. --- .../packages/ppopen-appl-fvm/package.py | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 var/spack/repos/builtin/packages/ppopen-appl-fvm/package.py diff --git a/var/spack/repos/builtin/packages/ppopen-appl-fvm/package.py b/var/spack/repos/builtin/packages/ppopen-appl-fvm/package.py new file mode 100644 index 00000000000..2dd6872cc29 --- /dev/null +++ b/var/spack/repos/builtin/packages/ppopen-appl-fvm/package.py @@ -0,0 +1,63 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + + +from spack import * +import os + + +class PpopenApplFvm(MakefilePackage): + """ + ppOpen-APPL/FVM ia a coupling library that enables weak + coupling on various simulation models, such as an + atmospheric model and an ocean model, a seismic model + and a structure model. For getting very wide + applicability, ppohMATHMP is designed so as that it is + independent from grid structure. Instead of grid + structure, ppOpen-APPL/FVM requires a data set + called 'mapping table'. Mapping table is composed of + a correspondence table of grid indexes between a send + model and a receive model and interpolation coefficients. + A subroutine for making a mapping table file is provided + by ppohMATHMP API. + + Current version of ppohMATHMP is ver.1.0 which targets + scalar data exchange. An exchange code of vector data + which requires rotation calculation is under + """ + + homepage = "http://ppopenhpc.cc.u-tokyo.ac.jp/ppopenhpc/" + url = "file://{0}/ppohFVM_0.3.0.tar.gz".format(os.getcwd()) + + version('0.3.0', sha256='4e05dd71f4eeda62c9683b7c3069a2537f3c2c7e86ba50a00d4963f41d9cbe29') + + depends_on('mpi') + depends_on('metis@:4') + + def edit(self, spec, prefix): + fflags = ['-O3'] + if spec.satisfies('%gcc'): + fflags.append('-ffree-line-length-none') + makefile_in = FileFilter('Makefile.in') + makefile_in.filter( + r'^PREFIX *=.*$', + 'PREFIX = {0}'.format(prefix) + ) + makefile_in.filter( + r'^METISDIR *=.*$', + 'METISDIR = {0}'.format(spec['metis'].prefix.lib) + ) + makefile_in.filter('mpifrtpx', spec['mpi'].mpifc) + makefile_in.filter('frtpx', spack_fc) + makefile_in.filter('-Kfast', ' '.join(fflags)) + makefile_in.filter( + ',openmp', + ' {0}'.format(self.compiler.openmp_flag) + ) + + def install(self, spec, prefix): + make('install') + install_tree('examples', prefix.examples) + install_tree('doc', prefix.doc) From 77e13849026b9b177c27fcaefd134dd32e4329e4 Mon Sep 17 00:00:00 2001 From: Ben Morgan Date: Tue, 31 Mar 2020 09:54:31 +0100 Subject: [PATCH 077/138] geant4: new version 10.6 plus simplifications (#15447) * geant4: new version 10.6 plus simplifications Add new 10.6.0 release, migrating download of source to use Geant4's public release repo on CERN GitLab. Change versioning scheme to use clearer and standard semantic scheme. Update geant4-data and g4XXX data packages with new versions. Migrate geant4-data as a BundlePackage of the g4XXX packages, installing links to each under a single directory under share for geant4-data. Ensure each g4XXX package exports the environment variable pointing to its location expected by Geant4. Remove "data" variant from Geant4 package and always use geant4-data. Simplify cxxstd variant transport to dependencies. * g4: Use self to resolve correct prefix * geant4, data: Fix flake8 errors * g4photonevaporation: flake8 fix * geant4: vecgeom version depends_on Geant4 major.minor versions have specific dependencies on vecgeom versions. Add missing vecgeom version for geant4 10.5, and match version requirements for vecgeom in geant4 depends_on. * geant4: c++17 patch specific for 10.4.3 * geant4: simplify geant4-data setup * geant4: Use new define_from_variant function * geant4: fix flake8 errors --- .../repos/builtin/packages/g4abla/package.py | 13 +- .../repos/builtin/packages/g4emlow/package.py | 17 +- .../builtin/packages/g4ensdfstate/package.py | 7 +- .../repos/builtin/packages/g4incl/package.py | 34 ++++ .../repos/builtin/packages/g4ndl/package.py | 6 + .../builtin/packages/g4neutronxs/package.py | 7 + .../builtin/packages/g4particlexs/package.py | 35 ++++ .../packages/g4photonevaporation/package.py | 11 +- .../repos/builtin/packages/g4pii/package.py | 6 + .../packages/g4radioactivedecay/package.py | 14 +- .../builtin/packages/g4realsurface/package.py | 10 +- .../builtin/packages/g4saiddata/package.py | 7 + .../repos/builtin/packages/g4tendl/package.py | 8 +- .../builtin/packages/geant4-data/package.py | 151 ++++++++------- ...geant4-10.4.3-cxx17-removed-features.patch | 18 ++ .../repos/builtin/packages/geant4/package.py | 176 ++++++++---------- .../repos/builtin/packages/vecgeom/package.py | 1 + 17 files changed, 328 insertions(+), 193 deletions(-) create mode 100644 var/spack/repos/builtin/packages/g4incl/package.py create mode 100644 var/spack/repos/builtin/packages/g4particlexs/package.py create mode 100644 var/spack/repos/builtin/packages/geant4/geant4-10.4.3-cxx17-removed-features.patch diff --git a/var/spack/repos/builtin/packages/g4abla/package.py b/var/spack/repos/builtin/packages/g4abla/package.py index b14f88d4d91..bed114d825b 100644 --- a/var/spack/repos/builtin/packages/g4abla/package.py +++ b/var/spack/repos/builtin/packages/g4abla/package.py @@ -11,12 +11,12 @@ class G4abla(Package): """Geant4 data for nuclear shell effects in INCL/ABLA hadronic mode""" homepage = "http://geant4.web.cern.ch" url = "http://geant4-data.web.cern.ch/geant4-data/datasets/G4ABLA.3.0.tar.gz" + maintainers = ['drbenmorgan'] - version( - '3.0', sha256='99fd4dcc9b4949778f14ed8364088e45fa4ff3148b3ea36f9f3103241d277014') - version( - '3.1', sha256='7698b052b58bf1b9886beacdbd6af607adc1e099fc730ab6b21cf7f090c027ed') + # Only versions relevant to Geant4 releases built by spack are added + version('3.1', sha256='7698b052b58bf1b9886beacdbd6af607adc1e099fc730ab6b21cf7f090c027ed') + version('3.0', sha256='99fd4dcc9b4949778f14ed8364088e45fa4ff3148b3ea36f9f3103241d277014') def install(self, spec, prefix): mkdirp(join_path(prefix.share, 'data')) @@ -24,6 +24,11 @@ def install(self, spec, prefix): .format(self.version)) install_tree(self.stage.source_path, install_path) + def setup_dependent_run_environment(self, env, dependent_spec): + install_path = join_path(self.prefix.share, 'data', 'G4ABLA{0}' + .format(self.version)) + env.set('G4ABLADATA', install_path) + def url_for_version(self, version): """Handle version string.""" return ("http://geant4-data.web.cern.ch/geant4-data/datasets/G4ABLA.%s.tar.gz" % version) diff --git a/var/spack/repos/builtin/packages/g4emlow/package.py b/var/spack/repos/builtin/packages/g4emlow/package.py index df6af19e262..713b9da6311 100644 --- a/var/spack/repos/builtin/packages/g4emlow/package.py +++ b/var/spack/repos/builtin/packages/g4emlow/package.py @@ -11,12 +11,14 @@ class G4emlow(Package): """Geant4 data files for low energy electromagnetic processes.""" homepage = "http://geant4.web.cern.ch" url = "http://geant4-data.web.cern.ch/geant4-data/datasets/G4EMLOW.6.50.tar.gz" + maintainers = ['drbenmorgan'] - version( - '6.50', sha256='c97be73fece5fb4f73c43e11c146b43f651c6991edd0edf8619c9452f8ab1236') - version( - '7.3', sha256='583aa7f34f67b09db7d566f904c54b21e95a9ac05b60e2bfb794efb569dba14e') + # Only versions relevant to Geant4 releases built by spack are added + version('7.9', sha256='4abf9aa6cda91e4612676ce4d2d8a73b91184533aa66f9aad19a53a8c4dc3aff') + version('7.7', sha256='16dec6adda6477a97424d749688d73e9bd7d0b84d0137a67cf341f1960984663') + version('7.3', sha256='583aa7f34f67b09db7d566f904c54b21e95a9ac05b60e2bfb794efb569dba14e') + version('6.50', sha256='c97be73fece5fb4f73c43e11c146b43f651c6991edd0edf8619c9452f8ab1236') def install(self, spec, prefix): mkdirp(join_path(prefix.share, 'data')) @@ -24,6 +26,11 @@ def install(self, spec, prefix): .format(self.version)) install_tree(self.stage.source_path, install_path) + def setup_dependent_run_environment(self, env, dependent_spec): + install_path = join_path(self.prefix.share, 'data', 'G4EMLOW{0}' + .format(self.version)) + env.set('G4LEDATA', install_path) + def url_for_version(self, version): """Handle version string.""" - return ("http://geant4.web.cern.ch/support/source/G4EMLOW.%s.tar.gz" % version) + return ("http://geant4-data.web.cern.ch/geant4-data/datasets/G4EMLOW.%s.tar.gz" % version) diff --git a/var/spack/repos/builtin/packages/g4ensdfstate/package.py b/var/spack/repos/builtin/packages/g4ensdfstate/package.py index 06b50b37545..36bc897f4b1 100644 --- a/var/spack/repos/builtin/packages/g4ensdfstate/package.py +++ b/var/spack/repos/builtin/packages/g4ensdfstate/package.py @@ -14,8 +14,9 @@ class G4ensdfstate(Package): maintainers = ['drbenmorgan'] - version('2.1', sha256='933e7f99b1c70f24694d12d517dfca36d82f4e95b084c15d86756ace2a2790d9') + # Only versions relevant to Geant4 releases built by spack are added version('2.2', sha256='dd7e27ef62070734a4a709601f5b3bada6641b111eb7069344e4f99a01d6e0a6') + version('2.1', sha256='933e7f99b1c70f24694d12d517dfca36d82f4e95b084c15d86756ace2a2790d9') def install(self, spec, prefix): mkdirp(join_path(prefix.share, 'data')) @@ -24,7 +25,9 @@ def install(self, spec, prefix): install_tree(self.stage.source_path, install_path) def setup_dependent_run_environment(self, env, dependent_spec): - env.set('G4ENSDFSTATEDATA', self.prefix.share.data) + install_path = join_path(self.prefix.share, 'data', 'G4ENSDFSTATE{0}' + .format(self.version)) + env.set('G4ENSDFSTATEDATA', install_path) def url_for_version(self, version): """Handle version string.""" diff --git a/var/spack/repos/builtin/packages/g4incl/package.py b/var/spack/repos/builtin/packages/g4incl/package.py new file mode 100644 index 00000000000..e21010f411a --- /dev/null +++ b/var/spack/repos/builtin/packages/g4incl/package.py @@ -0,0 +1,34 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + + +from spack import * + + +class G4incl(Package): + """Geant4 data for evaluated particle cross-sections on natural + composition of elements""" + homepage = "http://geant4.web.cern.ch" + url = "http://geant4-data.web.cern.ch/geant4-data/datasets/G4INCL.1.0.tar.gz" + + maintainers = ['drbenmorgan'] + + # Only versions relevant to Geant4 releases built by spack are added + version('1.0', sha256='716161821ae9f3d0565fbf3c2cf34f4e02e3e519eb419a82236eef22c2c4367d') + + def install(self, spec, prefix): + mkdirp(join_path(prefix.share, 'data')) + install_path = join_path(prefix.share, 'data', "G4INCL{0}" + .format(self.version)) + install_tree(self.stage.source_path, install_path) + + def setup_dependent_run_environment(self, env, dependent_spec): + install_path = join_path(self.prefix.share, 'data', 'G4INCL{0}' + .format(self.version)) + env.set('G4INCLDATA', install_path) + + def url_for_version(self, version): + """Handle version string.""" + return ("http://geant4-data.web.cern.ch/geant4-data/datasets/G4INCL.%s.tar.gz" % version) \ No newline at end of file diff --git a/var/spack/repos/builtin/packages/g4ndl/package.py b/var/spack/repos/builtin/packages/g4ndl/package.py index 7ab6c9f26dc..3eaad0f101f 100644 --- a/var/spack/repos/builtin/packages/g4ndl/package.py +++ b/var/spack/repos/builtin/packages/g4ndl/package.py @@ -14,6 +14,7 @@ class G4ndl(Package): maintainers = ['drbenmorgan'] + version('4.6', sha256='9d287cf2ae0fb887a2adce801ee74fb9be21b0d166dab49bcbee9408a5145408') version('4.5', sha256='cba928a520a788f2bc8229c7ef57f83d0934bb0c6a18c31ef05ef4865edcdf8e') def install(self, spec, prefix): @@ -22,6 +23,11 @@ def install(self, spec, prefix): .format(self.version)) install_tree(self.stage.source_path, install_path) + def setup_dependent_run_environment(self, env, dependent_spec): + install_path = join_path(self.prefix.share, 'data', 'G4NDL{0}' + .format(self.version)) + env.set('G4NEUTRONHPDATA', install_path) + def url_for_version(self, version): """Handle version string.""" return ("http://geant4-data.web.cern.ch/geant4-data/datasets/G4NDL.%s.tar.gz" % version) diff --git a/var/spack/repos/builtin/packages/g4neutronxs/package.py b/var/spack/repos/builtin/packages/g4neutronxs/package.py index df3de0696cf..41acc423a6f 100644 --- a/var/spack/repos/builtin/packages/g4neutronxs/package.py +++ b/var/spack/repos/builtin/packages/g4neutronxs/package.py @@ -15,6 +15,8 @@ class G4neutronxs(Package): maintainers = ['drbenmorgan'] + # Only versions relevant to Geant4 releases built by spack are added + # Dataset not used after Geant4 10.4.x version('1.4', sha256='57b38868d7eb060ddd65b26283402d4f161db76ed2169437c266105cca73a8fd') def install(self, spec, prefix): @@ -23,6 +25,11 @@ def install(self, spec, prefix): .format(self.version)) install_tree(self.stage.source_path, install_path) + def setup_dependent_run_environment(self, env, dependent_spec): + install_path = join_path(self.prefix.share, 'data', 'G4NEUTRONXS{0}' + .format(self.version)) + env.set('G4NEUTRONXSDATA', install_path) + def url_for_version(self, version): """Handle version string.""" return "http://geant4-data.web.cern.ch/geant4-data/datasets/G4NEUTRONXS.%s.tar.gz" % version diff --git a/var/spack/repos/builtin/packages/g4particlexs/package.py b/var/spack/repos/builtin/packages/g4particlexs/package.py new file mode 100644 index 00000000000..e573025b64e --- /dev/null +++ b/var/spack/repos/builtin/packages/g4particlexs/package.py @@ -0,0 +1,35 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + + +from spack import * + + +class G4particlexs(Package): + """Geant4 data for evaluated particle cross-sections on + natural composition of elements""" + homepage = "http://geant4.web.cern.ch" + url = "http://geant4-data.web.cern.ch/geant4-data/datasets/G4PARTICLEXS.2.1.tar.gz" + + maintainers = ['drbenmorgan'] + + # Only versions relevant to Geant4 releases built by spack are added + version('2.1', sha256='094d103372bbf8780d63a11632397e72d1191dc5027f9adabaf6a43025520b41') + version('1.1', sha256='100a11c9ed961152acfadcc9b583a9f649dda4e48ab314fcd4f333412ade9d62') + + def install(self, spec, prefix): + mkdirp(join_path(prefix.share, 'data')) + install_path = join_path(prefix.share, 'data', "G4PARTICLEXS{0}" + .format(self.version)) + install_tree(self.stage.source_path, install_path) + + def setup_dependent_run_environment(self, env, dependent_spec): + install_path = join_path(self.prefix.share, 'data', 'G4PARTICLEXS{0}' + .format(self.version)) + env.set('G4PARTICLEXSDATA', install_path) + + def url_for_version(self, version): + """Handle version string.""" + return ("http://geant4-data.web.cern.ch/geant4-data/datasets/G4PARTICLEXS.%s.tar.gz" % version) \ No newline at end of file diff --git a/var/spack/repos/builtin/packages/g4photonevaporation/package.py b/var/spack/repos/builtin/packages/g4photonevaporation/package.py index 4e5c62b9992..93d7f82de42 100644 --- a/var/spack/repos/builtin/packages/g4photonevaporation/package.py +++ b/var/spack/repos/builtin/packages/g4photonevaporation/package.py @@ -14,8 +14,11 @@ class G4photonevaporation(Package): maintainers = ['drbenmorgan'] - version('4.3.2', sha256='d4641a6fe1c645ab2a7ecee09c34e5ea584fb10d63d2838248bfc487d34207c7') + # Only versions relevant to Geant4 releases built by spack are added + version('5.5', sha256='5995dda126c18bd7f68861efde87b4af438c329ecbe849572031ceed8f5e76d7') + version('5.3', sha256='d47ababc8cbe548065ef644e9bd88266869e75e2f9e577ebc36bc55bf7a92ec8') version('5.2', sha256='83607f8d36827b2a7fca19c9c336caffbebf61a359d0ef7cee44a8bcf3fc2d1f') + version('4.3.2', sha256='d4641a6fe1c645ab2a7ecee09c34e5ea584fb10d63d2838248bfc487d34207c7') def install(self, spec, prefix): mkdirp(join_path(prefix.share, 'data')) @@ -24,6 +27,12 @@ def install(self, spec, prefix): .format(self.version)) install_tree(self.stage.source_path, install_path) + def setup_dependent_run_environment(self, env, dependent_spec): + install_path = join_path(self.prefix.share, 'data', + 'PhotonEvaporation{0}' + .format(self.version)) + env.set('G4LEVELGAMMADATA', install_path) + def url_for_version(self, version): """Handle version string.""" return ("http://geant4-data.web.cern.ch/geant4-data/datasets/G4PhotonEvaporation.%s.tar.gz" % version) diff --git a/var/spack/repos/builtin/packages/g4pii/package.py b/var/spack/repos/builtin/packages/g4pii/package.py index 2e238a64180..ea91b5b9c92 100644 --- a/var/spack/repos/builtin/packages/g4pii/package.py +++ b/var/spack/repos/builtin/packages/g4pii/package.py @@ -14,6 +14,7 @@ class G4pii(Package): maintainers = ['drbenmorgan'] + # Only versions relevant to Geant4 releases built by spack are added version('1.3', sha256='6225ad902675f4381c98c6ba25fc5a06ce87549aa979634d3d03491d6616e926') def install(self, spec, prefix): @@ -22,6 +23,11 @@ def install(self, spec, prefix): .format(self.version)) install_tree(self.stage.source_path, install_path) + def setup_dependent_run_environment(self, env, dependent_spec): + install_path = join_path(self.prefix.share, 'data', 'G4PII{0}' + .format(self.version)) + env.set('G4PIIDATA', install_path) + def url_for_version(self, version): """Handle version string.""" return ("http://geant4-data.web.cern.ch/geant4-data/datasets/G4PII.1.3.tar.gz" % version) diff --git a/var/spack/repos/builtin/packages/g4radioactivedecay/package.py b/var/spack/repos/builtin/packages/g4radioactivedecay/package.py index c281ff63cdc..6f34e89cea4 100644 --- a/var/spack/repos/builtin/packages/g4radioactivedecay/package.py +++ b/var/spack/repos/builtin/packages/g4radioactivedecay/package.py @@ -14,15 +14,25 @@ class G4radioactivedecay(Package): maintainers = ['drbenmorgan'] - version('5.1.1', sha256='f7a9a0cc998f0d946359f2cb18d30dff1eabb7f3c578891111fc3641833870ae') + # Only versions relevant to Geant4 releases built by spack are added + version('5.4', sha256='240779da7d13f5bf0db250f472298c3804513e8aca6cae301db97f5ccdcc4a61') + version('5.3', sha256='5c8992ac57ae56e66b064d3f5cdfe7c2fee76567520ad34a625bfb187119f8c1') version('5.2', sha256='99c038d89d70281316be15c3c98a66c5d0ca01ef575127b6a094063003e2af5d') + version('5.1.1', sha256='f7a9a0cc998f0d946359f2cb18d30dff1eabb7f3c578891111fc3641833870ae') def install(self, spec, prefix): mkdirp(join_path(prefix.share, 'data')) - install_path = join_path(prefix.share, 'data', 'RadioactiveDecay{0}' + install_path = join_path(prefix.share, 'data', + 'RadioactiveDecay{0}' .format(self.version)) install_tree(self.stage.source_path, install_path) + def setup_dependent_run_environment(self, env, dependent_spec): + install_path = join_path(self.prefix.share, 'data', + 'RadioactiveDecay{0}' + .format(self.version)) + env.set('G4RADIOACTIVEDATA', install_path) + def url_for_version(self, version): """Handle version string.""" return ("http://geant4-data.web.cern.ch/geant4-data/datasets/G4RadioactiveDecay.%s.tar.gz" % version) diff --git a/var/spack/repos/builtin/packages/g4realsurface/package.py b/var/spack/repos/builtin/packages/g4realsurface/package.py index b741b61ef88..dee32da8b93 100644 --- a/var/spack/repos/builtin/packages/g4realsurface/package.py +++ b/var/spack/repos/builtin/packages/g4realsurface/package.py @@ -14,9 +14,10 @@ class G4realsurface(Package): maintainers = ['drbenmorgan'] - version('1.0', sha256='3e2d2506600d2780ed903f1f2681962e208039329347c58ba1916740679020b1') - version('2.1', sha256='2a287adbda1c0292571edeae2082a65b7f7bd6cf2bf088432d1d6f889426dcf3') + # Only versions relevant to Geant4 releases built by spack are added version('2.1.1', sha256='90481ff97a7c3fa792b7a2a21c9ed80a40e6be386e581a39950c844b2dd06f50') + version('2.1', sha256='2a287adbda1c0292571edeae2082a65b7f7bd6cf2bf088432d1d6f889426dcf3') + version('1.0', sha256='3e2d2506600d2780ed903f1f2681962e208039329347c58ba1916740679020b1') def install(self, spec, prefix): mkdirp(join_path(prefix.share, 'data')) @@ -24,6 +25,11 @@ def install(self, spec, prefix): .format(self.version)) install_tree(self.stage.source_path, install_path) + def setup_dependent_run_environment(self, env, dependent_spec): + install_path = join_path(self.prefix.share, 'data', 'RealSurface{0}' + .format(self.version)) + env.set('G4REALSURFACEDATA', install_path) + def url_for_version(self, version): """Handle version string.""" return "http://geant4-data.web.cern.ch/geant4-data/datasets/{0}RealSurface.{1}.tar.gz".format( diff --git a/var/spack/repos/builtin/packages/g4saiddata/package.py b/var/spack/repos/builtin/packages/g4saiddata/package.py index 7b03177f735..0091d09744d 100644 --- a/var/spack/repos/builtin/packages/g4saiddata/package.py +++ b/var/spack/repos/builtin/packages/g4saiddata/package.py @@ -14,6 +14,8 @@ class G4saiddata(Package): maintainers = ['drbenmorgan'] + # Only versions relevant to Geant4 releases built by spack are added + version('2.0', sha256='1d26a8e79baa71e44d5759b9f55a67e8b7ede31751316a9e9037d80090c72e91') version('1.1', sha256='a38cd9a83db62311922850fe609ecd250d36adf264a88e88c82ba82b7da0ed7f') def install(self, spec, prefix): @@ -22,6 +24,11 @@ def install(self, spec, prefix): .format(self.version)) install_tree(self.stage.source_path, install_path) + def setup_dependent_run_environment(self, env, dependent_spec): + install_path = join_path(self.prefix.share, 'data', 'G4SAIDDATA{0}' + .format(self.version)) + env.set('G4SAIDXSDATA', install_path) + def url_for_version(self, version): """Handle version string.""" return "http://geant4-data.web.cern.ch/geant4-data/datasets/G4SAIDDATA.%s.tar.gz" % version diff --git a/var/spack/repos/builtin/packages/g4tendl/package.py b/var/spack/repos/builtin/packages/g4tendl/package.py index 2a3ecbc0749..aac083f539b 100644 --- a/var/spack/repos/builtin/packages/g4tendl/package.py +++ b/var/spack/repos/builtin/packages/g4tendl/package.py @@ -14,8 +14,9 @@ class G4tendl(Package): maintainers = ['drbenmorgan'] - version('1.3', sha256='52ad77515033a5d6f995c699809b464725a0e62099b5e55bf07c8bdd02cd3bce') + # Only versions relevant to Geant4 releases built by spack are added version('1.3.2', sha256='3b2987c6e3bee74197e3bd39e25e1cc756bb866c26d21a70f647959fc7afb849') + version('1.3', sha256='52ad77515033a5d6f995c699809b464725a0e62099b5e55bf07c8bdd02cd3bce') def install(self, spec, prefix): mkdirp(join_path(prefix.share, 'data')) @@ -23,6 +24,11 @@ def install(self, spec, prefix): .format(self.version)) install_tree(self.stage.source_path, install_path) + def setup_dependent_run_environment(self, env, dependent_spec): + install_path = join_path(self.prefix.share, 'data', 'G4TENDL{0}' + .format(self.version)) + env.set('G4PARTICLEHPDATA', install_path) + def url_for_version(self, version): """Handle version string.""" return ("http://geant4-data.web.cern.ch/geant4-data/datasets/G4TENDL.%s.tar.gz" % version) diff --git a/var/spack/repos/builtin/packages/geant4-data/package.py b/var/spack/repos/builtin/packages/geant4-data/package.py index f5c4e72fac0..4157fb76c6e 100644 --- a/var/spack/repos/builtin/packages/geant4-data/package.py +++ b/var/spack/repos/builtin/packages/geant4-data/package.py @@ -8,90 +8,89 @@ import glob -class Geant4Data(Package): - """An umbrella package to hold Geant4 data packages""" +class Geant4Data(BundlePackage): + """A bundle package to hold Geant4 data packages""" homepage = "http://geant4.cern.ch" - url = "http://geant4-data.web.cern.ch/geant4-data/ReleaseNotes/ReleaseNotes4.10.3.html" maintainers = ['drbenmorgan'] - version('10.03.p03', sha256='3e0d4d4e6854c8667d930fd5beaec09b7e6ec41f4847935e5d6a2720d0094b30', expand=False) - version('10.04', sha256='f67fb899b99348a1a7e471a05f249f972e7e303c78238fc5f693b99968642255', expand=False) + version('10.6.0') + version('10.5.1') + version('10.4.3') + version('10.4.0') + version('10.3.3') - # geant4@10.03.p03 - depends_on("g4abla@3.0", when='@10.03.p03 ') - depends_on("g4emlow@6.50", when='@10.03.p03 ') - depends_on("g4ndl@4.5", when='@10.03.p03 ') - depends_on("g4neutronxs@1.4", when='@10.03.p03 ') - depends_on("g4saiddata@1.1", when='@10.03.p03 ') - depends_on("g4ensdfstate@2.1", when='@10.03.p03 ') - depends_on("g4photonevaporation@4.3.2", when='@10.03.p03 ') - depends_on("g4pii@1.3", when='@10.03.p03 ') - depends_on("g4radioactivedecay@5.1.1", when='@10.03.p03 ') - depends_on("g4realsurface@1.0", when='@10.03.p03 ') - depends_on("g4tendl@1.3", when='@10.03.p03 ') - # geant4@10.04 - depends_on("g4abla@3.1", when='@10.04 ') - depends_on("g4emlow@7.3", when='@10.04 ') - depends_on("g4ndl@4.5", when='@10.04 ') - depends_on("g4neutronxs@1.4", when='@10.04 ') - depends_on("g4saiddata@1.1", when='@10.04 ') - depends_on("g4ensdfstate@2.2", when='@10.04 ') - depends_on("g4photonevaporation@5.2", when='@10.04 ') - depends_on("g4pii@1.3", when='@10.04 ') - depends_on("g4radioactivedecay@5.2", when='@10.04 ') - depends_on("g4realsurface@2.1", when='@10.04 ') - depends_on("g4tendl@1.3.2", when='@10.04 ') + # Add install phase so we can create the data "view" + phases = ['install'] + + # For clarity, declare deps on a Major-Minor version basis as + # they generally don't change on the patch level + # Can move to declaring on a dataset basis if needed + # geant4@10.6.X + depends_on("g4ndl@4.6", when='@10.6.0') + depends_on("g4emlow@7.9", when='@10.6.0') + depends_on("g4photonevaporation@5.5", when='@10.6.0') + depends_on("g4radioactivedecay@5.4", when='@10.6.0') + depends_on("g4particlexs@2.1", when='@10.6.0') + depends_on("g4pii@1.3", when='@10.6.0') + depends_on("g4realsurface@2.1.1", when='@10.6.0') + depends_on("g4saiddata@2.0", when='@10.6.0') + depends_on("g4abla@3.1", when='@10.6.0') + depends_on("g4incl@1.0", when='@10.6.0') + depends_on("g4ensdfstate@2.2", when='@10.6.0') + + # geant4@10.5.X + depends_on("g4ndl@4.5", when='@10.5.0:10.5.9999') + depends_on("g4emlow@7.7", when='@10.5.0:10.5.9999') + depends_on("g4photonevaporation@5.3", when='@10.5.0:10.5.9999') + depends_on("g4radioactivedecay@5.3", when='@10.5.0:10.5.9999') + depends_on("g4particlexs@1.1", when='@10.5.0:10.5.9999') + depends_on("g4pii@1.3", when='@10.5.0:10.5.9999') + depends_on("g4realsurface@2.1.1", when='@10.5.0:10.5.9999') + depends_on("g4saiddata@2.0", when='@10.5.0:10.5.9999') + depends_on("g4abla@3.1", when='@10.5.0:10.5.9999') + depends_on("g4incl@1.0", when='@10.5.0:10.5.9999') + depends_on("g4ensdfstate@2.2", when='@10.5.0:10.5.9999') + + # geant4@10.4.X + depends_on("g4ndl@4.5", when='@10.4.0:10.4.9999') + depends_on("g4emlow@7.3", when='@10.4.0:10.4.9999') + depends_on("g4photonevaporation@5.2", when='@10.4.0:10.4.9999') + depends_on("g4radioactivedecay@5.2", when='@10.4.0:10.4.9999') + depends_on("g4neutronxs@1.4", when='@10.4.0:10.4.9999') + depends_on("g4pii@1.3", when='@10.4.0:10.4.9999') + + depends_on("g4realsurface@2.1.1", when='@10.4.2:10.4.9999') + depends_on("g4realsurface@2.1", when='@10.4.0:10.4.1') + + depends_on("g4saiddata@1.1", when='@10.4.0:10.4.9999') + depends_on("g4abla@3.1", when='@10.4.0:10.4.9999') + depends_on("g4ensdfstate@2.2", when='@10.4.0:10.4.9999') + + # geant4@10.3.X + depends_on("g4ndl@4.5", when='@10.3.0:10.3.9999') + depends_on("g4emlow@6.50", when='@10.3.0:10.3.9999') + + depends_on("g4photonevaporation@4.3.2", when='@10.3.1:10.3.9999') + depends_on("g4photonevaporation@4.3", when='@10.3.0') + + depends_on("g4radioactivedecay@5.1.1", when='@10.3.1:10.3.9999') + depends_on("g4radioactivedecay@5.1", when='@10.3.0') + + depends_on("g4neutronxs@1.4", when='@10.3.0:10.3.9999') + depends_on("g4pii@1.3", when='@10.3.0:10.3.9999') + depends_on("g4realsurface@1.0", when='@10.3.0:10.3.9999') + depends_on("g4saiddata@1.1", when='@10.3.0:10.3.9999') + depends_on("g4abla@3.0", when='@10.3.0:10.3.9999') + depends_on("g4ensdfstate@2.1", when='@10.3.0:10.3.9999') def install(self, spec, prefix): spec = self.spec - version = self.version - major = version[0] - minor = version[1] - if len(version) > 2: - patch = version[-1] - else: - patch = 0 - data = 'Geant4-%s.%s.%s/data' % (major, minor, patch) + data = '{0}-{1}'.format(self.name, self.version.dotted) datadir = join_path(spec.prefix.share, data) - with working_dir(datadir, create=True): - for d in glob.glob('%s/share/data/*' % - spec['g4abla'].prefix): - os.symlink(d, os.path.basename(d)) - for d in glob.glob('%s/share/data/*' % - spec['g4emlow'].prefix): - os.symlink(d, os.path.basename(d)) - for d in glob.glob('%s/share/data/*' % - spec['g4ndl'].prefix): - os.symlink(d, os.path.basename(d)) - for d in glob.glob('%s/share/data/*' % - spec['g4saiddata'].prefix): - os.symlink(d, os.path.basename(d)) - for d in glob.glob('%s/share/data/*' % - spec['g4neutronxs'].prefix): - os.symlink(d, os.path.basename(d)) - for d in glob.glob('%s/share/data/*' % - spec['g4ensdfstate'].prefix): - os.symlink(d, os.path.basename(d)) - for d in glob.glob('%s/share/data/*' % - spec['g4photonevaporation'].prefix): - os.symlink(d, os.path.basename(d)) - for d in glob.glob('%s/share/data/*' % - spec['g4pii'].prefix): - os.symlink(d, os.path.basename(d)) - for d in glob.glob('%s/share/data/*' % - spec['g4radioactivedecay'].prefix): - os.symlink(d, os.path.basename(d)) - for d in glob.glob('%s/share/data/*' % - spec['g4realsurface'].prefix): - os.symlink(d, os.path.basename(d)) - for d in glob.glob('%s/share/data/*' % - spec['g4tendl'].prefix): - os.symlink(d, os.path.basename(d)) - def url_for_version(self, version): - """Handle version string.""" - url = 'http://geant4-data.web.cern.ch/geant4-data/ReleaseNotes/' - url = url + 'ReleaseNotes4.{0}.{1}.html'.format(version[0], version[1]) - return url + with working_dir(datadir, create=True): + for s in spec.dependencies(): + for d in glob.glob('{0}/data/*'.format(s.prefix.share)): + os.symlink(d, os.path.basename(d)) diff --git a/var/spack/repos/builtin/packages/geant4/geant4-10.4.3-cxx17-removed-features.patch b/var/spack/repos/builtin/packages/geant4/geant4-10.4.3-cxx17-removed-features.patch new file mode 100644 index 00000000000..a4938876794 --- /dev/null +++ b/var/spack/repos/builtin/packages/geant4/geant4-10.4.3-cxx17-removed-features.patch @@ -0,0 +1,18 @@ +diff --git a/cmake/Modules/G4BuildSettings.cmake b/cmake/Modules/G4BuildSettings.cmake +index f68cb0a44..6bf4b6948 100644 +--- a/cmake/Modules/G4BuildSettings.cmake ++++ b/cmake/Modules/G4BuildSettings.cmake +@@ -205,6 +205,13 @@ endif() + # Add Definition to flags for temporary back compatibility + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DG4USE_STD11") + ++# Spack patch to support use of C++ features deprecated/removed in C++17 ++# Only checked on AppleClang for now ++if(GEANT4_BUILD_CXXSTD GREATER 14) ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES=1") ++endif() ++#---- ++ + # Hold any appropriate compile flag(s) in variable for later export to + # config files. Needed to support clients using late CMake 2.8 where compile features + # are not available. diff --git a/var/spack/repos/builtin/packages/geant4/package.py b/var/spack/repos/builtin/packages/geant4/package.py index f3bcb121f60..4bf35792aac 100644 --- a/var/spack/repos/builtin/packages/geant4/package.py +++ b/var/spack/repos/builtin/packages/geant4/package.py @@ -4,8 +4,6 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * -import os -import glob class Geant4(CMakePackage): @@ -15,84 +13,113 @@ class Geant4(CMakePackage): science.""" homepage = "http://geant4.cern.ch/" - url = "http://geant4.cern.ch/support/source/geant4.10.01.p03.tar.gz" + url = "https://gitlab.cern.ch/geant4/geant4/-/archive/v10.6.0/geant4-v10.6.0.tar.gz" maintainers = ['drbenmorgan'] - version('10.05.p01', sha256='f4a292220500fad17e0167ce3153e96e3410ecbe96284e572dc707f63523bdff') - version('10.04', sha256='f6d883132f110eb036c69da2b21df51f13c585dc7b99d4211ddd32f4ccee1670') - version('10.03.p03', sha256='a164f49c038859ab675eec474d08c9d02be8c4be9c0c2d3aa8e69adf89e1e138') + version('10.6.0', sha256='eebe6a170546064ff81ab3b00f513ccd1d4122a026514982368d503ac55a4ee4') + version('10.5.1', sha256='2397eb859dc4de095ff66059d8bda9f060fdc42e10469dd7890946293eeb0e39') + version('10.4.3', sha256='67f3bb6405a2c77e573936c2b933f5a4a33915aa379626a2eb3012009b91e1da') + version('10.4.0', sha256='e919b9b0a88476e00c0b18ab65d40e6a714b55ee4778f66bac32a5396c22aa74') + version('10.3.3', sha256='bcd36a453da44de9368d1d61b0144031a58e4b43a6d2d875e19085f2700a89d8') - variant('qt', default=False, description='Enable Qt support') + _cxxstd_values = ('11', '14', '17') + variant('cxxstd', + default=_cxxstd_values[0], + values=_cxxstd_values, + multi=False, + description='Use the specified C++ standard when building.') + + variant('threads', default=True, description='Build with multithreading') variant('vecgeom', default=False, description='Enable vecgeom support') variant('opengl', default=False, description='Optional OpenGL support') variant('x11', default=False, description='Optional X11 support') variant('motif', default=False, description='Optional motif support') - variant('threads', default=True, description='Build with multithreading') - variant('data', default=True, description='Install geant4 data') - - variant('cxxstd', - default='11', - values=('11', '14', '17'), - multi=False, - description='Use the specified C++ standard when building.') + variant('qt', default=False, description='Enable Qt support') depends_on('cmake@3.5:', type='build') + depends_on('cmake@3.8:', type='build', when='@10.6.0:') - # C++11 support - depends_on("xerces-c cxxstd=11", when="cxxstd=11") - depends_on("clhep@2.3.3.0: cxxstd=11", when="@10.03.p03: cxxstd=11") - depends_on("vecgeom cxxstd=11", when="+vecgeom cxxstd=11") - - # C++14 support - depends_on("xerces-c cxxstd=14", when="cxxstd=14") - depends_on("clhep@2.3.3.0: cxxstd=14", when="@10.03.p03: cxxstd=14") - depends_on("vecgeom cxxstd=14", when="+vecgeom cxxstd=14") - - # C++17 support - depends_on("xerces-c cxxstd=17", when="cxxstd=17") - depends_on("clhep@2.3.3.0: cxxstd=17", when="@10.03.p03: cxxstd=17") - patch('cxx17.patch', when='@:10.03.p99 cxxstd=17') - patch('cxx17_geant4_10_0.patch', level=1, when='@10.04.00: cxxstd=17') - depends_on("vecgeom cxxstd=17", when="+vecgeom cxxstd=17") + depends_on('geant4-data@10.6.0', when='@10.6.0') + depends_on('geant4-data@10.5.1', when='@10.5.1') + depends_on('geant4-data@10.4.3', when='@10.4.3') + depends_on('geant4-data@10.4.0', when='@10.4.0') + depends_on('geant4-data@10.3.3', when='@10.3.3') depends_on("expat") depends_on("zlib") + + for std in _cxxstd_values: + # CLHEP version requirements to be reviewed + depends_on('clhep@2.3.3.0: cxxstd=' + std, + when='@10.3.3: cxxstd=' + std) + + # Spack only supports Xerces-c 3 and above, so no version req + depends_on('xerces-c cxxstd=' + std, when='cxxstd=' + std) + + # Vecgeom specific versions for each Geant4 version + depends_on('vecgeom@1.1.5 cxxstd=' + std, + when='@10.6.0:10.6.99 +vecgeom cxxstd=' + std) + depends_on('vecgeom@1.1.0 cxxstd=' + std, + when='@10.5.0:10.5.99 +vecgeom cxxstd=' + std) + depends_on('vecgeom@0.5.2 cxxstd=' + std, + when='@10.4.0:10.4.99 +vecgeom cxxstd=' + std) + depends_on('vecgeom@0.3rc cxxstd=' + std, + when='@10.3.0:10.3.99 +vecgeom cxxstd=' + std) + + # Visualization driver ependencies depends_on("gl", when='+opengl') depends_on("glx", when='+opengl+x11') depends_on("libx11", when='+x11') depends_on("libxmu", when='+x11') depends_on("motif", when='+motif') - depends_on("qt@4.8:", when="+qt") - - # if G4 data not installed with geant4 - # depend on G4 data packages - # this allows external data installations - # to avoid duplication - - depends_on('geant4-data@10.03.p03', when='@10.03.p03 ~data') - depends_on('geant4-data@10.04', when='@10.04 ~data') - depends_on('geant4-data@10.05.p01', when='@10.05.p01 ~data') + depends_on("qt@5:", when="+qt") # As released, 10.03.03 has issues with respect to using external # CLHEP. - patch('CLHEP-10.03.03.patch', level=1, when='@10.03.p03') + patch('CLHEP-10.03.03.patch', level=1, when='@10.3.3') + # These patches can be applied independent of the cxxstd value? + patch('cxx17.patch', when='@:10.3.99 cxxstd=17') + patch('cxx17_geant4_10_0.patch', level=1, when='@10.4.0 cxxstd=17') + patch('geant4-10.4.3-cxx17-removed-features.patch', + level=1, when='@10.4.3 cxxstd=17') def cmake_args(self): spec = self.spec + # Core options options = [ - '-DGEANT4_USE_GDML=ON', + '-DGEANT4_BUILD_CXXSTD=c++{0}'.format( + self.spec.variants['cxxstd'].value), '-DGEANT4_USE_SYSTEM_CLHEP=ON', - '-DGEANT4_USE_SYSTEM_CLHEP_GRANULAR=ON', - '-DGEANT4_USE_G3TOG4=ON', - '-DGEANT4_INSTALL_DATA=ON', - '-DGEANT4_BUILD_TLS_MODEL=global-dynamic', '-DGEANT4_USE_SYSTEM_EXPAT=ON', '-DGEANT4_USE_SYSTEM_ZLIB=ON', - '-DXERCESC_ROOT_DIR:STRING=%s' % - spec['xerces-c'].prefix, ] + '-DGEANT4_USE_G3TOG4=ON', + '-DGEANT4_USE_GDML=ON', + '-DXERCESC_ROOT_DIR={0}'.format(spec['xerces-c'].prefix) + ] + # Multithreading + options.append(self.define_from_variant('GEANT4_BUILD_MULTITHREADED', + 'threads')) + if '+threads' in spec: + # This should be a variant + options.append('-DGEANT4_BUILD_TLS_MODEL=global-dynamic') + + # install the data with geant4 + datadir = spec['geant4-data'].prefix.share + dataver = '{0}-{1}'.format(spec['geant4-data'].name, + spec['geant4-data'].version.dotted) + datapath = join_path(datadir, dataver) + options.append('-DGEANT4_INSTALL_DATADIR={0}'.format(datapath)) + + # Vecgeom + if '+vecgeom' in spec: + options.append('-DGEANT4_USE_USOLIDS=ON') + options.append('-DUSolids_DIR=%s' % spec[ + 'vecgeom'].prefix.lib.CMake.USolids) + + # Visualization options if 'platform=darwin' not in spec: if "+x11" in spec and "+opengl" in spec: options.append('-DGEANT4_USE_OPENGL_X11=ON') @@ -101,61 +128,10 @@ def cmake_args(self): if "+x11" in spec: options.append('-DGEANT4_USE_RAYTRACER_X11=ON') - options.append('-DGEANT4_BUILD_CXXSTD=c++{0}'.format( - self.spec.variants['cxxstd'].value)) - if '+qt' in spec: options.append('-DGEANT4_USE_QT=ON') options.append( '-DQT_QMAKE_EXECUTABLE=%s' % spec['qt'].prefix.bin.qmake) - if '+vecgeom' in spec: - options.append('-DGEANT4_USE_USOLIDS=ON') - options.append('-DUSolids_DIR=%s' % spec[ - 'vecgeom'].prefix.lib.CMake.USolids) - - on_or_off = lambda opt: 'ON' if '+' + opt in spec else 'OFF' - options.append('-DGEANT4_BUILD_MULTITHREADED=' + on_or_off('threads')) - - # install the data with geant4 - options.append('-DGEANT4_INSTALL_DATA=' + on_or_off('data')) - return options - - def url_for_version(self, version): - """Handle Geant4's unusual version string.""" - return ("http://geant4.cern.ch/support/source/geant4.%s.tar.gz" % version) - - @run_before('cmake') - def make_data_links(self): - if '+data' in self.spec: - return - spec = self.spec - version = self.version - major = version[0] - minor = version[1] - if len(version) > 2: - patch = version[-1] - else: - patch = 0 - datadir = 'Geant4-%s.%s.%s/data' % (major, minor, patch) - with working_dir(join_path(spec.prefix.share, datadir), - create=True): - dirs = glob.glob('%s/%s/*' % - (spec['geant4-data'].prefix.share, datadir)) - for d in dirs: - target = os.readlink(d) - os.symlink(target, os.path.basename(target)) - - def setup_dependent_build_environment(self, env, dependent_spec): - version = self.version - major = version[0] - minor = version[1] - if len(version) > 2: - patch = version[-1] - else: - patch = 0 - datadir = 'Geant4-%s.%s.%s' % (major, minor, patch) - env.append_path('CMAKE_MODULE_PATH', join_path( - self.prefix.lib64, datadir, 'Modules')) diff --git a/var/spack/repos/builtin/packages/vecgeom/package.py b/var/spack/repos/builtin/packages/vecgeom/package.py index 2e28586ef63..20352f77123 100644 --- a/var/spack/repos/builtin/packages/vecgeom/package.py +++ b/var/spack/repos/builtin/packages/vecgeom/package.py @@ -21,6 +21,7 @@ class Vecgeom(CMakePackage, CudaPackage): version('1.1.6', sha256='c4806a6b67d01b40074b8cc6865d78574a6a1c573be51696f2ecdf98b9cb954a') version('1.1.5', sha256='da674f3bbc75c30f56c1a2d251fa8930c899f27fa64b03a36569924030d87b95') version('1.1.3', sha256='ada09e8b6b2fa6c058290302b2cb5a6c2e644192aab1623c31d18c6a2f4c01c8') + version('1.1.0', sha256='e9d1ef83ff591fe4f9ef744a4d3155a3dc7e90ddb6735b24f3afe4c2dc3f7064') version('1.0.1', sha256='1eae7ac9014c608e8d8db5568058b8c0fea1a1dc7a8f54157a3a1c997b6fd9eb') version('0.5.2', tag='v00.05.02', commit='a7e0828c915ff936a79e672d1dd84b087a323b51') From 7357b7023eb9c062ceb8febd0cce9db2f7f27ab3 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Tue, 31 Mar 2020 16:49:25 +0200 Subject: [PATCH 078/138] Update link for codecov's browser extensions (#15779) --- lib/spack/docs/contribution_guide.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spack/docs/contribution_guide.rst b/lib/spack/docs/contribution_guide.rst index 0b79141ee37..9935ec0c83a 100644 --- a/lib/spack/docs/contribution_guide.rst +++ b/lib/spack/docs/contribution_guide.rst @@ -385,8 +385,8 @@ coverage. This helps us tell what percentage of lines of code in Spack are covered by unit tests. Although code covered by unit tests can still contain bugs, it is much less error prone than code that is not covered by unit tests. -Codecov provides `browser extensions `_ -for Google Chrome, Firefox, and Opera. These extensions integrate with GitHub +Codecov provides `browser extensions `_ +for Google Chrome and Firefox. These extensions integrate with GitHub and allow you to see coverage line-by-line when viewing the Spack repository. If you are new to Spack, a great way to get started is to write unit tests to increase coverage! From 663c3d21b55165be2019ddeb2262d490012c13b3 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 31 Mar 2020 12:08:26 -0500 Subject: [PATCH 079/138] JasPer: add 2.0.16 (#15781) --- var/spack/repos/builtin/packages/jasper/package.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/jasper/package.py b/var/spack/repos/builtin/packages/jasper/package.py index f8351bbbc63..9599aec8f4f 100644 --- a/var/spack/repos/builtin/packages/jasper/package.py +++ b/var/spack/repos/builtin/packages/jasper/package.py @@ -10,13 +10,11 @@ class Jasper(Package): """Library for manipulating JPEG-2000 images""" homepage = "https://www.ece.uvic.ca/~frodo/jasper/" - url = "https://www.ece.uvic.ca/~frodo/jasper/software/jasper-2.0.14.tar.gz" - list_url = homepage + url = "https://github.com/mdadams/jasper/archive/version-2.0.16.tar.gz" - version('2.0.14', sha256='2a1f61e55afe8b4ce8115e1508c5d7cb314d56dfcc2dd323f90c072f88ccf57b', - url="https://www.ece.uvic.ca/~frodo/jasper/software/jasper-2.0.14.tar.gz") - version('1.900.1', sha256='6b905a9c2aca2e275544212666eefc4eb44d95d0a57e4305457b407fe63f9494', - url="https://www.ece.uvic.ca/~frodo/jasper/software/jasper-1.900.1.zip") + version('2.0.16', sha256='f1d8b90f231184d99968f361884e2054a1714fdbbd9944ba1ae4ebdcc9bbfdb1') + version('2.0.14', sha256='85266eea728f8b14365db9eaf1edc7be4c348704e562bb05095b9a077cf1a97b') + version('1.900.1', sha256='c2b03f28166f9dc8ae434918839ae9aa9962b880fcfd24eebddd0a2daeb9192c') variant('jpeg', default=True, description='Enable the use of the JPEG library') variant('opengl', default=False, description='Enable the use of the OpenGL and GLUT libraries') From 25a65638ff19119dcb04db784170eaa44d545a8e Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 31 Mar 2020 13:02:20 -0500 Subject: [PATCH 080/138] autoconf-archive: add new package (#15782) --- .../builtin/packages/autoconf-archive/package.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 var/spack/repos/builtin/packages/autoconf-archive/package.py diff --git a/var/spack/repos/builtin/packages/autoconf-archive/package.py b/var/spack/repos/builtin/packages/autoconf-archive/package.py new file mode 100644 index 00000000000..91e89d46e9b --- /dev/null +++ b/var/spack/repos/builtin/packages/autoconf-archive/package.py @@ -0,0 +1,14 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + + +class AutoconfArchive(AutotoolsPackage, GNUMirrorPackage): + """The GNU Autoconf Archive is a collection of more than 500 macros for + GNU Autoconf.""" + + homepage = "https://www.gnu.org/software/autoconf-archive/" + gnu_mirror_path = "autoconf-archive/autoconf-archive-2019.01.06.tar.xz" + + version('2019.01.06', sha256='17195c833098da79de5778ee90948f4c5d90ed1a0cf8391b4ab348e2ec511e3f') From 87481609845310c3cb2a7bc324beeffe1c38f4b3 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 31 Mar 2020 15:44:17 -0500 Subject: [PATCH 081/138] GMT: add 6.0.0 (#15785) --- .../repos/builtin/packages/gmt/package.py | 88 ++++++++++++++++--- 1 file changed, 75 insertions(+), 13 deletions(-) diff --git a/var/spack/repos/builtin/packages/gmt/package.py b/var/spack/repos/builtin/packages/gmt/package.py index b9bb7b71d98..003c0d24be1 100644 --- a/var/spack/repos/builtin/packages/gmt/package.py +++ b/var/spack/repos/builtin/packages/gmt/package.py @@ -14,34 +14,49 @@ class Gmt(Package): contour maps to artificially illuminated surfaces and 3D perspective views. """ - homepage = "http://gmt.soest.hawaii.edu/" - url = "https://github.com/GenericMappingTools/gmt/archive/5.4.4.tar.gz" + homepage = "https://www.generic-mapping-tools.org/" + url = "https://github.com/GenericMappingTools/gmt/archive/6.0.0.tar.gz" + git = "https://github.com/GenericMappingTools/gmt.git" + maintainers = ['adamjstewart'] + + version('master', branch='master') + version('6.0.0', sha256='7a733e670f01d99f8fc0da51a4337320d764c06a68746621f83ccf2e3453bcb7') version('5.4.4', sha256='b593dfb101e6507c467619f3d2190a9f78b09d49fe2c27799750b8c4c0cd2da0') version('4.5.9', sha256='9b13be96ccf4bbd38c14359c05dfa7eeeb4b5f06d6f4be9c33d6c3ea276afc86', url='ftp://ftp.soest.hawaii.edu/gmt/legacy/gmt-4.5.9.tar.bz2') - variant('pcre', default=False, description='Enable the PCRE interface') - variant('gdal', default=False, description='Enable the GDAL interface') - variant('fftw', default=True, description='Fast FFTs') - variant('lapack', default=True, description='Fast matrix inversion') - variant('blas', default=True, description='Fast matrix multiplications') + variant('ghostscript', default=False, description='Ability to convert PostScript plots to PDF and rasters') + variant('gdal', default=False, description='Ability to read and write numerous grid and image formats') + variant('pcre', default=False, description='Regular expression support') + variant('fftw', default=False, description='Fast FFTs') + variant('glib', default=False, description='GTHREAD support') + variant('lapack', default=False, description='Fast matrix inversion') + variant('blas', default=False, description='Fast matrix multiplications') + variant('graphicsmagick', default=False, description='Convert images to animated GIFs') + variant('ffmpeg', default=False, description='Convert images to videos') + variant('docs', default=False, description='Build manpage and HTML documentation') - # http://gmt.soest.hawaii.edu/projects/gmt/wiki/BuildingGMT + # https://github.com/GenericMappingTools/gmt/blob/master/BUILDING.md + # https://github.com/GenericMappingTools/gmt/blob/master/MAINTENANCE.md # Required dependencies - depends_on('ghostscript') - depends_on('subversion') - depends_on('cmake@2.8.5:', type='build', when='@5:') + depends_on('cmake@2.8.7:', type='build', when='@5:') depends_on('netcdf-c@4:') depends_on('curl', when='@5.4:') # Optional dependencies - depends_on('pcre', when='+pcre') + depends_on('ghostscript', when='+ghostscript') depends_on('gdal', when='+gdal') + depends_on('pcre', when='+pcre') depends_on('fftw', when='+fftw') + depends_on('glib', when='+glib') depends_on('lapack', when='+lapack') depends_on('blas', when='+blas') + depends_on('graphicsmagick', when='+graphicsmagick') + depends_on('ffmpeg', when='+ffmpeg') + depends_on('py-sphinx@1.4:', when='+docs', type='build') + depends_on('graphicsmagick', type='test') patch('type.patch', when='@4.5.9') @@ -49,9 +64,56 @@ class Gmt(Package): @when('@5:') def install(self, spec, prefix): with working_dir('spack-build', create=True): - cmake('..', *std_cmake_args) + args = std_cmake_args + + args.extend([ + '-DNETCDF_CONFIG={0}'.format( + spec['netcdf-c'].prefix.bin.join('nc-config')), + '-DNETCDF_INCLUDE_DIR={0}'.format( + spec['netcdf-c'].headers.directories[0]), + '-DNETCDF_LIBRARY={0}'.format( + spec['netcdf-c'].libs[0]) + ]) + + # If these options aren't explicitly disabled, + # CMake will search OS for dependencies + if '+ghostscript' in spec: + args.append('-DGS={0}'.format( + spec['ghostscript'].prefix.bin.gs)) + else: + args.append('-DGS=') + + if '+gdal' in spec: + args.extend([ + '-DGDAL_TRANSLATE={0}'.format( + spec['gdal'].prefix.bin.gdal_translate), + '-DOGR2OGR={0}'.format( + spec['gdal'].prefix.bin.ogr2ogr), + ]) + else: + args.extend(['-DGDAL_TRANSLATE=', '-DOGR2OGR=']) + + if 'graphicsmagick' in spec: + args.extend([ + '-DGM={0}'.format( + spec['graphicsmagick'].prefix.bin.gm), + '-DGRAPHICSMAGICK={0}'.format( + spec['graphicsmagick'].prefix.bin.gm), + ]) + else: + args.extend(['-DGM=', '-DGRAPHICSMAGICK=']) + + if '+ffmpeg' in spec: + args.append('-DFFMPEG={0}'.format( + spec['ffmpeg'].prefix.bin.ffmpeg)) + else: + args.append('-DFFMPEG=') + + cmake('..', *args) make() + if self.run_tests: + make('check') make('install') @when('@:4') From 336191c25145823be104011fda23651e6e6aa723 Mon Sep 17 00:00:00 2001 From: Greg Becker Date: Tue, 31 Mar 2020 16:09:08 -0700 Subject: [PATCH 082/138] packages.yaml: allow virtuals to specify buildable: false (#14934) Currently, to force Spack to use an external MPI, you have to specify `buildable: False` for every MPI provider in Spack in your packages.yaml file. This is both tedious and fragile, as new MPI providers can be added and break your workflow when you do a git pull. This PR allows you to specify an entire virtual dependency as non-buildable, and specify particular implementations to be built: ``` packages: all: providers: mpi: [mpich] mpi: buildable: false paths: mpich@3.2 %gcc@7.3.0: /usr/packages/mpich-3.2-gcc-7.3.0 ``` will force all Spack builds to use the specified `mpich` install. --- lib/spack/docs/build_settings.rst | 33 ++++++++ lib/spack/spack/package.py | 8 ++ lib/spack/spack/package_prefs.py | 78 ++++++------------ .../spack/test/concretize_preferences.py | 59 ++++++------- lib/spack/spack/test/conftest.py | 7 ++ lib/spack/spack/test/mirror.py | 82 +++++++++---------- lib/spack/spack/test/module_parsing.py | 30 ++----- lib/spack/spack/test/spec_dag.py | 2 - lib/spack/spack/util/module_cmd.py | 9 +- 9 files changed, 155 insertions(+), 153 deletions(-) diff --git a/lib/spack/docs/build_settings.rst b/lib/spack/docs/build_settings.rst index b141f2b717c..cfd850af28a 100644 --- a/lib/spack/docs/build_settings.rst +++ b/lib/spack/docs/build_settings.rst @@ -124,6 +124,39 @@ The ``buildable`` does not need to be paired with external packages. It could also be used alone to forbid packages that may be buggy or otherwise undesirable. +Virtual packages in Spack can also be specified as not buildable, and +external implementations can be provided. In the example above, +OpenMPI is configured as not buildable, but Spack will often prefer +other MPI implementations over the externally available OpenMPI. Spack +can be configured with every MPI provider not buildable individually, +but more conveniently: + +.. code-block:: yaml + + packages: + mpi: + buildable: False + openmpi: + paths: + openmpi@1.4.3%gcc@4.4.7 arch=linux-debian7-x86_64: /opt/openmpi-1.4.3 + openmpi@1.4.3%gcc@4.4.7 arch=linux-debian7-x86_64+debug: /opt/openmpi-1.4.3-debug + openmpi@1.6.5%intel@10.1 arch=linux-debian7-x86_64: /opt/openmpi-1.6.5-intel + +Implementations can also be listed immediately under the virtual they provide: + +.. code-block:: yaml + + packages: + mpi: + buildable: False + openmpi@1.4.3%gcc@4.4.7 arch=linux-debian7-x86_64: /opt/openmpi-1.4.3 + openmpi@1.4.3%gcc@4.4.7 arch=linux-debian7-x86_64+debug: /opt/openmpi-1.4.3-debug + openmpi@1.6.5%intel@10.1 arch=linux-debian7-x86_64: /opt/openmpi-1.6.5-intel + mpich@3.3 %clang@9.0.0 arch=linux-debian7-x86_64: /opt/mpich-3.3-intel + +Spack can then use any of the listed external implementations of MPI +to satisfy a dependency, and will choose depending on the compiler and +architecture. .. _concretization-preferences: diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py index 9156d7d0dd3..b8ded0364b3 100644 --- a/lib/spack/spack/package.py +++ b/lib/spack/spack/package.py @@ -1035,6 +1035,14 @@ def provides(self, vpkg_name): for s, constraints in self.provided.items() if s.name == vpkg_name ) + @property + def virtuals_provided(self): + """ + virtual packages provided by this package with its spec + """ + return [vspec for vspec, constraints in self.provided.items() + if any(self.spec.satisfies(c) for c in constraints)] + @property def installed(self): """Installation status of a package. diff --git a/lib/spack/spack/package_prefs.py b/lib/spack/spack/package_prefs.py index 2801a6d1230..0158c7063a6 100644 --- a/lib/spack/spack/package_prefs.py +++ b/lib/spack/spack/package_prefs.py @@ -6,7 +6,6 @@ import stat from six import string_types -from six import iteritems import spack.repo import spack.error @@ -23,27 +22,6 @@ def _spec_type(component): return _lesser_spec_types.get(component, spack.spec.Spec) -def get_packages_config(): - """Wrapper around get_packages_config() to validate semantics.""" - config = spack.config.get('packages') - - # Get a list of virtuals from packages.yaml. Note that because we - # check spack.repo, this collects virtuals that are actually provided - # by sometihng, not just packages/names that don't exist. - # So, this won't include, e.g., 'all'. - virtuals = [(pkg_name, pkg_name._start_mark) for pkg_name in config - if spack.repo.path.is_virtual(pkg_name)] - - # die if there are virtuals in `packages.py` - if virtuals: - errors = ["%s: %s" % (line_info, name) for name, line_info in virtuals] - raise VirtualInPackagesYAMLError( - "packages.yaml entries cannot be virtual packages:", - '\n'.join(errors)) - - return config - - class PackagePrefs(object): """Defines the sort order for a set of specs. @@ -116,7 +94,7 @@ def order_for_package(cls, pkgname, component, vpkg=None, all=True): pkglist.append('all') for pkg in pkglist: - pkg_entry = get_packages_config().get(pkg) + pkg_entry = spack.config.get('packages').get(pkg) if not pkg_entry: continue @@ -160,7 +138,8 @@ def has_preferred_targets(cls, pkg_name): def preferred_variants(cls, pkg_name): """Return a VariantMap of preferred variants/values for a spec.""" for pkg in (pkg_name, 'all'): - variants = get_packages_config().get(pkg, {}).get('variants', '') + variants = spack.config.get('packages').get(pkg, {}).get( + 'variants', '') if variants: break @@ -181,33 +160,29 @@ def spec_externals(spec): # break circular import. from spack.util.module_cmd import get_path_from_module # NOQA: ignore=F401 - allpkgs = get_packages_config() - name = spec.name + allpkgs = spack.config.get('packages') + names = set([spec.name]) + names |= set(vspec.name for vspec in spec.package.virtuals_provided) external_specs = [] - pkg_paths = allpkgs.get(name, {}).get('paths', None) - pkg_modules = allpkgs.get(name, {}).get('modules', None) - if (not pkg_paths) and (not pkg_modules): - return [] - - for external_spec, path in iteritems(pkg_paths): - if not path: - # skip entries without paths (avoid creating extra Specs) + for name in names: + pkg_config = allpkgs.get(name, {}) + pkg_paths = pkg_config.get('paths', {}) + pkg_modules = pkg_config.get('modules', {}) + if (not pkg_paths) and (not pkg_modules): continue - external_spec = spack.spec.Spec(external_spec, - external_path=canonicalize_path(path)) - if external_spec.satisfies(spec): - external_specs.append(external_spec) + for external_spec, path in pkg_paths.items(): + external_spec = spack.spec.Spec( + external_spec, external_path=canonicalize_path(path)) + if external_spec.satisfies(spec): + external_specs.append(external_spec) - for external_spec, module in iteritems(pkg_modules): - if not module: - continue - - external_spec = spack.spec.Spec( - external_spec, external_module=module) - if external_spec.satisfies(spec): - external_specs.append(external_spec) + for external_spec, module in pkg_modules.items(): + external_spec = spack.spec.Spec( + external_spec, external_module=module) + if external_spec.satisfies(spec): + external_specs.append(external_spec) # defensively copy returned specs return [s.copy() for s in external_specs] @@ -215,12 +190,11 @@ def spec_externals(spec): def is_spec_buildable(spec): """Return true if the spec pkgspec is configured as buildable""" - allpkgs = get_packages_config() - if spec.name not in allpkgs: - return True - if 'buildable' not in allpkgs[spec.name]: - return True - return allpkgs[spec.name]['buildable'] + allpkgs = spack.config.get('packages') + do_not_build = [name for name, entry in allpkgs.items() + if not entry.get('buildable', True)] + return not (spec.name in do_not_build or + any(spec.package.provides(name) for name in do_not_build)) def get_package_dir_permissions(spec): diff --git a/lib/spack/spack/test/concretize_preferences.py b/lib/spack/spack/test/concretize_preferences.py index 81b5360869c..922d5a11d87 100644 --- a/lib/spack/spack/test/concretize_preferences.py +++ b/lib/spack/spack/test/concretize_preferences.py @@ -185,34 +185,6 @@ def test_develop(self): spec.concretize() assert spec.version == Version('0.2.15.develop') - def test_no_virtuals_in_packages_yaml(self): - """Verify that virtuals are not allowed in packages.yaml.""" - - # set up a packages.yaml file with a vdep as a key. We use - # syaml.load_config here to make sure source lines in the config are - # attached to parsed strings, as the error message uses them. - conf = syaml.load_config("""\ -mpi: - paths: - mpi-with-lapack@2.1: /path/to/lapack -""") - spack.config.set('packages', conf, scope='concretize') - - # now when we get the packages.yaml config, there should be an error - with pytest.raises(spack.package_prefs.VirtualInPackagesYAMLError): - spack.package_prefs.get_packages_config() - - def test_all_is_not_a_virtual(self): - """Verify that `all` is allowed in packages.yaml.""" - conf = syaml.load_config("""\ -all: - variants: [+mpi] -""") - spack.config.set('packages', conf, scope='concretize') - - # should be no error for 'all': - spack.package_prefs.get_packages_config() - def test_external_mpi(self): # make sure this doesn't give us an external first. spec = Spec('mpi') @@ -236,6 +208,37 @@ def test_external_mpi(self): spec.concretize() assert spec['mpich'].external_path == '/dummy/path' + def test_external_module(self, monkeypatch): + """Test that packages can find externals specified by module + + The specific code for parsing the module is tested elsewhere. + This just tests that the preference is accounted for""" + # make sure this doesn't give us an external first. + def mock_module(cmd, module): + return 'prepend-path PATH /dummy/path' + monkeypatch.setattr(spack.util.module_cmd, 'module', mock_module) + + spec = Spec('mpi') + spec.concretize() + assert not spec['mpi'].external + + # load config + conf = syaml.load_config("""\ +all: + providers: + mpi: [mpich] +mpi: + buildable: false + modules: + mpich@3.0.4: dummy +""") + spack.config.set('packages', conf, scope='concretize') + + # ensure that once config is in place, external is used + spec = Spec('mpi') + spec.concretize() + assert spec['mpich'].external_path == '/dummy/path' + def test_config_permissions_from_all(self, configure_permissions): # Although these aren't strictly about concretization, they are # configured in the same file and therefore convenient to test here. diff --git a/lib/spack/spack/test/conftest.py b/lib/spack/spack/test/conftest.py index a1864639070..8912c0219b7 100644 --- a/lib/spack/spack/test/conftest.py +++ b/lib/spack/spack/test/conftest.py @@ -1040,6 +1040,13 @@ def __init__(self, name, dependencies, dependency_types, conditions=None, self.conflicts = {} self.patches = {} + def provides(self, vname): + return vname in self.provided + + @property + def virtuals_provided(self): + return [v.name for v, c in self.provided] + class MockPackageMultiRepo(object): def __init__(self, packages): diff --git a/lib/spack/spack/test/mirror.py b/lib/spack/spack/test/mirror.py index 570c329b717..05cf46dc200 100644 --- a/lib/spack/spack/test/mirror.py +++ b/lib/spack/spack/test/mirror.py @@ -52,52 +52,52 @@ def check_mirror(): mirror_root = os.path.join(stage.path, 'test-mirror') # register mirror with spack config mirrors = {'spack-mirror-test': 'file://' + mirror_root} - spack.config.set('mirrors', mirrors) - with spack.config.override('config:checksum', False): - specs = [Spec(x).concretized() for x in repos] - spack.mirror.create(mirror_root, specs) - - # Stage directory exists - assert os.path.isdir(mirror_root) - - for spec in specs: - fetcher = spec.package.fetcher[0] - per_package_ref = os.path.join( - spec.name, '-'.join([spec.name, str(spec.version)])) - mirror_paths = spack.mirror.mirror_archive_paths( - fetcher, - per_package_ref) - expected_path = os.path.join( - mirror_root, mirror_paths.storage_path) - assert os.path.exists(expected_path) - - # Now try to fetch each package. - for name, mock_repo in repos.items(): - spec = Spec(name).concretized() - pkg = spec.package - + with spack.config.override('mirrors', mirrors): with spack.config.override('config:checksum', False): - with pkg.stage: - pkg.do_stage(mirror_only=True) + specs = [Spec(x).concretized() for x in repos] + spack.mirror.create(mirror_root, specs) - # Compare the original repo with the expanded archive - original_path = mock_repo.path - if 'svn' in name: - # have to check out the svn repo to compare. - original_path = os.path.join( - mock_repo.path, 'checked_out') + # Stage directory exists + assert os.path.isdir(mirror_root) - svn = which('svn', required=True) - svn('checkout', mock_repo.url, original_path) + for spec in specs: + fetcher = spec.package.fetcher[0] + per_package_ref = os.path.join( + spec.name, '-'.join([spec.name, str(spec.version)])) + mirror_paths = spack.mirror.mirror_archive_paths( + fetcher, + per_package_ref) + expected_path = os.path.join( + mirror_root, mirror_paths.storage_path) + assert os.path.exists(expected_path) - dcmp = filecmp.dircmp( - original_path, pkg.stage.source_path) + # Now try to fetch each package. + for name, mock_repo in repos.items(): + spec = Spec(name).concretized() + pkg = spec.package - # make sure there are no new files in the expanded - # tarball - assert not dcmp.right_only - # and that all original files are present. - assert all(l in exclude for l in dcmp.left_only) + with spack.config.override('config:checksum', False): + with pkg.stage: + pkg.do_stage(mirror_only=True) + + # Compare the original repo with the expanded archive + original_path = mock_repo.path + if 'svn' in name: + # have to check out the svn repo to compare. + original_path = os.path.join( + mock_repo.path, 'checked_out') + + svn = which('svn', required=True) + svn('checkout', mock_repo.url, original_path) + + dcmp = filecmp.dircmp( + original_path, pkg.stage.source_path) + + # make sure there are no new files in the expanded + # tarball + assert not dcmp.right_only + # and that all original files are present. + assert all(l in exclude for l in dcmp.left_only) def test_url_mirror(mock_archive): diff --git a/lib/spack/spack/test/module_parsing.py b/lib/spack/spack/test/module_parsing.py index bbe18b1ad05..0bf485913f5 100644 --- a/lib/spack/spack/test/module_parsing.py +++ b/lib/spack/spack/test/module_parsing.py @@ -20,28 +20,11 @@ 'setenv LDFLAGS -L/path/to/lib', 'prepend-path PATH /path/to/bin'] - -@pytest.fixture -def module_function_test_mode(): - old_mode = spack.util.module_cmd._test_mode - spack.util.module_cmd._test_mode = True - - yield - - spack.util.module_cmd._test_mode = old_mode +_test_template = "'. %s 2>&1' % args[1]" -@pytest.fixture -def save_module_func(): - old_func = spack.util.module_cmd.module - - yield - - spack.util.module_cmd.module = old_func - - -def test_module_function_change_env(tmpdir, working_env, - module_function_test_mode): +def test_module_function_change_env(tmpdir, working_env, monkeypatch): + monkeypatch.setattr(spack.util.module_cmd, '_cmd_template', _test_template) src_file = str(tmpdir.join('src_me')) with open(src_file, 'w') as f: f.write('export TEST_MODULE_ENV_VAR=TEST_SUCCESS\n') @@ -53,7 +36,8 @@ def test_module_function_change_env(tmpdir, working_env, assert os.environ['NOT_AFFECTED'] == "NOT_AFFECTED" -def test_module_function_no_change(tmpdir, module_function_test_mode): +def test_module_function_no_change(tmpdir, monkeypatch): + monkeypatch.setattr(spack.util.module_cmd, '_cmd_template', _test_template) src_file = str(tmpdir.join('src_me')) with open(src_file, 'w') as f: f.write('echo TEST_MODULE_FUNCTION_PRINT') @@ -65,11 +49,11 @@ def test_module_function_no_change(tmpdir, module_function_test_mode): assert os.environ == old_env -def test_get_path_from_module_faked(save_module_func): +def test_get_path_from_module_faked(monkeypatch): for line in test_module_lines: def fake_module(*args): return line - spack.util.module_cmd.module = fake_module + monkeypatch.setattr(spack.util.module_cmd, 'module', fake_module) path = get_path_from_module('mod') assert path == '/path/to' diff --git a/lib/spack/spack/test/spec_dag.py b/lib/spack/spack/test/spec_dag.py index 25917f9424a..e031f02c255 100644 --- a/lib/spack/spack/test/spec_dag.py +++ b/lib/spack/spack/test/spec_dag.py @@ -387,7 +387,6 @@ def test_unsatisfiable_architecture(self, set_dependency): with pytest.raises(spack.spec.UnsatisfiableArchitectureSpecError): spec.normalize() - @pytest.mark.usefixtures('config') def test_invalid_dep(self): spec = Spec('libelf ^mpich') with pytest.raises(spack.spec.InvalidDependencyError): @@ -602,7 +601,6 @@ def test_copy_normalized(self): copy_ids = set(id(s) for s in copy.traverse()) assert not orig_ids.intersection(copy_ids) - @pytest.mark.usefixtures('config') def test_copy_concretized(self): orig = Spec('mpileaks') orig.concretize() diff --git a/lib/spack/spack/util/module_cmd.py b/lib/spack/spack/util/module_cmd.py index 0edf7e6102a..74790156ae0 100644 --- a/lib/spack/spack/util/module_cmd.py +++ b/lib/spack/spack/util/module_cmd.py @@ -19,16 +19,11 @@ # If we need another option that changes the environment, add it here. module_change_commands = ['load', 'swap', 'unload', 'purge', 'use', 'unuse'] py_cmd = "'import os;import json;print(json.dumps(dict(os.environ)))'" - -# This is just to enable testing. I hate it but we can't find a better way -_test_mode = False +_cmd_template = "'module ' + ' '.join(args) + ' 2>&1'" def module(*args): - module_cmd = 'module ' + ' '.join(args) + ' 2>&1' - if _test_mode: - tty.warn('module function operating in test mode') - module_cmd = ". %s 2>&1" % args[1] + module_cmd = eval(_cmd_template) # So we can monkeypatch for testing if args[0] in module_change_commands: # Do the module manipulation, then output the environment in JSON # and read the JSON back in the parent process to update os.environ From 315faf8b775e1db1baa7030b5f645fa926ecb2ad Mon Sep 17 00:00:00 2001 From: Phil Tooley <32297355+ptooley@users.noreply.github.com> Date: Wed, 1 Apr 2020 00:14:43 +0100 Subject: [PATCH 083/138] Extrae: update package shasum and binutils version (#15516) Co-authored-by: telemin --- var/spack/repos/builtin/packages/extrae/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/extrae/package.py b/var/spack/repos/builtin/packages/extrae/package.py index 4ea5928b023..bab7b365d8e 100644 --- a/var/spack/repos/builtin/packages/extrae/package.py +++ b/var/spack/repos/builtin/packages/extrae/package.py @@ -35,7 +35,7 @@ class Extrae(AutotoolsPackage): OpenMP, CUDA, OpenCL, pthread, OmpSs""" homepage = "https://tools.bsc.es/extrae" url = "https://ftp.tools.bsc.es/extrae/extrae-3.4.1-src.tar.bz2" - version('3.7.1', sha256='95810b057f95e91bfc89813eb8bd320dfe40614fc8e98c63d95c5101c56dd213') + version('3.7.1', sha256='c83ddd18a380c9414d64ee5de263efc6f7bac5fe362d5b8374170c7f18360378') version('3.4.1', sha256='77bfec16d6b5eee061fbaa879949dcef4cad28395d6a546b1ae1b9246f142725') depends_on("autoconf", type='build') @@ -51,7 +51,7 @@ class Extrae(AutotoolsPackage): depends_on("elf", type="link") depends_on("libxml2") depends_on("numactl") - depends_on("binutils+libiberty") + depends_on("binutils+libiberty@:2.33") depends_on("gettext") # gettext dependency added to find -lintl # https://www.gnu.org/software/gettext/FAQ.html#integrating_undefined From a4b3edd68a91543f62146919670e7627bd9e21c0 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Tue, 31 Mar 2020 18:57:14 -0500 Subject: [PATCH 084/138] Allow Spack Environments with '-h' in the name (#15429) If a user invoked "spack env activate example-henv", Spack would mistakenly interpret the "-h" from "example-henv" as the "-h" option. This commit allows users to create and activate environments with "-h" in the name. This issue existed for bash shell support as well as csh support, and this commit addresses both, along with some other unrelated csh support issues. --- share/spack/csh/spack.csh | 46 ++++++++++++++++++++++++------------ share/spack/setup-env.sh | 49 +++++++++++++++++++++++++-------------- 2 files changed, 63 insertions(+), 32 deletions(-) diff --git a/share/spack/csh/spack.csh b/share/spack/csh/spack.csh index b4d963ae101..7a510502812 100644 --- a/share/spack/csh/spack.csh +++ b/share/spack/csh/spack.csh @@ -66,7 +66,7 @@ case cd: [ $#_sp_args -gt 0 ] && set _sp_arg = ($_sp_args[1]) shift _sp_args - if ( "$_sp_arg" == "-h" ) then + if ( "$_sp_arg" == "-h" || "$_sp_args" == "--help" ) then \spack cd -h else cd `\spack location $_sp_arg $_sp_args` @@ -78,7 +78,7 @@ case env: set _sp_arg="" [ $#_sp_args -gt 0 ] && set _sp_arg = ($_sp_args[1]) - if ( "$_sp_arg" == "-h" ) then + if ( "$_sp_arg" == "-h" || "$_sp_arg" == "--help" ) then \spack env -h else switch ($_sp_arg) @@ -86,12 +86,18 @@ case env: set _sp_env_arg="" [ $#_sp_args -gt 1 ] && set _sp_env_arg = ($_sp_args[2]) - if ( "$_sp_env_arg" == "" || "$_sp_args" =~ "*--sh*" || "$_sp_args" =~ "*--csh*" || "$_sp_args" =~ "*-h*" ) then - # no args or args contain -h/--help, --sh, or --csh: just execute + # Space needed here to differentiate between `-h` + # argument and environments with "-h" in the name. + if ( "$_sp_env_arg" == "" || \ + "$_sp_args" =~ "* --sh*" || \ + "$_sp_args" =~ "* --csh*" || \ + "$_sp_args" =~ "* -h*" || \ + "$_sp_args" =~ "* --help*" ) then + # No args or args contain --sh, --csh, or -h/--help: just execute. \spack $_sp_flags env $_sp_args else shift _sp_args # consume 'activate' or 'deactivate' - # actual call to activate: source the output + # Actual call to activate: source the output. eval `\spack $_sp_flags env activate --csh $_sp_args` endif breaksw @@ -99,30 +105,40 @@ case env: set _sp_env_arg="" [ $#_sp_args -gt 1 ] && set _sp_env_arg = ($_sp_args[2]) - if ( "$_sp_env_arg" != "" ) then - # with args: execute the command + # Space needed here to differentiate between `--sh` + # argument and environments with "--sh" in the name. + if ( "$_sp_args" =~ "* --sh*" || \ + "$_sp_args" =~ "* --csh*" ) then + # Args contain --sh or --csh: just execute. \spack $_sp_flags env $_sp_args + else if ( "$_sp_env_arg" != "" ) then + # Any other arguments are an error or -h/--help: just run help. + \spack $_sp_flags env deactivate -h else - # no args: source the output + # No args: source the output of the command. eval `\spack $_sp_flags env deactivate --csh` endif breaksw default: - echo default \spack $_sp_flags env $_sp_args breaksw endsw endif + breaksw + case load: case unload: - # Space in `-h` portion is important for differentiating -h option - # from variants that begin with "h" or packages with "-h" in name - if ( "$_sp_spec" =~ "*--sh*" || "$_sp_spec" =~ "*--csh*" || \ - " $_sp_spec" =~ "* -h*" || "$_sp_spec" =~ "*--help*") then - # IF a shell is given, print shell output + # Get --sh, --csh, -h, or --help arguments. + # Space needed here to differentiate between `-h` + # argument and specs with "-h" in the name. + if ( " $_sp_spec" =~ "* --sh*" || \ + " $_sp_spec" =~ "* --csh*" || \ + " $_sp_spec" =~ "* -h*" || \ + " $_sp_spec" =~ "* --help*") then + # Args contain --sh, --csh, or -h/--help: just execute. \spack $_sp_flags $_sp_subcommand $_sp_spec else - # otherwise eval with csh + # Otherwise, eval with csh. eval `\spack $_sp_flags $_sp_subcommand --csh $_sp_spec || \ echo "exit 1"` endif diff --git a/share/spack/setup-env.sh b/share/spack/setup-env.sh index c3d9ef260cd..5968c4c0160 100755 --- a/share/spack/setup-env.sh +++ b/share/spack/setup-env.sh @@ -115,31 +115,44 @@ spack() { else case $_sp_arg in activate) - _a="$@" + # Get --sh, --csh, or -h/--help arguments. + # Space needed here becauses regexes start with a space + # and `-h` may be the only argument. + _a=" $@" + # Space needed here to differentiate between `-h` + # argument and environments with "-h" in the name. + # Also see: https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html#Shell-Parameter-Expansion if [ -z ${1+x} ] || \ - [ "${_a#*--sh}" != "$_a" ] || \ - [ "${_a#*--csh}" != "$_a" ] || \ - [ "${_a#*-h}" != "$_a" ]; + [ "${_a#* --sh}" != "$_a" ] || \ + [ "${_a#* --csh}" != "$_a" ] || \ + [ "${_a#* -h}" != "$_a" ] || \ + [ "${_a#* --help}" != "$_a" ]; then - # no args or args contain -h/--help, --sh, or --csh: just execute + # No args or args contain --sh, --csh, or -h/--help: just execute. command spack env activate "$@" else - # actual call to activate: source the output + # Actual call to activate: source the output. eval $(command spack $_sp_flags env activate --sh "$@") fi ;; deactivate) - _a="$@" - if [ "${_a#*--sh}" != "$_a" ] || \ - [ "${_a#*--csh}" != "$_a" ]; + # Get --sh, --csh, or -h/--help arguments. + # Space needed here becauses regexes start with a space + # and `-h` may be the only argument. + _a=" $@" + # Space needed here to differentiate between `--sh` + # argument and environments with "--sh" in the name. + # Also see: https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html#Shell-Parameter-Expansion + if [ "${_a#* --sh}" != "$_a" ] || \ + [ "${_a#* --csh}" != "$_a" ]; then - # just execute the command if --sh or --csh are provided + # Args contain --sh or --csh: just execute. command spack env deactivate "$@" elif [ -n "$*" ]; then - # any other arguments are an error or help, so just run help + # Any other arguments are an error or -h/--help: just run help. command spack env deactivate -h else - # no args: source the output of the command + # No args: source the output of the command. eval $(command spack $_sp_flags env deactivate --sh) fi ;; @@ -151,17 +164,19 @@ spack() { return ;; "load"|"unload") - # get --sh, --csh, --help, or -h arguments - # space is important for -h case to differentiate between `-h` - # argument and specs with "-h" in package name or variant settings + # Get --sh, --csh, -h, or --help arguments. + # Space needed here becauses regexes start with a space + # and `-h` may be the only argument. _a=" $@" + # Space needed here to differentiate between `-h` + # argument and specs with "-h" in the name. + # Also see: https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html#Shell-Parameter-Expansion if [ "${_a#* --sh}" != "$_a" ] || \ [ "${_a#* --csh}" != "$_a" ] || \ [ "${_a#* -h}" != "$_a" ] || \ [ "${_a#* --help}" != "$_a" ]; then - # just execute the command if --sh or --csh are provided - # or if the -h or --help arguments are provided + # Args contain --sh, --csh, or -h/--help: just execute. command spack $_sp_flags $_sp_subcommand "$@" else eval $(command spack $_sp_flags $_sp_subcommand --sh "$@" || \ From 97cfef320c3b601fbaea870aeba1f93b5dd69c20 Mon Sep 17 00:00:00 2001 From: "Dr. Christian Tacke" <58549698+ChristianTackeGSI@users.noreply.github.com> Date: Wed, 1 Apr 2020 15:07:41 +0200 Subject: [PATCH 085/138] slurm: new version, system configuration path (#15466) * Add version 18-08-9-1 * Add variant to allow setting the sysconfdir: See below About sysconfdir: slurm has a server and a client. To use the correct communication channel, the client needs to be able to read the correct config. This config is in PREFIX/etc. Let's assume one has the server part installed as a system package. This generally is a good idea, so that the server gets started during boot. This means, that the config is in /etc/slurm. If one now wants to use the client part (library!) via spack, one has a problem: spack's slurm looks in SPACK-PACKAGE-PREFIX/etc for the config. There needs to be a way to let the spack installed package use the system's config. So add a variant to override the path during build: sysconfdir=/etc/slurm. This is much like what happened in #15307 for munge. --- var/spack/repos/builtin/packages/slurm/package.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/var/spack/repos/builtin/packages/slurm/package.py b/var/spack/repos/builtin/packages/slurm/package.py index bfa6621f077..daae7743a03 100644 --- a/var/spack/repos/builtin/packages/slurm/package.py +++ b/var/spack/repos/builtin/packages/slurm/package.py @@ -24,6 +24,7 @@ class Slurm(AutotoolsPackage): homepage = 'https://slurm.schedmd.com' url = 'https://github.com/SchedMD/slurm/archive/slurm-17-02-6-1.tar.gz' + version('18-08-9-1', sha256='32eb0b612ca18ade1e35c3c9d3b4d71aba2b857446841606a9e54d0a417c3b03') version('18-08-0-1', sha256='62129d0f2949bc8a68ef86fe6f12e0715cbbf42f05b8da6ef7c3e7e7240b50d9') version('17-11-9-2', sha256='6e34328ed68262e776f524f59cca79ac75bcd18030951d45ea545a7ba4c45906') version('17-02-6-1', sha256='97b3a3639106bd6d44988ed018e2657f3d640a3d5c105413d05b4721bc8ee25e') @@ -35,6 +36,8 @@ class Slurm(AutotoolsPackage): variant('hdf5', default=False, description='Enable hdf5 support') variant('readline', default=True, description='Enable readline support') variant('pmix', default=False, description='Enable PMIx support') + variant('sysconfdir', default='PREFIX/etc', values=any, + description='Set system configuration path (possibly /etc/slurm)') # TODO: add variant for BG/Q and Cray support @@ -94,6 +97,10 @@ def configure_args(self): else: args.append('--without-pmix') + sysconfdir = spec.variants['sysconfdir'].value + if sysconfdir != 'PREFIX/etc': + args.append('--sysconfdir={0}'.format(sysconfdir)) + return args def install(self, spec, prefix): From 49aa28790c5df2c8d2640eabc2f2058ef140194b Mon Sep 17 00:00:00 2001 From: Sinan Date: Wed, 1 Apr 2020 06:09:39 -0700 Subject: [PATCH 086/138] new package: py-spatialite (#12597) * new package: py-spatialite * make flake8 happy Co-authored-by: Sinan81 --- .../builtin/packages/py-spatialite/package.py | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-spatialite/package.py diff --git a/var/spack/repos/builtin/packages/py-spatialite/package.py b/var/spack/repos/builtin/packages/py-spatialite/package.py new file mode 100644 index 00000000000..e78cff81ad3 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-spatialite/package.py @@ -0,0 +1,20 @@ +# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PySpatialite(PythonPackage): + """Wrapper for standard Python module "sqlite3" which adds SpatiaLite + support. + """ + + homepage = "https://github.com/malexer/spatialite" + url = "https://pypi.io/packages/source/s/spatialite/spatialite-0.0.3.tar.gz" + + version('0.0.3', sha256='a0761f239a52f326b14ce41ba61b6614dfcc808b978a0bec4a37c1de9ad9071e') + + depends_on('py-setuptools', type='build') + depends_on('libspatialite') From c430ad91c39d625d6da7e7410a1fff3b0c6d9d9f Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Wed, 1 Apr 2020 08:58:09 -0700 Subject: [PATCH 087/138] pybind11 2.5.0: Include Change (#13905) Add pybind11, version 2.5.0. This release adds improved include helpers. --- .../repos/builtin/packages/py-pybind11/package.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/py-pybind11/package.py b/var/spack/repos/builtin/packages/py-pybind11/package.py index cda6cada32f..3fe7402a0f5 100644 --- a/var/spack/repos/builtin/packages/py-pybind11/package.py +++ b/var/spack/repos/builtin/packages/py-pybind11/package.py @@ -4,6 +4,7 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * +import os class PyPybind11(CMakePackage): @@ -23,6 +24,7 @@ class PyPybind11(CMakePackage): maintainers = ['ax3l'] version('master', branch='master') + version('2.5.0', sha256='97504db65640570f32d3fdf701c25a340c8643037c3b69aec469c10c93dc8504') version('2.4.3', sha256='1eed57bc6863190e35637290f97a20c81cfe4d9090ac0a24f3bbf08f265eb71d') version('2.3.0', sha256='0f34838f2c8024a6765168227ba587b3687729ebf03dc912f88ff75c7aa9cfe8') version('2.2.4', sha256='b69e83658513215b8d1443544d0549b7d231b9f201f6fc787a2b2218b408181e') @@ -56,6 +58,8 @@ def cmake_args(self): def setup_build_environment(self, env): env.set('PYBIND11_USE_CMAKE', 1) + # https://github.com/pybind/pybind11/pull/1995 + @when('@:2.4.99') def patch(self): """ see https://github.com/spack/spack/issues/13559 """ filter_file('import sys', @@ -74,9 +78,11 @@ def test(self): with working_dir('spack-test', create=True): # test include helper points to right location python = self.spec['python'].command - inc = python( + py_inc = python( '-c', 'import pybind11 as py; ' + self.spec['python'].package.print_string('py.get_include()'), - output=str) - assert inc.strip() == str(self.prefix.include) + output=str).strip() + for inc in [py_inc, self.prefix.include]: + inc_file = join_path(inc, 'pybind11', 'pybind11.h') + assert os.path.isfile(inc_file) From c3e8825f8ec9aecc7e25380e34e8851b065c21e1 Mon Sep 17 00:00:00 2001 From: Greg Sjaardema Date: Wed, 1 Apr 2020 11:02:26 -0600 Subject: [PATCH 088/138] Spelling fixes (#15805) * Spelling fixes * spelling fixes * spelling fixes * spelling fixes * spelling fix * spelling fix * spelling fix * spelling fixes * spelling fix --- .flake8_packages | 2 +- CHANGELOG.md | 6 +++--- lib/spack/docs/basic_usage.rst | 2 +- lib/spack/docs/build_systems/intelpackage.rst | 6 +++--- lib/spack/docs/containers.rst | 6 +++--- lib/spack/docs/getting_started.rst | 2 +- lib/spack/docs/packaging_guide.rst | 2 +- lib/spack/docs/pipelines.rst | 2 +- lib/spack/docs/workflows.rst | 6 +++--- 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.flake8_packages b/.flake8_packages index d17a34951d1..fc2dbf98afd 100644 --- a/.flake8_packages +++ b/.flake8_packages @@ -9,7 +9,7 @@ # # Note that we also add *per-line* exemptions for certain patterns in the # `spack flake8` command. This is where F403 for `from spack import *` -# is added (beause we *only* allow that wildcard). +# is added (because we *only* allow that wildcard). # # See .flake8 for regular exceptions. # diff --git a/CHANGELOG.md b/CHANGELOG.md index 6fea0528842..092959aff98 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,7 +25,7 @@ This is a bugfix release on top of `v0.14.0`. Specific fixes include: 2. **Build pipelines.** You can also build in parallel through Gitlab CI. Simply create a Spack environment and push it to Gitlab to build - on Gitlab runners. Pipeline support is now integreated into a single + on Gitlab runners. Pipeline support is now integrated into a single `spack ci` command, so setting it up is easier than ever. See the [Pipelines section](https://spack.readthedocs.io/en/v0.14.0/pipelines.html) in the docs. @@ -125,8 +125,8 @@ RHEL8. * mirror bugfixes: symlinks, duplicate patches, and exception handling (#13789) * don't try to fetch `BundlePackages` (#13908) * avoid re-fetching patches already added to a mirror (#13908) -* avoid re-fetching alread added patches (#13908) -* avoid re-fetching alread added patches (#13908) +* avoid re-fetching already added patches (#13908) +* avoid re-fetching already added patches (#13908) * allow repeated invocations of `spack mirror create` on the same dir (#13908) * bugfix for RHEL8 when `python` is unavailable (#14252) * improve concretization performance in environments (#14190) diff --git a/lib/spack/docs/basic_usage.rst b/lib/spack/docs/basic_usage.rst index d63dec8827e..2f047c07853 100644 --- a/lib/spack/docs/basic_usage.rst +++ b/lib/spack/docs/basic_usage.rst @@ -925,7 +925,7 @@ contains any spaces. Any of ``cppflags=-O3``, ``cppflags="-O3"``, ``cppflags='-O3'``, and ``cppflags="-O3 -fPIC"`` are acceptable, but ``cppflags=-O3 -fPIC`` is not. Additionally, if the value of the compiler flags is not the last thing on the line, it must be followed -by a space. The commmand ``spack install libelf cppflags="-O3"%intel`` +by a space. The command ``spack install libelf cppflags="-O3"%intel`` will be interpreted as an attempt to set ``cppflags="-O3%intel"``. The six compiler flags are injected in the order of implicit make commands diff --git a/lib/spack/docs/build_systems/intelpackage.rst b/lib/spack/docs/build_systems/intelpackage.rst index c14fc34f519..153b41bdc75 100644 --- a/lib/spack/docs/build_systems/intelpackage.rst +++ b/lib/spack/docs/build_systems/intelpackage.rst @@ -553,7 +553,7 @@ follow `the next section `_ instead. f77: stub fc: stub - Replace ``18.0.3`` with the version that you determined in the preceeding + Replace ``18.0.3`` with the version that you determined in the preceding step. The contents under ``paths:`` do not matter yet. You are right to ask: "Why on earth is that necessary?" [fn8]_. @@ -696,7 +696,7 @@ follow `the next section `_ instead. - /home/$user/spack-stage Do not duplicate the ``config:`` line if it already is present. - Adapt the location, which here is the same as in the preceeding example. + Adapt the location, which here is the same as in the preceding example. 3. Retry installing the large package. @@ -965,7 +965,7 @@ a *virtual* ``mkl`` package is declared in Spack. Likewise, in a :ref:`MakefilePackage ` - or similiar package that does not use AutoTools you may need to provide include + or similar package that does not use AutoTools you may need to provide include and link options for use on command lines or in environment variables. For example, to generate an option string of the form ``-I``, use: diff --git a/lib/spack/docs/containers.rst b/lib/spack/docs/containers.rst index 18500ff7648..2ca25b7207b 100644 --- a/lib/spack/docs/containers.rst +++ b/lib/spack/docs/containers.rst @@ -44,7 +44,7 @@ Environments: && echo " install_tree: /opt/software" \ && echo " view: /opt/view") > /opt/spack-environment/spack.yaml - # Install the software, remove unecessary deps + # Install the software, remove unnecessary deps RUN cd /opt/spack-environment && spack install && spack gc -y # Strip all the binaries @@ -266,7 +266,7 @@ following ``Dockerfile``: && echo " install_tree: /opt/software" \ && echo " view: /opt/view") > /opt/spack-environment/spack.yaml - # Install the software, remove unecessary deps + # Install the software, remove unnecessary deps RUN cd /opt/spack-environment && spack install && spack gc -y # Strip all the binaries @@ -304,4 +304,4 @@ following ``Dockerfile``: .. note:: Spack can also produce Singularity definition files to build the image. The minimum version of Singularity required to build a SIF (Singularity Image Format) - from them is ``3.5.3``. \ No newline at end of file + from them is ``3.5.3``. diff --git a/lib/spack/docs/getting_started.rst b/lib/spack/docs/getting_started.rst index 3a9b2d42b2e..8de9d276623 100644 --- a/lib/spack/docs/getting_started.rst +++ b/lib/spack/docs/getting_started.rst @@ -851,7 +851,7 @@ from websites and from git. .. warning:: - This workaround should be used ONLY as a last resort! Wihout SSL + This workaround should be used ONLY as a last resort! Without SSL certificate verification, spack and git will download from sites you wouldn't normally trust. The code you download and run may then be compromised! While this is not a major issue for archives that will diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst index 3c588c240b8..88b78148389 100644 --- a/lib/spack/docs/packaging_guide.rst +++ b/lib/spack/docs/packaging_guide.rst @@ -3607,7 +3607,7 @@ the command line. For most compilers, ``$rpath_flag`` is ``-Wl,-rpath,``. However, NAG passes its flags to GCC instead of passing them directly to the linker. Therefore, its ``$rpath_flag`` is doubly wrapped: ``-Wl,-Wl,,-rpath,``. - ``$rpath_flag`` can be overriden on a compiler specific basis in + ``$rpath_flag`` can be overridden on a compiler specific basis in ``lib/spack/spack/compilers/$compiler.py``. The compiler wrappers also pass the compiler flags specified by the user from diff --git a/lib/spack/docs/pipelines.rst b/lib/spack/docs/pipelines.rst index f70b39a16d8..a8f81988528 100644 --- a/lib/spack/docs/pipelines.rst +++ b/lib/spack/docs/pipelines.rst @@ -132,7 +132,7 @@ A pipeline-enabled spack environment ------------------------------------ Here's an example of a spack environment file that has been enhanced with -sections desribing a build pipeline: +sections describing a build pipeline: .. code-block:: yaml diff --git a/lib/spack/docs/workflows.rst b/lib/spack/docs/workflows.rst index b329a0205c8..89d17e98b28 100644 --- a/lib/spack/docs/workflows.rst +++ b/lib/spack/docs/workflows.rst @@ -444,7 +444,7 @@ environment. A single-prefix filesystem view is a single directory tree that is the union of the directory hierarchies of a number of installed packages; -it is similar to the directory hiearchy that might exist under +it is similar to the directory hierarchy that might exist under ``/usr/local``. The files of the view's installed packages are brought into the view by symbolic or hard links, referencing the original Spack installation. @@ -1237,7 +1237,7 @@ you can also manually set them in your ``.bashrc``. 2. Other package managers like Homebrew will try to install things to the same directory. If you plan on using Homebrew in conjunction with Spack, don't symlink things to ``/usr/local``. - 3. If you are on a shared workstation, or don't have sudo priveleges, you + 3. If you are on a shared workstation, or don't have sudo privileges, you can't do this. If you still want to do this anyway, there are several ways around SIP. @@ -1467,7 +1467,7 @@ In order to build and run the image, execute: SPACK_ROOT=/usr/local \ FORCE_UNSAFE_CONFIGURE=1 - # install minimal spack depedencies + # install minimal spack dependencies RUN apt-get update \ && apt-get install -y --no-install-recommends \ autoconf \ From 58cb2e509232cbc4ea42d95b6899f37d95639968 Mon Sep 17 00:00:00 2001 From: Andrew Gaspar Date: Wed, 1 Apr 2020 11:02:55 -0600 Subject: [PATCH 089/138] Add libgit2 1.0.0 and 0.28.5 (#15801) --- var/spack/repos/builtin/packages/libgit2/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/libgit2/package.py b/var/spack/repos/builtin/packages/libgit2/package.py index 222075ffdb5..dcd5259a27c 100644 --- a/var/spack/repos/builtin/packages/libgit2/package.py +++ b/var/spack/repos/builtin/packages/libgit2/package.py @@ -16,7 +16,11 @@ class Libgit2(CMakePackage): homepage = "https://libgit2.github.com/" url = "https://github.com/libgit2/libgit2/archive/v0.26.0.tar.gz" + maintainers = ["AndrewGaspar"] + + version('1.0.0', sha256='6a1fa16a7f6335ce8b2630fbdbb5e57c4027929ebc56fcd1ac55edb141b409b4') version('0.99.0', sha256='174024310c1563097a6613a0d3f7539d11a9a86517cd67ce533849065de08a11') + version('0.28.5', sha256='2b7b68aee6f123bc84cc502a9c12738435b8054e7d628962e091cd2a25be4f42') version('0.28.4', sha256='30f3877469d09f2e4a21be933b4e2800560d16646028dd800744dc5f7fb0c749') version('0.28.3', sha256='ee5344730fe11ce7c86646e19c2d257757be293f5a567548d398fb3af8b8e53b') version('0.28.2', sha256='42b5f1e9b9159d66d86fff0394215c5733b6ef8f9b9d054cdd8c73ad47177fc3') From 67fbf257f09763b8217b0b51ac9ad5ebc8acd4c9 Mon Sep 17 00:00:00 2001 From: Sinan Date: Wed, 1 Apr 2020 10:05:53 -0700 Subject: [PATCH 090/138] Package/sfcgal fix typo (#15796) * fix typo in dependency definition * remove arbitrary dependency constraint Co-authored-by: Sinan81 --- var/spack/repos/builtin/packages/sfcgal/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/sfcgal/package.py b/var/spack/repos/builtin/packages/sfcgal/package.py index 021ba1bb97b..c1e80174e0c 100644 --- a/var/spack/repos/builtin/packages/sfcgal/package.py +++ b/var/spack/repos/builtin/packages/sfcgal/package.py @@ -20,8 +20,8 @@ class Sfcgal(CMakePackage): version('1.3.7', sha256='30ea1af26cb2f572c628aae08dd1953d80a69d15e1cac225390904d91fce031b') # Ref: http://oslandia.github.io/SFCGAL/installation.html - depends_on('cgal@4.3 +core') - depends_on('boost@1.54.0:1.69.0') + depends_on('cgal@4.3: +core') + depends_on('boost@1.54.0:') depends_on('mpfr@2.2.1:') depends_on('gmp@4.2:') From 917c0a0efd4258b76fe62f66233a9cca3186c5d4 Mon Sep 17 00:00:00 2001 From: "Nichols A. Romero" Date: Wed, 1 Apr 2020 12:28:36 -0500 Subject: [PATCH 091/138] Minor LLVM libomptarget fixes (#15788) * Add myself as a maintainer * This was a regression that occured in previous PR. Flang has been excised from LLVM for now until f18 is merged upstream. * Libraries only needed when a GPU backend is present. --- var/spack/repos/builtin/packages/llvm/package.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py index 588c1cae1dd..a5aedb625d8 100644 --- a/var/spack/repos/builtin/packages/llvm/package.py +++ b/var/spack/repos/builtin/packages/llvm/package.py @@ -19,7 +19,7 @@ class Llvm(CMakePackage): url = "https://github.com/llvm/llvm-project/archive/llvmorg-7.1.0.tar.gz" list_url = "http://releases.llvm.org/download.html" git = "https://github.com/llvm/llvm-project" - maintainers = ['trws'] + maintainers = ['trws', 'naromero77'] family = "compiler" # Used by lmod @@ -132,23 +132,16 @@ class Llvm(CMakePackage): description="Build with OpenMP capable thread sanitizer", ) variant("python", default=False, description="Install python bindings") - variant( - "flang", - default=False, - description="Build flang branch version instead", - ) extends("python", when="+python") # Build dependency depends_on("cmake@3.4.3:", type="build") depends_on("python@2.7:2.8", when="@:4.999 ~python", type="build") - depends_on("python@2.7:2.8", when="@5: ~python +flang", type="build") depends_on("python", when="@5: ~python", type="build") # Universal dependency depends_on("python@2.7:2.8", when="@:4.999+python") - depends_on("python@2.7:2.8", when="@5:+python+flang") depends_on("python", when="@5:+python") depends_on("z3", when="@9:") @@ -158,8 +151,8 @@ class Llvm(CMakePackage): # openmp dependencies depends_on("perl-data-dumper", type=("build")) depends_on("hwloc") - depends_on("libelf") # libomptarget - depends_on("libffi") # libomptarget + depends_on("libelf", when="+cuda") # libomptarget + depends_on("libffi", when="+cuda") # libomptarget # ncurses dependency depends_on("ncurses+termlib") From 6ad717cc9df8799a56d6a126180cbc380f4e57c1 Mon Sep 17 00:00:00 2001 From: Robert Pavel Date: Wed, 1 Apr 2020 11:31:01 -0600 Subject: [PATCH 092/138] Fixed Remaining Shared Objects in Static Lua (#15787) Fixed removal of remaining references and symlinks to so files when building lua with static libraries --- .../repos/builtin/packages/lua/package.py | 55 ++++++++++--------- 1 file changed, 30 insertions(+), 25 deletions(-) diff --git a/var/spack/repos/builtin/packages/lua/package.py b/var/spack/repos/builtin/packages/lua/package.py index c8fe652c39d..420e3b041a4 100644 --- a/var/spack/repos/builtin/packages/lua/package.py +++ b/var/spack/repos/builtin/packages/lua/package.py @@ -69,24 +69,25 @@ def install(self, spec, prefix): # compatibility with ax_lua.m4 from autoconf-archive # https://www.gnu.org/software/autoconf-archive/ax_lua.html - with working_dir(prefix.lib): - # e.g., liblua.so.5.1.5 - src_path = 'liblua.{0}.{1}'.format(dso_suffix, - str(self.version.up_to(3))) + if '+shared' in spec: + with working_dir(prefix.lib): + # e.g., liblua.so.5.1.5 + src_path = 'liblua.{0}.{1}'.format(dso_suffix, + str(self.version.up_to(3))) - # For lua version 5.1.X, the symlinks should be: - # liblua5.1.so - # liblua51.so - # liblua-5.1.so - # liblua-51.so - version_formats = [str(self.version.up_to(2)), - Version(str(self.version.up_to(2))).joined] - for version_str in version_formats: - for joiner in ['', '-']: - dest_path = 'liblua{0}{1}.{2}'.format(joiner, - version_str, - dso_suffix) - os.symlink(src_path, dest_path) + # For lua version 5.1.X, the symlinks should be: + # liblua5.1.so + # liblua51.so + # liblua-5.1.so + # liblua-51.so + version_formats = [str(self.version.up_to(2)), + Version(str(self.version.up_to(2))).joined] + for version_str in version_formats: + for joiner in ['', '-']: + dest_path = 'liblua{0}{1}.{2}'.format(joiner, + version_str, + dso_suffix) + os.symlink(src_path, dest_path) with working_dir(os.path.join('luarocks', 'luarocks')): configure('--prefix=' + prefix, '--with-lua=' + prefix) @@ -96,7 +97,8 @@ def install(self, spec, prefix): def append_paths(self, paths, cpaths, path): paths.append(os.path.join(path, '?.lua')) paths.append(os.path.join(path, '?', 'init.lua')) - cpaths.append(os.path.join(path, '?.so')) + if '+shared' in self.spec: + cpaths.append(os.path.join(path, '?.so')) def _setup_dependent_env_helper(self, env, dependent_spec): lua_paths = [] @@ -126,7 +128,8 @@ def setup_dependent_build_environment(self, env, dependent_spec): env, dependent_spec) env.set('LUA_PATH', ';'.join(lua_patterns), separator=';') - env.set('LUA_CPATH', ';'.join(lua_cpatterns), separator=';') + if '+shared' in self.spec: + env.set('LUA_CPATH', ';'.join(lua_cpatterns), separator=';') def setup_dependent_run_environment(self, env, dependent_spec): # For run time environment set only the path for dependent_spec and @@ -136,8 +139,9 @@ def setup_dependent_run_environment(self, env, dependent_spec): if dependent_spec.package.extends(self.spec): env.prepend_path('LUA_PATH', ';'.join(lua_patterns), separator=';') - env.prepend_path('LUA_CPATH', ';'.join(lua_cpatterns), - separator=';') + if '+shared' in spec: + env.prepend_path('LUA_CPATH', ';'.join(lua_cpatterns), + separator=';') def setup_run_environment(self, env): env.prepend_path( @@ -156,10 +160,11 @@ def setup_run_environment(self, env): 'LUA_PATH', os.path.join(self.spec.prefix, self.lua_lib_dir, '?', 'init.lua'), separator=';') - env.prepend_path( - 'LUA_CPATH', - os.path.join(self.spec.prefix, self.lua_lib_dir, '?.so'), - separator=';') + if '+shared' in self.spec: + env.prepend_path( + 'LUA_CPATH', + os.path.join(self.spec.prefix, self.lua_lib_dir, '?.so'), + separator=';') @property def lua_lib_dir(self): From 64b14b64c00bc6885acc1ff4d9b76898f66a8a86 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Wed, 1 Apr 2020 13:30:03 -0500 Subject: [PATCH 093/138] OpenDX: add new package (#15737) --- .../repos/builtin/packages/opendx/package.py | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 var/spack/repos/builtin/packages/opendx/package.py diff --git a/var/spack/repos/builtin/packages/opendx/package.py b/var/spack/repos/builtin/packages/opendx/package.py new file mode 100644 index 00000000000..2cf5a9e5e36 --- /dev/null +++ b/var/spack/repos/builtin/packages/opendx/package.py @@ -0,0 +1,20 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + + +class Opendx(AutotoolsPackage): + """Open Visualization Data Explorer.""" + + homepage = "https://github.com/Mwoolsey/OpenDX" + git = "https://github.com/Mwoolsey/OpenDX.git" + + version('master', branch='master') + + depends_on('motif') # lesstif also works, but exhibits odd behaviors + depends_on('gl') + + @run_before('autoreconf') + def distclean(self): + make('distclean') From 47f135534ca3a8cf5f370fb0656c5d238741cdb7 Mon Sep 17 00:00:00 2001 From: Robert Pavel Date: Wed, 1 Apr 2020 12:32:15 -0600 Subject: [PATCH 094/138] Added v3 of Laghos (#15806) * Added v3 of Laghos Added v3 of Laghos as per https://github.com/CEED/Laghos/blob/v3.0/README.md * Update var/spack/repos/builtin/packages/laghos/package.py Changed develop->master as per PR Co-Authored-By: Adam J. Stewart * Made Metis Dependency Explicit Added explicit metis dependency * Folded @develop Laghos Deps in to @3.0: Theoretically there will be a difference between develop and 3.0: in the future but currently there is not Co-authored-by: Adam J. Stewart --- .../repos/builtin/packages/laghos/package.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/laghos/package.py b/var/spack/repos/builtin/packages/laghos/package.py index 7edb886a83c..438da2f5cf2 100644 --- a/var/spack/repos/builtin/packages/laghos/package.py +++ b/var/spack/repos/builtin/packages/laghos/package.py @@ -18,15 +18,15 @@ class Laghos(MakefilePackage): url = "https://github.com/CEED/Laghos/archive/v1.0.tar.gz" git = "https://github.com/CEED/Laghos.git" - version('develop', branch='master') + version('master', branch='master') + version('3.0', sha256='4db56286e15b42ecdc8d540c4888a7dec698b019df9c7ccb8319b7ea1f92d8b4') version('2.0', sha256='dd3632d5558889beec2cd3c49eb60f633f99e6d886ac868731610dd006c44c14') version('1.1', sha256='53b9bfe2af263c63eb4544ca1731dd26f40b73a0d2775a9883db51821bf23b7f') version('1.0', sha256='af50a126355a41c758fcda335a43fdb0a3cd97e608ba51c485afda3dd84a5b34') variant('metis', default=True, description='Enable/disable METIS support') - depends_on('mfem@develop+mpi+metis', when='@develop+metis') - depends_on('mfem@develop+mpi~metis', when='@develop~metis') + depends_on('metis@4.0.3:', when='+metis') # Recommended mfem version for laghos v2.0 is: ^mfem@3.4.1-laghos-v2.0 depends_on('mfem@3.4.0:+mpi+metis', when='@2.0+metis') @@ -36,6 +36,11 @@ class Laghos(MakefilePackage): depends_on('mfem@3.3.1-laghos-v1.0:+mpi+metis', when='@1.0,1.1+metis') depends_on('mfem@3.3.1-laghos-v1.0:+mpi~metis', when='@1.0,1.1~metis') + # 3.0 requirements + depends_on('hypre@2.11.2', when='@3.0:') + depends_on('mfem@develop+mpi+metis', when='@3.0:+metis') + depends_on('mfem@develop+mpi~metis', when='@3.0:~metis') + @property def build_targets(self): targets = [] @@ -46,6 +51,11 @@ def build_targets(self): targets.append('TEST_MK=%s' % spec['mfem'].package.test_mk) targets.append('CXX=%s' % spec['mpi'].mpicxx) + if self.version >= ver('3.0'): + targets.append('HYPRE_DIR=%s' % spec['hypre'].prefix) + if '+metis' in self.spec: + targets.append('METIS_DIR=%s' % spec['metis'].prefix) + return targets # See lib/spack/spack/build_systems/makefile.py From 8552efe54f55c4db14ec5923ff7b0d3025edfb15 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Wed, 1 Apr 2020 14:41:23 -0400 Subject: [PATCH 095/138] amrex: New version 20.04 (#15808) --- var/spack/repos/builtin/packages/amrex/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/amrex/package.py b/var/spack/repos/builtin/packages/amrex/package.py index aaf28a9d602..5bd19e582ba 100644 --- a/var/spack/repos/builtin/packages/amrex/package.py +++ b/var/spack/repos/builtin/packages/amrex/package.py @@ -18,6 +18,7 @@ class Amrex(CMakePackage): maintainers = ['mic84', 'asalmgren'] version('develop', branch='development') + version('20.04', sha256='ce951105336d6fcc07abe3eadf9f71161f0ccbe3e45f4547be4d0ae99e15f3c6') version('20.03', sha256='a535dcc016f0d38b55d0ab8e9067c1c53e3686961f6a1fb471cb18a0ebc909e6') version('20.02', sha256='33529a23694283d12eb37d4682aa86c9cc1240bd50124efcf4464747a7554147') version('20.01', sha256='f7026d267ca5de79ec7e740264d54230f419776d40feae705e939be0b1d8e0d3') From 37c0039eb946ce7149dae106d6ae37207d8fa335 Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Wed, 1 Apr 2020 13:57:19 -0600 Subject: [PATCH 096/138] openssl: add v1.1.1f (#15802) --- var/spack/repos/builtin/packages/openssl/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/openssl/package.py b/var/spack/repos/builtin/packages/openssl/package.py index 3f8e4647c41..fe650f71337 100644 --- a/var/spack/repos/builtin/packages/openssl/package.py +++ b/var/spack/repos/builtin/packages/openssl/package.py @@ -25,6 +25,7 @@ class Openssl(Package): # Uses Fake Autotools, should subclass Package # The latest stable version is the 1.1.1 series. This is also our Long Term # Support (LTS) version, supported until 11th September 2023. + version('1.1.1f', sha256='186c6bfe6ecfba7a5b48c47f8a1673d0f3b0e5ba2e25602dd23b629975da3f35') version('1.1.1e', sha256='694f61ac11cb51c9bf73f54e771ff6022b0327a43bbdfa1b2f19de1662a6dcbe') version('1.1.1d', sha256='1e3a91bc1f9dfce01af26026f856e064eab4c8ee0a8f457b5ae30b40b8b711f2') version('1.1.1c', sha256='f6fb3079ad15076154eda9413fed42877d668e7069d9b87396d0804fdb3f4c90') From e260eb4775d3c90b11bdc897438612cea1908257 Mon Sep 17 00:00:00 2001 From: Jonathon Anderson Date: Wed, 1 Apr 2020 15:51:59 -0600 Subject: [PATCH 097/138] Version bump for slurm package (#15790) --- var/spack/repos/builtin/packages/slurm/package.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/slurm/package.py b/var/spack/repos/builtin/packages/slurm/package.py index daae7743a03..c0d4cc01a91 100644 --- a/var/spack/repos/builtin/packages/slurm/package.py +++ b/var/spack/repos/builtin/packages/slurm/package.py @@ -22,8 +22,10 @@ class Slurm(AutotoolsPackage): """ homepage = 'https://slurm.schedmd.com' - url = 'https://github.com/SchedMD/slurm/archive/slurm-17-02-6-1.tar.gz' + url = 'https://github.com/SchedMD/slurm/archive/slurm-19-05-6-1.tar.gz' + version('19-05-6-1', sha256='1b83bce4260af06d644253b1f2ec2979b80b4418c631e9c9f48c2729ae2c95ba') + version('19-05-5-1', sha256='e53e67bd0bb4c37a9c481998764a746467a96bc41d6527569080514f36452c07') version('18-08-9-1', sha256='32eb0b612ca18ade1e35c3c9d3b4d71aba2b857446841606a9e54d0a417c3b03') version('18-08-0-1', sha256='62129d0f2949bc8a68ef86fe6f12e0715cbbf42f05b8da6ef7c3e7e7240b50d9') version('17-11-9-2', sha256='6e34328ed68262e776f524f59cca79ac75bcd18030951d45ea545a7ba4c45906') From 5a814ad0c5859605f66b9d4c1f6a99a656c388b7 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Wed, 1 Apr 2020 18:36:04 -0700 Subject: [PATCH 098/138] hdf5: prefer version 1.10 for now (#15810) HDF5 1.12 broke backward compatibility, so we're preferring version 1.10 for now. Packages that need the new API should specify: depends_on("hdf5@1.12:") to be explicit. We can eventually change the preference, but at the moment most libraries have not udpated to use the new HDF5. --- var/spack/repos/builtin/packages/hdf5/package.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py index e560c23f44c..9d5505b5f78 100644 --- a/var/spack/repos/builtin/packages/hdf5/package.py +++ b/var/spack/repos/builtin/packages/hdf5/package.py @@ -25,7 +25,10 @@ class Hdf5(AutotoolsPackage): version('1.12.0', sha256='a62dcb276658cb78e6795dd29bf926ed7a9bc4edf6e77025cd2c689a8f97c17a') - version('1.10.6', sha256='5f9a3ee85db4ea1d3b1fa9159352aebc2af72732fc2f58c96a3f0768dba0e9aa') + # HDF5 1.12 broke API compatibility, so we currently prefer the latest + # 1.10 release. packages that want later versions of HDF5 should specify, + # e.g., depends_on("hdf5@1.12:") to get 1.12 or higher. + version('1.10.6', sha256='5f9a3ee85db4ea1d3b1fa9159352aebc2af72732fc2f58c96a3f0768dba0e9aa', preferred=True) version('1.10.5', sha256='6d4ce8bf902a97b050f6f491f4268634e252a63dadd6656a1a9be5b7b7726fa8') version('1.10.4', sha256='8f60dc4dd6ab5fcd23c750d1dc5bca3d0453bdce5c8cdaf0a4a61a9d1122adb2') version('1.10.3', sha256='b600d7c914cfa80ae127cd1a1539981213fee9994ac22ebec9e3845e951d9b39') From 814996eebcd15c036afb5bc43a29e7bf3780ca8e Mon Sep 17 00:00:00 2001 From: takanori-ihara <62980219+takanori-ihara@users.noreply.github.com> Date: Thu, 2 Apr 2020 10:38:09 +0900 Subject: [PATCH 099/138] New package:dhpmm-f (#15798) * New package:dhpmm-f * Remove unnecessary line --- .../repos/builtin/packages/dhpmm-f/package.py | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 var/spack/repos/builtin/packages/dhpmm-f/package.py diff --git a/var/spack/repos/builtin/packages/dhpmm-f/package.py b/var/spack/repos/builtin/packages/dhpmm-f/package.py new file mode 100644 index 00000000000..5e2bfa31548 --- /dev/null +++ b/var/spack/repos/builtin/packages/dhpmm-f/package.py @@ -0,0 +1,51 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class DhpmmF(MakefilePackage): + """DHPMM_P:High-precision Matrix Multiplication with Faithful Rounding""" + + homepage = "http://www.math.twcu.ac.jp/ogita/post-k/" + url = "http://www.math.twcu.ac.jp/ogita/post-k/software/DHPMM_F/DHPMM_F_alpha.tar.gz" + + version('alpha', sha256='35321ecbc749f2682775ffcd27833afc8c8eb4fa7753ce769727c9d1fe097848') + + depends_on('blas', type='link') + depends_on('lapack', type='link') + + def patch(self): + math_libs = self.spec['lapack'].libs + self.spec['blas'].libs + makefile = FileFilter('Makefile') + if self.spec.satisfies('%gcc'): + makefile.filter(r'^MKL\s+=\s1', 'MKL=0') + makefile.filter(r'^CC\s+=\sgcc', + 'CC={0}'.format(spack_cc)) + makefile.filter(r'^CXX\s+=\sg\+\+', + 'CXX={0}'.format(spack_cxx)) + makefile.filter(r'^BLASLIBS\s+=\s-llapack\s-lblas', + 'BLASLIBS={0}'.format(math_libs.ld_flags)) + elif self.spec.satisfies('%fj'): + makefile.filter(r'^#ENV\s+=\sFX100', 'ENV=FX100') + makefile.filter(r'^ENV\s+=\sGCC', '#ENV=GCC') + makefile.filter(r'^MKL\s+=\s1', 'MKL=0') + makefile.filter(r'^CC\s+=\sfccpx', + 'CC={0}'.format(spack_cc)) + makefile.filter(r'^CXX\s+=\sFCCpx', + 'CXX={0}'.format(spack_cxx)) + makefile.filter(r'^BLASLIBS\s+=\s-llapack\s-lblas', + 'BLASLIBS={0}'.format(math_libs.ld_flags)) + elif self.spec.satisfies('%intel'): + makefile.filter(r'^ENV\s+=\sGCC', '#ENV=GCC') + makefile.filter(r'^ENV\s+=\sICC', 'ENV=ICC') + makefile.filter(r'^CC\s+=\sicc', + 'CC={0}'.format(spack_cc)) + makefile.filter(r'^CXX\s+=\sicc', + 'CXX={0}'.format(spack_cxx)) + + def install(self, spec, prefix): + mkdirp(prefix.bin) + install('test/source4_SpMV', prefix.bin) From 9b1820c2de6f92b322038f059baadb2f9f4060c2 Mon Sep 17 00:00:00 2001 From: Carson Woods Date: Wed, 1 Apr 2020 21:39:04 -0400 Subject: [PATCH 100/138] package: add static library build option for yaml-cpp (#15814) * Add static build option * Fix flake8 errors and standardize spacing of build commands Co-authored-by: Carson Woods --- var/spack/repos/builtin/packages/yaml-cpp/package.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/var/spack/repos/builtin/packages/yaml-cpp/package.py b/var/spack/repos/builtin/packages/yaml-cpp/package.py index 321792bd2ef..3679b571d83 100644 --- a/var/spack/repos/builtin/packages/yaml-cpp/package.py +++ b/var/spack/repos/builtin/packages/yaml-cpp/package.py @@ -23,6 +23,8 @@ class YamlCpp(CMakePackage): variant('shared', default=True, description='Enable build of shared libraries') + variant('static', default=False, + description='Build with static libraries') variant('pic', default=True, description='Build with position independent code') variant('tests', default=False, @@ -65,6 +67,8 @@ def cmake_args(self): options.extend([ '-DBUILD_SHARED_LIBS:BOOL=%s' % ( 'ON' if '+shared' in spec else 'OFF'), + '-DBUILD_STATIC_LIBS=%s' % ( + 'ON' if '+static' in spec else 'OFF'), '-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=%s' % ( 'ON' if '+pic' in spec else 'OFF'), '-DYAML_CPP_BUILD_TESTS:BOOL=%s' % ( From bb0c79b50436297861781a11b24441ca348df136 Mon Sep 17 00:00:00 2001 From: Carson Woods Date: Wed, 1 Apr 2020 21:39:57 -0400 Subject: [PATCH 101/138] package: add variants to cgns (#15816) * Add additional configuration options for cgns * Fix syntax errors * Further syntax fixes * Convert tabs to spaces Co-authored-by: Carson Woods --- .../repos/builtin/packages/cgns/package.py | 32 +++++++++++++++---- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/var/spack/repos/builtin/packages/cgns/package.py b/var/spack/repos/builtin/packages/cgns/package.py index a4f6aa05826..5e05c805af9 100644 --- a/var/spack/repos/builtin/packages/cgns/package.py +++ b/var/spack/repos/builtin/packages/cgns/package.py @@ -26,12 +26,18 @@ class Cgns(CMakePackage): version('3.3.1', sha256='81093693b2e21a99c5640b82b267a495625b663d7b8125d5f1e9e7aaa1f8d469') version('3.3.0', sha256='8422c67994f8dc6a2f201523a14f6c7d7e16313bdd404c460c16079dbeafc662') - variant('hdf5', default=True, description='Enable HDF5 interface') - variant('fortran', default=False, description='Enable Fortran interface') - variant('scoping', default=True, description='Enable scoping') - variant('mpi', default=True, description='Enable parallel cgns') - variant('int64', default=False, description='Build with 64-bit integers') - variant('shared', default=True, description='Enable shared library') + variant('hdf5', default=True, description='Enable HDF5 interface') + variant('fortran', default=False, description='Enable Fortran interface') + variant('base_scope', default=False, description='Enable base scope') + variant('scoping', default=True, description='Enable scoping') + variant('mpi', default=True, description='Enable parallel cgns') + variant('int64', default=False, description='Build with 64-bit integers') + variant('shared', default=True, description='Enable shared library') + variant('static', default=False, description='Build static libraries') + variant('testing', default=False, description='Build CGNS testing') + variant('legacy', default=False, description='Enable legacy options') + variant('parallel', default=False, description='Enable parallel features') + variant('mem_debug', default=False, description='Enable memory debugging option') depends_on('hdf5~mpi', when='+hdf5~mpi') depends_on('hdf5+mpi', when='+hdf5+mpi') @@ -49,9 +55,21 @@ def cmake_args(self): '-DCGNS_ENABLE_PARALLEL:BOOL=%s' % ( 'ON' if '+mpi' in spec else 'OFF'), '-DCGNS_ENABLE_TESTS:BOOL=OFF', + '-DCGNS_BUILD_TESTING:BOOL=%s' % ( + 'ON' if '+testing' in spec else 'OFF'), '-DCGNS_BUILD_CGNSTOOLS:BOOL=OFF', '-DCGNS_BUILD_SHARED:BOOL=%s' % ( - 'ON' if '+shared' in spec else 'OFF') + 'ON' if '+shared' in spec else 'OFF'), + '-DCGNS_BUILD_STATIC:BOOL=%s' % ( + 'ON' if '+static' in spec else 'OFF'), + '-DCGNS_ENABLE_BASE_SCOPE:BOOL=%s' % ( + 'ON' if '+base_scope' in spec else 'OFF'), + '-DCGNS_ENABLE_LEGACY:BOOL=%s' % ( + 'ON' if '+legacy' in spec else 'OFF'), + '-DCGNS_ENABLE_PARALLEL:BOOL=%s' % ( + 'ON' if '+parallel' in spec else 'OFF'), + '-DCGNS_ENABLE_MEM_DEBUG:BOOL=%s' % ( + 'ON' if '+mem_debug' in spec else 'OFF') ]) if '+mpi' in spec: From c3c057f2b3a15aad87adc8389c83c6faf1929ecb Mon Sep 17 00:00:00 2001 From: Michael Bentley Date: Wed, 1 Apr 2020 21:05:58 -0600 Subject: [PATCH 102/138] package: update flit and py-pyelftools versions (#15817) * Update flit package to v2.1.0 and add dependencies * flit: comment out bash dependency The host system should have bash available and compiling bash through spack failed for me. I'm not sure if binutils and coreutils should be listed as dependencies as well. * Add new version of py-pyelftools * py-pyelftools: add py-setuptools as a build dependency * Address review comments --- .../repos/builtin/packages/flit/package.py | 20 ++++++++++--------- .../builtin/packages/py-pyelftools/package.py | 5 ++++- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/var/spack/repos/builtin/packages/flit/package.py b/var/spack/repos/builtin/packages/flit/package.py index 66f4c43452c..fbe1d2f3423 100644 --- a/var/spack/repos/builtin/packages/flit/package.py +++ b/var/spack/repos/builtin/packages/flit/package.py @@ -14,16 +14,18 @@ class Flit(MakefilePackage): homepage = "https://pruners.github.io/flit" url = "https://github.com/PRUNERS/FLiT" - url = "https://github.com/PRUNERS/FLiT/archive/v2.0-alpha.1.tar.gz" + url = "https://github.com/PRUNERS/FLiT/archive/v2.1.0.tar.gz" - version('2.0-alpha.1', sha256='8de2bd400acf0f513d69f3dbf588e8984dfb18b8ccaaf684391811a0582f694b') + version('2.1.0', sha256='b31ffa02fda1ab0f5555acdc6edc353d93d53ae8ef85e099f83bcf1c83e70885') + + maintainers = ['mikebentley15'] # Add dependencies - depends_on('python@3:', type='run') - depends_on('py-numpy', type='run') - depends_on('py-matplotlib tk=False', type='run') - depends_on('py-toml', type='run') + depends_on('python@3:', type='run') + depends_on('py-toml', type='run') + depends_on('py-pyelftools', type='run') + depends_on('gmake', type=('run', 'build')) + depends_on('sqlite@3:', type='run') - @property - def install_targets(self): - return ['install', 'PREFIX=%s' % self.prefix] + def edit(self, spec, prefix): + env['PREFIX'] = prefix diff --git a/var/spack/repos/builtin/packages/py-pyelftools/package.py b/var/spack/repos/builtin/packages/py-pyelftools/package.py index a69d0a2e7e9..0607560e0b3 100644 --- a/var/spack/repos/builtin/packages/py-pyelftools/package.py +++ b/var/spack/repos/builtin/packages/py-pyelftools/package.py @@ -10,6 +10,9 @@ class PyPyelftools(PythonPackage): """A pure-Python library for parsing and analyzing ELF files and DWARF debugging information""" homepage = "https://pypi.python.org/pypi/pyelftools" - url = "https://pypi.io/packages/source/p/pyelftools/pyelftools-0.23.tar.gz" + url = "https://pypi.io/packages/source/p/pyelftools/pyelftools-0.26.tar.gz" + version('0.26', sha256='86ac6cee19f6c945e8dedf78c6ee74f1112bd14da5a658d8c9d4103aed5756a2') version('0.23', sha256='fc57aadd096e8f9b9b03f1a9578f673ee645e1513a5ff0192ef439e77eab21de') + + depends_on('py-setuptools', when='@0.25:', type='build') From 60f29a9f80ea11a4a0a11c7265e336191f847b9d Mon Sep 17 00:00:00 2001 From: Jonathon Anderson Date: Thu, 2 Apr 2020 02:54:05 -0600 Subject: [PATCH 103/138] qt: added v5.14.2 (#15824) --- var/spack/repos/builtin/packages/qt/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py index 3f4c767a692..408ebc9f591 100644 --- a/var/spack/repos/builtin/packages/qt/package.py +++ b/var/spack/repos/builtin/packages/qt/package.py @@ -24,6 +24,7 @@ class Qt(Package): phases = ['configure', 'build', 'install'] + version('5.14.2', sha256='c6fcd53c744df89e7d3223c02838a33309bd1c291fcb6f9341505fe99f7f19fa') version('5.14.1', sha256='6f17f488f512b39c2feb57d83a5e0a13dcef32999bea2e2a8f832f54a29badb8') version('5.14.0', sha256='be9a77cd4e1f9d70b58621d0753be19ea498e6b0da0398753e5038426f76a8ba') version('5.13.1', sha256='adf00266dc38352a166a9739f1a24a1e36f1be9c04bf72e16e142a256436974e') From 7d44a0090dc04ddaa81cb2653f2211e8928996e9 Mon Sep 17 00:00:00 2001 From: Jonathon Anderson Date: Thu, 2 Apr 2020 02:55:20 -0600 Subject: [PATCH 104/138] cryptsetup: added v2.2.2, v2.2.3 and v2.3.1 (#15823) Also confined the included patch to the earlier versions, as indicated. --- var/spack/repos/builtin/packages/cryptsetup/package.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/cryptsetup/package.py b/var/spack/repos/builtin/packages/cryptsetup/package.py index ccde594c84f..99c14de004b 100644 --- a/var/spack/repos/builtin/packages/cryptsetup/package.py +++ b/var/spack/repos/builtin/packages/cryptsetup/package.py @@ -16,6 +16,9 @@ class Cryptsetup(AutotoolsPackage): # If you're adding newer versions, check whether the patch below # still needs to be applied. + version('2.3.1', sha256='92aba4d559a2cf7043faed92e0f22c5addea36bd63f8c039ba5a8f3a159fe7d2') + version('2.2.3', sha256='2af0ec9551ab9c870074cae9d3f68d82cab004f4095fa89db0e4413713424a46') + version('2.2.2', sha256='2af0ec9551ab9c870074cae9d3f68d82cab004f4095fa89db0e4413713424a46') version('2.2.1', sha256='94e79a31ed38bdb0acd9af7ccca1605a2ac62ca850ed640202876b1ee11c1c61') depends_on('libuuid', type=('build', 'link')) @@ -36,7 +39,7 @@ class Cryptsetup(AutotoolsPackage): # the LDFLAGS. See https://gitlab.com/cryptsetup/cryptsetup/issues/479 # This *should* be unnecessary starting with release 2.2.2, see # https://gitlab.com/cryptsetup/cryptsetup/issues/479#note_227617031 - patch('autotools-libintl.patch') + patch('autotools-libintl.patch', when='@:2.2.1') def url_for_version(self, version): url = "https://www.kernel.org/pub/linux/utils/cryptsetup/v{0}/cryptsetup-{1}.tar.xz" From 8078089914b9df029bc98f87d0dd29de0018a403 Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Thu, 2 Apr 2020 03:06:21 -0600 Subject: [PATCH 105/138] cmake: added v3.17.0 (#15822) --- var/spack/repos/builtin/packages/cmake/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/cmake/package.py b/var/spack/repos/builtin/packages/cmake/package.py index 444a22e52a5..ce436d2ea9f 100644 --- a/var/spack/repos/builtin/packages/cmake/package.py +++ b/var/spack/repos/builtin/packages/cmake/package.py @@ -13,6 +13,7 @@ class Cmake(Package): url = 'https://github.com/Kitware/CMake/releases/download/v3.15.5/cmake-3.15.5.tar.gz' maintainers = ['chuckatkins'] + version('3.17.0', sha256='b74c05b55115eacc4fa2b77a814981dbda05cdc95a53e279fe16b7b272f00847') version('3.16.5', sha256='5f760b50b8ecc9c0c37135fae5fbf00a2fef617059aa9d61c1bb91653e5a8bfc') version('3.16.2', sha256='8c09786ec60ca2be354c29829072c38113de9184f29928eb9da8446a5f2ce6a9') version('3.16.1', sha256='a275b3168fa8626eca4465da7bb159ff07c8c6cb0fb7179be59e12cbdfa725fd') From d921974db1510831757efcbe12dc26eebab791eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=81=A5=E7=BE=8E=E7=8C=9E=E7=8C=81?= Date: Thu, 2 Apr 2020 17:13:17 +0800 Subject: [PATCH 106/138] py-ephem: added new package at v3.7.71 (#15438) --- .../repos/builtin/packages/py-ephem/package.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-ephem/package.py diff --git a/var/spack/repos/builtin/packages/py-ephem/package.py b/var/spack/repos/builtin/packages/py-ephem/package.py new file mode 100644 index 00000000000..b3f62ae3cf7 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-ephem/package.py @@ -0,0 +1,16 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyEphem(PythonPackage): + """PyEphem provides an ephem Python package for + performing high-precision astronomy computations.""" + + homepage = "https://rhodesmill.org/pyephem/" + url = "https://github.com/brandon-rhodes/pyephem/archive/v3.7.7.1.tar.gz" + + version('3.7.7.1', sha256='d9d05d85c0d38a79169acaef25964ac9df2d808f0d833354545b9ef681ff584d') From d2b6ef98f129e1a7b8dba7b267c9c49bdcb1683f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=81=A5=E7=BE=8E=E7=8C=9E=E7=8C=81?= Date: Thu, 2 Apr 2020 18:07:22 +0800 Subject: [PATCH 107/138] py-pyfits: added new package at v3.5 (#15825) --- .../builtin/packages/py-pyfits/package.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-pyfits/package.py diff --git a/var/spack/repos/builtin/packages/py-pyfits/package.py b/var/spack/repos/builtin/packages/py-pyfits/package.py new file mode 100644 index 00000000000..f013175d339 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-pyfits/package.py @@ -0,0 +1,19 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyPyfits(PythonPackage): + """The PyFITS module is a Python library providing access to + FITS(Flexible Image Transport System) files.""" + + homepage = "https://github.com/spacetelescope/pyfits" + url = "https://github.com/spacetelescope/PyFITS/archive/3.5.tar.gz" + + version('3.5', sha256='fd32596ee09170a70ddc87d0dfc5503d860ef6b68abcff486d7aa6993dff6162') + + depends_on('py-setuptools', type='build') + depends_on('py-numpy', type=('build', 'run')) From 1f6f395337988ad8b35d9603a5f54abf38b91e3c Mon Sep 17 00:00:00 2001 From: Toyohisa Kameyama Date: Thu, 2 Apr 2020 19:08:09 +0900 Subject: [PATCH 108/138] ppOpen-APPL/BEM: added new package at v0.5.0 (#15819) --- .../packages/ppopen-appl-bem/package.py | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 var/spack/repos/builtin/packages/ppopen-appl-bem/package.py diff --git a/var/spack/repos/builtin/packages/ppopen-appl-bem/package.py b/var/spack/repos/builtin/packages/ppopen-appl-bem/package.py new file mode 100644 index 00000000000..7260e1befcd --- /dev/null +++ b/var/spack/repos/builtin/packages/ppopen-appl-bem/package.py @@ -0,0 +1,79 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * +import os + + +class PpopenApplBem(MakefilePackage): + """ppOpen-APPL/BEM is software used to support a boundary element analysis + executed on a parallel computer. + + The current version includes a software framework for a parallel BEM + analysis and an H-matrix library. + If you want to use the framework based on dense matrix computations, + please move to the directory 'src/framework' and + 'src/framework_with_template'. + If you want to use the H-matrix library, please + move to the directly 'src/HACApK_with_BEM-BB-framework_1.0.0'. + """ + + homepage = "http://ppopenhpc.cc.u-tokyo.ac.jp/ppopenhpc/" + url = "file://{0}/ppohBEM_0.5.0.tar.gz".format(os.getcwd()) + + version('0.5.0', sha256='bf5e32902c97674c99353ee35de9c89206659e82b9c3d1f6edc9beffbb7c9d5f') + + depends_on('mpi') + + parallel = False + hacapk_src_dir = join_path( + 'HACApK_1.0.0', + 'src', + 'HACApK_with_BEM-BB-framework_1.0.0' + ) + src_directories = [ + join_path('bem-bb-framework_dense', 'src', 'framework_with_templates'), + join_path('bem-bb-framework_dense', 'src', 'framework'), + hacapk_src_dir + ] + + def edit(self, spec, prefix): + flags = [self.compiler.openmp_flag] + fflags = flags[:] + if spec.satisfies('%gcc'): + fflags.append('-ffree-line-length-none') + filter_file( + 'bem-bb-SCM.out', + 'HACApK-bem-bb-sSCM.out', + join_path(self.hacapk_src_dir, 'Makefile') + ) + for d in self.src_directories: + with working_dir(d): + with open('Makefile', 'a') as m: + m.write('ifeq ($(SYSTEM),spack)\n') + m.write(' CC = {0}\n'.format(spec['mpi'].mpicc)) + m.write(' F90 = {0}\n'.format(spec['mpi'].mpifc)) + m.write(' CCFLAGS = {0}\n'.format(' '.join(flags))) + m.write(' F90FLAGS = {0}\n'.format(' '.join(fflags))) + m.write(' FFLAGS = {0}\n'.format(' '.join(fflags))) + m.write(' LDFLAGS = {0}\n'.format(' '.join(flags))) + m.write('endif\n') + + def build(self, spec, prefix): + for d in self.src_directories: + with working_dir(d): + make('SYSTEM=spack') + + def install(self, spec, prefix): + mkdir(prefix.bin) + mkdir(prefix.src) + for d in self.src_directories: + for f in find(d, '*.out'): + copy(f, prefix.bin) + install_src = join_path(prefix.src, os.path.basename(d)) + mkdir(install_src) + install_tree(d, install_src) + with working_dir(install_src): + make('clean') From 144557e945ca71a4d7e790d471137874bf6bfb05 Mon Sep 17 00:00:00 2001 From: iarspider Date: Thu, 2 Apr 2020 15:52:37 +0200 Subject: [PATCH 109/138] c-blosc: Add variants to disable building tests and benchmarks (#15789) * Add variants to disable building tests and benchmarks * Flake8 * Update package.py * Update package.py * Update package.py --- var/spack/repos/builtin/packages/c-blosc/package.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/var/spack/repos/builtin/packages/c-blosc/package.py b/var/spack/repos/builtin/packages/c-blosc/package.py index 8e11cb0956a..71280590566 100644 --- a/var/spack/repos/builtin/packages/c-blosc/package.py +++ b/var/spack/repos/builtin/packages/c-blosc/package.py @@ -50,6 +50,13 @@ def cmake_args(self): args.append('-DPREFER_EXTERNAL_ZSTD=ON') args.append('-DPREFER_EXTERNAL_LZ4=ON') + if self.run_tests: + args.append('-DBUILD_TESTS=ON') + args.append('-DBUILD_BENCHMARKS=ON') + else: + args.append('-DBUILD_TESTS=OFF') + args.append('-DBUILD_BENCHMARKS=OFF') + return args @run_after('install') From 8b52f9f37d904a8c401da0096d9e5a1f1d600a13 Mon Sep 17 00:00:00 2001 From: Matthieu Dorier Date: Thu, 2 Apr 2020 23:15:45 +0100 Subject: [PATCH 110/138] unqlite: Patching unqlite to be able to build a shared library (#15830) * Patching unqlite to be able to build a shared library * Correcting a whitespace for flake8 to pass * added comment about PR on unqlite * extra commit to force github to merge --- ...IC-key-word-to-enable-building-a-sha.patch | 26 +++++++++++++++++++ .../repos/builtin/packages/unqlite/package.py | 8 ++++++ 2 files changed, 34 insertions(+) create mode 100644 var/spack/repos/builtin/packages/unqlite/0001-Removed-the-STATIC-key-word-to-enable-building-a-sha.patch diff --git a/var/spack/repos/builtin/packages/unqlite/0001-Removed-the-STATIC-key-word-to-enable-building-a-sha.patch b/var/spack/repos/builtin/packages/unqlite/0001-Removed-the-STATIC-key-word-to-enable-building-a-sha.patch new file mode 100644 index 00000000000..70602845e27 --- /dev/null +++ b/var/spack/repos/builtin/packages/unqlite/0001-Removed-the-STATIC-key-word-to-enable-building-a-sha.patch @@ -0,0 +1,26 @@ +From 7c14b18c4967c04344ceba2da90467cd27ee5678 Mon Sep 17 00:00:00 2001 +From: Matthieu Dorier +Date: Thu, 2 Apr 2020 12:43:19 +0100 +Subject: [PATCH] Removed the STATIC key word to enable building a shared + library + +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f2bb3cd..efb63a7 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -18,7 +18,7 @@ SET(SOURCES_UNQLITE + ) + + SET(UNQLITE_STATIC_LIB unqlite) +-ADD_LIBRARY(${UNQLITE_STATIC_LIB} STATIC ${HEADERS_UNQLITE} ${SOURCES_UNQLITE}) ++ADD_LIBRARY(${UNQLITE_STATIC_LIB} ${HEADERS_UNQLITE} ${SOURCES_UNQLITE}) + + INSTALL(TARGETS ${UNQLITE_STATIC_LIB} COMPONENT devel ARCHIVE DESTINATION lib) + INSTALL(FILES ${HEADERS_UNQLITE} COMPONENT devel DESTINATION include) +-- +2.20.1 + diff --git a/var/spack/repos/builtin/packages/unqlite/package.py b/var/spack/repos/builtin/packages/unqlite/package.py index 84c3b5575e4..e23f97c02b0 100644 --- a/var/spack/repos/builtin/packages/unqlite/package.py +++ b/var/spack/repos/builtin/packages/unqlite/package.py @@ -16,3 +16,11 @@ class Unqlite(CMakePackage): version('master', branch='master') version('1.1.9', sha256='33d5b5e7b2ca223942e77d31112d2e20512bc507808414451c8a98a7be5e15c0') + + # This patch corresponds to https://github.com/symisc/unqlite/pull/99 + # It should restricted to @1.1.9 once the PR lands. + patch('0001-Removed-the-STATIC-key-word-to-enable-building-a-sha.patch') + + def cmake_args(self): + args = ["-DBUILD_SHARED_LIBS:BOOL=ON"] + return args From 06ebb94f375b70ceae59fb2f4689c3c4e25e87aa Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Thu, 2 Apr 2020 14:59:48 +0200 Subject: [PATCH 111/138] go: Add 1.14.1 and 1.13.9 --- var/spack/repos/builtin/packages/go/package.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/var/spack/repos/builtin/packages/go/package.py b/var/spack/repos/builtin/packages/go/package.py index 09d5796c09d..50ade3e2c30 100644 --- a/var/spack/repos/builtin/packages/go/package.py +++ b/var/spack/repos/builtin/packages/go/package.py @@ -35,16 +35,18 @@ class Go(Package): extendable = True - version('1.14', sha256='6d643e46ad565058c7a39dac01144172ef9bd476521f42148be59249e4b74389') + version('1.14.1', sha256='2ad2572115b0d1b4cb4c138e6b3a31cee6294cb48af75ee86bec3dca04507676') + version('1.14', sha256='6d643e46ad565058c7a39dac01144172ef9bd476521f42148be59249e4b74389') + version('1.13.9', sha256='34bb19d806e0bc4ad8f508ae24bade5e9fedfa53d09be63b488a9314d2d4f31d') version('1.13.8', sha256='b13bf04633d4d8cf53226ebeaace8d4d2fd07ae6fa676d0844a688339debec34') version('1.13.7', sha256='e4ad42cc5f5c19521fbbbde3680995f2546110b5c6aa2b48c3754ff7af9b41f4') version('1.13.6', sha256='aae5be954bdc40bcf8006eb77e8d8a5dde412722bc8effcdaf9772620d06420c') version('1.13.5', sha256='27d356e2a0b30d9983b60a788cf225da5f914066b37a6b4f69d457ba55a626ff') - version('1.13.4', sha256='95dbeab442ee2746b9acf0934c8e2fc26414a0565c008631b04addb8c02e7624') + version('1.13.4', sha256='95dbeab442ee2746b9acf0934c8e2fc26414a0565c008631b04addb8c02e7624') version('1.13.3', sha256='4f7123044375d5c404280737fbd2d0b17064b66182a65919ffe20ffe8620e3df') version('1.13.2', sha256='1ea68e01472e4276526902b8817abd65cf84ed921977266f0c11968d5e915f44') version('1.13.1', sha256='81f154e69544b9fa92b1475ff5f11e64270260d46e7e36c34aafc8bc96209358') - version('1.13', sha256='3fc0b8b6101d42efd7da1da3029c0a13f22079c0c37ef9730209d8ec665bf122') + version('1.13', sha256='3fc0b8b6101d42efd7da1da3029c0a13f22079c0c37ef9730209d8ec665bf122') version('1.12.17', sha256='de878218c43aa3c3bad54c1c52d95e3b0e5d336e1285c647383e775541a28b25') version('1.12.15', sha256='8aba74417e527524ad5724e6e6c21016795d1017692db76d1b0851c6bdec84c3') version('1.12.14', sha256='39dbf05f7e2ffcb19b08f07d53dcc96feadeb1987fef9e279e7ff0c598213064') From 4d2de863ef8f0e0cb4a11b54942375fc069d6de8 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 2 Apr 2020 14:45:29 -0500 Subject: [PATCH 112/138] intel-mkl-dnn: add 1.3 --- var/spack/repos/builtin/packages/intel-mkl-dnn/package.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/intel-mkl-dnn/package.py b/var/spack/repos/builtin/packages/intel-mkl-dnn/package.py index d5160200f3a..c57b3c70a77 100644 --- a/var/spack/repos/builtin/packages/intel-mkl-dnn/package.py +++ b/var/spack/repos/builtin/packages/intel-mkl-dnn/package.py @@ -11,10 +11,11 @@ class IntelMklDnn(CMakePackage): (Intel(R) MKL-DNN).""" homepage = "https://intel.github.io/mkl-dnn/" - url = "https://github.com/intel/mkl-dnn/archive/v1.2.2.tar.gz" + url = "https://github.com/intel/mkl-dnn/archive/v1.3.tar.gz" maintainers = ['adamjstewart'] + version('1.3', sha256='7396c20bd0c2dcf71cec84422bd6f9b91778938c10a7578424a7681fb822b077') version('1.2.2', sha256='a71ec1f27c30b8a176605e8a78444f1f12301a3c313b70ff93290926c140509c') version('1.2.1', sha256='c69544783c453ab3fbf14c7a5b9a512561267690c9fc3e7fc3470f04756e0ab3') version('1.2', sha256='30979a09753e8e35d942446c3778c9f0eba543acf2fb0282af8b9c89355d0ddf') From 0083c87c262d6baeed2c3d28df73fc6b536348db Mon Sep 17 00:00:00 2001 From: Carson Woods Date: Thu, 2 Apr 2020 20:37:35 -0400 Subject: [PATCH 113/138] mpip: add demangling and setjmp variants (#15837) * Add demangling to mpip * Add setjmp support to mpip * Flake8 fixes --- var/spack/repos/builtin/packages/mpip/package.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/var/spack/repos/builtin/packages/mpip/package.py b/var/spack/repos/builtin/packages/mpip/package.py index ceaaba05b64..65c2453c25c 100644 --- a/var/spack/repos/builtin/packages/mpip/package.py +++ b/var/spack/repos/builtin/packages/mpip/package.py @@ -17,6 +17,10 @@ class Mpip(AutotoolsPackage): version("3.4.1", sha256="688bf37d73211e6a915f9fc59c358282a266d166c0a10af07a38a01a473296f0") variant('shared', default=False, description="Build the shared library") + variant('demangling', default=False, description="Build with demangling support") + variant('setjmp', + default=False, + description="Replace glic backtrace() with setjmp for stack trace") depends_on("elf") depends_on("libdwarf") @@ -36,4 +40,14 @@ def configure_args(self): config_args.append("--with-cc=%s" % self.spec['mpi'].mpicc) config_args.append("--with-cxx=%s" % self.spec['mpi'].mpicxx) + if '+demangling' in self.spec: + config_args.append('--enable-demangling') + else: + config_args.append('--disable-demangling') + + if '+setjmp' in self.spec: + config_args.append('--enable-setjmp') + else: + config_args.append('--disable-setjmp') + return config_args From 37e9e450c94a7f5ff94e4267f7b8d10acaf79824 Mon Sep 17 00:00:00 2001 From: Robert Mijakovic Date: Fri, 3 Apr 2020 02:39:44 +0200 Subject: [PATCH 114/138] Updates versions of Intel packages (#15839) * update version: intel packages daal, ipp, mkl-dnn, mkl, mpi, parallel-studio, pin, tbb and makes url parameter consistent and always use single quote. * Fixes a typo with one of the sha256 checksum.. * Adds version entries for new versions of Intel packages. Co-authored-by: Robert Mijakovic --- var/spack/repos/builtin/packages/intel-daal/package.py | 2 ++ var/spack/repos/builtin/packages/intel-ipp/package.py | 2 ++ var/spack/repos/builtin/packages/intel-mkl/package.py | 2 ++ var/spack/repos/builtin/packages/intel-mpi/package.py | 2 ++ .../repos/builtin/packages/intel-parallel-studio/package.py | 3 +++ var/spack/repos/builtin/packages/intel-pin/package.py | 1 + var/spack/repos/builtin/packages/intel-tbb/package.py | 1 + var/spack/repos/builtin/packages/intel/package.py | 1 + 8 files changed, 14 insertions(+) diff --git a/var/spack/repos/builtin/packages/intel-daal/package.py b/var/spack/repos/builtin/packages/intel-daal/package.py index 9d5ab0f2eff..8ac099e65d9 100644 --- a/var/spack/repos/builtin/packages/intel-daal/package.py +++ b/var/spack/repos/builtin/packages/intel-daal/package.py @@ -11,6 +11,8 @@ class IntelDaal(IntelPackage): homepage = "https://software.intel.com/en-us/daal" + version('2020.1.217', sha256='3f84dea0ce1038ac1b9c25b3e2c02e9fac440fa36cc8adfce69edfc06fe0edda', + url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16536/l_daal_2020.1.217.tgz') version('2020.0.166', sha256='695166c9ab32ac5d3006d6d35162db3c98734210507144e315ed7c3b7dbca9c1', url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16234/l_daal_2020.0.166.tgz') version('2019.5.281', sha256='e92aaedbe35c9daf1c9483260cb2363da8a85fa1aa5566eb38cf4b1f410bc368', diff --git a/var/spack/repos/builtin/packages/intel-ipp/package.py b/var/spack/repos/builtin/packages/intel-ipp/package.py index 1727e488be9..04df142bf5f 100644 --- a/var/spack/repos/builtin/packages/intel-ipp/package.py +++ b/var/spack/repos/builtin/packages/intel-ipp/package.py @@ -11,6 +11,8 @@ class IntelIpp(IntelPackage): homepage = "https://software.intel.com/en-us/intel-ipp" + version('2020.1.217', sha256='0bf8ac7e635e7e602cf201063a1a7dea3779b093104563fdb15e6b7ecf2f00a7', + url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16534/l_ipp_2020.1.217.tgz') version('2020.0.166', sha256='6844007892ba524e828f245355cee44e8149f4c233abbbea16f7bb55a7d6ecff', url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16233/l_ipp_2020.0.166.tgz') version('2019.5.281', sha256='61d1e1da1a4a50f1cf02a3ed44e87eed05e94d58b64ef1e67a3bdec363bee713', diff --git a/var/spack/repos/builtin/packages/intel-mkl/package.py b/var/spack/repos/builtin/packages/intel-mkl/package.py index 423223589af..4247f9bb8ed 100644 --- a/var/spack/repos/builtin/packages/intel-mkl/package.py +++ b/var/spack/repos/builtin/packages/intel-mkl/package.py @@ -13,6 +13,8 @@ class IntelMkl(IntelPackage): homepage = "https://software.intel.com/en-us/intel-mkl" + version('2020.1.217', sha256='082a4be30bf4f6998e4d6e3da815a77560a5e66a68e254d161ab96f07086066d', + url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16533/l_mkl_2020.1.217.tgz') version('2020.0.166', sha256='f6d92deb3ff10b11ba3df26b2c62bb4f0f7ae43e21905a91d553e58f0f5a8ae0', url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16232/l_mkl_2020.0.166.tgz') version('2019.5.281', sha256='9995ea4469b05360d509c9705e9309dc983c0a10edc2ae3a5384bc837326737e', diff --git a/var/spack/repos/builtin/packages/intel-mpi/package.py b/var/spack/repos/builtin/packages/intel-mpi/package.py index 27885ed1f21..15cb84150ef 100644 --- a/var/spack/repos/builtin/packages/intel-mpi/package.py +++ b/var/spack/repos/builtin/packages/intel-mpi/package.py @@ -11,6 +11,8 @@ class IntelMpi(IntelPackage): homepage = "https://software.intel.com/en-us/intel-mpi-library" + version('2019.7.217', sha256='90383b0023f84ac003a55d8bb29dbcf0c639f43a25a2d8d8698a16e770ac9c07', + url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16546/l_mpi_2019.7.217.tgz') version('2019.6.166', sha256='119be69f1117c93a9e5e9b8b4643918e55d2a55a78ad9567f77d16cdaf18cd6e', url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16120/l_mpi_2019.6.166.tgz') version('2019.5.281', sha256='9c59da051f1325b221e5bc4d8b689152e85d019f143069fa39e17989306811f4', diff --git a/var/spack/repos/builtin/packages/intel-parallel-studio/package.py b/var/spack/repos/builtin/packages/intel-parallel-studio/package.py index f1b453c257c..410cd4045e4 100644 --- a/var/spack/repos/builtin/packages/intel-parallel-studio/package.py +++ b/var/spack/repos/builtin/packages/intel-parallel-studio/package.py @@ -20,6 +20,7 @@ class IntelParallelStudio(IntelPackage): # in the 'intel' package. # Cluster Edition (top tier; all components included) + version('cluster.2020.1', sha256='fd11d8de72b2bd60474f8bce7b463e4cbb2255969b9eaf24f689575aa2a2abab', url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16526/parallel_studio_xe_2020_update1_cluster_edition.tgz') version('cluster.2020.0', sha256='573b1d20707d68ce85b70934cfad15b5ad9cc14124a261c17ddd7717ba842c64', url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16225/parallel_studio_xe_2020_cluster_edition.tgz') # version('cluster.2019.5', sha256='c03421de616bd4e640ed25ce4103ec9c5c85768a940a5cb5bd1e97b45be33904', url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/15809/parallel_studio_xe_2019_update5_cluster_edition.tgz') @@ -58,6 +59,7 @@ class IntelParallelStudio(IntelPackage): # NB: Pre-2018 download packages for Professional are the same as for # Cluster; differences manifest only in the tokens present in the license # file delivered as part of the purchase. + version('professional.2020.1', sha256='5b547be92ecf50cb338b3038a565f5609135b27aa98a8b7964879eb2331eb29a', url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16527/parallel_studio_xe_2020_update1_professional_edition.tgz') version('professional.2020.0', sha256='e88cad18d28da50ed9cb87b12adccf13efd91bf94731dc33290481306c6f15ac', url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16226/parallel_studio_xe_2020_professional_edition.tgz') # version('professional.2019.5', sha256='0ec638330214539361f8632e20759f385a5a78013dcc980ee93743d86d354452', url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/15810/parallel_studio_xe_2019_update5_professional_edition.tgz') @@ -92,6 +94,7 @@ class IntelParallelStudio(IntelPackage): version('professional.2015.1', sha256='84fdf48d1de20e1d580ba5d419a5bc1c55d217a4f5dc1807190ecffe0229a62b', url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/4992/parallel_studio_xe_2015_update1.tgz') # Composer Edition (basic tier; excluded: MPI/..., Advisor/Inspector/Vtune) + version('composer.2020.1', sha256='26c7e7da87b8a83adfd408b2a354d872be97736abed837364c1bf10f4469b01e', url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16530/parallel_studio_xe_2020_update1_composer_edition.tgz') version('composer.2020.0', sha256='9168045466139b8e280f50f0606b9930ffc720bbc60bc76f5576829ac15757ae', url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16229/parallel_studio_xe_2020_composer_edition.tgz') # version('composer.2019.5', sha256='e8c8e4b9b46826a02c49325c370c79f896858611bf33ddb7fb204614838ad56c', url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/15813/parallel_studio_xe_2019_update5_composer_edition.tgz') diff --git a/var/spack/repos/builtin/packages/intel-pin/package.py b/var/spack/repos/builtin/packages/intel-pin/package.py index ae0473734c3..e886ba0784c 100644 --- a/var/spack/repos/builtin/packages/intel-pin/package.py +++ b/var/spack/repos/builtin/packages/intel-pin/package.py @@ -15,6 +15,7 @@ class IntelPin(Package): homepage = "http://www.pintool.org" maintainers = ['matthiasdiener'] + version('3.13', sha256='04a36e91f3f85119c3496f364a8806c82bb675f7536a8ab45344c9890b5e2714', url='https://software.intel.com/sites/landingpage/pintool/downloads/pin-3.13-98189-g60a6ef199-gcc-linux.tar.gz') version('3.11', sha256='aa5abca475a6e106a75e6ed4ba518fb75a57549a59f00681e6bd6e3f221bd23a', url='https://software.intel.com/sites/landingpage/pintool/downloads/pin-3.11-97998-g7ecce2dac-gcc-linux.tar.gz') version('3.10', sha256='7c8f14c3a0654bab662b58aba460403138fa44517bd40052501e8e0075b2702a', url='https://software.intel.com/sites/landingpage/pintool/downloads/pin-3.10-97971-gc5e41af74-gcc-linux.tar.gz') version('3.7', sha256='4730328795be61f1addb0e505a3792a4b4ca80b1b9405acf217beec6b5b90fb8', url='https://software.intel.com/sites/landingpage/pintool/downloads/pin-3.7-97619-g0d0c92f4f-gcc-linux.tar.gz') diff --git a/var/spack/repos/builtin/packages/intel-tbb/package.py b/var/spack/repos/builtin/packages/intel-tbb/package.py index 20d8a2f9e99..94eec8a06e6 100644 --- a/var/spack/repos/builtin/packages/intel-tbb/package.py +++ b/var/spack/repos/builtin/packages/intel-tbb/package.py @@ -23,6 +23,7 @@ class IntelTbb(Package): # Note: when adding new versions, please check and update the # patches, filters and url_for_version() below as needed. + version('2020.2', sha256='4804320e1e6cbe3a5421997b52199e3c1a3829b2ecb6489641da4b8e32faf500') version('2020.1', sha256='7c96a150ed22bc3c6628bc3fef9ed475c00887b26d37bca61518d76a56510971') version('2020.0', sha256='57714f2d2cf33935db33cee93af57eb3ecd5a7bef40c1fb7ca4a41d79684b118') version('2019.9', sha256='3f5ea81b9caa195f1967a599036b473b2e7c347117330cda99b79cfcf5b77c84') diff --git a/var/spack/repos/builtin/packages/intel/package.py b/var/spack/repos/builtin/packages/intel/package.py index 5f3c19d5788..3bb9ea5c0e2 100644 --- a/var/spack/repos/builtin/packages/intel/package.py +++ b/var/spack/repos/builtin/packages/intel/package.py @@ -13,6 +13,7 @@ class Intel(IntelPackage): # Same as in ../intel-parallel-studio/package.py, Composer Edition, # but the version numbering in Spack differs. + version('19.1.1', sha256='26c7e7da87b8a83adfd408b2a354d872be97736abed837364c1bf10f4469b01e', url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16530/parallel_studio_xe_2020_update1_composer_edition.tgz') version('19.1.0', sha256='9168045466139b8e280f50f0606b9930ffc720bbc60bc76f5576829ac15757ae', url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16229/parallel_studio_xe_2020_composer_edition.tgz') version('19.0.5', sha256='e8c8e4b9b46826a02c49325c370c79f896858611bf33ddb7fb204614838ad56c', url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/15813/parallel_studio_xe_2019_update5_composer_edition.tgz') version('19.0.4', sha256='1915993445323e1e78d6de73702a88fa3df2036109cde03d74ee38fef9f1abf2', url='http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/15537/parallel_studio_xe_2019_update4_composer_edition.tgz') From 73ac853c3d7d5346210aadb5dc48cd1613cd759a Mon Sep 17 00:00:00 2001 From: Shintaro Iwasaki Date: Thu, 2 Apr 2020 20:11:06 -0500 Subject: [PATCH 115/138] argobots: new version 1.0 (#15786) --- var/spack/repos/builtin/packages/argobots/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/argobots/package.py b/var/spack/repos/builtin/packages/argobots/package.py index 11c8febea6a..8f967d020b1 100644 --- a/var/spack/repos/builtin/packages/argobots/package.py +++ b/var/spack/repos/builtin/packages/argobots/package.py @@ -21,6 +21,7 @@ class Argobots(AutotoolsPackage): maintainers = ['shintaro-iwasaki'] version("master", branch="master") + version("1.0", sha256="36a0815f7bf99900a9c9c1eef61ef9b3b76aa2cfc4594a304f6c8c3296da8def") version("1.0rc2", sha256="7496b8bd39930a548b01aa3b1fe8f8b582c272600ef6a05ddc4398cf21dc12a2") version("1.0rc1", sha256="2dc4487556dce602655a6535f501136f0edc3575708029c80b1af6dccd069ce7") version("1.0b1", sha256="480b85b0e8db288400088a57c2dc5639f556843b06b0492841920c38348a2a3e") From 1d14f74d197e9851ac56fb6edce17b4610bad0d1 Mon Sep 17 00:00:00 2001 From: Jennifer Herting Date: Thu, 2 Apr 2020 21:11:48 -0400 Subject: [PATCH 116/138] New Package: py-astropy-helpers (#15658) * [py-astropy-helpers] created template * [py-astropy-helpers] - removed boilerplate - added homepage - added depends_on('py-astropy') * [py-astropy-helpers] Setuptools versioning * [py-astropy-helpers] cleaned up unused build_args method * [py-astropy-helpers] py-astropy is a runtime dependency * [py-astropy-helpers] requires python@3.6: * [py-astropy-helpers] cleaned up unnecessary older versions * [py-astropy-helpers] turns out py-astropy isn't actually a dependency --- .../packages/py-astropy-helpers/package.py | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-astropy-helpers/package.py diff --git a/var/spack/repos/builtin/packages/py-astropy-helpers/package.py b/var/spack/repos/builtin/packages/py-astropy-helpers/package.py new file mode 100644 index 00000000000..636fcb8b305 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-astropy-helpers/package.py @@ -0,0 +1,21 @@ +# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyAstropyHelpers(PythonPackage): + """The astropy-helpers package includes many build, + installation, and documentation-related tools used by the + Astropy project, but packaged separately for use by other + projects that wish to leverage this work.""" + + homepage = "https://github.com/astropy/astropy-helpers" + url = "https://github.com/astropy/astropy-helpers/archive/v4.0.1.tar.gz" + + version('4.0.1', sha256='88602971c3b63d6aaa6074d013f995d1e234acb3d517d70d7fcebd30cdaf5c89') + + depends_on('python@3.6:', type=('build', 'run')) + depends_on('py-setuptools@30.3:', type='build') From 1662c3581bb8e07a4a59841b31354877b24ed7c9 Mon Sep 17 00:00:00 2001 From: Carson Woods Date: Thu, 2 Apr 2020 22:09:33 -0400 Subject: [PATCH 117/138] pmix: add option for toggling pmi backwards compatibility (#15838) * Add option for toggling pmi backwards compatibility * Remove trailing whitespace --- var/spack/repos/builtin/packages/pmix/package.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/var/spack/repos/builtin/packages/pmix/package.py b/var/spack/repos/builtin/packages/pmix/package.py index fb4e37e572b..2cb5126b535 100644 --- a/var/spack/repos/builtin/packages/pmix/package.py +++ b/var/spack/repos/builtin/packages/pmix/package.py @@ -50,6 +50,10 @@ class Pmix(AutotoolsPackage): depends_on('libevent@2.0.20:2.0.22,2.1.8') depends_on('hwloc@1.11.0:1.11.99,2.0.1:', when='@3.0.0:') + variant('pmi_backwards_compatibility', + default=True, + description="Toggle pmi backwards compatibility") + def configure_args(self): spec = self.spec @@ -58,6 +62,11 @@ def configure_args(self): '--enable-static' ] + if '+pmi_backwards_compatibility' in self.spec: + config_args.append('--enable-pmi-backward-compatibility') + else: + config_args.append('--disable-pmi-backward-compatibility') + # libevent support config_args.append( '--with-libevent={0}'.format(spec['libevent'].prefix)) From 75a2f8046a5782dc227f2679d6860558db4b1bfb Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 3 Apr 2020 01:12:03 -0500 Subject: [PATCH 118/138] Add commands to facilitate Spack/Python/OS reporting (#15834) * Add --version arg to spack python command * Add `spack debug report` command --- .github/ISSUE_TEMPLATE/bug_report.md | 48 ++++++++-------------------- lib/spack/spack/cmd/debug.py | 18 ++++++++++- lib/spack/spack/cmd/python.py | 9 ++++++ lib/spack/spack/test/cmd/debug.py | 14 +++++++- lib/spack/spack/test/cmd/python.py | 7 ++++ share/spack/spack-completion.bash | 8 +++-- 6 files changed, 65 insertions(+), 39 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index b38a6774164..9a568285ea1 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,21 +1,11 @@ --- -name: "\U0001F41E Bug report" -about: Report a bug in the core of Spack (command not working as expected, etc.) +name: "\U0001F41E Bug report" +about: Report a bug in the core of Spack (command not working as expected, etc.) labels: "bug,triage" --- - - - -### Spack version - -```console -$ spack --version - -``` + ### Steps to reproduce the issue @@ -27,38 +17,26 @@ $ spack ### Error Message - ```console -$ spack -d --stacktrace -$ spack -d --stacktrace -... +$ spack --debug --stacktrace ``` -that activate the full debug output. ---> ### Information on your system - ---> + -### General information +### Additional information -- [ ] I have run `spack --version` and reported the version of Spack + +- [ ] I have run `spack debug report` and reported the version of Spack/Python/Platform - [ ] I have searched the issues of this repo and believe this is not a duplicate - [ ] I have run the failing commands in debug mode and reported the output - \ No newline at end of file +Other than that, thanks for taking the time to contribute to Spack! --> diff --git a/lib/spack/spack/cmd/debug.py b/lib/spack/spack/cmd/debug.py index 4fc39251aff..074e95209af 100644 --- a/lib/spack/spack/cmd/debug.py +++ b/lib/spack/spack/cmd/debug.py @@ -3,7 +3,10 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +from __future__ import print_function + import os +import platform import re from datetime import datetime from glob import glob @@ -11,7 +14,9 @@ import llnl.util.tty as tty from llnl.util.filesystem import working_dir +import spack.architecture as architecture import spack.paths +from spack.main import get_version from spack.util.executable import which description = "debugging commands for troubleshooting Spack" @@ -23,6 +28,7 @@ def setup_parser(subparser): sp = subparser.add_subparsers(metavar='SUBCOMMAND', dest='debug_command') sp.add_parser('create-db-tarball', help="create a tarball of Spack's installation metadata") + sp.add_parser('report', help='print information useful for bug reports') def _debug_tarball_suffix(): @@ -78,6 +84,16 @@ def create_db_tarball(args): tty.msg('Created %s' % tarball_name) +def report(args): + print('* **Spack:**', get_version()) + print('* **Python:**', platform.python_version()) + print('* **Platform:**', architecture.Arch( + architecture.platform(), 'frontend', 'frontend')) + + def debug(parser, args): - action = {'create-db-tarball': create_db_tarball} + action = { + 'create-db-tarball': create_db_tarball, + 'report': report, + } action[args.debug_command](args) diff --git a/lib/spack/spack/cmd/python.py b/lib/spack/spack/cmd/python.py index 2f2290aad8a..a91f3663fbe 100644 --- a/lib/spack/spack/cmd/python.py +++ b/lib/spack/spack/cmd/python.py @@ -3,6 +3,8 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +from __future__ import print_function + import os import sys import code @@ -20,6 +22,9 @@ def setup_parser(subparser): + subparser.add_argument( + '-V', '--version', action='store_true', + help='print the Python version number and exit') subparser.add_argument( '-c', dest='python_command', help='command to execute') subparser.add_argument( @@ -31,6 +36,10 @@ def setup_parser(subparser): def python(parser, args, unknown_args): + if args.version: + print('Python', platform.python_version()) + return + if args.module: sys.argv = ['spack-python'] + unknown_args + args.python_args runpy.run_module(args.module, run_name="__main__", alter_sys=True) diff --git a/lib/spack/spack/test/cmd/debug.py b/lib/spack/spack/test/cmd/debug.py index 4a06276abf0..2898ad670eb 100644 --- a/lib/spack/spack/test/cmd/debug.py +++ b/lib/spack/spack/test/cmd/debug.py @@ -3,12 +3,15 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import platform + import pytest import os import os.path -from spack.main import SpackCommand +import spack.architecture as architecture +from spack.main import SpackCommand, get_version from spack.util.executable import which debug = SpackCommand('debug') @@ -41,3 +44,12 @@ def test_create_db_tarball(tmpdir, database): spec_suffix = '%s/.spack/spec.yaml' % spec.dag_hash() assert spec_suffix in contents + + +def test_report(): + out = debug('report') + arch = architecture.Arch(architecture.platform(), 'frontend', 'frontend') + + assert get_version() in out + assert platform.python_version() in out + assert str(arch) in out diff --git a/lib/spack/spack/test/cmd/python.py b/lib/spack/spack/test/cmd/python.py index 5bc05e0127e..b1c9d3db00e 100644 --- a/lib/spack/spack/test/cmd/python.py +++ b/lib/spack/spack/test/cmd/python.py @@ -3,6 +3,8 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import platform + import pytest import spack @@ -16,6 +18,11 @@ def test_python(): assert out.strip() == spack.spack_version +def test_python_version(): + out = python('-V') + assert platform.python_version() in out + + def test_python_with_module(): # pytest rewrites a lot of modules, which interferes with runpy, so # it's hard to test this. Trying to import a module like sys, that diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash index 38788438f7d..6df546e89f0 100755 --- a/share/spack/spack-completion.bash +++ b/share/spack/spack-completion.bash @@ -655,7 +655,7 @@ _spack_debug() { then SPACK_COMPREPLY="-h --help" else - SPACK_COMPREPLY="create-db-tarball" + SPACK_COMPREPLY="create-db-tarball report" fi } @@ -663,6 +663,10 @@ _spack_debug_create_db_tarball() { SPACK_COMPREPLY="-h --help" } +_spack_debug_report() { + SPACK_COMPREPLY="-h --help" +} + _spack_dependencies() { if $list_options then @@ -1272,7 +1276,7 @@ _spack_pydoc() { _spack_python() { if $list_options then - SPACK_COMPREPLY="-h --help -c -m" + SPACK_COMPREPLY="-h --help -V --version -c -m" else SPACK_COMPREPLY="" fi From e227a684b93b9eabf78deaa51847a6f14fa322fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=81=A5=E7=BE=8E=E7=8C=9E=E7=8C=81?= Date: Fri, 3 Apr 2020 16:29:25 +0800 Subject: [PATCH 119/138] py-d2to1: added v0.2.12 (#15844) --- .../builtin/packages/py-d2to1/package.py | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-d2to1/package.py diff --git a/var/spack/repos/builtin/packages/py-d2to1/package.py b/var/spack/repos/builtin/packages/py-d2to1/package.py new file mode 100644 index 00000000000..040d0b8d4b5 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-d2to1/package.py @@ -0,0 +1,20 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyD2to1(PythonPackage): + """d2to1 (the 'd' is for 'distutils') allows + using distutils2-like setup.cfg files for a package's + metadata with a distribute/setuptools setup.py script.""" + + homepage = "https://github.com/embray/d2to1" + url = "https://github.com/embray/d2to1/archive/0.2.12.tar.gz" + + version('0.2.12.post1', sha256='80e026ccc604850d8171fd8599b3130d234c0d443e1dc4e2039be0b204cea9b4') + version('0.2.12', sha256='04ab9f3ac255d367ecda1eb59379e5031816740c3a3eda95d0dba9f6bb3b7ca4') + + depends_on('py-setuptools', type='build') From 87444aef7e939e9c10a66fb9eb288d02074c856a Mon Sep 17 00:00:00 2001 From: Toyohisa Kameyama Date: Fri, 3 Apr 2020 18:11:46 +0900 Subject: [PATCH 120/138] ppOpen-APPL/BEM-AT: added new package at v0.1.0 (#15841) --- .../ppopen-appl-bem-at/duplicate_defs.patch | 13 +++++ .../packages/ppopen-appl-bem-at/package.py | 58 +++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100755 var/spack/repos/builtin/packages/ppopen-appl-bem-at/duplicate_defs.patch create mode 100644 var/spack/repos/builtin/packages/ppopen-appl-bem-at/package.py diff --git a/var/spack/repos/builtin/packages/ppopen-appl-bem-at/duplicate_defs.patch b/var/spack/repos/builtin/packages/ppopen-appl-bem-at/duplicate_defs.patch new file mode 100755 index 00000000000..d21d9364e58 --- /dev/null +++ b/var/spack/repos/builtin/packages/ppopen-appl-bem-at/duplicate_defs.patch @@ -0,0 +1,13 @@ +diff --git a/framework_with_templates/OAT_bem-bb-fw-dense-0.1.0.f90 b/framework_with_templates/OAT_bem-bb-fw-dense-0.1.0.f90 +index edabbed..16c6a52 100644 +--- a/framework_with_templates/OAT_bem-bb-fw-dense-0.1.0.f90 ++++ b/framework_with_templates/OAT_bem-bb-fw-dense-0.1.0.f90 +@@ -1201,8 +1201,6 @@ contains + integer i, j + + include "OAT.h" +- integer iusw1_ppohBEMresidual_direct +- integer iusw1_ppohBEMmatvec_direct + + character*100 ctmp + diff --git a/var/spack/repos/builtin/packages/ppopen-appl-bem-at/package.py b/var/spack/repos/builtin/packages/ppopen-appl-bem-at/package.py new file mode 100644 index 00000000000..cba923eeeac --- /dev/null +++ b/var/spack/repos/builtin/packages/ppopen-appl-bem-at/package.py @@ -0,0 +1,58 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * +import os + + +class PpopenApplBemAt(MakefilePackage): + """ + ppOpen-APPL/BEM-AT is ppOpen-APPL/Bem with auto tuning. + If you want to use ppOpen-APPL/BERM-AT, please copy files in + src/framework_with_template from ppOpen-APPL/BEM install directory. + """ + + homepage = "http://ppopenhpc.cc.u-tokyo.ac.jp/ppopenhpc/" + url = "file://{0}/ppohBEM_AT_0.1.0.tar.gz".format(os.getcwd()) + + version('0.1.0', sha256='215034fea7d9f64e6361d8e605e04c7f5d302c87ce048dcd6d146b14d22c17f9') + # In OAT_bem-bb-fw-dense-0.1.0.f90 the 2 variables are defined. + # But ame variables are already defined in include file DAT.h. + # This patch is deleted the variables definitions + # in OAT_bem-bb-fw-dense-0.1.0.f90. + patch('duplicate_defs.patch', when="@0.1.0") + + depends_on('mpi') + depends_on('ppopen-appl-bem', type='run') + + parallel = False + build_directory = 'framework_with_templates' + build_targets = ['SYSTEM=spack'] + + def edit(self, spec, prefix): + flags = ['-O3', self.compiler.openmp_flag] + fflags = flags[:] + if spec.satisfies('%gcc'): + fflags.append('-ffree-line-length-none') + with open(join_path(self.build_directory, 'Makefile'), 'a') as m: + m.write('ifeq ($(SYSTEM),spack)\n') + m.write(' CC = {0}\n'.format(spec['mpi'].mpicc)) + m.write(' F90 = {0}\n'.format(spec['mpi'].mpifc)) + m.write(' CCFLAGS = {0}\n'.format(' '.join(flags))) + m.write(' F90FLAGS = {0}\n'.format(' '.join(fflags))) + m.write(' FFLAGS = {0}\n'.format(' '.join(fflags))) + m.write(' LDFLAGS = {0}\n'.format(' '.join(flags))) + m.write('endif\n') + + def install(self, spec, prefix): + install_src_dir = join_path(prefix.src, self.build_directory) + mkdir(prefix.bin) + mkdirp(install_src_dir) + for f in find(self.build_directory, '*.out'): + copy(f, prefix.bin) + install_src = join_path(prefix.src, self.build_directory) + install_tree(self.build_directory, install_src_dir) + with working_dir(install_src): + make('clean') From c0d2f70d02856508d4edd61d710de05d2a5ef178 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=81=A5=E7=BE=8E=E7=8C=9E=E7=8C=81?= Date: Fri, 3 Apr 2020 17:12:59 +0800 Subject: [PATCH 121/138] py-stsci-distutils: new package at v0.3.8 (#15845) --- .../packages/py-stsci-distutils/package.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-stsci-distutils/package.py diff --git a/var/spack/repos/builtin/packages/py-stsci-distutils/package.py b/var/spack/repos/builtin/packages/py-stsci-distutils/package.py new file mode 100644 index 00000000000..f14a6ebd468 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-stsci-distutils/package.py @@ -0,0 +1,19 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyStsciDistutils(PythonPackage): + """This package contains utilities used to + package some of STScI's Python projects.""" + + homepage = "https://github.com/spacetelescope/stsci.distutils" + url = "https://github.com/spacetelescope/stsci.distutils/archive/0.3.8.tar.gz" + + version('0.3.8', sha256='a52f3ec3b392a9cecd98d143b678c27346cbfa8f34c34698821d7e167907edce') + + depends_on('py-setuptools', type='build') + depends_on('py-d2to1', type='build') From 1461332e9712c48bc5b0ade5ea4c2c1d0f99db11 Mon Sep 17 00:00:00 2001 From: Jennifer Herting Date: Fri, 3 Apr 2020 12:07:25 -0400 Subject: [PATCH 122/138] New package: libnotify (#15769) * [libnotify] created template * [libnotify] added homepage and description * [libnotify] added dependencies * [libnotify] patch location to docbook * [libnotify] more dependency work * [libnotify] reorder dependencies * [libnotify] added variant docbook * [libnotify] more accurate dependency version * [libnotify] xsltproc still needed * [libnotify] created test variant * [libnotify] added gtkdoc varient * [libnotify] cleaned up leftover fixme * [libnotify] flake8 * [libnotify] test variant became self.run_tests * [libnotify] pkgconfig is build dependency * [libnotify] commented out broken variants * [libnotify] flake8 --- .../packages/libnotify/docbook-location.patch | 11 ++++ .../builtin/packages/libnotify/package.py | 57 +++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 var/spack/repos/builtin/packages/libnotify/docbook-location.patch create mode 100644 var/spack/repos/builtin/packages/libnotify/package.py diff --git a/var/spack/repos/builtin/packages/libnotify/docbook-location.patch b/var/spack/repos/builtin/packages/libnotify/docbook-location.patch new file mode 100644 index 00000000000..5fcaf2ddb77 --- /dev/null +++ b/var/spack/repos/builtin/packages/libnotify/docbook-location.patch @@ -0,0 +1,11 @@ +--- a/meson.build 2020-03-30 14:00:26.851258170 -0400 ++++ b/meson.build 2020-03-30 14:03:43.134195999 -0400 +@@ -54,7 +54,7 @@ + + if get_option('man') + xsltproc = find_program('xsltproc', required: true) +- stylesheet = 'http://docbook.sourceforge.net/release/xsl-ns/current/manpages/docbook.xsl' ++ stylesheet = 'http://cdn.docbook.org/release/xsl/current/manpages/docbook.xsl' + xsltproc_command = [ + xsltproc, + '--nonet', diff --git a/var/spack/repos/builtin/packages/libnotify/package.py b/var/spack/repos/builtin/packages/libnotify/package.py new file mode 100644 index 00000000000..6407fd6406b --- /dev/null +++ b/var/spack/repos/builtin/packages/libnotify/package.py @@ -0,0 +1,57 @@ +# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Libnotify(MesonPackage): + """libnotify is a library for sending desktop notifications""" + + homepage = "https://github.com/GNOME/libnotify" + url = "https://github.com/GNOME/libnotify/archive/0.7.9.tar.gz" + + version('0.7.9', sha256='9bd4f5fa911d27567e7cc2d2d09d69356c16703c4e8d22c0b49a5c45651f3af0') + + # Libnotify is having trouble with finding the DTD and XSLT for docbook, + # which is required for both of these varients. + # variant('docbook', default=False, + # description='Build docbook docs. Currently broken') + # variant('gtkdoc', default=False, + # description='Build with gtkdoc. Currently broken') + + depends_on('pkgconfig', type='build') + depends_on('glib@2.26.0:') + depends_on('gtkplus@2.90:') + depends_on('gobject-introspection') + depends_on('libxslt', type='build') + depends_on('docbook-xsl', type='build') + # depends_on('gtk-doc', when='+gtkdoc', type='build') + # depends_on('xmlto', when='+docbook', type='build') + + patch('docbook-location.patch') + + def meson_args(self): + # spec = self.spec + args = [] + + # if '+docbook' in spec: + # args.append('-Ddocbook_docs=enabled') + # else: + # args.append('-Ddocbook_docs=disabled') + args.append('-Ddocbook_docs=disabled') + + # if self.run_tests: + # args.append('-Dtests=true') + # else: + # args.append('-Dtests=false') + args.append('-Dtests=false') + + # if '+gtkdoc' in spec: + # args.append('-Dgtk_doc=true') + # else: + # args.append('-Dgtk_doc=false') + args.append('-Dgtk_doc=false') + + return args From be57c0f6e716425d624eaaa9c56c0ea603eef8f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Simonis?= Date: Fri, 3 Apr 2020 18:33:47 +0200 Subject: [PATCH 123/138] precice: Add version 2.0.2 (#15846) --- var/spack/repos/builtin/packages/precice/package.py | 1 + 1 file changed, 1 insertion(+) diff --git a/var/spack/repos/builtin/packages/precice/package.py b/var/spack/repos/builtin/packages/precice/package.py index 40661e43291..986bfa7f146 100644 --- a/var/spack/repos/builtin/packages/precice/package.py +++ b/var/spack/repos/builtin/packages/precice/package.py @@ -19,6 +19,7 @@ class Precice(CMakePackage): maintainers = ['fsimonis', 'MakisH'] version('develop', branch='develop') + version('2.0.2', sha256='72864480f32696e7b6da94fd404ef5cd6586e2e1640613e46b75f1afac8569ed') version('2.0.1', sha256='e4fe2d2063042761ab325f8c802f88ae088c90862af288ad1a642967d074bd50') version('2.0.0', sha256='c8979d366f06e35626a8da08a1c589df77ec13972eb524a1ba99a011e245701f') version('1.6.1', sha256='7d0c54faa2c69e52304f36608d93c408629868f16f3201f663a0f9b2008f0763') From 5e5b68c063d16e5574a66ffa216299d2d30f71d4 Mon Sep 17 00:00:00 2001 From: G-Ragghianti <33492707+G-Ragghianti@users.noreply.github.com> Date: Fri, 3 Apr 2020 12:39:29 -0400 Subject: [PATCH 124/138] Papi package: updating with new bugfix version and variant (#15849) * Added new variant "sde" to papi * Updated papi with new version and new variant "sde" --- var/spack/repos/builtin/packages/papi/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/papi/package.py b/var/spack/repos/builtin/packages/papi/package.py index 6e0b6cb817a..f82f319fa0c 100644 --- a/var/spack/repos/builtin/packages/papi/package.py +++ b/var/spack/repos/builtin/packages/papi/package.py @@ -23,6 +23,7 @@ class Papi(Package): maintainers = ['G-Ragghianti'] url = "http://icl.cs.utk.edu/projects/papi/downloads/papi-5.4.1.tar.gz" + version('6.0.0.1', sha256='3cd7ed50c65b0d21d66e46d0ba34cd171178af4bbf9d94e693915c1aca1e287f') version('6.0.0', sha256='3442709dae3405c2845b304c06a8b15395ecf4f3899a89ceb4d715103cb4055f') version('5.7.0', sha256='d1a3bb848e292c805bc9f29e09c27870e2ff4cda6c2fba3b7da8b4bba6547589') version('5.6.0', sha256='49b7293f9ca2d74d6d80bd06b5c4be303663123267b4ac0884cbcae4c914dc47') @@ -37,6 +38,7 @@ class Papi(Package): variant('powercap', default=False, description='Enable powercap interface support') variant('rapl', default=False, description='Enable RAPL support') variant('lmsensors', default=False, description='Enable lm_sensors support') + variant('sde', default=False, description='Enable software defined events') depends_on('lm-sensors', when='+lmsensors') From 0a9d4f6720a0695ee08095a5b051b8dd814a52f1 Mon Sep 17 00:00:00 2001 From: Jennifer Herting Date: Fri, 3 Apr 2020 14:58:02 -0400 Subject: [PATCH 125/138] New package: py-portalocker (#15854) * [py-portalocker] Create template * [py-portalocker] added homepage and description * [py-portalocker] specified dependencies * [py-portalocker] cleaned up fixmes * [py-portalocker] removed unnecessary python dependency listing --- .../builtin/packages/py-portalocker/package.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-portalocker/package.py diff --git a/var/spack/repos/builtin/packages/py-portalocker/package.py b/var/spack/repos/builtin/packages/py-portalocker/package.py new file mode 100644 index 00000000000..f4aa5145509 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-portalocker/package.py @@ -0,0 +1,18 @@ +# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyPortalocker(PythonPackage): + """Portalocker is a library to provide an easy API to file + locking.""" + + homepage = "https://github.com/WoLpH/portalocker" + url = "https://github.com/WoLpH/portalocker/archive/v1.6.0.tar.gz" + + version('1.6.0', sha256='084ff315ccb9fb38a7c06155d409da5df29647da7c6d2bc2b24637f9f79001ff') + + depends_on('py-setuptools@38.3.0:', type='build') From 0b99cc2261c075dd2abaf829ffc5b3bcce954bb9 Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Fri, 3 Apr 2020 13:26:33 -0700 Subject: [PATCH 126/138] Environments/views: only override spec prefix for non-external packages (#15475) * only override spec prefix for non-external packages * add test that environment shell modifications respect explicitly-specified prefixes for external packages * add clarifying comment --- lib/spack/spack/test/cmd/env.py | 48 +++++++++++++++++++++++++++++ lib/spack/spack/user_environment.py | 2 +- 2 files changed, 49 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/test/cmd/env.py b/lib/spack/spack/test/cmd/env.py index 841e6e20c8a..4f3abb4438d 100644 --- a/lib/spack/spack/test/cmd/env.py +++ b/lib/spack/spack/test/cmd/env.py @@ -370,6 +370,54 @@ def test_init_from_yaml(tmpdir): assert not e2.specs_by_hash +@pytest.mark.usefixtures('config') +def test_env_view_external_prefix(tmpdir_factory, mutable_database, + mock_packages): + fake_prefix = tmpdir_factory.mktemp('a-prefix') + fake_bin = fake_prefix.join('bin') + fake_bin.ensure(dir=True) + + initial_yaml = StringIO("""\ +env: + specs: + - a + view: true +""") + + external_config = StringIO("""\ +packages: + a: + paths: + a: {a_prefix} + buildable: false +""".format(a_prefix=str(fake_prefix))) + external_config_dict = spack.util.spack_yaml.load_config(external_config) + + test_scope = spack.config.InternalConfigScope( + 'env-external-test', data=external_config_dict) + with spack.config.override(test_scope): + + e = ev.create('test', initial_yaml) + e.concretize() + # Note: normally installing specs in a test environment requires doing + # a fake install, but not for external specs since no actions are + # taken to install them. The installation commands also include + # post-installation functions like DB-registration, so are important + # to do (otherwise the package is not considered installed). + e.install_all() + e.write() + + env_modifications = e.add_default_view_to_shell('sh') + individual_modifications = env_modifications.split('\n') + + def path_includes_fake_prefix(cmd): + return 'export PATH' in cmd and str(fake_bin) in cmd + + assert any( + path_includes_fake_prefix(cmd) for cmd in individual_modifications + ) + + def test_init_with_file_and_remove(tmpdir): """Ensure a user can remove from any position in the spack.yaml file.""" path = tmpdir.join('spack.yaml') diff --git a/lib/spack/spack/user_environment.py b/lib/spack/spack/user_environment.py index 4c9fdc3d67f..5f2c1c6f502 100644 --- a/lib/spack/spack/user_environment.py +++ b/lib/spack/spack/user_environment.py @@ -65,7 +65,7 @@ def environment_modifications_for_spec(spec, view=None): This list is specific to the location of the spec or its projection in the view.""" spec = spec.copy() - if view: + if view and not spec.external: spec.prefix = prefix.Prefix(view.view().get_projection_for_spec(spec)) # generic environment modifications determined by inspecting the spec From bae4f91bfe4e93cb8f2364c6580a54dfda0e3832 Mon Sep 17 00:00:00 2001 From: G-Ragghianti <33492707+G-Ragghianti@users.noreply.github.com> Date: Fri, 3 Apr 2020 16:33:20 -0400 Subject: [PATCH 127/138] Add option "--first" for "spack load" (#15622) * Implemented --first option for "spack load" * added test for "spack load --first" Co-authored-by: gragghia --- lib/spack/docs/workflows.rst | 6 ++++-- lib/spack/spack/cmd/__init__.py | 10 +++++++--- lib/spack/spack/cmd/load.py | 10 +++++++++- lib/spack/spack/test/cmd/load.py | 15 ++++++++++++++- share/spack/spack-completion.bash | 2 +- 5 files changed, 35 insertions(+), 8 deletions(-) diff --git a/lib/spack/docs/workflows.rst b/lib/spack/docs/workflows.rst index 89d17e98b28..9ce664b6cad 100644 --- a/lib/spack/docs/workflows.rst +++ b/lib/spack/docs/workflows.rst @@ -284,8 +284,10 @@ have some drawbacks: The ``spack load`` and ``spack module tcl loads`` commands, on the other hand, are not very smart: if the user-supplied spec matches more than one installed package, then ``spack module tcl loads`` will - fail. This may change in the future. For now, the workaround is to - be more specific on any ``spack load`` commands that fail. + fail. This default behavior may change in the future. For now, + the workaround is to either be more specific on any failing ``spack load`` + commands or to use ``spack load --first`` to allow spack to load the + first matching spec. """""""""""""""""""""" diff --git a/lib/spack/spack/cmd/__init__.py b/lib/spack/spack/cmd/__init__.py index 2a75a87b549..83e12004a19 100644 --- a/lib/spack/spack/cmd/__init__.py +++ b/lib/spack/spack/cmd/__init__.py @@ -177,7 +177,7 @@ def elide_list(line_list, max_num=10): return line_list -def disambiguate_spec(spec, env, local=False, installed=True): +def disambiguate_spec(spec, env, local=False, installed=True, first=False): """Given a spec, figure out which installed package it refers to. Arguments: @@ -190,10 +190,11 @@ def disambiguate_spec(spec, env, local=False, installed=True): database query. See ``spack.database.Database._query`` for details. """ hashes = env.all_hashes() if env else None - return disambiguate_spec_from_hashes(spec, hashes, local, installed) + return disambiguate_spec_from_hashes(spec, hashes, local, installed, first) -def disambiguate_spec_from_hashes(spec, hashes, local=False, installed=True): +def disambiguate_spec_from_hashes(spec, hashes, local=False, + installed=True, first=False): """Given a spec and a list of hashes, get concrete spec the spec refers to. Arguments: @@ -213,6 +214,9 @@ def disambiguate_spec_from_hashes(spec, hashes, local=False, installed=True): if not matching_specs: tty.die("Spec '%s' matches no installed packages." % spec) + elif first: + return matching_specs[0] + elif len(matching_specs) > 1: format_string = '{name}{@version}{%compiler}{arch=architecture}' args = ["%s matches multiple packages." % spec, diff --git a/lib/spack/spack/cmd/load.py b/lib/spack/spack/cmd/load.py index 9a00ad1c589..3ef485941fe 100644 --- a/lib/spack/spack/cmd/load.py +++ b/lib/spack/spack/cmd/load.py @@ -33,6 +33,14 @@ def setup_parser(subparser): '--csh', action='store_const', dest='shell', const='csh', help="print csh commands to load the package") + subparser.add_argument( + '--first', + action='store_true', + default=False, + dest='load_first', + help="load the first match if multiple packages match the spec" + ) + subparser.add_argument( '--only', default='package,dependencies', @@ -47,7 +55,7 @@ def setup_parser(subparser): def load(parser, args): env = ev.get_env(args, 'load') - specs = [spack.cmd.disambiguate_spec(spec, env) + specs = [spack.cmd.disambiguate_spec(spec, env, first=args.load_first) for spec in spack.cmd.parse_specs(args.specs)] if not args.shell: diff --git a/lib/spack/spack/test/cmd/load.py b/lib/spack/spack/test/cmd/load.py index a10b99d45b4..e6664a9d39b 100644 --- a/lib/spack/spack/test/cmd/load.py +++ b/lib/spack/spack/test/cmd/load.py @@ -3,7 +3,8 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) import os -from spack.main import SpackCommand +import pytest +from spack.main import SpackCommand, SpackCommandError import spack.spec import spack.user_environment as uenv @@ -83,6 +84,18 @@ def test_load_includes_run_env(install_mockery, mock_fetch, mock_archive, assert 'setenv FOOBAR mpileaks' in csh_out +def test_load_first(install_mockery, mock_fetch, mock_archive, mock_packages): + """Test with and without the --first option""" + install('libelf@0.8.12') + install('libelf@0.8.13') + # Now there are two versions of libelf + with pytest.raises(SpackCommandError): + # This should cause an error due to multiple versions + load('--sh', 'libelf') + # Using --first should avoid the error condition + load('--sh', '--first', 'libelf') + + def test_load_fails_no_shell(install_mockery, mock_fetch, mock_archive, mock_packages): """Test that spack load prints an error message without a shell.""" diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash index 6df546e89f0..a4d59220fa3 100755 --- a/share/spack/spack-completion.bash +++ b/share/spack/spack-completion.bash @@ -984,7 +984,7 @@ _spack_list() { _spack_load() { if $list_options then - SPACK_COMPREPLY="-h --help -r --dependencies --sh --csh --only" + SPACK_COMPREPLY="-h --help -r --dependencies --sh --csh --first --only" else _installed_packages fi From 4173c2786832b2eec57c4098668586d0e8985db4 Mon Sep 17 00:00:00 2001 From: Matthieu Dorier Date: Fri, 3 Apr 2020 21:48:29 +0100 Subject: [PATCH 128/138] unqlite: restricted patch to version 1.1.9 (#15857) * restricted unqlite patch to version 1.1.9 * putting back the URL of the PR corresponding to the patch --- var/spack/repos/builtin/packages/unqlite/package.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/unqlite/package.py b/var/spack/repos/builtin/packages/unqlite/package.py index e23f97c02b0..ff746cc75a7 100644 --- a/var/spack/repos/builtin/packages/unqlite/package.py +++ b/var/spack/repos/builtin/packages/unqlite/package.py @@ -18,8 +18,7 @@ class Unqlite(CMakePackage): version('1.1.9', sha256='33d5b5e7b2ca223942e77d31112d2e20512bc507808414451c8a98a7be5e15c0') # This patch corresponds to https://github.com/symisc/unqlite/pull/99 - # It should restricted to @1.1.9 once the PR lands. - patch('0001-Removed-the-STATIC-key-word-to-enable-building-a-sha.patch') + patch('0001-Removed-the-STATIC-key-word-to-enable-building-a-sha.patch', when='@1.1.9') def cmake_args(self): args = ["-DBUILD_SHARED_LIBS:BOOL=ON"] From bf8fea1d53a34214b9ecec1298af011b7d58f74f Mon Sep 17 00:00:00 2001 From: G-Ragghianti <33492707+G-Ragghianti@users.noreply.github.com> Date: Fri, 3 Apr 2020 16:48:44 -0400 Subject: [PATCH 129/138] Added support for new config process for papi@6:+lmsensors (#15858) * Added support for new configuration process of lmsensors component for papi@6: * Removed extraneous blank lines --- .../repos/builtin/packages/papi/package.py | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/var/spack/repos/builtin/packages/papi/package.py b/var/spack/repos/builtin/packages/papi/package.py index f82f319fa0c..7ec1217640a 100644 --- a/var/spack/repos/builtin/packages/papi/package.py +++ b/var/spack/repos/builtin/packages/papi/package.py @@ -46,15 +46,24 @@ class Papi(Package): # https://bitbucket.org/icl/papi/issues/46/cannot-compile-on-arch-linux patch('https://bitbucket.org/icl/papi/commits/53de184a162b8a7edff48fed01a15980664e15b1/raw', sha256='64c57b3ad4026255238cc495df6abfacc41de391a0af497c27d0ac819444a1f8', when='@5.4.0:5.6.99%gcc@8:') + def setup_build_environment(self, env): + if '+lmsensors' in self.spec and self.version >= Version('6'): + env.set('PAPI_LMSENSORS_ROOT', self.spec['lm-sensors'].prefix) + + def setup_run_environment(self, env): + if '+lmsensors' in self.spec and self.version >= Version('6'): + env.set('PAPI_LMSENSORS_ROOT', self.spec['lm-sensors'].prefix) + def install(self, spec, prefix): if '+lmsensors' in spec: - with working_dir("src/components/lmsensors"): - configure_args = [ - "--with-sensors_incdir=%s/sensors" % - spec['lm-sensors'].headers.directories[0], - "--with-sensors_libdir=%s" % - spec['lm-sensors'].libs.directories[0]] - configure(*configure_args) + if self.version < Version('6'): + with working_dir("src/components/lmsensors"): + configure_args = [ + "--with-sensors_incdir=%s/sensors" % + spec['lm-sensors'].headers.directories[0], + "--with-sensors_libdir=%s" % + spec['lm-sensors'].libs.directories[0]] + configure(*configure_args) with working_dir("src"): configure_args = ["--prefix=%s" % prefix] From 0891c5d85405e2f0b08a8a4d300115e900d043f4 Mon Sep 17 00:00:00 2001 From: Jennifer Herting Date: Fri, 3 Apr 2020 16:49:21 -0400 Subject: [PATCH 130/138] New package: py-gluoncv (#15856) * [py-gluoncv] created template * [py-gluoncv] added description and homepage * [py-gluoncv] added dependencies * [py-gluoncv] unicode in readme is causing build to fail * [py-gluoncv] cleaned up fixmes * [py-gluoncv] removed unnecessary python dependency listing * [py-gluoncv] added cython --- .../py-gluoncv/no-unicode-readme.patch | 11 ++++++ .../builtin/packages/py-gluoncv/package.py | 36 +++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-gluoncv/no-unicode-readme.patch create mode 100644 var/spack/repos/builtin/packages/py-gluoncv/package.py diff --git a/var/spack/repos/builtin/packages/py-gluoncv/no-unicode-readme.patch b/var/spack/repos/builtin/packages/py-gluoncv/no-unicode-readme.patch new file mode 100644 index 00000000000..43d0a6c5e87 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-gluoncv/no-unicode-readme.patch @@ -0,0 +1,11 @@ +--- a/README.md 2020-04-03 11:56:41.820271316 -0400 ++++ b/README.md 2020-04-03 11:56:55.901335611 -0400 +@@ -72,7 +72,7 @@ + + There are multiple versions of MXNet pre-built package available. Please refer to [mxnet packages](https://gluon-crash-course.mxnet.io/mxnet_packages.html) if you need more details about MXNet versions. + +-# Docs 📖 ++# Docs + GluonCV documentation is available at [our website](https://gluon-cv.mxnet.io/index.html). + + # Examples diff --git a/var/spack/repos/builtin/packages/py-gluoncv/package.py b/var/spack/repos/builtin/packages/py-gluoncv/package.py new file mode 100644 index 00000000000..05966766543 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-gluoncv/package.py @@ -0,0 +1,36 @@ +# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyGluoncv(PythonPackage): + """GluonCV provides implementations of state-of-the-art + (SOTA) deep learning algorithms in computer vision. It aims + to help engineers, researchers, and students quickly + prototype products, validate new ideas and learn computer + vision.""" + + homepage = "https://gluon-cv.mxnet.io/" + url = "https://github.com/dmlc/gluon-cv/archive/v0.6.0.tar.gz" + + version('0.6.0', sha256='5ac89d73f34d02b2e60595a5cc35f46d0a69376567fae3a9518005dd89161305') + + depends_on('py-setuptools', type='build') + depends_on('py-numpy', type=('build', 'run')) + depends_on('py-tqdm', type=('build', 'run')) + depends_on('py-requests', type=('build', 'run')) + depends_on('py-matplotlib', type=('build', 'run')) + depends_on('py-portalocker', type=('build', 'run')) + depends_on('py-pillow', type=('build', 'run')) + depends_on('py-scipy', type=('build', 'run')) + depends_on('py-cython', type='build') + + patch('no-unicode-readme.patch') + + def build_args(self, spec, prefix): + args = [] + args.append('--with-cython') + return args From a7f418e0b2806eeaf832e55c6faa4707ca54b00f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=81=A5=E7=BE=8E=E7=8C=9E=E7=8C=81?= Date: Sun, 5 Apr 2020 00:10:48 +0800 Subject: [PATCH 131/138] Check if CPU family is x86_64. (#15862) * Check if CPU family is x86_64. * Remove the leading space. --- var/spack/repos/builtin/packages/fl/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/fl/package.py b/var/spack/repos/builtin/packages/fl/package.py index f314ca6cdca..98809a21f10 100644 --- a/var/spack/repos/builtin/packages/fl/package.py +++ b/var/spack/repos/builtin/packages/fl/package.py @@ -17,7 +17,7 @@ class Fl(Package): def install(self, spec, prefix): if (self.spec.satisfies('platform=linux') and - self.spec.satisfies('target=x86_64')): + self.spec.target.family == 'x86_64'): with working_dir('fl_{0}'.format(spec.version)): install_tree('.', prefix) else: From 4bb1392d7da081d071701e0f77674fd068e3216f Mon Sep 17 00:00:00 2001 From: Simon Pintarelli <1237199+simonpintarelli@users.noreply.github.com> Date: Sat, 4 Apr 2020 18:11:17 +0200 Subject: [PATCH 132/138] SIRIUS add version 6.5.1 and 6.5.2 (#15860) --- var/spack/repos/builtin/packages/sirius/package.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/var/spack/repos/builtin/packages/sirius/package.py b/var/spack/repos/builtin/packages/sirius/package.py index f45aa077819..ff81b120d4d 100644 --- a/var/spack/repos/builtin/packages/sirius/package.py +++ b/var/spack/repos/builtin/packages/sirius/package.py @@ -19,6 +19,8 @@ class Sirius(CMakePackage, CudaPackage): version('develop', branch='develop') version('master', branch='master') + version('6.5.2', sha256='c18adc45b069ebae03f94eeeeed031ee99b3d8171fa6ee73c7c6fb1e42397fe7') + version('6.5.1', sha256='599dd0fa25a4e83db2a359257a125e855d4259188cf5b0065b8e7e66378eacf3') version('6.5.0', sha256='5544f3abbb71dcd6aa08d18aceaf53c38373de4cbd0c3af44fbb39c20cfeb7cc') version('6.4.4', sha256='1c5de9565781847658c3cc11edcb404e6e6d1c5a9dfc81e977de7a9a7a162c8a') version('6.4.3', sha256='4d1effeadb84b3e1efd7d9ac88018ef567aa2e0aa72e1112f0abf2e493e2a189') From 4ee9fd46bc41759e1c8e70b70d538a458edf8413 Mon Sep 17 00:00:00 2001 From: "Nichols A. Romero" Date: Sat, 4 Apr 2020 11:12:21 -0500 Subject: [PATCH 133/138] LLVM support for mlir (#15859) --- var/spack/repos/builtin/packages/llvm/package.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py index a5aedb625d8..810203a9f00 100644 --- a/var/spack/repos/builtin/packages/llvm/package.py +++ b/var/spack/repos/builtin/packages/llvm/package.py @@ -77,6 +77,7 @@ class Llvm(CMakePackage): ) variant("lldb", default=True, description="Build the LLVM debugger") variant("lld", default=True, description="Build the LLVM linker") + variant("mlir", default=False, description="Build with MLIR support") variant( "internal_unwind", default=True, @@ -182,6 +183,9 @@ class Llvm(CMakePackage): # OMP TSAN exists in > 5.x conflicts("+omp_tsan", when="@:5.99") + # MLIR exists in > 10.x + conflicts("+mlir", when="@:9") + # Github issue #4986 patch("llvm_gcc7.patch", when="@4.0.0:4.0.1+lldb %gcc@7.0:") # Backport from llvm master + additional fix @@ -299,6 +303,8 @@ def cmake_args(self): projects.append("libcxxabi") if spec.satisfies("@3.9.0:"): cmake_args.append("-DCLANG_DEFAULT_CXX_STDLIB=libc++") + if "+mlir" in spec: + projects.append("mlir") if "+internal_unwind" in spec: projects.append("libunwind") if "+polly" in spec: From 9b9b46c0a98ec311db79592d716b27c79d501437 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Sat, 4 Apr 2020 11:35:23 -0500 Subject: [PATCH 134/138] Package rename: intel-mkl-dnn -> dnnl (#15852) --- .../{intel-mkl-dnn => dnnl}/package.py | 47 +++++++++++++++---- .../builtin/packages/py-torch/package.py | 2 +- 2 files changed, 39 insertions(+), 10 deletions(-) rename var/spack/repos/builtin/packages/{intel-mkl-dnn => dnnl}/package.py (71%) diff --git a/var/spack/repos/builtin/packages/intel-mkl-dnn/package.py b/var/spack/repos/builtin/packages/dnnl/package.py similarity index 71% rename from var/spack/repos/builtin/packages/intel-mkl-dnn/package.py rename to var/spack/repos/builtin/packages/dnnl/package.py index c57b3c70a77..9b339a5a015 100644 --- a/var/spack/repos/builtin/packages/intel-mkl-dnn/package.py +++ b/var/spack/repos/builtin/packages/dnnl/package.py @@ -3,14 +3,15 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from spack import * +import sys -class IntelMklDnn(CMakePackage): - """Intel(R) Math Kernel Library for Deep Neural Networks - (Intel(R) MKL-DNN).""" +class Dnnl(CMakePackage): + """Deep Neural Network Library (DNNL). - homepage = "https://intel.github.io/mkl-dnn/" + Formerly known as Intel MKL-DNN.""" + + homepage = "https://01.org/dnnl" url = "https://github.com/intel/mkl-dnn/archive/v1.3.tar.gz" maintainers = ['adamjstewart'] @@ -46,15 +47,38 @@ class IntelMklDnn(CMakePackage): version('0.10', sha256='59828764ae43f1151f77b8997012c52e0e757bc50af1196b86fce8934178c570') version('0.9', sha256='8606a80851c45b0076f7d4047fbf774ce13d6b6d857cb2edf95c7e1fd4bca1c7') + default_cpu_runtime = 'omp' + if sys.platform == 'darwin': + default_cpu_runtime = 'tbb' + + variant('cpu_runtime', default=default_cpu_runtime, + description='CPU threading runtime to use', + values=('omp', 'tbb', 'seq'), multi=False) + variant('gpu_runtime', default='none', + description='Runtime to use for GPU engines', + values=('ocl', 'none'), multi=False) + + # https://github.com/intel/mkl-dnn#requirements-for-building-from-source depends_on('cmake@2.8.11:', type='build') - depends_on('intel-mkl') - depends_on('llvm-openmp', when='%clang platform=darwin') + depends_on('tbb@2017:', when='cpu_runtime=tbb') + depends_on('llvm-openmp', when='%clang platform=darwin cpu_runtime=omp') + depends_on('opencl@1.2:', when='gpu_runtime=ocl') def cmake_args(self): - args = [] + args = [ + '-DDNNL_CPU_RUNTIME={0}'.format( + self.spec.variants['cpu_runtime'].value.upper()), + '-DDNNL_GPU_RUNTIME={0}'.format( + self.spec.variants['gpu_runtime'].value.upper()), + ] + + if self.run_tests: + args.append('-DDNNL_BUILD_TESTS=ON') + else: + args.append('-DDNNL_BUILD_TESTS=OFF') # https://github.com/intel/mkl-dnn/issues/591 - if self.spec.satisfies('%clang platform=darwin'): + if self.spec.satisfies('%clang platform=darwin cpu_runtime=omp'): args.extend([ '-DOpenMP_CXX_FLAGS={0}'.format(self.compiler.openmp_flag), '-DOpenMP_C_FLAGS={0}'.format(self.compiler.openmp_flag), @@ -67,5 +91,10 @@ def cmake_args(self): self.spec['llvm-openmp'].libs.ld_flags ), ]) + elif self.spec.satisfies('cpu_runtime=tbb'): + args.append('-DTBBROOT=' + self.spec['tbb'].prefix) + + if self.spec.satisfies('gpu_runtime=ocl'): + args.append('-DOPENCLROOT=' + self.spec['opencl'].prefix) return args diff --git a/var/spack/repos/builtin/packages/py-torch/package.py b/var/spack/repos/builtin/packages/py-torch/package.py index e1dbdccb6df..a60486a64ca 100644 --- a/var/spack/repos/builtin/packages/py-torch/package.py +++ b/var/spack/repos/builtin/packages/py-torch/package.py @@ -154,7 +154,7 @@ class PyTorch(PythonPackage, CudaPackage): # TODO: See if there is a way to use an external mkldnn installation. # Currently, only older versions of py-torch use an external mkldnn # library. - depends_on('intel-mkl-dnn', when='@0.4:0.4.1+mkldnn') + depends_on('dnnl', when='@0.4:0.4.1+mkldnn') # TODO: add dependency: https://github.com/Maratyszcza/NNPACK # depends_on('nnpack', when='+nnpack') depends_on('qnnpack', when='+qnnpack') From 7f8102d6d0149a13a5bf61e6ec4ad310c0debd52 Mon Sep 17 00:00:00 2001 From: darmac Date: Sun, 5 Apr 2020 00:35:46 +0800 Subject: [PATCH 135/138] openjdk: support aarch64 platform (#15840) --- .../repos/builtin/packages/openjdk/package.py | 47 ++++++++++++++----- 1 file changed, 34 insertions(+), 13 deletions(-) diff --git a/var/spack/repos/builtin/packages/openjdk/package.py b/var/spack/repos/builtin/packages/openjdk/package.py index 2007ccd78d3..437c1701ddb 100644 --- a/var/spack/repos/builtin/packages/openjdk/package.py +++ b/var/spack/repos/builtin/packages/openjdk/package.py @@ -5,6 +5,32 @@ from spack import * import os +import platform + + +# If you need to add a new version, please be aware that: +# - versions in the following dict are automatically added to the package +# - version tuple must be in the form (checksum, url) +# - checksum must be sha256 +# - package key must be in the form '{os}-{arch}' where 'os' is in the +# format returned by platform.system() and 'arch' by platform.machine() + +_versions = { + '11.0.0-2020-01-01': { + 'Linux-aarch64': ('05c7d9c90edacd853850fbb0f52f8aa482809d0452c599cb9fe0b28b3b4bf329', 'https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk11u-2020-01-01-06-13/OpenJDK11U-jdk_aarch64_linux_hotspot_2020-01-01-06-13.tar.gz')}, + '11.0.2': { + 'Linux-x86_64': ('99be79935354f5c0df1ad293620ea36d13f48ec3ea870c838f20c504c9668b57', 'https://download.java.net/java/GA/jdk11/9/GPL/openjdk-11.0.2_linux-x64_bin.tar.gz')}, + '11.0.1': { + 'Linux-x86_64': ('7a6bb980b9c91c478421f865087ad2d69086a0583aeeb9e69204785e8e97dcfd', 'https://download.java.net/java/GA/jdk11/13/GPL/openjdk-11.0.1_linux-x64_bin.tar.gz')}, + '1.8.0_191-b12': { + 'Linux-aarch64': ('8eee0aede947b804f9a5f49c8a38b52aace8a30a9ebd9383b7d06042fb5a237c', 'https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u191-b12/OpenJDK8U-jdk_aarch64_linux_hotspot_8u191b12.tar.gz')}, + '1.8.0_222-b10': { + 'Linux-x86_64': ('20cff719c6de43f8bb58c7f59e251da7c1fa2207897c9a4768c8c669716dc819', 'https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10_openj9-0.15.1/OpenJDK8U-jdk_x64_linux_openj9_8u222b10_openj9-0.15.1.tar.gz')}, + '1.8.0_202-b08': { + 'Linux-x86_64': ('533dcd8d9ca15df231a1eb392fa713a66bca85a8e76d9b4ee30975f3823636b7', 'https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u202-b08/OpenJDK8U-jdk_x64_linux_openj9_8u202b08_openj9-0.12.0.tar.gz')}, + '1.8.0_40-b25': { + 'Linux-x86_64': ('79e96dce03a14271040023231a7d0ae374b755d48adf68bbdaec30294e4e2b88', 'https://download.java.net/openjdk/jdk8u40/ri/jdk_ri-8u40-b25-linux-x64-10_feb_2015.tar.gz')}, +} class Openjdk(Package): @@ -12,22 +38,17 @@ class Openjdk(Package): homepage = "https://jdk.java.net" - version("11.0.2", sha256="99be79935354f5c0df1ad293620ea36d13f48ec3ea870c838f20c504c9668b57", - url="https://download.java.net/java/GA/jdk11/9/GPL/openjdk-11.0.2_linux-x64_bin.tar.gz") - version("11.0.1", sha256="7a6bb980b9c91c478421f865087ad2d69086a0583aeeb9e69204785e8e97dcfd", - url="https://download.java.net/java/GA/jdk11/13/GPL/openjdk-11.0.1_linux-x64_bin.tar.gz") - version("1.8.0_222-b10", sha256="20cff719c6de43f8bb58c7f59e251da7c1fa2207897c9a4768c8c669716dc819", - url="https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10_openj9-0.15.1/OpenJDK8U-jdk_x64_linux_openj9_8u222b10_openj9-0.15.1.tar.gz") - version("1.8.0_202-b08", sha256="533dcd8d9ca15df231a1eb392fa713a66bca85a8e76d9b4ee30975f3823636b7", - url="https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u202-b08/OpenJDK8U-jdk_x64_linux_openj9_8u202b08_openj9-0.12.0.tar.gz") - version('1.8.0_40-b25', sha256='79e96dce03a14271040023231a7d0ae374b755d48adf68bbdaec30294e4e2b88', - url='https://download.java.net/openjdk/jdk8u40/ri/jdk_ri-8u40-b25-linux-x64-10_feb_2015.tar.gz') + for ver, packages in _versions.items(): + key = "{0}-{1}".format(platform.system(), platform.machine()) + pkg = packages.get(key) + if pkg: + version(ver, sha256=pkg[0], url=pkg[1], expand=False) - provides('java@11', when='@11.0:11.99') provides('java@8', when='@1.8.0:1.8.999') + provides('java@11', when='@11.0:11.99') - conflicts('target=ppc64:', msg='openjdk is only available for x86_64') - conflicts('target=ppc64le:', msg='openjdk is only available for x86_64') + conflicts('target=ppc64:', msg='openjdk is only available for x86_64 and aarch64') + conflicts('target=ppc64le:', msg='openjdk is only available for x86_64 and aarch64') # FIXME: # 1. `extends('java')` doesn't work, you need to use `extends('openjdk')` From b4271d1a262f7e4bdb4e4619480910aa7fa3a8bf Mon Sep 17 00:00:00 2001 From: Christoph Junghans Date: Sat, 4 Apr 2020 12:00:04 -0600 Subject: [PATCH 136/138] py-espressopp: pin py-numpy to py2 version (#15865) --- var/spack/repos/builtin/packages/py-espressopp/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-espressopp/package.py b/var/spack/repos/builtin/packages/py-espressopp/package.py index a4524da78eb..779873bc98c 100644 --- a/var/spack/repos/builtin/packages/py-espressopp/package.py +++ b/var/spack/repos/builtin/packages/py-espressopp/package.py @@ -35,7 +35,7 @@ class PyEspressopp(CMakePackage): depends_on("fftw") depends_on("py-sphinx", when="+ug", type='build') depends_on("py-sphinx", when="+pdf", type='build') - depends_on('py-numpy', type=('build', 'run')) + depends_on('py-numpy@:1.16.6', type=('build', 'run')) depends_on('py-matplotlib', when="+ug", type='build') depends_on('py-matplotlib', when="+pdf", type='build') depends_on("texlive", when="+pdf", type='build') From c99a88128ad6baf803fdb87dc51924219a211015 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Trahay?= Date: Sun, 5 Apr 2020 16:39:57 +0200 Subject: [PATCH 137/138] Version bump: eztrace-1.1-10 (#15866) * version bump: eztrace-1.1-10 * 'trahay' is the maintainer for package 'eztrace' --- var/spack/repos/builtin/packages/eztrace/package.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/eztrace/package.py b/var/spack/repos/builtin/packages/eztrace/package.py index 9468ce82147..ddf9808f7b7 100644 --- a/var/spack/repos/builtin/packages/eztrace/package.py +++ b/var/spack/repos/builtin/packages/eztrace/package.py @@ -11,9 +11,10 @@ class Eztrace(AutotoolsPackage): of HPC applications.""" homepage = "http://eztrace.gforge.inria.fr" - url = "https://gforge.inria.fr/frs/download.php/file/37703/eztrace-1.1-8.tar.gz" + url = "https://gitlab.com/eztrace/eztrace/-/archive/eztrace-1.1-10/eztrace-eztrace-1.1-10.tar.gz" + maintainers = ['trahay'] - version('1.1-8', sha256='d80d78a25f1eb0e6e60a3e535e3972cd178c6a8663a3d6109105dfa6a880b8ec') + version('1.1-10', sha256='97aba8f3b3b71e8e2f7ef47e00c262234e27b9cb4a870c85c525317a83a3f0d4') depends_on('mpi') From 34627fcbe55c19357dc99a5106045106160681ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=81=A5=E7=BE=8E=E7=8C=9E=E7=8C=81?= Date: Mon, 6 Apr 2020 00:21:54 +0800 Subject: [PATCH 138/138] py-pywcs: a new package. (#15826) * py-pywcs: a new package. * Fix a flake8 issue. * Add missing dependencies. * run -> build. * Add version specifications. --- .../builtin/packages/py-pywcs/package.py | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 var/spack/repos/builtin/packages/py-pywcs/package.py diff --git a/var/spack/repos/builtin/packages/py-pywcs/package.py b/var/spack/repos/builtin/packages/py-pywcs/package.py new file mode 100644 index 00000000000..dea2adb2d92 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-pywcs/package.py @@ -0,0 +1,24 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyPywcs(PythonPackage): + """pywcs is a set of routines for + handling the FITS World Coordinate System (WCS) standard.""" + + homepage = "https://github.com/spacetelescope/pywcs" + url = "https://github.com/spacetelescope/pywcs/archive/1.12.1.tar.gz" + + version('1.12.1', sha256='efd4e0ea190e3a2521ebcde583452e126acdeac85cc8a9c78c8a96f10805b5e1') + + depends_on('python@2.6:', type=('build', 'run')) + depends_on('py-setuptools', type='build') + depends_on('py-d2to1@0.2.3:', type='build') + depends_on('py-stsci-distutils@0.3.2:', type='build') + depends_on('py-numpy@1.5.1:', type=('build', 'run')) + depends_on('py-pyfits@1.4:', type=('build', 'run')) + depends_on('py-astropy@0.3.1:', type=('build', 'run'))