diff --git a/.github/containers/x86_64-broadwell-gcc11.2.1/Dockerfile b/.github/containers/x86_64-broadwell-gcc11.2.1/Dockerfile new file mode 100644 index 00000000..3f07390d --- /dev/null +++ b/.github/containers/x86_64-broadwell-gcc11.2.1/Dockerfile @@ -0,0 +1,34 @@ +FROM centos:7 AS base +MAINTAINER Giorgis Georgakoudis +RUN \ + yum install -y dnf &&\ + dnf install -y epel-release &&\ + dnf group install -y "Development Tools" &&\ + dnf install -y curl findutils gcc-gfortran gnupg2 hostname iproute redhat-lsb-core python3 python3-pip python3-setuptools unzip python-boto3 centos-release-scl-rh &&\ + dnf install -y devtoolset-11 environment-modules &&\ + dnf upgrade -y +COPY repo repo +RUN \ + mkdir -p ams-spack-env +COPY spack.yaml ams-spack-env/spack.yaml + + +FROM base AS setup-spack-env +RUN \ + source /etc/profile &&\ + mkdir -p /usr/share/Modules/modulefiles/gcc &&\ + /usr/share/Modules/bin/createmodule.sh /opt/rh/devtoolset-11/enable > /usr/share/Modules/modulefiles/gcc/11.2.1 &&\ + module load gcc/11.2.1 &&\ + git clone --depth 1 --branch releases/v0.20 https://github.com/spack/spack.git &&\ + source spack/share/spack/setup-env.sh &&\ + spack compiler find &&\ + spack compiler rm gcc@4.8.5 &&\ + sed -i "s/modules.*/modules: [gcc\/11.2.1]/" ~/.spack/linux/compilers.yaml + +FROM setup-spack-env AS install-spack-env +RUN \ + source spack/share/spack/setup-env.sh &&\ + spack env activate -p ams-spack-env &&\ + spack install &&\ + spack clean --all + diff --git a/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/AMS/package.py b/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/AMS/package.py new file mode 100644 index 00000000..9d948779 --- /dev/null +++ b/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/AMS/package.py @@ -0,0 +1,121 @@ +# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other +# AMSLib Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +from spack.package import * + + +class Ams(CMakePackage, CudaPackage): + + homepage = "https://lc.llnl.gov/gitlab/autonomous-multiscale-project/marbl-matprops-miniapp" + git = "ssh://git@czgitlab.llnl.gov:7999/autonomous-multiscale-project/marbl-matprops-miniapp.git" + + maintainers = ["parasyris1", "koparasy"] + + version("develop", branch="develop", submodules=False) + version("release", branch="release", submodules=False) + version("main", branch="main", submodules=False) + + variant("faiss", default=False, description="Build with FAISS index as uncertainty quantification module") + variant("caliper", default=False, description="Build with caliper for gather performance counters") + variant("torch", default=False, description="Use torch for surrogate models") + variant("mpi", default=False, description="Enable MPI support") + variant("examples", default=False, description="Enable MPI support") + variant("redis", default=False, description="Enable redis database") + variant("hdf5", default=False, description="Enable HDF5 data storage") + variant("rabbitmq", default=False, description="Enable RabbitMQ as data broker") + variant("verbose", default=False, description="Enable AMSLib verbose output (controlled by environment variable)") + + depends_on("umpire") + depends_on("mpi", when="+mpi") + + depends_on("caliper+cuda", when="+caliper +cuda") + depends_on("faiss+cuda", when="+faiss +cuda") + depends_on("mfem+cuda", when="+examples +cuda") + depends_on("py-torch+cuda", when="+torch +cuda") + + depends_on("py-torch~cuda", when="+torch ~cuda") + depends_on("caliper ~cuda", when="+caliper ~cuda") + depends_on("faiss ~cuda", when="+faiss ~cuda") + depends_on("mfem ~cuda", when="+examples ~cuda") + + depends_on("redis-plus-plus", when="+redis") + depends_on("hdf5", when="+hdf5") + depends_on("amqp-cpp +tcp", when="+rabbitmq") + + with when("+cuda"): + cuda_archs=CudaPackage.cuda_arch_values + with when("+examples"): + depends_on("mfem+cuda") + for sm_ in cuda_archs: + depends_on("mfem +cuda cuda_arch={0}".format(sm_), when="cuda_arch={0}".format(sm_)) + + with when("+torch"): + depends_on("py-torch+cuda") + for sm_ in cuda_archs: + depends_on("py-torch +cuda cuda_arch={0}".format(sm_), when="cuda_arch={0}".format(sm_)) + + with when("+caliper"): + depends_on("caliper+cuda", when="+caliper") + for sm_ in cuda_archs: + depends_on("caliper +cuda cuda_arch={0}".format(sm_), when="cuda_arch={0}".format(sm_)) + + depends_on("umpire+cuda") + for sm_ in cuda_archs: + depends_on("umpire +cuda cuda_arch={0}".format(sm_), when="cuda_arch={0}".format(sm_)) + + with when("+faiss"): + depends_on("faiss+cuda", when="+faiss") + for sm_ in cuda_archs: + depends_on("umpire +cuda cuda_arch={0}".format(sm_), when="cuda_arch={0}".format(sm_)) + + def cmake_args(self): + spec = self.spec + args = [] + args.append("-DUMPIRE_DIR={0}".format(spec["umpire"].prefix)) + args.append("-DWITH_MPI={0}".format("On" if "+mpi" in spec else "Off")) + + args.append("-DWITH_DB={0}".format("On" if ("+redis" in spec or "hdf5" in spec or "+rabbitmq" in spec) else "Off")) + + if "+verbose" in spec: + args.append("-DWITH_AMS_DEBUG=On") + + if "+hdf5" in spec: + args.append("-DWITH_HDF5=On") + args.append("-DHDF5_Dir={0}".format(spec["hdf5"].prefix)) + + if "+cuda" in spec: + args.append("-DWITH_CUDA=On") + cuda_arch = spec.variants["cuda_arch"].value[0] + args.append("-DAMS_CUDA_ARCH={0}".format(cuda_arch)) + + if "+caliper" in spec: + args.append("-DWITH_CALIPER=On") + args.append("-DCALIPER_DIR={0}/share/cmake/caliper".format(spec["caliper"].prefix)) + else: + args.append("-DWITH_CALIPER=Off") + + if "+faiss" in spec: + args.append("-DWITH_FAISS=On") + args.append("-DFAISS_DIR={0}".format(spec['faiss'].prefix)) + else: + args.append("-DWITH_FAISS=Off") + + if "+torch" in spec: + args.append("-DWITH_TORCH=On") + args.append("-DTorch_DIR={0}/lib/python{1}/site-packages/torch/share/cmake/Torch".format(spec['py-torch'].prefix, spec['python'].version.up_to(2))) + + if "+redis" in spec: + args.append("-DWITH_REDIS=On") + args.append("-DREDIS_PLUS_PLUS_DIR={0}".format(spec["redis-plus-plus"].prefix)) + + if "+rabbitmq" in spec: + args.append("-DWITH_RMQ=On") + args.append("-Damqpcpp_DIR={0}/cmake".format(spec["amqp-cpp"].prefix)) + + if "+examples" in spec: + args.append("-DWITH_EXAMPLES=On") + args.append("-DMFEM_DIR={0}".format(spec['mfem'].prefix)) + + return args diff --git a/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/cmake/5882-enable-cce-fortran-preprocessing.patch b/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/cmake/5882-enable-cce-fortran-preprocessing.patch new file mode 100644 index 00000000..5e01a007 --- /dev/null +++ b/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/cmake/5882-enable-cce-fortran-preprocessing.patch @@ -0,0 +1,31 @@ +From ef513fe3d1d864d865d7143699834228988a7cd7 Mon Sep 17 00:00:00 2001 +From: Brad King +Date: Fri, 5 Mar 2021 08:08:16 -0500 +Subject: [PATCH] Cray: Enable explicit Fortran preprocessing for Ninja + generator + +Cray 11.0 adds support for preprocessing with output written to a +specified file (instead of always next to the source). Use it to +enable Cray Fortran with the Ninja generator. + +Patch-by: James Elliott +Fixes: #20731 +--- + Modules/Compiler/Cray-Fortran.cmake | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/Modules/Compiler/Cray-Fortran.cmake b/Modules/Compiler/Cray-Fortran.cmake +index 696ae76074..0d5e1c7679 100644 +--- a/Modules/Compiler/Cray-Fortran.cmake ++++ b/Modules/Compiler/Cray-Fortran.cmake +@@ -19,3 +19,7 @@ else() + set(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_ON "-eZ") + set(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_OFF "-dZ") + endif() ++ ++if (NOT CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 11.0) ++ set(CMAKE_Fortran_PREPROCESS_SOURCE " -o -eP ") ++endif() +-- +GitLab + diff --git a/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/cmake/cmake-macos-add-coreservices.patch b/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/cmake/cmake-macos-add-coreservices.patch new file mode 100644 index 00000000..62e7244e --- /dev/null +++ b/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/cmake/cmake-macos-add-coreservices.patch @@ -0,0 +1,28 @@ +commit 475e78d9071b34690617a85853433a9fc15da057 +Author: Chuck Atkins +Date: Mon Jan 28 16:28:28 2019 -0500 + + macOS: Add missing explicit dependency on CoreServices framework + + On Apple, the implementation of cmGlobalXCodeGenerator::Open uses + LSOpenCFURLRef from CoreServices. This get's transitively pulled in + from CMake's libuv build but ends up generating a linker error when + using an external libuv. This explicitly adds the appropriate + dependency. + +diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt +index 311f3f4e56..8aff8f6b2f 100644 +--- a/Source/CMakeLists.txt ++++ b/Source/CMakeLists.txt +@@ -791,9 +791,10 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR MATCHES "sparc" + endif() + endif() + +-# On Apple we need CoreFoundation ++# On Apple we need CoreFoundation and CoreServices + if(APPLE) + target_link_libraries(CMakeLib "-framework CoreFoundation") ++ target_link_libraries(CMakeLib "-framework CoreServices") + endif() + + if(WIN32 AND NOT UNIX) diff --git a/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/cmake/cmake-revert-findmpi-link-flag-list.patch b/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/cmake/cmake-revert-findmpi-link-flag-list.patch new file mode 100644 index 00000000..4a977d84 --- /dev/null +++ b/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/cmake/cmake-revert-findmpi-link-flag-list.patch @@ -0,0 +1,29 @@ +From 89fc3b1fd22f97f9380990b521dd79f306ac18fd Mon Sep 17 00:00:00 2001 +From: Chuck Atkins +Date: Thu, 25 Jul 2019 09:37:20 -0400 +Subject: [PATCH] Revert "FindMPI: Store imported target link flags as a list + instead of a string" + +This reverts commit f7eaa342de316707d99e6ae29c693a480861560d. +--- + Modules/FindMPI.cmake | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/Modules/FindMPI.cmake b/Modules/FindMPI.cmake +index a80f799..fe09764 100644 +--- a/Modules/FindMPI.cmake ++++ b/Modules/FindMPI.cmake +@@ -1144,9 +1144,7 @@ macro(_MPI_create_imported_target LANG) + + set_property(TARGET MPI::MPI_${LANG} PROPERTY INTERFACE_LINK_LIBRARIES "") + if(MPI_${LANG}_LINK_FLAGS) +- separate_arguments(_MPI_${LANG}_LINK_FLAGS NATIVE_COMMAND "${MPI_${LANG}_LINK_FLAGS}") +- set_property(TARGET MPI::MPI_${LANG} APPEND PROPERTY INTERFACE_LINK_LIBRARIES "${_MPI_${LANG}_LINK_FLAGS}") +- unset(_MPI_${LANG}_LINK_FLAGS) ++ set_property(TARGET MPI::MPI_${LANG} APPEND PROPERTY INTERFACE_LINK_LIBRARIES "${MPI_${LANG}_LINK_FLAGS}") + endif() + # If the compiler links MPI implicitly, no libraries will be found as they're contained within + # CMAKE__IMPLICIT_LINK_LIBRARIES already. +-- +2.5.5 + diff --git a/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/cmake/fix-xlf-ninja-mr-4075.patch b/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/cmake/fix-xlf-ninja-mr-4075.patch new file mode 100644 index 00000000..584e3385 --- /dev/null +++ b/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/cmake/fix-xlf-ninja-mr-4075.patch @@ -0,0 +1,145 @@ +From 19f267c75e84b72c4de42570be0c4222bb93aaff Mon Sep 17 00:00:00 2001 +From: Brad King +Date: Thu, 21 Nov 2019 14:38:35 -0500 +Subject: [PATCH] XL: Add support for Ninja and XL Fortran + +The Ninja generator's support for Fortran requires that source files +be preprocessed explicitly first. However, the `xlf` compiler does +not have a simple `-E` option or equivalent to do preprocessing. +The only documented way to get preprocessed output is to use `-d` +to leave it behind, but only at an inflexible location. + +Instead, create our own `cpp` wrapper script and substitute it for the +real preprocessor using `-tF -B ...`. Teach the wrapper to map the +`cpp` output to the location we need and then invoke the real `cpp` +underneath. + +Fixes: #19450 +--- + Help/release/dev/xlf-ninja.rst | 5 ++++ + Modules/CMakeDetermineCompilerId.cmake | 10 +++++++ + Modules/CMakeDetermineFortranCompiler.cmake | 5 ++++ + Modules/CMakeFortranCompiler.cmake.in | 1 + + Modules/Compiler/XL-Fortran.cmake | 4 +++ + Modules/Compiler/XL-Fortran/cpp | 29 +++++++++++++++++++++ + 6 files changed, 54 insertions(+) + create mode 100644 Help/release/dev/xlf-ninja.rst + create mode 100755 Modules/Compiler/XL-Fortran/cpp + +diff --git a/Help/release/dev/xlf-ninja.rst b/Help/release/dev/xlf-ninja.rst +new file mode 100644 +index 0000000000..916e713008 +--- /dev/null ++++ b/Help/release/dev/xlf-ninja.rst +@@ -0,0 +1,5 @@ ++xlf-ninja ++--------- ++ ++* The IBM XL Fortran compiler is now supported by the :generator:`Ninja` ++ generator. +diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake +index f7ef755aeb..0b3664c5de 100644 +--- a/Modules/CMakeDetermineCompilerId.cmake ++++ b/Modules/CMakeDetermineCompilerId.cmake +@@ -182,6 +182,10 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src) + message(STATUS "The ${lang} compiler identification is unknown") + endif() + ++ if(lang STREQUAL "Fortran" AND CMAKE_${lang}_COMPILER_ID STREQUAL "XL") ++ set(CMAKE_${lang}_XL_CPP "${CMAKE_${lang}_COMPILER_ID_CPP}" PARENT_SCOPE) ++ endif() ++ + set(CMAKE_${lang}_COMPILER_ID "${CMAKE_${lang}_COMPILER_ID}" PARENT_SCOPE) + set(CMAKE_${lang}_PLATFORM_ID "${CMAKE_${lang}_PLATFORM_ID}" PARENT_SCOPE) + set(CMAKE_${lang}_COMPILER_ARCHITECTURE_ID "${CMAKE_${lang}_COMPILER_ARCHITECTURE_ID}" PARENT_SCOPE) +@@ -542,6 +546,12 @@ Id flags: ${testflags} ${CMAKE_${lang}_COMPILER_ID_FLAGS_ALWAYS} + ERROR_VARIABLE CMAKE_${lang}_COMPILER_ID_OUTPUT + RESULT_VARIABLE CMAKE_${lang}_COMPILER_ID_RESULT + ) ++ if("${CMAKE_${lang}_COMPILER_ID_OUTPUT}" MATCHES "exec: [^\n]*\\((/[^,\n]*/cpp),CMakeFortranCompilerId.F") ++ set(_cpp "${CMAKE_MATCH_1}") ++ if(EXISTS "${_cpp}") ++ set(CMAKE_${lang}_COMPILER_ID_CPP "${_cpp}" PARENT_SCOPE) ++ endif() ++ endif() + endif() + + # Check the result of compilation. +diff --git a/Modules/CMakeDetermineFortranCompiler.cmake b/Modules/CMakeDetermineFortranCompiler.cmake +index 5ddd64fae8..e8505417d6 100644 +--- a/Modules/CMakeDetermineFortranCompiler.cmake ++++ b/Modules/CMakeDetermineFortranCompiler.cmake +@@ -271,6 +271,11 @@ include(CMakeFindBinUtils) + include(Compiler/${CMAKE_Fortran_COMPILER_ID}-FindBinUtils OPTIONAL) + unset(_CMAKE_PROCESSING_LANGUAGE) + ++if(CMAKE_Fortran_XL_CPP) ++ set(_SET_CMAKE_Fortran_XL_CPP ++ "set(CMAKE_Fortran_XL_CPP \"${CMAKE_Fortran_XL_CPP}\")") ++endif() ++ + if(CMAKE_Fortran_COMPILER_ARCHITECTURE_ID) + set(_SET_CMAKE_Fortran_COMPILER_ARCHITECTURE_ID + "set(CMAKE_Fortran_COMPILER_ARCHITECTURE_ID ${CMAKE_Fortran_COMPILER_ARCHITECTURE_ID})") +diff --git a/Modules/CMakeFortranCompiler.cmake.in b/Modules/CMakeFortranCompiler.cmake.in +index ae7b73ac4a..34f44aa542 100644 +--- a/Modules/CMakeFortranCompiler.cmake.in ++++ b/Modules/CMakeFortranCompiler.cmake.in +@@ -6,6 +6,7 @@ set(CMAKE_Fortran_COMPILER_WRAPPER "@CMAKE_Fortran_COMPILER_WRAPPER@") + set(CMAKE_Fortran_PLATFORM_ID "@CMAKE_Fortran_PLATFORM_ID@") + set(CMAKE_Fortran_SIMULATE_ID "@CMAKE_Fortran_SIMULATE_ID@") + set(CMAKE_Fortran_SIMULATE_VERSION "@CMAKE_Fortran_SIMULATE_VERSION@") ++@_SET_CMAKE_Fortran_XL_CPP@ + @_SET_CMAKE_Fortran_COMPILER_ARCHITECTURE_ID@ + @SET_MSVC_Fortran_ARCHITECTURE_ID@ + set(CMAKE_AR "@CMAKE_AR@") +diff --git a/Modules/Compiler/XL-Fortran.cmake b/Modules/Compiler/XL-Fortran.cmake +index c4fb09712a..1683dff4f0 100644 +--- a/Modules/Compiler/XL-Fortran.cmake ++++ b/Modules/Compiler/XL-Fortran.cmake +@@ -18,3 +18,7 @@ string(APPEND CMAKE_Fortran_FLAGS_INIT " -qthreaded -qhalt=e") + # xlf: 1501-214 (W) command option E reserved for future use - ignored + set(CMAKE_Fortran_CREATE_PREPROCESSED_SOURCE) + set(CMAKE_Fortran_CREATE_ASSEMBLY_SOURCE) ++ ++set(CMAKE_Fortran_PREPROCESS_SOURCE ++ " -qpreprocess -qnoobject -qsuppress=1517-020 -tF -B \"${CMAKE_CURRENT_LIST_DIR}/XL-Fortran/\" -WF,--cpp,\"${CMAKE_Fortran_XL_CPP}\",--out, " ++ ) +diff --git a/Modules/Compiler/XL-Fortran/cpp b/Modules/Compiler/XL-Fortran/cpp +new file mode 100755 +index 0000000000..1fd62c26a0 +--- /dev/null ++++ b/Modules/Compiler/XL-Fortran/cpp +@@ -0,0 +1,29 @@ ++#!/usr/bin/env bash ++ ++# Source file. ++src="$(printf %q "$1")" ++shift ++ ++# Output file the compiler expects. ++out="$(printf %q "$1")" ++shift ++ ++# Create the file the compiler expects. It will check syntax. ++>"$out" ++ ++cpp='cpp' ++opts='' ++while test "$#" != 0; do ++ case "$1" in ++ # Extract the option for the path to cpp. ++ --cpp) shift; cpp="$(printf %q "$1")" ;; ++ # Extract the option for our own output file. ++ --out) shift; out="$(printf %q "$1")" ;; ++ # Collect the rest of the command line. ++ *) opts="$opts $(printf %q "$1")" ;; ++ esac ++ shift ++done ++ ++# Execute the real preprocessor tool. ++eval "exec $cpp $src $out $opts" +-- +2.24.1 + diff --git a/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/cmake/fujitsu_add_linker_option.patch b/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/cmake/fujitsu_add_linker_option.patch new file mode 100644 index 00000000..4a0cf7ab --- /dev/null +++ b/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/cmake/fujitsu_add_linker_option.patch @@ -0,0 +1,10 @@ +--- spack-src/Modules/FortranCInterface/Verify/CMakeLists.txt.org 2020-06-05 15:54:59.559043595 +0900 ++++ spack-src/Modules/FortranCInterface/Verify/CMakeLists.txt 2020-06-05 15:58:28.150062948 +0900 +@@ -4,6 +4,7 @@ + cmake_minimum_required(VERSION ${CMAKE_VERSION}) + project(VerifyFortranC C Fortran) + ++set (CMAKE_EXE_LINKER_FLAGS "--linkfortran") + option(VERIFY_CXX "Whether to verify C++ and Fortran" OFF) + if(VERIFY_CXX) + enable_language(CXX) diff --git a/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/cmake/ignore_crayxc_warnings.patch b/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/cmake/ignore_crayxc_warnings.patch new file mode 100644 index 00000000..85928f0e --- /dev/null +++ b/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/cmake/ignore_crayxc_warnings.patch @@ -0,0 +1,11 @@ +diff --git a/Source/Checks/cm_cxx_features.cmake b/Source/Checks/cm_cxx_features.cmake +index fb68ed78c9..c6c1ba667f 100644 +--- a/Source/Checks/cm_cxx_features.cmake ++++ b/Source/Checks/cm_cxx_features.cmake +@@ -17,2 +17,6 @@ function(cm_check_cxx_feature name) + set(check_output "${OUTPUT}") ++ # Filter out libhugetlbfs warnings ++ string(REGEX REPLACE "[^\n]*libhugetlbfs [^\n]*: WARNING[^\n]*" "" check_output "${check_output}") ++ # Filter out icpc warnings ++ string(REGEX REPLACE "[^\n]*icpc: command line warning #10121: overriding [^\n]*" "" check_output "${check_output}") + # Filter out MSBuild output that looks like a warning. diff --git a/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/cmake/intel-c-gnu11.patch b/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/cmake/intel-c-gnu11.patch new file mode 100644 index 00000000..afe6f871 --- /dev/null +++ b/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/cmake/intel-c-gnu11.patch @@ -0,0 +1,23 @@ +diff --git a/Modules/Compiler/Intel-C.cmake b/Modules/Compiler/Intel-C.cmake +index eb9602a..edca154 100644 +--- a/Modules/Compiler/Intel-C.cmake ++++ b/Modules/Compiler/Intel-C.cmake +@@ -16,14 +16,14 @@ endif() + + if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 15.0.0) + set(CMAKE_C11_STANDARD_COMPILE_OPTION "${_std}=c11") +- set(CMAKE_C11_EXTENSION_COMPILE_OPTION "${_std}=c11") ++ set(CMAKE_C11_EXTENSION_COMPILE_OPTION "${_std}=gnu11") + endif() + +-if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.1) ++if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.0) + set(CMAKE_C90_STANDARD_COMPILE_OPTION "${_std}=c89") +- set(CMAKE_C90_EXTENSION_COMPILE_OPTION "${_std}=c89") ++ set(CMAKE_C90_EXTENSION_COMPILE_OPTION "${_std}=gnu89") + set(CMAKE_C99_STANDARD_COMPILE_OPTION "${_std}=c99") +- set(CMAKE_C99_EXTENSION_COMPILE_OPTION "${_std}=c99") ++ set(CMAKE_C99_EXTENSION_COMPILE_OPTION "${_std}=gnu99") + endif() + + if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.1) diff --git a/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/cmake/intel-cxx-bootstrap.patch b/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/cmake/intel-cxx-bootstrap.patch new file mode 100644 index 00000000..d5475b2e --- /dev/null +++ b/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/cmake/intel-cxx-bootstrap.patch @@ -0,0 +1,11 @@ +--- a/bootstrap 2020-07-24 11:02:56.488414260 +0200 ++++ b/bootstrap 2020-07-24 11:03:20.763775094 +0200 +@@ -1179,7 +1179,7 @@ + } + #endif + +-#if (__cplusplus >= 201703L || defined(__INTEL_COMPILER) && defined(__cpp_if_constexpr)) ++#if (__cplusplus >= 201703L || defined(__INTEL_COMPILER) && defined(__cpp_deduction_guides)) + #include + template ::type = nullptr> diff --git a/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/cmake/nag-response-files.patch b/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/cmake/nag-response-files.patch new file mode 100644 index 00000000..07dc4a1a --- /dev/null +++ b/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/cmake/nag-response-files.patch @@ -0,0 +1,9 @@ +diff --git a/Modules/Compiler/NAG-Fortran.cmake b/Modules/Compiler/NAG-Fortran.cmake +index 39aae1883..9973febc3 100644 +--- a/Modules/Compiler/NAG-Fortran.cmake ++++ b/Modules/Compiler/NAG-Fortran.cmake +@@ -34,3 +34,4 @@ set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-fixed") + set(CMAKE_Fortran_FORMAT_FREE_FLAG "-free") + set(CMAKE_Fortran_COMPILE_OPTIONS_PIC "-PIC") + set(CMAKE_Fortran_COMPILE_OPTIONS_PIE "-PIC") ++set(CMAKE_Fortran_RESPONSE_FILE_LINK_FLAG "-Wl,@") diff --git a/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/cmake/package.py b/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/cmake/package.py new file mode 100644 index 00000000..bf10323f --- /dev/null +++ b/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/cmake/package.py @@ -0,0 +1,468 @@ +# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other +# AMSLib Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +import os +import re +import sys + +import spack.build_environment +from spack.package import * + + +class Cmake(Package): + """A cross-platform, open-source build system. CMake is a family of + tools designed to build, test and package software. + """ + + homepage = "https://www.cmake.org" + url = "https://github.com/Kitware/CMake/releases/download/v3.19.0/cmake-3.19.0.tar.gz" + git = "https://gitlab.kitware.com/cmake/cmake.git" + maintainers("chuckatkins") + + tags = ["build-tools", "windows"] + + executables = ["^cmake[0-9]*$"] + + version("master", branch="master") + version("3.26.3", sha256="bbd8d39217509d163cb544a40d6428ac666ddc83e22905d3e52c925781f0f659") + version("3.26.2", sha256="d54f25707300064308ef01d4d21b0f98f508f52dda5d527d882b9d88379f89a8") + version("3.26.1", sha256="f29964290ad3ced782a1e58ca9fda394a82406a647e24d6afd4e6c32e42c412f") + version("3.26.0", sha256="4256613188857e95700621f7cdaaeb954f3546a9249e942bc2f9b3c26e381365") + version("3.25.3", sha256="cc995701d590ca6debc4245e9989939099ca52827dd46b5d3592f093afe1901c") + version("3.25.2", sha256="c026f22cb931dd532f648f087d587f07a1843c6e66a3dfca4fb0ea21944ed33c") + version("3.25.1", sha256="1c511d09516af493694ed9baf13c55947a36389674d657a2d5e0ccedc6b291d8") + version("3.25.0", sha256="306463f541555da0942e6f5a0736560f70c487178b9d94a5ae7f34d0538cdd48") + version("3.24.4", sha256="32c9e499510eff7070d3f0adfbabe0afea2058608c5fa93e231beb49fbfa2296") + version("3.24.3", sha256="b53aa10fa82bff84ccdb59065927b72d3bee49f4d86261249fc0984b3b367291") + version("3.24.2", sha256="0d9020f06f3ddf17fb537dc228e1a56c927ee506b486f55fe2dc19f69bf0c8db") + version("3.24.1", sha256="4931e277a4db1a805f13baa7013a7757a0cbfe5b7932882925c7061d9d1fa82b") + version("3.24.0", sha256="c2b61f7cdecb1576cad25f918a8f42b8685d88a832fd4b62b9e0fa32e915a658") + version("3.23.5", sha256="f2944cde7a140b992ba5ccea2009a987a92413762250de22ebbace2319a0f47d") + version("3.23.4", sha256="aa8b6c17a5adf04de06e42c06adc7e25b21e4fe8378f44f703a861e5f6ac59c7") + version("3.23.3", sha256="06fefaf0ad94989724b56f733093c2623f6f84356e5beb955957f9ce3ee28809") + version("3.23.2", sha256="f316b40053466f9a416adf981efda41b160ca859e97f6a484b447ea299ff26aa") + version("3.23.1", sha256="33fd10a8ec687a4d0d5b42473f10459bb92b3ae7def2b745dc10b192760869f3") + version("3.23.0", sha256="5ab0a12f702f44013be7e19534cd9094d65cc9fe7b2cd0f8c9e5318e0fe4ac82") + version("3.22.6", sha256="73933163670ea4ea95c231549007b0c7243282293506a2cf4443714826ad5ec3") + version("3.22.5", sha256="d3987c3f7759fa0a401c5fcd5076be44a19613bfaa8baee1b5d1835750dc5375") + version("3.22.4", sha256="5c55d0b0bc4c191549e3502b8f99a4fe892077611df22b4178cc020626e22a47") + version("3.22.3", sha256="9f8469166f94553b6978a16ee29227ec49a2eb5ceb608275dec40d8ae0d1b5a0") + version("3.22.2", sha256="3c1c478b9650b107d452c5bd545c72e2fad4e37c09b89a1984b9a2f46df6aced") + version("3.22.1", sha256="0e998229549d7b3f368703d20e248e7ee1f853910d42704aa87918c213ea82c0") + version("3.22.0", sha256="998c7ba34778d2dfdb3df8a695469e24b11e2bfa21fbe41b361a3f45e1c9345e") + version("3.21.7", sha256="3523c4a5afc61ac3d7c92835301cdf092129c9b672a6ee17e68c92e928c1375a") + version("3.21.6", sha256="b7c3ac35ca7ed3cce8c192c9c873e6061aaecc8b2bc564290e629b10bff59f3c") + version("3.21.5", sha256="c73587b5ab827d56c09f0a1e256b12743ff200495e31fc9686f2b9dc8a28897f") + version("3.21.4", sha256="d9570a95c215f4c9886dd0f0564ca4ef8d18c30750f157238ea12669c2985978") + version("3.21.3", sha256="d14d06df4265134ee42c4d50f5a60cb8b471b7b6a47da8e5d914d49dd783794f") + version("3.21.2", sha256="94275e0b61c84bb42710f5320a23c6dcb2c6ee032ae7d2a616f53f68b3d21659") + version("3.21.1", sha256="fac3915171d4dff25913975d712f76e69aef44bf738ba7b976793a458b4cfed4") + version("3.21.0", sha256="4a42d56449a51f4d3809ab4d3b61fd4a96a469e56266e896ce1009b5768bd2ab") + version("3.20.6", sha256="a0bd485e1a38dd13c0baec89d5f4adbf61c7fd32fddb38eabc69a75bc0b65d72") + version("3.20.5", sha256="12c8040ef5c6f1bc5b8868cede16bb7926c18980f59779e299ab52cbc6f15bb0") + version("3.20.4", sha256="87a4060298f2c6bb09d479de1400bc78195a5b55a65622a7dceeb3d1090a1b16") + version("3.20.3", sha256="4d008ac3461e271fcfac26a05936f77fc7ab64402156fb371d41284851a651b8") + version("3.20.2", sha256="aecf6ecb975179eb3bb6a4a50cae192d41e92b9372b02300f9e8f1d5f559544e") + version("3.20.1", sha256="3f1808b9b00281df06c91dd7a021d7f52f724101000da7985a401678dfe035b0") + version("3.20.0", sha256="9c06b2ddf7c337e31d8201f6ebcd3bba86a9a033976a9aee207fe0c6971f4755") + version("3.19.8", sha256="09b4fa4837aae55c75fb170f6a6e2b44818deba48335d1969deddfbb34e30369") + version("3.19.7", sha256="58a15f0d56a0afccc3cc5371234fce73fcc6c8f9dbd775d898e510b83175588e") + version("3.19.6", sha256="ec87ab67c45f47c4285f204280c5cde48e1c920cfcfed1555b27fb3b1a1d20ba") + version("3.19.5", sha256="c432296eb5dec6d71eae15d140f6297d63df44e9ffe3e453628d1dc8fc4201ce") + version("3.19.4", sha256="7d0232b9f1c57e8de81f38071ef8203e6820fe7eec8ae46a1df125d88dbcc2e1") + version("3.19.3", sha256="3faca7c131494a1e34d66e9f8972ff5369e48d419ea8ceaa3dc15b4c11367732") + version("3.19.2", sha256="e3e0fd3b23b7fb13e1a856581078e0776ffa2df4e9d3164039c36d3315e0c7f0") + version("3.19.1", sha256="1d266ea3a76ef650cdcf16c782a317cb4a7aa461617ee941e389cb48738a3aba") + version("3.19.0", sha256="fdda688155aa7e72b7c63ef6f559fca4b6c07382ea6dca0beb5f45aececaf493") + version("3.18.6", sha256="124f571ab70332da97a173cb794dfa09a5b20ccbb80a08e56570a500f47b6600") + version("3.18.5", sha256="080bf24b0f73f4bf3ec368d2be1aa59369b9bb1cd693deeb6f18fe553ca74ab4") + version("3.18.4", sha256="597c61358e6a92ecbfad42a9b5321ddd801fc7e7eca08441307c9138382d4f77") + version("3.18.3", sha256="2c89f4e30af4914fd6fb5d00f863629812ada848eee4e2d29ec7e456d7fa32e5") + version("3.18.2", sha256="5d4e40fc775d3d828c72e5c45906b4d9b59003c9433ff1b36a1cb552bbd51d7e") + version("3.18.1", sha256="c0e3338bd37e67155b9d1e9526fec326b5c541f74857771b7ffed0c46ad62508") + version("3.18.0", sha256="83b4ffcb9482a73961521d2bafe4a16df0168f03f56e6624c419c461e5317e29") + version("3.17.5", sha256="8c3083d98fd93c1228d5e4e40dbff2dd88f4f7b73b9fa24a2938627b8bc28f1a") + version("3.17.4", sha256="86985d73d0a63ec99c236aab5287316e252164f33d7c4cb160954a980c71f36f") + version("3.17.3", sha256="0bd60d512275dc9f6ef2a2865426a184642ceb3761794e6b65bff233b91d8c40") + version("3.17.1", sha256="3aa9114485da39cbd9665a0bfe986894a282d5f0882b1dea960a739496620727") + version("3.17.0", sha256="b74c05b55115eacc4fa2b77a814981dbda05cdc95a53e279fe16b7b272f00847") + version("3.16.9", sha256="1708361827a5a0de37d55f5c9698004c035abb1de6120a376d5d59a81630191f") + version("3.16.8", sha256="177434021132686cb901fea7db9fa2345efe48d566b998961594d5cc346ac588") + version("3.16.7", sha256="5f49c95a2933b1800f14840f3a389f4cef0b19093985a35053b43f38ec21358f") + version("3.16.6", sha256="6f6ff1a197851b0fa8412ff5de602e6717a4eb9509b2c385b08589c4e7a16b62") + version("3.16.5", sha256="5f760b50b8ecc9c0c37135fae5fbf00a2fef617059aa9d61c1bb91653e5a8bfc") + version("3.16.4", sha256="9bcc8c114d9da603af9512083ed7d4a39911d16105466beba165ba8fe939ac2c") + version("3.16.3", sha256="e54f16df9b53dac30fd626415833a6e75b0e47915393843da1825b096ee60668") + version("3.16.2", sha256="8c09786ec60ca2be354c29829072c38113de9184f29928eb9da8446a5f2ce6a9") + version("3.16.1", sha256="a275b3168fa8626eca4465da7bb159ff07c8c6cb0fb7179be59e12cbdfa725fd") + version("3.16.0", sha256="6da56556c63cab6e9a3e1656e8763ed4a841ac9859fefb63cbe79472e67e8c5f") + version("3.15.7", sha256="71999d8a14c9b51708847371250a61533439a7331eb7702ac105cfb3cb1be54b") + version("3.15.6", sha256="3fa17992ac97d3fc856ffba5d3b10578744ea5b4736818f01e6067f0253b2db5") + version("3.15.5", sha256="fbdd7cef15c0ced06bb13024bfda0ecc0dedbcaaaa6b8a5d368c75255243beb4") + version("3.15.4", sha256="8a211589ea21374e49b25fc1fc170e2d5c7462b795f1b29c84dd0e984301ed7a") + version("3.15.3", sha256="13958243a01365b05652fa01b21d40fa834f70a9e30efa69c02604e64f58b8f5") + version("3.15.2", sha256="539088cb29a68e6d6a8fba5c00951e5e5b1a92c68fa38a83e1ed2f355933f768") + version("3.15.1", sha256="18dec548d8f8b04d53c60f9cedcebaa6762f8425339d1e2c889c383d3ccdd7f7") + version("3.15.0", sha256="0678d74a45832cacaea053d85a5685f3ed8352475e6ddf9fcb742ffca00199b5") + version("3.14.7", sha256="9221993e0af3e6d10124d840ff24f5b2f3b884416fca04d3312cb0388dec1385") + version("3.14.6", sha256="4e8ea11cabe459308671b476469eace1622e770317a15951d7b55a82ccaaccb9") + version("3.14.5", sha256="505ae49ebe3c63c595fa5f814975d8b72848447ee13b6613b0f8b96ebda18c06") + version("3.14.4", sha256="00b4dc9b0066079d10f16eed32ec592963a44e7967371d2f5077fd1670ff36d9") + version("3.14.3", sha256="215d0b64e81307182b29b63e562edf30b3875b834efdad09b3fcb5a7d2f4b632") + version("3.14.2", sha256="a3cbf562b99270c0ff192f692139e98c605f292bfdbc04d70da0309a5358e71e") + version("3.14.1", sha256="7321be640406338fc12590609c42b0fae7ea12980855c1be363d25dcd76bb25f") + version("3.14.0", sha256="aa76ba67b3c2af1946701f847073f4652af5cbd9f141f221c97af99127e75502") + version("3.13.5", sha256="526db6a4b47772d1943b2f86de693e712f9dacf3d7c13b19197c9bef133766a5") + version("3.13.4", sha256="fdd928fee35f472920071d1c7f1a6a2b72c9b25e04f7a37b409349aef3f20e9b") + version("3.13.3", sha256="665f905036b1f731a2a16f83fb298b1fb9d0f98c382625d023097151ad016b25") + version("3.13.2", sha256="c925e7d2c5ba511a69f43543ed7b4182a7d446c274c7480d0e42cd933076ae25") + version("3.13.1", sha256="befe1ce6d672f2881350e94d4e3cc809697dd2c09e5b708b76c1dae74e1b2210") + version("3.13.0", sha256="4058b2f1a53c026564e8936698d56c3b352d90df067b195cb749a97a3d273c90") + version("3.12.4", sha256="5255584bfd043eb717562cff8942d472f1c0e4679c4941d84baadaa9b28e3194") + version("3.12.3", sha256="acbf13af31a741794106b76e5d22448b004a66485fc99f6d7df4d22e99da164a") + version("3.12.2", sha256="0f97485799e51a7070cc11494f3e02349b0fc3a24cc12b082e737bf67a0581a4") + version("3.12.1", sha256="c53d5c2ce81d7a957ee83e3e635c8cda5dfe20c9d501a4828ee28e1615e57ab2") + version("3.12.0", sha256="d0781a90f6cdb9049d104ac16a150f9350b693498b9dea8a0331e799db6b9d69") + version("3.11.4", sha256="8f864e9f78917de3e1483e256270daabc4a321741592c5b36af028e72bff87f5") + version("3.11.3", sha256="287135b6beb7ffc1ccd02707271080bbf14c21d80c067ae2c0040e5f3508c39a") + version("3.11.2", sha256="5ebc22bbcf2b4c7a20c4190d42c084cf38680a85b1a7980a2f1d5b4a52bf5248") + version("3.11.1", sha256="57bebc6ca4d1d42c6385249d148d9216087e0fda57a47dc5c858790a70217d0c") + version("3.11.0", sha256="c313bee371d4d255be2b4e96fd59b11d58bc550a7c78c021444ae565709a656b") + version("3.10.3", sha256="0c3a1dcf0be03e40cf4f341dda79c96ffb6c35ae35f2f911845b72dab3559cf8") + version("3.10.2", sha256="80d0faad4ab56de07aa21a7fc692c88c4ce6156d42b0579c6962004a70a3218b") + version("3.10.1", sha256="7be36ee24b0f5928251b644d29f5ff268330a916944ef4a75e23ba01e7573284") + version("3.10.0", sha256="b3345c17609ea0f039960ef470aa099de9942135990930a57c14575aae884987") + version("3.9.6", sha256="7410851a783a41b521214ad987bb534a7e4a65e059651a2514e6ebfc8f46b218") + version("3.9.4", sha256="b5d86f12ae0072db520fdbdad67405f799eb728b610ed66043c20a92b4906ca1") + version("3.9.2", sha256="954a5801a456ee48e76f01107c9a4961677dd0f3e115275bbd18410dc22ba3c1") + version("3.9.0", sha256="167701525183dbb722b9ffe69fb525aa2b81798cf12f5ce1c020c93394dfae0f") + version("3.8.2", sha256="da3072794eb4c09f2d782fcee043847b99bb4cf8d4573978d9b2024214d6e92d") + version("3.8.1", sha256="ce5d9161396e06501b00e52933783150a87c33080d4bdcef461b5b7fd24ac228") + version("3.8.0", sha256="cab99162e648257343a20f61bcd0b287f5e88e36fcb2f1d77959da60b7f35969") + version("3.7.2", sha256="dc1246c4e6d168ea4d6e042cfba577c1acd65feea27e56f5ff37df920c30cae0") + version("3.7.1", sha256="449a5bce64dbd4d5b9517ebd1a1248ed197add6ad27934478976fd5f1f9330e1") + version("3.6.1", sha256="28ee98ec40427d41a45673847db7a905b59ce9243bb866eaf59dce0f58aaef11") + version("3.6.0", sha256="fd05ed40cc40ef9ef99fac7b0ece2e0b871858a82feade48546f5d2940147670") + version("3.5.2", sha256="92d8410d3d981bb881dfff2aed466da55a58d34c7390d50449aa59b32bb5e62a") + version("3.5.1", sha256="93d651a754bcf6f0124669646391dd5774c0fc4d407c384e3ae76ef9a60477e8") + version("3.5.0", sha256="92c83ad8a4fd6224cf6319a60b399854f55b38ebe9d297c942408b792b1a9efa") + version("3.4.3", sha256="b73f8c1029611df7ed81796bf5ca8ba0ef41c6761132340c73ffe42704f980fa") + version("3.4.0", sha256="a5b82bf6ace6c481cdb911fd5d372a302740cbefd387e05297cb37f7468d1cea") + version("3.3.1", sha256="cd65022c6a0707f1c7112f99e9c981677fdd5518f7ddfa0f778d4cee7113e3d6") + version("3.1.0", sha256="8bdc3fa3f2da81bc10c772a6b64cc9052acc2901d42e1e1b2588b40df224aad9") + version("3.0.2", sha256="6b4ea61eadbbd9bec0ccb383c29d1f4496eacc121ef7acf37c7a24777805693e") + version("2.8.10.2", sha256="ce524fb39da06ee6d47534bbcec6e0b50422e18b62abc4781a4ba72ea2910eb1") + + variant( + "build_type", + default="Release", + description="CMake build type", + values=("Debug", "Release", "RelWithDebInfo", "MinSizeRel"), + ) + + # Revert the change that introduced a regression when parsing mpi link + # flags, see: https://gitlab.kitware.com/cmake/cmake/issues/19516 + patch("cmake-revert-findmpi-link-flag-list.patch", when="@3.15.0") + + # Fix linker error when using external libs on darwin. + # See https://gitlab.kitware.com/cmake/cmake/merge_requests/2873 + patch("cmake-macos-add-coreservices.patch", when="@3.11.0:3.13.3") + + # Fix builds with XLF + Ninja generator + # https://gitlab.kitware.com/cmake/cmake/merge_requests/4075 + patch( + "fix-xlf-ninja-mr-4075.patch", + sha256="42d8b2163a2f37a745800ec13a96c08a3a20d5e67af51031e51f63313d0dedd1", + when="@3.15.5", + ) + + depends_on("ninja", when="platform=windows") + + # We default ownlibs to true because it greatly speeds up the CMake + # build, and CMake is built frequently. Also, CMake is almost always + # a build dependency, and its libs will not interfere with others in + # the build. + variant("ownlibs", default=True, description="Use CMake-provided third-party libraries") + variant("qt", default=False, description="Enables the build of cmake-gui") + variant( + "doc", + default=False, + description="Enables the generation of html and man page documentation", + ) + variant( + "ncurses", + default=sys.platform != "win32", + description="Enables the build of the ncurses gui", + ) + + # See https://gitlab.kitware.com/cmake/cmake/-/issues/21135 + conflicts( + "%gcc platform=darwin", + when="@:3.17", + msg="CMake <3.18 does not compile with GCC on macOS, " + "please use %apple-clang or a newer CMake release. " + "See: https://gitlab.kitware.com/cmake/cmake/-/issues/21135", + ) + + # Vendored dependencies do not build with nvhpc; it's also more + # transparent to patch Spack's versions of CMake's dependencies. + conflicts("+ownlibs %nvhpc") + + with when("~ownlibs"): + depends_on("curl") + depends_on("expat") + depends_on("zlib") + # expat/zlib are used in CMake/CTest, so why not require them in libarchive. + depends_on("libarchive@3.1.0: xar=expat compression=zlib") + depends_on("libarchive@3.3.3:", when="@3.15.0:") + depends_on("libuv@1.0.0:1.10", when="@3.7.0:3.10.3") + depends_on("libuv@1.10.0:1.10", when="@3.11.0:3.11") + depends_on("libuv@1.10.0:", when="@3.12.0:") + depends_on("rhash", when="@3.8.0:") + + for plat in ["darwin", "linux", "cray"]: + with when("+ownlibs platform=%s" % plat): + depends_on("openssl") + depends_on("openssl@:1.0", when="@:3.6.9") + + depends_on("qt", when="+qt") + depends_on("ncurses", when="+ncurses") + + with when("+doc"): + depends_on("python@2.7.11:", type="build") + depends_on("py-sphinx", type="build") + + # TODO: update curl package to build with Windows SSL implementation + # at which point we can build with +ownlibs on Windows + conflicts("~ownlibs", when="platform=windows") + # Cannot build with Intel, should be fixed in 3.6.2 + # https://gitlab.kitware.com/cmake/cmake/issues/16226 + patch("intel-c-gnu11.patch", when="@3.6.0:3.6.1") + + # Cannot build with Intel again, should be fixed in 3.17.4 and 3.18.1 + # https://gitlab.kitware.com/cmake/cmake/-/issues/21013 + patch("intel-cxx-bootstrap.patch", when="@3.17.0:3.17.3,3.18.0") + + # https://gitlab.kitware.com/cmake/cmake/issues/18232 + patch("nag-response-files.patch", when="@3.7:3.12") + + # Cray libhugetlbfs and icpc warnings failing CXX tests + # https://gitlab.kitware.com/cmake/cmake/-/merge_requests/4698 + # https://gitlab.kitware.com/cmake/cmake/-/merge_requests/4681 + patch("ignore_crayxc_warnings.patch", when="@3.7:3.17.2") + + # The Fujitsu compiler requires the '--linkfortran' option + # to combine C++ and Fortran programs. + patch("fujitsu_add_linker_option.patch", when="%fj") + + # Remove -A from the C++ flags we use when CXX_EXTENSIONS is OFF + # Should be fixed in 3.19. + # https://gitlab.kitware.com/cmake/cmake/-/merge_requests/5025 + patch("pgi-cxx-ansi.patch", when="@3.15:3.18") + + # Adds CCE v11+ fortran preprocessing definition. + # requires Cmake 3.19+ + # https://gitlab.kitware.com/cmake/cmake/-/merge_requests/5882 + patch( + "5882-enable-cce-fortran-preprocessing.patch", + sha256="b48396c0e4f61756248156b6cebe9bc0d7a22228639b47b5aa77c9330588ce88", + when="@3.19.0:3.19", + ) + + conflicts("+qt", when="^qt@5.4.0") # qt-5.4.0 has broken CMake modules + + # https://gitlab.kitware.com/cmake/cmake/issues/18166 + conflicts("%intel", when="@3.11.0:3.11.4") + conflicts("%intel@:14", when="@3.14:", msg="Intel 14 has immature C++11 support") + + resource( + name="cmake-bootstrap", + url="https://cmake.org/files/v3.21/cmake-3.21.2-windows-x86_64.zip", + checksum="213a4e6485b711cb0a48cbd97b10dfe161a46bfe37b8f3205f47e99ffec434d2", + placement="cmake-bootstrap", + when="@3.0.2: platform=windows", + ) + + resource( + name="cmake-bootstrap", + url="https://cmake.org/files/v2.8/cmake-2.8.4-win32-x86.zip", + checksum="8b9b520f3372ce67e33d086421c1cb29a5826d0b9b074f44a8a0304e44cf88f3", + placement="cmake-bootstrap", + when="@:2.8.10.2 platform=windows", + ) + + phases = ["bootstrap", "build", "install"] + + + @property + def libs(self): + """CMake has no libraries, so if you ask for `spec['cmake'].libs` + (which happens automatically for packages that depend on CMake as + a link dependency) the default implementation of ``.libs` will + search the entire root prefix recursively before failing. + The longer term solution is for all dependents of CMake to change + their deptype. For now, this returns an empty set of libraries. + """ + return LibraryList([]) + + @property + def headers(self): + return HeaderList([]) + + @classmethod + def determine_version(cls, exe): + output = Executable(exe)("--version", output=str, error=str) + match = re.search(r"cmake.*version\s+(\S+)", output) + return match.group(1) if match else None + + def flag_handler(self, name, flags): + if name == "cxxflags" and self.compiler.name == "fj": + cxx11plus_flags = (self.compiler.cxx11_flag, self.compiler.cxx14_flag) + cxxpre11_flags = self.compiler.cxx98_flag + if any(f in flags for f in cxxpre11_flags): + raise ValueError("cannot build cmake pre-c++11 standard") + elif not any(f in flags for f in cxx11plus_flags): + flags.append(self.compiler.cxx11_flag) + return (flags, None, None) + + def setup_build_environment(self, env): + spec = self.spec + if "+ownlibs" in spec and "platform=windows" not in spec: + env.set("OPENSSL_ROOT_DIR", spec["openssl"].prefix) + + def bootstrap_args(self): + spec = self.spec + args = [] + self.generator = make + + # The Intel compiler isn't able to deal with noinline member functions of + # template classes defined in headers. As such it outputs + # warning #2196: routine is both "inline" and "noinline" + # cmake bootstrap will fail due to the word 'warning'. + if spec.satisfies("%intel@:2021.6.0"): + args.append("CXXFLAGS=-diag-disable=2196") + + if self.spec.satisfies("platform=windows"): + args.append("-GNinja") + self.generator = ninja + + if not sys.platform == "win32": + args.append("--prefix={0}".format(self.prefix)) + + jobs = spack.build_environment.get_effective_jobs( + make_jobs, + parallel=self.parallel, + supports_jobserver=self.generator.supports_jobserver, + ) + if jobs is not None: + args.append("--parallel={0}".format(jobs)) + + if "+ownlibs" in spec: + # Build and link to the CMake-provided third-party libraries + args.append("--no-system-libs") + else: + # Build and link to the Spack-installed third-party libraries + args.append("--system-libs") + + if spec.satisfies("@3.2:"): + # jsoncpp requires CMake to build + # use CMake-provided library to avoid circular dependency + args.append("--no-system-jsoncpp") + + if "+qt" in spec: + args.append("--qt-gui") + else: + args.append("--no-qt-gui") + + if "+doc" in spec: + args.append("--sphinx-html") + args.append("--sphinx-man") + + # Now for CMake arguments to pass after the initial bootstrap + args.append("--") + else: + args.append("-DCMAKE_INSTALL_PREFIX=%s" % self.prefix) + + args.append("-DCMAKE_BUILD_TYPE={0}".format(self.spec.variants["build_type"].value)) + + # Install CMake correctly, even if `spack install` runs + # inside a ctest environment + args.append("-DCMake_TEST_INSTALL=OFF") + + # When building our own private copy of curl we still require an + # external openssl. + if "+ownlibs" in spec: + if "platform=windows" in spec: + args.append("-DCMAKE_USE_OPENSSL=OFF") + else: + args.append("-DCMAKE_USE_OPENSSL=ON") + + args.append("-DBUILD_CursesDialog=%s" % str("+ncurses" in spec)) + + # Make CMake find its own dependencies. + rpaths = spack.build_environment.get_rpaths(self) + prefixes = spack.build_environment.get_cmake_prefix_path(self) + args.extend( + [ + "-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=ON", + "-DCMAKE_INSTALL_RPATH={0}".format(";".join(str(v) for v in rpaths)), + "-DCMAKE_PREFIX_PATH={0}".format(";".join(str(v) for v in prefixes)), + ] + ) + + return args + + def cmake_bootstrap(self): + exe_prefix = self.stage.source_path + relative_cmake_exe = os.path.join("cmake-bootstrap", "bin", "cmake.exe") + return Executable(os.path.join(exe_prefix, relative_cmake_exe)) + + def bootstrap(self, spec, prefix): + bootstrap_args = self.bootstrap_args() + if sys.platform == "win32": + bootstrap = self.cmake_bootstrap() + bootstrap_args.extend(["."]) + else: + bootstrap = Executable("./bootstrap") + bootstrap(*bootstrap_args) + + def build(self, spec, prefix): + self.generator() + + @run_after("build") + @on_package_attributes(run_tests=True) + def build_test(self): + # Some tests fail, takes forever + self.generator("test") + + def install(self, spec, prefix): + self.generator("install") + + if spec.satisfies("%fj"): + for f in find(self.prefix, "FindMPI.cmake", recursive=True): + filter_file("mpcc_r)", "mpcc_r mpifcc)", f, string=True) + filter_file("mpc++_r)", "mpc++_r mpiFCC)", f, string=True) + filter_file("mpifc)", "mpifc mpifrt)", f, string=True) + + def setup_dependent_package(self, module, dependent_spec): + """Called before cmake packages's install() methods.""" + + module.cmake = Executable(self.spec.prefix.bin.cmake) + module.ctest = Executable(self.spec.prefix.bin.ctest) + + def test(self): + """Perform smoke tests on the installed package.""" + spec_vers_str = "version {0}".format(self.spec.version) + + for exe in ["ccmake", "cmake", "cpack", "ctest"]: + reason = "test version of {0} is {1}".format(exe, spec_vers_str) + self.run_test( + exe, + ["--version"], + [spec_vers_str], + installed=True, + purpose=reason, + skip_missing=True, + ) diff --git a/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/cmake/pgi-cxx-ansi.patch b/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/cmake/pgi-cxx-ansi.patch new file mode 100644 index 00000000..953ea23e --- /dev/null +++ b/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/cmake/pgi-cxx-ansi.patch @@ -0,0 +1,50 @@ +From 52eee1938919deb59cc2b51d44f365f0d9a418e5 Mon Sep 17 00:00:00 2001 +From: Tin Huynh +Date: Thu, 16 Jul 2020 16:06:33 -0700 +Subject: [PATCH] PGI: Remove -A from the C++ flags we use when CXX_EXTENSIONS + is OFF + +Since commit 9b97cb5562 (PGI: Add language standards for PGI, +2017-05-01, v3.9.0-rc1~174^2), we have passed the `-A` flag to +the PGI C++ compiler when specifying a C++ standard flag with +compiler extensions turned off. The flag is not meant for that. +The PGI C++ standard flags do not turn extensions on by default +and have a separate `--gnu_extensions` flag for that which we +already use when CXX_EXTENSIONS is ON. Simply drop the `-A` flag. + +Fixes: #20997 +--- + Modules/Compiler/PGI-CXX.cmake | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/Modules/Compiler/PGI-CXX.cmake b/Modules/Compiler/PGI-CXX.cmake +index c77de3605b..2d7a303c9b 100644 +--- a/Modules/Compiler/PGI-CXX.cmake ++++ b/Modules/Compiler/PGI-CXX.cmake +@@ -4,19 +4,19 @@ string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL_INIT " -DNDEBUG") + string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " -DNDEBUG") + + if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 12.10) +- set(CMAKE_CXX98_STANDARD_COMPILE_OPTION -A) ++ set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "") + set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION --gnu_extensions) + set(CMAKE_CXX98_STANDARD__HAS_FULL_SUPPORT ON) + if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13.10) +- set(CMAKE_CXX11_STANDARD_COMPILE_OPTION --c++11 -A) ++ set(CMAKE_CXX11_STANDARD_COMPILE_OPTION --c++11) + set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION --c++11 --gnu_extensions) + set(CMAKE_CXX11_STANDARD__HAS_FULL_SUPPORT ON) + if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 15.7) +- set(CMAKE_CXX14_STANDARD_COMPILE_OPTION --c++14 -A) ++ set(CMAKE_CXX14_STANDARD_COMPILE_OPTION --c++14) + set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION --c++14 --gnu_extensions) + set(CMAKE_CXX14_STANDARD__HAS_FULL_SUPPORT ON) + if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 17.1) +- set(CMAKE_CXX17_STANDARD_COMPILE_OPTION --c++17 -A) ++ set(CMAKE_CXX17_STANDARD_COMPILE_OPTION --c++17) + set(CMAKE_CXX17_EXTENSION_COMPILE_OPTION --c++17 --gnu_extensions) + set(CMAKE_CXX17_STANDARD__HAS_FULL_SUPPORT ON) + endif() +-- +GitLab + diff --git a/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/flux-core/0001-build-fix-build-errors-with-side-installed-0MQ.patch b/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/flux-core/0001-build-fix-build-errors-with-side-installed-0MQ.patch new file mode 100644 index 00000000..f8ba8c93 --- /dev/null +++ b/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/flux-core/0001-build-fix-build-errors-with-side-installed-0MQ.patch @@ -0,0 +1,60 @@ +From bb0496137d5a15f67ccde15e4d1462d6abaee339 Mon Sep 17 00:00:00 2001 +From: Jim Garlick +Date: Tue, 19 Oct 2021 14:27:47 -0700 +Subject: [PATCH 1/1] build: fix build errors with side-installed 0MQ + +Problem: when building against side-installed libzmq, libczmq, +compilation fails with a missing zframe_t definition. + +If the side installed 0MQ packages were built with the "draft APIs" +enabled (the default), libczmqcontainers/zhashx.h and zlistx.h define +function prototypes using zframe_t. Extend CZMQ_BUILD_EXTRA to +include those prototypes so they are never defined in libczmqcontainers. +--- + src/common/libczmqcontainers/zhashx.h | 2 +- + src/common/libczmqcontainers/zlistx.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/common/libczmqcontainers/zhashx.h b/src/common/libczmqcontainers/zhashx.h +index 01a69ae0a..d9cbe1712 100644 +--- a/src/common/libczmqcontainers/zhashx.h ++++ b/src/common/libczmqcontainers/zhashx.h +@@ -267,7 +267,6 @@ CZMQ_EXPORT zhashx_t * + // Self test of this class. + CZMQ_EXPORT void + zhashx_test (bool verbose); +-#endif // CZMQ_BUILD_EXTRA + + #ifdef CZMQ_BUILD_DRAFT_API + // *** Draft method, for development use, may change without warning *** +@@ -284,6 +283,7 @@ CZMQ_EXPORT zframe_t * + zhashx_pack_own (zhashx_t *self, zhashx_serializer_fn serializer); + + #endif // CZMQ_BUILD_DRAFT_API ++#endif // CZMQ_BUILD_EXTRA + // @end + + #ifdef __cplusplus +diff --git a/src/common/libczmqcontainers/zlistx.h b/src/common/libczmqcontainers/zlistx.h +index c2ccd9877..1bb55eb6c 100644 +--- a/src/common/libczmqcontainers/zlistx.h ++++ b/src/common/libczmqcontainers/zlistx.h +@@ -197,7 +197,6 @@ CZMQ_EXPORT void + // Self test of this class. + CZMQ_EXPORT void + zlistx_test (bool verbose); +-#endif // CZMQ_BUILD_EXTRA + + #ifdef CZMQ_BUILD_DRAFT_API + // *** Draft method, for development use, may change without warning *** +@@ -225,6 +224,7 @@ CZMQ_EXPORT zframe_t * + zlistx_pack (zlistx_t *self); + + #endif // CZMQ_BUILD_DRAFT_API ++#endif // CZMQ_BUILD_EXTRA + // @end + + +-- +2.27.0 + diff --git a/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/flux-core/package.py b/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/flux-core/package.py new file mode 100644 index 00000000..465284bd --- /dev/null +++ b/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/flux-core/package.py @@ -0,0 +1,272 @@ +# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other +# AMSLib Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +import os + +import spack.util.executable +from spack.package import * + + +class FluxCore(AutotoolsPackage): + """A next-generation resource manager (pre-alpha)""" + + homepage = "https://github.com/flux-framework/flux-core" + url = "https://github.com/flux-framework/flux-core/releases/download/v0.8.0/flux-core-0.8.0.tar.gz" + git = "https://github.com/flux-framework/flux-core.git" + tags = ["radiuss", "e4s"] + + maintainers("grondo") + + version("master", branch="master") + version("0.52.0", sha256="dca434238405e4cae4686c8143f2cc79919bfd9e26b09c980e1e5f69ffd0c448") + version("0.51.0", sha256="e57b71b708482f20d2a2195a000c0c3b9176faa6aaadfad4d2117f8671ca67ce") + version("0.50.0", sha256="77414299a7ca081199aa0f57bcaea3e05860e2095df73c0f6b7672b88fadf683") + version("0.49.0", sha256="9b8d7af1d8aaa7ee110bcb9815b6b8647af686de949097c9bb2a0269d5551051") + version("0.48.0", sha256="32c1bfdde44123e90606422807d381406874bb6dbec170ddb493f905208cc275") + version("0.47.0", sha256="c13c8df3dd3db565ff7a3db727f087b7c1a3946b98c4b945ac43fe44a4c534c3") + version("0.46.1", sha256="a7873fd49889c11f12e62d59eb992d4a089ddfde8566789f79eca1dfae1a5ffa") + version("0.45.0", sha256="6550fe682c1686745e1d9c201daf18f9c57691468124565c9252d27823d2fe46") + version("0.44.0", sha256="6786b258657675ed573907a2a6012f68f2dd5053d7d09eb76b4e7f9943d6d466") + version("0.43.0", sha256="4b9816d04e8b5b248a8d5e3dac3f9822f8f89831e340f36745e01512d768597b") + version("0.42.0", sha256="ac64055976cd7cda26e2991174b9a58048bd4fb75c5c2012023050d76c718445") + version("0.41.0", sha256="3f3a6a8a1e7d2f326b0e684dcf70e4489076b3f52dd14480e2f33cfdaeba690a") + version("0.40.0", sha256="b15996b6165f037e5a6c42ea277e2c1c56a4f4b6bf47334105e324dcfefbf6fa") + version("0.39.0", sha256="ad55529fc3f056ac167b53b5bd489167c2ef218c3c49e721ad507a8ea9c409db") + version("0.38.0", sha256="69d150c3d48b5985bca606e1a4de12282eb76233b6b730de1a9fff4136faf65f") + version("0.37.0", sha256="4779f739da573c02df32a834179cc0c157688f6e82bb4cd2049eb0aa59fffffc") + version("0.36.0", sha256="04def00d8679a30f51c030791b69a536176725b19dc13e7bfc0df58d0041e975") + version("0.35.0", sha256="28094c77d0a0d34f8fd71c9b397ae25dd7a4b138aad83f02e75c5a182c76b32b") + version("0.34.0", sha256="e045b0a4f38d1a08280c2acc7f6e03a06e3715282ff84d9a0d1037b86e0aae33") + version("0.33.0", sha256="b6f07fb6c0fc36bf300852d71df527778c46517bf61e26c7f54c6978898df2f1") + version("0.32.0", sha256="fabe4450ce805db547de2675afebc077e4f833d86e00a8c0dd4cd0727b374e30") + version("0.31.0", sha256="a18251de2ca3522484cacfa986df934ba8f98c54586e18940ce5d2c6147a8a7f") + version("0.30.0", sha256="e51fde4464140367ae4bc1b44f960675ea0a6f58eede3a561cacd8a11ca3e776") + version("0.29.0", sha256="c13b40e82d66356e75208a689a495ca01f0a013e2e45ac8ea202ed8224987323") + version("0.28.0", sha256="9a784def7186b0036091bd8d6d8fe5bc3425ab2927e1465e1c9ad266631c285d") + version( + "0.27.0", + sha256="abd46d38081ba6b501adb1c111374b39d6ae72ac1aec9fbbf31943a856541d3a", + deprecated=True, + ) + version( + "0.26.0", + sha256="58bfd4742c59364b13cd83214e8f70735952d01793800b149cae056fddfeeff1", + deprecated=True, + ) + version( + "0.25.0", + sha256="3c97e21eaec51e8aa0eaee6aa8eb23246650d102a6b6a5c9943cd69e3c8e1008", + deprecated=True, + ) + version( + "0.24.0", + sha256="fb7e0f9a44d84144a8eaf8f42a5d7e64a4a847861d0ddc2ad8fc4908b5a9190e", + deprecated=True, + ) + version( + "0.23.0", + sha256="918b181be4e27c32f02d5036230212cd9235dc78dc2bde249c3651d6f75866c7", + deprecated=True, + ) + version( + "0.22.0", + sha256="1dd0b737199b8a40f245e6a4e1b3b28770f0ecf2f483d284232080b8b252521f", + deprecated=True, + ) + version( + "0.21.0", + sha256="cc1b7a46d7c1c1a3e99e8861bba0dde89a97351eabd6f1b264788bd76e64c329", + deprecated=True, + ) + version( + "0.20.0", + sha256="2970b9b1c389fc4a381f9e605921ce0eb6aa9339387ea741978bcffb4bd81b6f", + deprecated=True, + ) + version( + "0.19.0", + sha256="f45328a37d989c308c46639a9ed771f47b11184422cf5604249919fbd320d6f5", + deprecated=True, + ) + version( + "0.18.0", + sha256="9784bbca94177a32dbbc99728e8925bf894f3aebaa316961d6ea85df32d59545", + deprecated=True, + ) + version( + "0.17.0", + sha256="3f8c6cb72982028f86a96c0098cacd3a6e9de359fa1cf077380c835a20e7b7f7", + deprecated=True, + ) + version( + "0.16.0", + sha256="1582f7fb4d2313127418c34de7c9ce4f5fef00622d19cedca7bed929f4709f10", + deprecated=True, + ) + version( + "0.15.0", + sha256="51bc2eae69501f802459fc82f191eb5e8ae0b4f7e9e77ac18543a850cc8445f5", + deprecated=True, + ) + + # Avoid the infinite symlink issue + # This workaround is documented in PR #3543 + build_directory = "spack-build" + + variant("docs", default=False, description="Build flux manpages and docs") + variant("cuda", default=False, description="Build dependencies with support for CUDA") + variant("security", default=False, description="Build with flux-security") + + # Restrict flux to Linux based platforms where builds are possible. + conflicts("platform=darwin", msg="flux-core does not support MacOS based platforms.") + conflicts("platform=windows", msg="flux-core does not support Windows based platforms.") + + depends_on("libarchive", when="@0.38.0:") + depends_on("ncurses@6.2:", when="@0.32.0:") + depends_on("libzmq@4.0.4:") + depends_on("czmq@3.0.1:") + depends_on("hwloc@1.11.1:1", when="@:0.17.0") + depends_on("hwloc@1.11.1:", when="@0.17.0:") + depends_on("hwloc +cuda", when="+cuda") + # Provide version hints for lua so that the concretizer succeeds when no + # explicit flux-core version is given. See issue #10000 for details + depends_on("lua", type=("build", "run", "link")) + depends_on("lua@5.1:5.2", when="@:0.17.0") + depends_on("lua@5.1:5.3", when="@0.18.0:") + depends_on("lua-luaposix") + # `link` dependency on python due to Flux's `pymod` module + depends_on("python@3.6:", when="@0.17:", type=("build", "link", "run")) + depends_on("python@2.7:", type=("build", "link", "run")) + depends_on("py-cffi@1.1:", type=("build", "run")) + depends_on("py-six@1.9:", when="@:0.24", type=("build", "run")) + depends_on("py-pyyaml@3.10:", type=("build", "run")) + depends_on("py-jsonschema@2.3:", type=("build", "run")) + depends_on("py-ply", type=("build", "run"), when="@0.46.1:") + depends_on("jansson") + depends_on("jansson@2.10:", when="@0.21.0:") + depends_on("pkgconfig") + depends_on("lz4") + depends_on("sqlite") + + depends_on("asciidoc", type="build", when="+docs") + depends_on("py-docutils", type="build", when="@0.32.0: +docs") + + # Flux security variant + # Note that if you install with this variant, it is + # recommended to create a view and then a broker.toml that + # has the path to flux-imp generated by flux-security + depends_on("flux-security", type="build", when="+security") + + # Need autotools when building on master: + depends_on("autoconf", type="build", when="@master") + depends_on("automake", type="build", when="@master") + depends_on("libtool", type="build", when="@master") + + # Testing Dependencies + depends_on("mpich pmi=pmi", type="test") + depends_on("valgrind", type="test") + depends_on("jq", type="test") + + # Patch 0.27-0.30 for build errors when czmq built with "draft APIs": + patch("0001-build-fix-build-errors-with-side-installed-0MQ.patch", when="@0.27.0:0.30.0") + + def url_for_version(self, version): + """ + Flux uses a fork of ZeroMQ's Collective Code Construction Contract + (https://flux-framework.readthedocs.io/projects/flux-rfc/en/latest/spec_1.html). + This model requires a repository fork for every stable release that has + patch releases. For example, 0.8.0 and 0.9.0 are both tags within the + main repository, but 0.8.1 and 0.9.5 would be releases on the v0.8 and + v0.9 forks, respectively. + + Rather than provide an explicit URL for each patch release, make Spack + aware of this repo structure. + """ + if version[-1] == 0: + url = "https://github.com/flux-framework/flux-core/releases/download/v{0}/flux-core-{0}.tar.gz" + else: + url = "https://github.com/flux-framework/flux-core-v{1}/releases/download/v{0}/flux-core-{0}.tar.gz" + return url.format(version.up_to(3), version.up_to(2)) + + def setup(self): + pass + + @when("@master") + def setup(self): + with working_dir(self.stage.source_path): + # Allow git-describe to get last tag so flux-version works: + git = which("git") + # When using spack develop, this will already be unshallow + try: + git("fetch", "--unshallow") + git("config", "remote.origin.fetch", "+refs/heads/*:refs/remotes/origin/*") + git("fetch", "origin") + except spack.util.executable.ProcessError: + git("fetch") + + def autoreconf(self, spec, prefix): + self.setup() + if not os.path.exists("configure"): + # Bootstrap with autotools + bash = which("bash") + bash("./autogen.sh") + + @property + def lua_version(self): + return self.spec["lua"].version.up_to(2) + + @property + def lua_share_dir(self): + return os.path.join("share", "lua", str(self.lua_version)) + + @property + def lua_lib_dir(self): + return os.path.join("lib", "lua", str(self.lua_version)) + + def setup_build_environment(self, env): + # Ensure ./fluxometer.lua can be found during flux's make check + env.append_path("LUA_PATH", "./?.lua", separator=";") + + def setup_run_environment(self, env): + env.prepend_path( + "LUA_PATH", os.path.join(self.spec.prefix, self.lua_share_dir, "?.lua"), separator=";" + ) + env.prepend_path( + "LUA_CPATH", os.path.join(self.spec.prefix, self.lua_lib_dir, "?.so"), separator=";" + ) + env.prepend_path( + "PYTHONPATH", + os.path.join( + self.spec.prefix.lib, + "python{0}".format(self.spec["python"].version.up_to(2)), + "site-packages", + ), + ) + env.prepend_path("FLUX_MODULE_PATH", self.prefix.lib.flux.modules) + env.prepend_path("FLUX_EXEC_PATH", self.prefix.libexec.flux.cmd) + env.prepend_path("FLUX_CONNECTOR_PATH", self.prefix.lib.flux.connectors) + + def configure_args(self): + args = ["--enable-pylint=no"] + if "+docs" not in self.spec: + args.append("--disable-docs") + if "+security" in self.spec: + args.append("--with-flux-security") + return args + + def flag_handler(self, name, flags): + if name == "cflags": + # https://github.com/flux-framework/flux-core/issues/3482 + if self.spec.satisfies("%gcc@10:") and self.spec.satisfies("@0.23.0:0.23"): + if flags is None: + flags = [] + flags.append("-Wno-error=stringop-truncation") + + if self.spec.satisfies("%gcc@8:") and self.spec.satisfies("@0.23.0"): + if flags is None: + flags = [] + flags.append("-Wno-error=maybe-uninitialized") + + return (flags, None, None) diff --git a/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/flux-sched/jobid-sign-compare-fix.patch b/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/flux-sched/jobid-sign-compare-fix.patch new file mode 100644 index 00000000..edaae12a --- /dev/null +++ b/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/flux-sched/jobid-sign-compare-fix.patch @@ -0,0 +1,13 @@ +diff --git a/resource/hlapi/bindings/c++/reapi_cli_impl.hpp b/resource/hlapi/bindings/c++/reapi_cli_impl.hpp +index 0b01b341..e0a91458 100644 +--- a/resource/hlapi/bindings/c++/reapi_cli_impl.hpp ++++ b/resource/hlapi/bindings/c++/reapi_cli_impl.hpp +@@ -594,7 +594,7 @@ int resource_query_t::remove_job (const uint64_t jobid) + { + int rc = -1; + +- if (jobid > std::numeric_limits::max ()) { ++ if (jobid > (uint64_t) std::numeric_limits::max ()) { + errno = EOVERFLOW; + return rc; + } diff --git a/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/flux-sched/no-valgrind.patch b/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/flux-sched/no-valgrind.patch new file mode 100644 index 00000000..3b828e43 --- /dev/null +++ b/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/flux-sched/no-valgrind.patch @@ -0,0 +1,19 @@ +diff --git a/t/t5000-valgrind.t b/t/t5000-valgrind.t +index 08255348..aac546f6 100755 +--- a/t/t5000-valgrind.t ++++ b/t/t5000-valgrind.t +@@ -6,6 +6,14 @@ test_description='Run broker under valgrind with a small workload' + test -n "$FLUX_TESTS_LOGFILE" && set -- "$@" --logfile + . `dirname $0`/sharness.sh + ++# Do not run valgrind test by default unless FLUX_ENABLE_VALGRIND_TEST ++# is set in environment (e.g. by CI), or the test run run with -d, --debug ++# ++if test -z "$FLUX_ENABLE_VALGRIND_TEST" && test "$debug" = ""; then ++ skip_all='skipping valgrind tests since FLUX_ENABLE_VALGRIND_TEST not set' ++ test_done ++fi ++ + if ! which valgrind >/dev/null; then + skip_all='skipping valgrind tests since no valgrind executable found' + test_done diff --git a/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/flux-sched/package.py b/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/flux-sched/package.py new file mode 100644 index 00000000..3f8399c2 --- /dev/null +++ b/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/flux-sched/package.py @@ -0,0 +1,175 @@ +# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other +# AMSLib Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +import os + +import spack.util.executable +from spack.package import * + + +class FluxSched(AutotoolsPackage): + """A scheduler for flux-core (pre-alpha)""" + + homepage = "https://github.com/flux-framework/flux-sched" + url = "https://github.com/flux-framework/flux-sched/releases/download/v0.5.0/flux-sched-0.5.0.tar.gz" + git = "https://github.com/flux-framework/flux-sched.git" + tags = ["radiuss", "e4s"] + + maintainers("grondo") + + version("master", branch="master") + version("0.28.0", sha256="9431c671bed5d76fd95b4a4a7f36224d4bf76f416a2a1a5c4908f3ca790d434d") + version("0.27.0", sha256="1e131924440c904fa0c925b7aa14c47b97f4e67b43af7efd2ebc0ef7ce90eb7c") + version("0.26.0", sha256="184faec800cf45952ef79bda113f710bf91a05be584034d36a3234627d4a54c7") + version("0.25.0", sha256="a984b238d8b6968ef51f1948a550bf57887bf3da8002dcd1734ce26afc4bff07") + version("0.24.0", sha256="e104eb740e94f26a6a690f1c299bbe643f88751cc14a2596f0779a19cfeb5e6f") + version("0.23.0", sha256="159b62cc4d25ef3d5da5338511ff38449a893d8adca13383cda7b322295acc1c") + version("0.22.0", sha256="33cab21b667eeccd5665c5f139293b7b3e17cd3847e5fb2633c0dbacb33c611f") + version("0.21.1", sha256="4dbe8a2e06a816535ef43f34cec960c1e4108932438cd6dbb1d0040423f4477d") + version("0.21.0", sha256="156fe5b078a7c0b2075a1f1925ec9303a608c846c93187272f52c23eea24e06d") + version("0.20.0", sha256="1d2074e1458ba1e7a1d4c33341b9f09769559cd1b8c68edc32097e220c4240b8") + version("0.19.0", sha256="8dffa8eaec95a81286f621639ef851c52dc4c562d365971233bbd91100c31ed2") + version("0.18.0", sha256="a4d8a6444fdb7b857b26f47fdea57992b486c9522f4ff92d5a6f547d95b586ae") + version("0.17.0", sha256="5acfcb757e2294a92eaa91be58ba9b42736b88b42d2937de4a78f4642b1c4933") + version("0.16.0", sha256="08313976161c141b9b34e2d44d5a08d1b11302e22d60aeaf878eef84d4bd2884") + version("0.15.0", sha256="ff24d26997f91af415f98734b8117291f5a5001e86dac865b56b3d72980c80c8") + version("0.14.0", sha256="2808f42032b917823d69cd26103c9238694416e2f30c6d39c11c670927ed232a") + version("0.13.0", sha256="ba17fc0451239fe31a1524b6a270741873f59a5057514d2524fd3e9215c47a82") + version("0.12.0", sha256="b41ecaebba254abfb5a7995fd9100bd45a59d4ad0a79bdca8b3db02785d97b1d") + version("0.11.0", sha256="6a0e3c0678f85da8724e5399b02be9686311c835617f6036235ef54b489cc336") + version("0.10.0", sha256="5944927774709b5f52ddf64a0e825d9b0f24c9dea890b5504b87a8576d217cf6") + version("0.9.0", sha256="0e1eb408a937c2843bdaaed915d4d7e2ea763b98c31e7b849a96a74758d66a21") + version("0.8.0", sha256="45bc3cefb453d19c0cb289f03692fba600a39045846568d258e4b896ca19ca0d") + + # Avoid the infinite symlink issue + # This workaround is documented in PR #3543 + build_directory = "spack-build" + + variant("cuda", default=False, description="Build dependencies with support for CUDA") + + # Needs to be seen if tis is needed once we remove the default variants + depends_on( + "boost+exception+filesystem+system+serialization+graph+container+regex@1.53.0,1.59.0: " + ) + depends_on("py-pyyaml@3.10:", type=("build", "run")) + depends_on("py-jsonschema@2.3:", type=("build", "run")) + depends_on("libedit") + depends_on("libxml2@2.9.1:") + # pin yaml-cpp to 0.6.3 due to issue #886 + # https://github.com/flux-framework/flux-sched/issues/886 + depends_on("yaml-cpp@0.6.3") + depends_on("uuid") + depends_on("pkgconfig") + + depends_on("flux-core", type=("build", "link", "run")) + depends_on("flux-core+cuda", when="+cuda", type=("build", "run", "link")) + depends_on("flux-core@0.16.0:0.16", when="@0.8.0", type=("build", "run", "link")) + depends_on("flux-core@0.22.0", when="@0.14.0", type=("build", "run", "link")) + depends_on("flux-core@0.23.0:0.25", when="@0.15.0", type=("build", "run", "link")) + depends_on("flux-core@0.26.0:", when="@0.16.0", type=("build", "run", "link")) + depends_on("flux-core@0.28.0:", when="@0.17.0", type=("build", "run", "link")) + depends_on("flux-core@0.29.0:", when="@0.18.0", type=("build", "run", "link")) + depends_on("flux-core@0.30.0:", when="@0.19.0", type=("build", "run", "link")) + depends_on("flux-core@0.31.0:", when="@0.19.0", type=("build", "run", "link")) + depends_on("flux-core@0.38.0:", when="@0.21.0", type=("build", "run", "link")) + depends_on("flux-core@master", when="@master", type=("build", "run", "link")) + + # Need autotools when building on master: + depends_on("autoconf", type="build", when="@master") + depends_on("automake", type="build", when="@master") + depends_on("libtool", type="build", when="@master") + + # Disable t5000-valgrind.t by default due to false positives not yet + # in the suppressions file. (This patch will be in v0.21.0) + patch("no-valgrind.patch", when="@:0.20.0") + patch("jobid-sign-compare-fix.patch", when="@:0.22.0") + + def url_for_version(self, version): + """ + Flux uses a fork of ZeroMQ's Collective Code Construction Contract + (https://github.com/flux-framework/rfc/blob/master/spec_1.adoc). + This model requires a repository fork for every stable release that has + patch releases. For example, 0.8.0 and 0.9.0 are both tags within the + main repository, but 0.8.1 and 0.9.5 would be releases on the v0.8 and + v0.9 forks, respectively. + + Rather than provide an explicit URL for each patch release, make Spack + aware of this repo structure. + """ + if version[-1] == 0: + url = "https://github.com/flux-framework/flux-sched/releases/download/v{0}/flux-sched-{0}.tar.gz" + else: + url = "https://github.com/flux-framework/flux-sched-v{1}/releases/download/v{0}/flux-sched-{0}.tar.gz" + return url.format(version.up_to(3), version.up_to(2)) + + def setup(self): + pass + + @when("@master") + def setup(self): + with working_dir(self.stage.source_path): + # Allow git-describe to get last tag so flux-version works: + git = which("git") + # When using spack develop, this will already be unshallow + try: + git("fetch", "--unshallow") + git("config", "remote.origin.fetch", "+refs/heads/*:refs/remotes/origin/*") + git("fetch", "origin") + except spack.util.executable.ProcessError: + git("fetch") + + def autoreconf(self, spec, prefix): + self.setup() + if os.path.exists(self.configure_abs_path): + return + # make sure configure doesn't get confused by the staging symlink + with working_dir(self.configure_directory): + # Bootstrap with autotools + bash = which("bash") + bash("./autogen.sh") + + @when("@:0.20") + def patch(self): + """Fix build with clang@13 and gcc@11""" + filter_file("NULL", "nullptr", "resource/schema/sched_data.hpp") + filter_file("size_t", "std::size_t", "resource/planner/planner.h") + + def configure_args(self): + args = [] + if self.spec.satisfies("@0.9.0:"): + args.append("CXXFLAGS=-Wno-uninitialized") + if self.spec.satisfies("%clang@12:"): + args.append("CXXFLAGS=-Wno-defaulted-function-deleted") + if self.spec.satisfies("%oneapi"): + args.append("CXXFLAGS=-Wno-tautological-constant-compare") + # flux-sched's ax_boost is sometimes weird about non-system locations + # explicitly setting the path guarantees success + args.append("--with-boost={0}".format(self.spec["boost"].prefix)) + return args + + @property + def lua_version(self): + return self.spec["lua"].version.up_to(2) + + @property + def lua_share_dir(self): + return os.path.join("share", "lua", str(self.lua_version)) + + @property + def lua_lib_dir(self): + return os.path.join("lib", "lua", str(self.lua_version)) + + def setup_run_environment(self, env): + env.prepend_path( + "LUA_PATH", os.path.join(self.spec.prefix, self.lua_share_dir, "?.lua"), separator=";" + ) + env.prepend_path( + "LUA_CPATH", os.path.join(self.spec.prefix, self.lua_lib_dir, "?.so"), separator=";" + ) + + env.prepend_path("FLUX_MODULE_PATH", self.prefix.lib.flux.modules) + env.prepend_path("FLUX_MODULE_PATH", self.prefix.lib.flux.modules.sched) + env.prepend_path("FLUX_EXEC_PATH", self.prefix.libexec.flux.cmd) + env.prepend_path("FLUX_RC_EXTRA", self.prefix.etc.flux) diff --git a/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/flux-security/package.py b/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/flux-security/package.py new file mode 100644 index 00000000..2fa4618e --- /dev/null +++ b/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/flux-security/package.py @@ -0,0 +1,62 @@ +# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other +# AMSLib Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +import os + +import spack.util.executable +from spack.package import * + + +class FluxSecurity(AutotoolsPackage): + """Independent project for Flux security code and APIs.""" + + homepage = "https://github.com/flux-framework/flux-security" + url = "https://github.com/flux-framework/flux-security/releases/download/v0.8.0/flux-security-0.8.0.tar.gz" + git = "https://github.com/flux-framework/flux-security.git" + tags = ["radiuss", "e4s"] + + maintainers("grondo") + + version("master", branch="master") + version("0.9.0", sha256="2258120c6f32ca0b5b13b166bae56d9bd82a44c6eeaa6bc6187e4a4419bdbcc0") + version("0.8.0", sha256="9963628063b4abdff6bece03208444c8f23fbfda33c20544c48b21e9f4819ce2") + + # Need autotools when building on master: + depends_on("autoconf", type="build", when="@master") + depends_on("automake", type="build", when="@master") + depends_on("libtool", type="build", when="@master") + + depends_on("pkgconfig") + depends_on("libsodium@1.0.14:") + depends_on("jansson") + depends_on("libuuid") + depends_on("munge") + depends_on("libpam") + + def setup(self): + pass + + @when("@master") + def setup(self): + with working_dir(self.stage.source_path): + # Allow git-describe to get last tag so flux-version works: + git = which("git") + # When using spack develop, this will already be unshallow + try: + git("fetch", "--unshallow") + git("config", "remote.origin.fetch", "+refs/heads/*:refs/remotes/origin/*") + git("fetch", "origin") + except spack.util.executable.ProcessError: + git("fetch") + + def autoreconf(self, spec, prefix): + self.setup() + if os.path.exists(self.configure_abs_path): + return + # make sure configure doesn't get confused by the staging symlink + with working_dir(self.configure_directory): + # Bootstrap with autotools + bash = which("bash") + bash("./autogen.sh") diff --git a/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/py-hdbscan/package.py b/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/py-hdbscan/package.py new file mode 100644 index 00000000..84498557 --- /dev/null +++ b/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/py-hdbscan/package.py @@ -0,0 +1,38 @@ +# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other +# AMSLib Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +from spack.package import * + + +class PyHdbscan(PythonPackage): + """HDBSCAN - Hierarchical Density-Based Spatial Clustering of + Applications with Noise. Performs DBSCAN over varying epsilon + values and integrates the result to find a clustering that gives + the best stability over epsilon. This allows HDBSCAN to find + clusters of varying densities (unlike DBSCAN), and be more robust + to parameter selection. In practice this means that HDBSCAN + returns a good clustering straight away with little or no + parameter tuning -- and the primary parameter, minimum cluster + size, is intuitive and easy to select. HDBSCAN is ideal for + exploratory data analysis; it's a fast and robust algorithm that + you can trust to return meaningful clusters (if there are any).""" + + homepage = "https://github.com/scikit-learn-contrib/hdbscan" + url = "https://github.com/scikit-learn-contrib/hdbscan/archive/0.8.26.tar.gz" + + version("0.8.29", sha256="67ba1c00b5ad7c0dca2d662d6036b6df235bd61522a785d68a8458b732555d76") + version("0.8.26", sha256="2fd10906603b6565ee138656b6d59df3494c03c5e8099aede400d50b13af912b") + + depends_on("py-setuptools", type="build") + depends_on("py-cython@0.27:", type=("build", "run")) + depends_on("py-numpy@1.16.0:", type=("build", "run")) + depends_on("py-numpy@1.20:", type=("build", "run"), when="@0.8.29:") + depends_on("py-scipy@0.9:", type=("build", "run")) + depends_on("py-scipy@1.0:", type=("build", "run"), when="@0.8.29:") + depends_on("py-scikit-learn@0.17:", type=("build", "run")) + depends_on("py-scikit-learn@0.20:", type=("build", "run"), when="@0.8.29:") + depends_on("py-joblib", type=("build", "run")) + depends_on("py-joblib@1.0:", type=("build", "run"), when="@0.8.29:") + depends_on("py-six", type=("build", "run")) diff --git a/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/py-kosh/package.py b/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/py-kosh/package.py new file mode 100644 index 00000000..fb5e66e7 --- /dev/null +++ b/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/py-kosh/package.py @@ -0,0 +1,41 @@ +# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other +# AMSLib Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +from spack.package import * + + +class PyKosh(PythonPackage): + """ + Kosh allows codes to store, query, share data via an easy-to-use Python API. + Kosh lies on top of Sina and can use any database backend supported by Sina. + In adition Kosh aims to make data access and sharing as simple as possible. + """ + + homepage = "https://github.com/LLNL/kosh" + url = "https://github.com/LLNL/kosh/archive/refs/tags/v2.0.tar.gz" + + # notify when the package is updated. + maintainers("doutriaux1") + + version("3.0.1", sha256="e0d97c93476930ccfe8ed892517439d555760d66d57f9a8e52459fb5910ba398") + version("2.2", sha256="3c79c3b7e7b64018ec5987dd7148886a6c619a28cda6f84e61a57439c9f3d7a3") + version("2.1", sha256="597ed5beb4c3c3675b4af15ee7bfb60a463d5bda2222cd927061737ed073d562") + version("2.0", sha256="059e431e3d3219b53956cb464d9e10933ca141dc89662f55d9c633e35c8b3a1e") + + depends_on("py-setuptools", type="build") + depends_on("py-llnl-sina@1.11:", type=("build", "run")) + depends_on("py-networkx", type=("build", "run")) + depends_on("py-numpy", type=("build", "run")) + + with when("@3:"): + depends_on("py-networkx@2.6:", type=("build", "run")) + depends_on("py-numpy@1.20:", type=("build", "run")) + depends_on("py-scipy", type=("build", "run")) + depends_on("py-h5py@3:", type=("build", "run")) + depends_on("py-scikit-learn@1.0.2:", type=("build", "run")) + depends_on("py-pandas", type=("build", "run")) + depends_on("py-hdbscan@0.8.29:", type=("build", "run")) + depends_on("py-matplotlib", type=("build", "run")) + depends_on("py-tqdm", type=("build", "run")) diff --git a/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/py-llnl-sina/no_orjson.patch b/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/py-llnl-sina/no_orjson.patch new file mode 100644 index 00000000..de937f41 --- /dev/null +++ b/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/py-llnl-sina/no_orjson.patch @@ -0,0 +1,15 @@ +--- a/python/setup.py ++++ b/python/setup.py +@@ -51,9 +51,7 @@ setup(name='llnl-sina', + 'six', + 'sqlalchemy', + 'enum34;python_version<"3.4"', +- 'orjson;python_version>="3.6" and platform_machine!="ppc64le"', +- 'ujson;python_version>="3.6" and platform_machine=="ppc64le"', +- 'ujson<4;python_version<"3.6" and platform_machine!="ppc64le"', ++ 'ujson', + ], + license='MIT', + classifiers=[ + + diff --git a/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/py-llnl-sina/package.py b/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/py-llnl-sina/package.py new file mode 100644 index 00000000..dcc86981 --- /dev/null +++ b/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/py-llnl-sina/package.py @@ -0,0 +1,38 @@ +# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other +# AMSLib Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +from spack.package import * + + +class PyLlnlSina(PythonPackage): + """Sina allows codes to store, query, and visualize their data through an + easy-to-use Python API. Data that fits its recognized schema can be ingested + into one or more supported backends. + Sina's API is independent of backend and gives users the benefits of a database + without requiring knowledge of one, allowing queries to be expressed in pure + Python. Visualizations are also provided through Python. + + Sina is intended especially for use with run metadata, + allowing users to easily and efficiently find simulation runs that match some + criteria. + """ + + homepage = "https://github.com/LLNL/Sina" + git = "https://github.com/LLNL/Sina.git" + + # notify when the package is updated. + maintainers("HaluskaR", "estebanpauli", "murray55", "doutriaux1") + version("develop", branch="develop") + version("1.11.0", tag="v1.11.0") + version("1.10.0", tag="v1.10.0") + + # let's remove dependency on orjson + patch("no_orjson.patch", when="@:1.11.0") + depends_on("py-setuptools", type="build") + depends_on("py-ujson", type=("build", "run")) + depends_on("py-sqlalchemy", type=("build", "run")) + depends_on("py-six", type=("build", "run")) + + build_directory = "python" diff --git a/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/py-pika/package.py b/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/py-pika/package.py new file mode 100644 index 00000000..c19ab0af --- /dev/null +++ b/.github/containers/x86_64-broadwell-gcc11.2.1/repo/packages/py-pika/package.py @@ -0,0 +1,26 @@ +# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other +# AMSLib Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +from spack.package import * + + +class PyPika(PythonPackage): + """Pika is a RabbitMQ (AMQP 0-9-1) client library for Python.""" + + homepage = "https://pika.readthedocs.io/" + git = "https://github.com/pika/pika.git" + pypi = "pika/pika-1.2.0.tar.gz" + + version("1.3.1", sha256="beb19ff6dd1547f99a29acc2c6987ebb2ba7c44bf44a3f8e305877c5ef7d2fdc") + version("1.3.0", sha256="15357ddc47a5c28f0b07d80e93d504cbbf7a1ad5e1cd129ecd27afe76472c529") + version("1.2.1", sha256="e5fbf3a0a3599f4e114f6e4a7af096f9413a8f24f975c2657ba2fac3c931434f") + version("1.2.0", sha256="f023d6ac581086b124190cb3dc81dd581a149d216fa4540ac34f9be1e3970b89") + version("1.1.0", sha256="9fa76ba4b65034b878b2b8de90ff8660a59d925b087c5bb88f8fdbb4b64a1dbf") + version("1.0.0", sha256="fba41293b35c845bd96cfdd29981f0eeff91f705ac0c3ba361a771c4bfbc3485") + version("0.13.1", sha256="b0640085f1d6398fd47bb16a17713053e26578192821ea5d928772b8e6a28789") + version("0.13.0", sha256="5338d829d1edb3e5bcf1523b4a9e32c56dea5a8bda7018825849e35325580484") + + depends_on("python@2.7,3.4:", type=("build", "run")) + depends_on("py-setuptools", type="build") diff --git a/.github/containers/x86_64-broadwell-gcc11.2.1/repo/repo.yaml b/.github/containers/x86_64-broadwell-gcc11.2.1/repo/repo.yaml new file mode 100644 index 00000000..fda4049c --- /dev/null +++ b/.github/containers/x86_64-broadwell-gcc11.2.1/repo/repo.yaml @@ -0,0 +1,2 @@ +repo: + namespace: 'llnl.ams' diff --git a/.github/containers/x86_64-broadwell-gcc11.2.1/spack.yaml b/.github/containers/x86_64-broadwell-gcc11.2.1/spack.yaml new file mode 100644 index 00000000..5184391a --- /dev/null +++ b/.github/containers/x86_64-broadwell-gcc11.2.1/spack.yaml @@ -0,0 +1,71 @@ +# This is a Spack Environment file. +# +# It describes a set of packages to be installed, along with +# configuration settings. +spack: + # add package specs to the `specs` list + specs: + - python + - py-torch + - py-scipy + - py-h5py + - py-pip + - py-kosh + - py-mpi4py + - mfem + - umpire + - caliper + - faiss + - flux-core + - flux-sched + - py-pika + - amqp-cpp +tcp + view: local + concretizer: + unify: true + reuse: false + repos: + - ../repo + - $spack/var/spack/repos/builtin + packages: + all: + variants: [~cuda] + compiler: [gcc@11.2.1] + target: [broadwell] + providers: + mpi: [mvapich2] + blas: [openblas] + lapack: [openblas] + cmake: + require: '@3.23.1' + py-torch: + require: '@1.12~valgrind~mkldnn+distributed+mpi~cuda' + py-kosh: + require: '@3.0.1' + raja: + require: '@2022.03.0~openmp~cuda' + hdf5: + require: '@1.14~mpi api=v18' + mfem: + require: '@4.5~openmp~cuda+raja+umpire+shared+static~mpi~metis~examples~zlib' + umpire: + require: '@2022.03.1~shared~cuda' + caliper: + require: '@2.9+shared~libdw~libunwind' + faiss: + require: '@1.7.2+python+shared~cuda build_system=cmake' + redis-plus-plus: + require: '@1.3.6+tls cxxstd=14' + py-tqdm: + require: +notebook + cudnn: + require: '@8.4.0.27-11.6' + py-tensorboard: + require: '@2.4.1' + flux-core: + require: '@0.45' + flux-sched: + require: '@0.28' + py-pika: + require: '@1.3.1' + diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..21d0f0ee --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,61 @@ +name: CI + +on: + # Triggers the workflow on push or pull request events but only for the "develop" branch + push: + branches: [ "develop" ] + pull_request: + branches: [ "develop" ] + + workflow_dispatch: + +jobs: + build-run-tests: + # The type of runner that the job will run on + runs-on: ubuntu-latest + container: ghcr.io/ggeorgakoudis/ams-ci-test-ruby-centos7 + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + - uses: actions/checkout@v3 + - name: Build AMS + shell: bash -l {0} + run: | + module load gcc/11.2.1 + source /spack/share/spack/setup-env.sh + spack env activate -p /ams-spack-env + mkdir build + cd build + export AMS_MFEM_PATH=$(spack location -i mfem) + export AMS_TORCH_PATH=$(spack location -i py-torch)/lib/python3.10/site-packages/torch/share/cmake/Torch + export AMS_FAISS_PATH=$(spack location -i faiss) + export AMS_UMPIRE_PATH=$(spack location -i umpire) + export AMS_HDF5_PATH=$(spack location -i hdf5) + cmake \ + -DBUILD_SHARED_LIBS=On \ + -DCMAKE_PREFIX_PATH=$INSTALL_DIR \ + -DWITH_CALIPER=On \ + -DWITH_DB=On \ + -DWITH_HDF5=On \ + -DWITH_EXAMPLES=On \ + -DHDF5_Dir=$AMS_HDF5_PATH \ + -DCMAKE_INSTALL_PREFIX=./install \ + -DCMAKE_BUILD_TYPE=Release \ + -DWITH_CUDA=Off \ + -DUMPIRE_DIR=$AMS_UMPIRE_PATH \ + -DMFEM_DIR=$AMS_MFEM_PATH \ + -DWITH_FAISS=On \ + -DWITH_MPI=On \ + -DWITH_TORCH=On \ + -DWITH_TESTS=On \ + -DTorch_DIR=$AMS_TORCH_PATH \ + -DWITH_FAISS=On \ + -DFAISS_DIR=$AMS_FAISS_PATH \ + -DWITH_AMS_DEBUG=On \ + -DWITH_WORKFLOW=On \ + $GITHUB_WORKSPACE + make + - name: Run tests + run: | + cd build + make test diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 6d6f086f..ef5d9e15 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -22,5 +22,4 @@ endfunction() ADDTEST(ams_allocator ams_allocate.cpp AMSAllocate) ADDTEST(ams_packing cpu_packing_test.cpp AMSPack) -ADDTEST(ams_inference torch_model.cpp AMSInfer /usr/workspace/AMS/miniapp_resources/trained_models/debug_model.pt) -ADDTEST(ams_loadBalance lb.cpp AMSLoadBalance) +ADDTEST(ams_inference torch_model.cpp AMSInfer ${CMAKE_CURRENT_SOURCE_DIR}/debug_model.pt) diff --git a/tests/debug_model.pt b/tests/debug_model.pt new file mode 100644 index 00000000..28b510db Binary files /dev/null and b/tests/debug_model.pt differ