From a5d66c4d72243630451467d140d477055fbe4d0e Mon Sep 17 00:00:00 2001 From: Landon Owen Date: Tue, 26 Mar 2024 13:07:13 -0700 Subject: [PATCH 01/42] Updated blt and PYB11Generator submodules, fixed cmake logic for using latest BLT --- cmake/SetupSpheral.cmake | 2 +- cmake/blt | 2 +- cmake/spheral/InstantiateCXX.cmake | 2 +- cmake/spheral/SpheralHandleTPL.cmake | 2 +- extern/PYB11Generator | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmake/SetupSpheral.cmake b/cmake/SetupSpheral.cmake index 4d1ef5768..8a1e523b1 100644 --- a/cmake/SetupSpheral.cmake +++ b/cmake/SetupSpheral.cmake @@ -38,7 +38,7 @@ if (NOT EXISTS "${SPHERAL_BLT_DIR}/SetupBLT.cmake") "${SPHERAL_BLT_DIR} is not present.\n" "call cmake with -DSPHERAL_BLT_DIR=/your/installation/of/blt\n") endif() - +set(BLT_EXPORT_THIRDPARTY ON CACHE BOOL "") include(${SPHERAL_BLT_DIR}/SetupBLT.cmake) #------------------------------------------------------------------------------- diff --git a/cmake/blt b/cmake/blt index 29eecef76..b7314a86e 160000 --- a/cmake/blt +++ b/cmake/blt @@ -1 +1 @@ -Subproject commit 29eecef7652728ec37d9fe0b7d7f41e3184ac7eb +Subproject commit b7314a86e9fc78baf2682ad55509bbc8acd4bce6 diff --git a/cmake/spheral/InstantiateCXX.cmake b/cmake/spheral/InstantiateCXX.cmake index 5f16244e6..9788af1d2 100644 --- a/cmake/spheral/InstantiateCXX.cmake +++ b/cmake/spheral/InstantiateCXX.cmake @@ -40,7 +40,7 @@ function(instantiate _inst_var _source_var) # Uses BLT's python for instantiations to work when building CXX_ONLY as well as with python add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_inst_file} DEPENDS ${_inst_py} - COMMAND ${PYTHON_EXECUTABLE} ${SPHERAL_ROOT_DIR}/src/helpers/InstantiationGenerator.py ${_inst_py} ${_inst_file} ${_dim} + COMMAND ${Python3_EXECUTABLE} ${SPHERAL_ROOT_DIR}/src/helpers/InstantiationGenerator.py ${_inst_py} ${_inst_file} ${_dim} BYPRODUCTS ${_inst_file} COMMENT "Generating instantiation ${_inst_file}..." ) diff --git a/cmake/spheral/SpheralHandleTPL.cmake b/cmake/spheral/SpheralHandleTPL.cmake index 3e75a8978..18c8da287 100644 --- a/cmake/spheral/SpheralHandleTPL.cmake +++ b/cmake/spheral/SpheralHandleTPL.cmake @@ -92,5 +92,5 @@ function(Spheral_Handle_TPL lib_name TPL_CMAKE_DIR) EXPORT spheral_cxx-targets DESTINATION lib/cmake) endif() - set_target_properties(${lib_name} PROPERTIES EXPORT_NAME spheral::${lib_name}) + blt_export_tpl_targets(EXPORT ${lib_name} NAMESPACE spheral) endfunction() diff --git a/extern/PYB11Generator b/extern/PYB11Generator index 71608127d..df24db6ca 160000 --- a/extern/PYB11Generator +++ b/extern/PYB11Generator @@ -1 +1 @@ -Subproject commit 71608127d276e9135c2c81d65bd0822adb006e91 +Subproject commit df24db6ca94e4e5e7531fe7e3c0177d0af79e557 From 26e118546f7ade178df258d0a03bf0f5a7b59c25 Mon Sep 17 00:00:00 2001 From: Landon Owen Date: Thu, 18 Apr 2024 17:38:24 -0700 Subject: [PATCH 02/42] Significant changes to spack recipes and minor changes to tpl-manager --- .uberenv_config.json | 2 +- scripts/devtools/tpl-manager.py | 8 +- scripts/spack/configs/config.yaml | 203 +++++++++++++++--- .../configs/toss_4_x86_64_ib/packages.yaml | 18 ++ scripts/spack/packages/m-aneos/package.py | 2 +- scripts/spack/packages/opensubdiv/package.py | 10 +- scripts/spack/packages/polytope/package.py | 1 + .../packages/polytope/polytope_cxx.patch | 11 + scripts/spack/packages/py-ats/package.py | 30 --- .../spack/packages/py-numpy-stl/package.py | 18 -- scripts/spack/packages/py-pillow/package.py | 153 ------------- scripts/spack/packages/py-pipreqs/package.py | 20 -- scripts/spack/packages/qhull/package.py | 2 +- scripts/spack/packages/spheral/package.py | 62 +++--- scripts/spack/packages/tcl/package.py | 172 --------------- scripts/spack/packages/tk/package.py | 145 ------------- 16 files changed, 249 insertions(+), 608 deletions(-) create mode 100644 scripts/spack/packages/polytope/polytope_cxx.patch delete mode 100644 scripts/spack/packages/py-ats/package.py delete mode 100644 scripts/spack/packages/py-numpy-stl/package.py delete mode 100644 scripts/spack/packages/py-pillow/package.py delete mode 100644 scripts/spack/packages/py-pipreqs/package.py delete mode 100644 scripts/spack/packages/tcl/package.py delete mode 100644 scripts/spack/packages/tk/package.py diff --git a/.uberenv_config.json b/.uberenv_config.json index 475e3f325..cd7b365fe 100644 --- a/.uberenv_config.json +++ b/.uberenv_config.json @@ -3,7 +3,7 @@ "package_version" : "develop", "package_source_dir" : "../../..", "spack_url" : "https://github.com/spack/spack", - "spack_commit" : "5e0d2107348eed6cbe6deca43a30f5b06c5e40af", + "spack_commit" : "89319413d5d90caa9bea98e3419f8aeab61a2a0d", "spack_configs_path" : "scripts/spack/configs", "spack_packages_path" : "scripts/spack/packages" } diff --git a/scripts/devtools/tpl-manager.py b/scripts/devtools/tpl-manager.py index ccd06cbe3..bf99482ee 100755 --- a/scripts/devtools/tpl-manager.py +++ b/scripts/devtools/tpl-manager.py @@ -128,7 +128,7 @@ def build_deps(args): # We just want to use the spac instance directly to generate our TPLs, we don't want # to have the spack instance take over our environment. - os.environ["SPACK_DISABLE_LOCAL_CONFIG"] = "1" + #os.environ["SPACK_DISABLE_LOCAL_CONFIG"] = "1" spack_cmd=os.path.join(args.spheral_spack_dir, "spack/bin/spack") spheral_config_dir="scripts/spack/configs/" @@ -176,13 +176,13 @@ def build_deps(args): os.environ["LC_ALL"] = "en_US.UTF-8" if not args.no_spec: - if sexe("{0} spec --fresh -I {1}@develop%{2}".format(spack_cmd, package_name, s), echo=True) : sys.exit(1) + if sexe("{0} spec --fresh -IL {1}@develop%{2} 2>&1 | tee -a \"spec-info-{2}-out.txt\"".format(spack_cmd, package_name, s), echo=True) : sys.exit(1) # Install only the dependencies for Spheral - if sexe("{0} install --fail-fast --fresh --deprecated --only dependencies {2}@develop%{3} 2>&1 | tee -a \"dev-build-{3}-out.txt\"".format(spack_cmd, os.getcwd(), package_name, s), echo=True) : sys.exit(1) + if sexe("{0} install --fail-fast --fresh --deprecated --only dependencies {1}@develop%{2} 2>&1 | tee -a \"tpl-build-{2}-out.txt\"".format(spack_cmd, package_name, s), echo=True) : sys.exit(1) # Using dev-build we can have spack generate an init-config with the local source files for spheral. - if sexe("{0} dev-build --fresh --deprecated -u initconfig {2}@develop%{3} 2>&1 | tee -a \"dev-build-{3}-out.txt\"".format(spack_cmd, os.getcwd(), package_name, s), echo=True) : sys.exit(1) + if sexe("{0} dev-build --reuse-deps --ignore-dependencies --deprecated -u initconfig {1}@develop%{2} 2>&1 | tee -a \"dev-build-{2}-out.txt\"".format(spack_cmd, package_name, s), echo=True) : sys.exit(1) if not args.no_clean: sexe("rm dev-build-* spack-build-* spack-configure-args.txt") diff --git a/scripts/spack/configs/config.yaml b/scripts/spack/configs/config.yaml index e1947f386..9d6b3e27b 100644 --- a/scripts/spack/configs/config.yaml +++ b/scripts/spack/configs/config.yaml @@ -14,55 +14,83 @@ # ~/.spack/config.yaml # ------------------------------------------------------------------------- config: - concretizer: "clingo" # This is the path to the root of the Spack install tree. # You can use $spack here to refer to the root of the spack instance. install_tree: root: $spack/opt/spack projections: - all: "${ARCHITECTURE}/${COMPILERNAME}-${COMPILERVER}/${PACKAGE}-${VERSION}-${HASH}" + all: "{architecture}/{compiler.name}-{compiler.version}/{name}-{version}-{hash}" + # install_tree can include an optional padded length (int or boolean) + # default is False (do not pad) + # if padded_length is True, Spack will pad as close to the system max path + # length as possible + # if padded_length is an integer, Spack will pad to that many characters, + # assuming it is higher than the length of the install_tree root. padded_length: 128 -# Locations where templates should be found + + # Locations where templates should be found template_dirs: - $spack/templates - # Locations where different types of modules should be installed. - #module_roots: - # tcl: $spack/share/spack/modules - # lmod: $spack/share/spack/lmod - + # Directory where licenses should be located + license_dir: $spack/etc/spack/licenses # Temporary locations Spack can try to use for builds. # - # Spack will use the first one it finds that exists and is writable. - # You can use $tempdir to refer to the system default temp directory - # (as returned by tempfile.gettempdir()). + # Recommended options are given below. + # + # Builds can be faster in temporary directories on some (e.g., HPC) systems. + # Specifying `$tempdir` will ensure use of the default temporary directory + # (i.e., ``$TMP` or ``$TMPDIR``). + # + # Another option that prevents conflicts and potential permission issues is + # to specify `$user_cache_path/stage`, which ensures each user builds in their + # home directory. # - # A value of $spack/var/spack/stage indicates that Spack should run - # builds directly inside its install directory without staging them in - # temporary space. + # A more traditional path uses the value of `$spack/var/spack/stage`, which + # builds directly inside Spack's instance without staging them in a + # temporary space. Problems with specifying a path inside a Spack instance + # are that it precludes its use as a system package and its ability to be + # pip installable. # - # The build stage can be purged with `spack purge --stage`. + # In Spack environment files, chaining onto existing system Spack + # installations, the $env variable can be used to download, cache and build + # into user-writable paths that are relative to the currently active + # environment. + # + # In any case, if the username is not already in the path, Spack will append + # the value of `$user` in an attempt to avoid potential conflicts between + # users in shared temporary spaces. + # + # The build stage can be purged with `spack clean --stage` and + # `spack clean -a`, so it is important that the specified directory uniquely + # identifies Spack staging to avoid accidentally wiping out non-Spack work. build_stage: - # skipping tempdir b/c running mpi tests fails with local fs - # - $tempdir - $spack/../builds + # Directory in which to run tests and store test results. + # Tests will be stored in directories named by date/time and package + # name/hash. + test_stage: $user_cache_path/test - # Cache directory already downloaded source tarballs and archived - # repositories. This can be purged with `spack purge --downloads`. + # Cache directory for already downloaded source tarballs and archived + # repositories. This can be purged with `spack clean --downloads`. source_cache: $spack/var/spack/cache + ## Directory where spack managed environments are created and stored + # environments_root: $spack/var/spack/environments + + # Cache directory for miscellaneous files, like the package index. - # This can be purged with `spack purge --misc-cache` - misc_cache: .spack/misccache + # This can be purged with `spack clean --misc-cache` + misc_cache: $spack/misccache # Timeout in seconds used for downloading sources etc. This only applies # to the connection phase and can be increased for slow connections or - # servers. 0 means no timeout. Default(10). + # servers. 0 means no timeout. connect_timeout: 60 @@ -71,18 +99,139 @@ config: verify_ssl: true + # Suppress gpg warnings from binary package verification + # Only suppresses warnings, gpg failure will still fail the install + # Potential rationale to set True: users have already explicitly trusted the + # gpg key they are using, and may not want to see repeated warnings that it + # is self-signed or something of the sort. + suppress_gpg_warnings: false + + + # If set to true, Spack will attempt to build any compiler on the spec + # that is not already available. If set to False, Spack will only use + # compilers already configured in compilers.yaml + install_missing_compilers: false + + # If set to true, Spack will always check checksums after downloading # archives. If false, Spack skips the checksum step. checksum: true + # If set to true, Spack will fetch deprecated versions without warning. + # If false, Spack will raise an error when trying to install a deprecated version. + deprecated: true + + # If set to true, `spack install` and friends will NOT clean # potentially harmful variables from the build environment. Use wisely. dirty: false - # The default number of jobs to use when running `make` in parallel. - # If set to 4, for example, `spack install` will run `make -j4`. - # If not set, all available cores are used by default. - # for uberenv, limit build_jobs to 8 - build_jobs: 54 + # The language the build environment will use. This will produce English + # compiler messages by default, so the log parser can highlight errors. + # If set to C, it will use English (see man locale). + # If set to the empty string (''), it will use the language from the + # user's environment. + build_language: C + + + # When set to true, concurrent instances of Spack will use locks to + # avoid modifying the install tree, database file, etc. If false, Spack + # will disable all locking, but you must NOT run concurrent instances + # of Spack. For filesystems that don't support locking, you should set + # this to false and run one Spack at a time, but otherwise we recommend + # enabling locks. + locks: true + + # The default url fetch method to use. + # If set to 'curl', Spack will require curl on the user's system + # If set to 'urllib', Spack will use python built-in libs to fetch + url_fetch_method: urllib + + # The maximum number of jobs to use for the build system (e.g. `make`), when + # the -j flag is not given on the command line. Defaults to 16 when not set. + # Note that the maximum number of jobs is limited by the number of cores + # available, taking thread affinity into account when supported. For instance: + # - With `build_jobs: 16` and 4 cores available `spack install` will run `make -j4` + # - With `build_jobs: 16` and 32 cores available `spack install` will run `make -j16` + # - With `build_jobs: 2` and 4 cores available `spack install -j6` will run `make -j6` + # build_jobs: 16 + + + # If set to true, Spack will use ccache to cache C compiles. + ccache: false + + + # The concretization algorithm to use in Spack. Options are: + # + # 'clingo': Uses a logic solver under the hood to solve DAGs with full + # backtracking and optimization for user preferences. Spack will + # try to bootstrap the logic solver, if not already available. + # + # 'original': Spack's original greedy, fixed-point concretizer. This + # algorithm can make decisions too early and will not backtrack + # sufficiently for many specs. This will soon be deprecated in + # favor of clingo. + # + # See `concretizer.yaml` for more settings you can fine-tune when + # using clingo. + concretizer: clingo + + + # How long to wait to lock the Spack installation database. This lock is used + # when Spack needs to manage its own package metadata and all operations are + # expected to complete within the default time limit. The timeout should + # therefore generally be left untouched. + db_lock_timeout: 60 + + + # How long to wait when attempting to modify a package (e.g. to install it). + # This value should typically be 'null' (never time out) unless the Spack + # instance only ever has a single user at a time, and only if the user + # anticipates that a significant delay indicates that the lock attempt will + # never succeed. + package_lock_timeout: null + + + # Control how shared libraries are located at runtime on Linux. See the + # the Spack documentation for details. + shared_linking: + # Spack automatically embeds runtime search paths in ELF binaries for their + # dependencies. Their type can either be "rpath" or "runpath". For glibc, rpath is + # inherited and has precedence over LD_LIBRARY_PATH; runpath is not inherited + # and of lower precedence. DO NOT MIX these within the same install tree. + type: rpath + + + # (Experimental) Embed absolute paths of dependent libraries directly in ELF + # binaries to avoid runtime search. This can improve startup time of + # executables with many dependencies, in particular on slow filesystems. + bind: false + + + # Set to 'false' to allow installation on filesystems that doesn't allow setgid bit + # manipulation by unprivileged user (e.g. AFS) + allow_sgid: true + + # Whether to show status information during building and installing packages. + # This gives information about Spack's current progress as well as the current + # and total number of packages. Information is shown both in the terminal + # title and inline. + install_status: true + + # Number of seconds a buildcache's index.json is cached locally before probing + # for updates, within a single Spack invocation. Defaults to 10 minutes. + binary_index_ttl: 600 + + flags: + # Whether to keep -Werror flags active in package builds. + keep_werror: 'none' + + # A mapping of aliases that can be used to define new commands. For instance, + # `sp: spec -I` will define a new command `sp` that will execute `spec` with + # the `-I` argument. Aliases cannot override existing commands. + aliases: + concretise: concretize + containerise: containerize + rm: remove diff --git a/scripts/spack/configs/toss_4_x86_64_ib/packages.yaml b/scripts/spack/configs/toss_4_x86_64_ib/packages.yaml index 17d02a6c3..7cdee2b2e 100644 --- a/scripts/spack/configs/toss_4_x86_64_ib/packages.yaml +++ b/scripts/spack/configs/toss_4_x86_64_ib/packages.yaml @@ -10,6 +10,24 @@ packages: externals: - spec: cmake@3.23.1 prefix: /usr/tce/packages/cmake/cmake-3.23.1 + gmake: + version: [4.2.1] + buildable: false + externals: + - spec: gmake@4.2.1 + prefix: /usr + git: + version: [2.29.1] + buildable: false + externals: + - spec: git@2.29.1+tcltk + prefix: /usr/tce + perl: + version: [5.26.3] + buildable: false + externals: + - spec: perl@5.26.3 + prefix: /usr mvapich2: externals: diff --git a/scripts/spack/packages/m-aneos/package.py b/scripts/spack/packages/m-aneos/package.py index 3d03dc05c..4bfac8bad 100644 --- a/scripts/spack/packages/m-aneos/package.py +++ b/scripts/spack/packages/m-aneos/package.py @@ -3,7 +3,7 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from spack import * +from spack.package import * class MAneos(MakefilePackage): diff --git a/scripts/spack/packages/opensubdiv/package.py b/scripts/spack/packages/opensubdiv/package.py index b8e17a1c2..190f81b6b 100644 --- a/scripts/spack/packages/opensubdiv/package.py +++ b/scripts/spack/packages/opensubdiv/package.py @@ -28,15 +28,15 @@ def url_for_version(self, version): variant('tbb', default=False, description='Builds with Intel TBB support') variant('openmp', default=False, description='Builds with OpenMP support') - variant('doc', default=False, description='Builds documentation. Requires Python 2') + #variant('doc', default=False, description='Builds documentation. Requires Python 2') variant('pic', default=True, description='Produce position-independent code (for shared libs)') depends_on('cmake@2.8.6:', type='build') - depends_on('graphviz', type='build', when='+doc') - depends_on('doxygen', type='build', when='+doc') - depends_on('py-docutils', type='build', when='+doc') - depends_on('python@2.6:2', type='build', when='+doc') + # depends_on('graphviz', type='build', when='+doc') + # depends_on('doxygen', type='build', when='+doc') + # depends_on('py-docutils', type='build', when='+doc') + # depends_on('python@2.6:2', type='build', when='+doc') #depends_on('gl') #depends_on('glew@1.9.0:') #depends_on('glfw@3.0.0:') diff --git a/scripts/spack/packages/polytope/package.py b/scripts/spack/packages/polytope/package.py index 5a5993a9c..838af8444 100644 --- a/scripts/spack/packages/polytope/package.py +++ b/scripts/spack/packages/polytope/package.py @@ -20,6 +20,7 @@ class Polytope(CMakePackage): depends_on('python@3: +zlib +shared', type=('build', 'run'), when='+python') depends_on('py-decorator', type=('build', 'run'), when='+python') depends_on('boost', type=('build', 'run')) + patch('polytope_cxx.patch', when='^boost@1.82:') parallel = False # Should be able to remove this at some point diff --git a/scripts/spack/packages/polytope/polytope_cxx.patch b/scripts/spack/packages/polytope/polytope_cxx.patch new file mode 100644 index 000000000..d473d6788 --- /dev/null +++ b/scripts/spack/packages/polytope/polytope_cxx.patch @@ -0,0 +1,11 @@ +--- a/CMakeLists.txt 2024-04-18 13:16:02.394111000 -0700 ++++ b/CMakeLists.txt 2024-04-18 13:15:58.611132000 -0700 +@@ -10,7 +10,7 @@ + project(Polytope) + + # We require at least C++11 +-set(CMAKE_CXX_STANDARD 11) ++set(CMAKE_CXX_STANDARD 14) + set(CMAKE_CXX_STANDARD_REQUIRED ON) + set(CMAKE_CXX_EXTENSIONS OFF) + diff --git a/scripts/spack/packages/py-ats/package.py b/scripts/spack/packages/py-ats/package.py deleted file mode 100644 index 3d69395a1..000000000 --- a/scripts/spack/packages/py-ats/package.py +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright 2013-2021 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 PyAts(PythonPackage): - """ATS - Automated Testing System - is an open-source, Python-based tool - for automating the running of tests of an application across a broad range - of high performance computers.""" - - homepage = "https://github.com/LLNL/ATS" - git = "https://github.com/LLNL/ATS.git" - - maintainers = ['white238'] - - version('main', branch='main') - version('exit', branch='bugfix/exit-code') - version('7.0.100', tag='7.0.100') - version('7.0.9', tag='7.0.9') - version('7.0.5', tag='7.0.5') - - # TODO: Add flux variant when Flux functionality works in ATS - - depends_on("python@3.8:", type=('build', 'run')) - depends_on("py-numpy", type=('build', 'run')) - depends_on('py-setuptools', type='build') - depends_on('py-poetry-core', type='build') diff --git a/scripts/spack/packages/py-numpy-stl/package.py b/scripts/spack/packages/py-numpy-stl/package.py deleted file mode 100644 index 13593cbbf..000000000 --- a/scripts/spack/packages/py-numpy-stl/package.py +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright 2013-2021 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 PyNumpyStl(PythonPackage): - """""" - - homepage = "https://pypi.org/project/numpy-stl/" - pypi = "numpy-stl/numpy-stl-3.0.0.tar.gz" - - version('3.0.0', sha256='578b78eacb0529ac9aba2f17dcc363d58c7c3c5708710c18f8c1e9965f2e81ac') - - extends('python@3:', type=['build', 'run']) - depends_on('py-setuptools', type='build') diff --git a/scripts/spack/packages/py-pillow/package.py b/scripts/spack/packages/py-pillow/package.py deleted file mode 100644 index 2bb5c5a4e..000000000 --- a/scripts/spack/packages/py-pillow/package.py +++ /dev/null @@ -1,153 +0,0 @@ -# Copyright 2013-2022 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.package import * - - -class PyPillowBase(PythonPackage): - """Base class for Pillow and its fork Pillow-SIMD.""" - - maintainers = ["adamjstewart"] - - provides("pil") - - # These defaults correspond to Pillow defaults - # https://pillow.readthedocs.io/en/stable/installation.html#external-libraries - VARIANTS_IN_SETUP_CFG = [ - "zlib", - "jpeg", - "tiff", - "freetype", - "lcms", - "webp", - "webpmux", - "jpeg2000", - "imagequant", - "xcb" - ] - variant("zlib", default=True, description="Compressed PNG functionality") - variant("jpeg", default=True, description="JPEG functionality") - variant("tiff", default=False, description="Compressed TIFF functionality") - variant("freetype", default=False, description="Type related services") - variant("lcms", default=False, description="Color management") - variant("webp", default=False, description="WebP format") - variant("webpmux", when="+webp", default=False, description="WebP metadata") - variant("jpeg2000", default=False, description="JPEG 2000 functionality") - variant("imagequant", when="@3.3:", default=False, description="Improved color quantization") - variant("xcb", when="@7.1:", default=False, description="X11 screengrab support") - variant("raqm", when="@8.2:", default=False, description="RAQM support") - - # Required dependencies - # https://pillow.readthedocs.io/en/latest/installation.html#notes - depends_on("python@3.7:3.10", when="@9:", type=("build", "run")) - depends_on("python@3.6:3.10", when="@8.3.2:8.4", type=("build", "run")) - depends_on("python@3.6:3.9", when="@8:8.3.1", type=("build", "run")) - depends_on("python@3.5:3.8", when="@7.0:7.2", type=("build", "run")) - depends_on("python@2.7:2.8,3.5:3.8", when="@6.2.1:6.2.2", type=("build", "run")) - depends_on("python@2.7:2.8,3.5:3.7", when="@6.0:6.2.0", type=("build", "run")) - depends_on("python@2.7:2.8,3.4:3.7", when="@5.2:5.4", type=("build", "run")) - depends_on("python@2.7:2.8,3.4:3.6", when="@5.0:5.1", type=("build", "run")) - depends_on("python@2.7:2.8,3.3:3.6", when="@4.0:4", type=("build", "run")) - depends_on("python@2.6:2.8,3.2:3.5", when="@2:3", type=("build", "run")) - depends_on("python@2.4:2.7", when="@:1", type=("build", "run")) - depends_on("py-setuptools", type="build") - - # Optional dependencies - depends_on("zlib", when="+zlib") - depends_on("jpeg", when="+jpeg") - depends_on("libtiff", when="+tiff") - depends_on("freetype", when="+freetype") - depends_on("lcms@2:", when="+lcms") - depends_on("libwebp", when="+webp") - depends_on("libwebp+libwebpmux+libwebpdemux", when="+webpmux") - depends_on("openjpeg", when="+jpeg2000") - depends_on("libimagequant", when="+imagequant") - depends_on("libxcb", when="+xcb") - depends_on("libraqm", when="+raqm") - - # Conflicting options - conflicts("+raqm", when="~freetype") - - def patch(self): - """Patch setup.py to provide library and include directories - for dependencies.""" - - if self.spec.satisfies("@:7.1.0"): - self.VARIANTS_IN_SETUP_CFG.remove("xcb") - - library_dirs = [] - include_dirs = [] - for dep in self.spec.dependencies(deptype="link"): - query = self.spec[dep.name] - library_dirs.extend(query.libs.directories) - include_dirs.extend(query.headers.directories) - - setup = FileFilter("setup.py") - setup.filter("library_dirs = []", "library_dirs = {0}".format(library_dirs), string=True) - setup.filter("include_dirs = []", "include_dirs = {0}".format(include_dirs), string=True) - - def variant_to_cfg(variant): - able = "enable" if "+" + variant in self.spec else "disable" - return "{0}_{1}=1\n".format(able, variant) - - with open("setup.cfg", "a") as setup: - setup.write("[build_ext]\n") - for variant in self.VARIANTS_IN_SETUP_CFG: - setup.write(variant_to_cfg(variant)) - - setup.write("rpath={0}\n".format(":".join(self.rpath))) - setup.write("[install]\n") - - def setup_build_environment(self, env): - env.set("MAX_CONCURRENCY", str(make_jobs)) - - -class PyPillow(PyPillowBase): - """Pillow is a fork of the Python Imaging Library (PIL). It adds image - processing capabilities to your Python interpreter. This library supports - many file formats, and provides powerful image processing and graphics - capabilities.""" - - homepage = "https://python-pillow.org/" - pypi = "Pillow/Pillow-7.2.0.tar.gz" - - version("9.2.0", sha256="75e636fd3e0fb872693f23ccb8a5ff2cd578801251f3a4f6854c6a5d437d3c04") - version("9.1.1", sha256="7502539939b53d7565f3d11d87c78e7ec900d3c72945d4ee0e2f250d598309a0") - version("9.1.0", sha256="f401ed2bbb155e1ade150ccc63db1a4f6c1909d3d378f7d1235a44e90d75fb97") - version("9.0.1", sha256="6c8bc8238a7dfdaf7a75f5ec5a663f4173f8c367e5a39f87e720495e1eed75fa") - version("9.0.0", sha256="ee6e2963e92762923956fe5d3479b1fdc3b76c83f290aad131a2f98c3df0593e") - version("8.4.0", sha256="b8e2f83c56e141920c39464b852de3719dfbfb6e3c99a2d8da0edf4fb33176ed") - version("8.0.0", sha256="59304c67d12394815331eda95ec892bf54ad95e0aa7bc1ccd8e0a4a5a25d4bf3") - version("7.2.0", sha256="97f9e7953a77d5a70f49b9a48da7776dc51e9b738151b22dacf101641594a626") - version("7.0.0", sha256="4d9ed9a64095e031435af120d3c910148067087541131e82b3e8db302f4c8946") - version("6.2.2", sha256="db9ff0c251ed066d367f53b64827cc9e18ccea001b986d08c265e53625dab950") - version("6.2.1", sha256="bf4e972a88f8841d8fdc6db1a75e0f8d763e66e3754b03006cbc3854d89f1cb1") - version("6.2.0", sha256="4548236844327a718ce3bb182ab32a16fa2050c61e334e959f554cac052fb0df") - version("6.0.0", sha256="809c0a2ce9032cbcd7b5313f71af4bdc5c8c771cb86eb7559afd954cab82ebb5") - version("5.4.1", sha256="5233664eadfa342c639b9b9977190d64ad7aca4edc51a966394d7e08e7f38a9f") - version("5.1.0", sha256="cee9bc75bff455d317b6947081df0824a8f118de2786dc3d74a3503fd631f4ef") - version("3.2.0", sha256="64b0a057210c480aea99406c9391180cd866fc0fd8f0b53367e3af21b195784a") - version("3.0.0", sha256="ad50bef540fe5518a4653c3820452a881b6a042cb0f8bb7657c491c6bd3654bb") - - for ver in [ - "9.2.0", - "9.1.1", - "9.1.0", - "9.0.1", - "9.0.0", - "8.4.0", - "8.0.0", - "7.2.0", - "7.0.0", - "6.2.2", - "6.2.1", - "6.2.0", - "6.0.0", - "5.4.1", - "5.1.0", - "3.2.0", - "3.0.0", - ]: - provides("pil@" + ver, when="@" + ver) diff --git a/scripts/spack/packages/py-pipreqs/package.py b/scripts/spack/packages/py-pipreqs/package.py deleted file mode 100644 index 8a7fe5eeb..000000000 --- a/scripts/spack/packages/py-pipreqs/package.py +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright 2013-2021 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 PyPipreqs(PythonPackage): - """""" - - homepage = "https://pypi.org/project/pipreqs/" - pypi = "pipreqs/pipreqs-0.4.10.tar.gz" - - #maintainers = ['mdavis36','jmikeowen'] - - version('0.4.11', sha256='c793b4e147ac437871b3a962c5ce467e129c859ece5ba79aca83c20f4d9c3aef') - - extends('python@3:', type=['build', 'run']) - depends_on("py-setuptools", type="build") diff --git a/scripts/spack/packages/qhull/package.py b/scripts/spack/packages/qhull/package.py index b735baa6d..be42294e0 100644 --- a/scripts/spack/packages/qhull/package.py +++ b/scripts/spack/packages/qhull/package.py @@ -3,7 +3,7 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from spack import * +from spack.package import * class Qhull(CMakePackage): diff --git a/scripts/spack/packages/spheral/package.py b/scripts/spack/packages/spheral/package.py index 7f8fd6650..bb4258494 100644 --- a/scripts/spack/packages/spheral/package.py +++ b/scripts/spack/packages/spheral/package.py @@ -3,7 +3,7 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) -from spack import * +from spack.package import * import socket import os @@ -36,48 +36,48 @@ class Spheral(CachedCMakePackage, CudaPackage): depends_on('mpi', when='+mpi') depends_on('cmake@3.10.0:', type='build') - depends_on('zlib@1.2.11 +shared +pic', type='build') + depends_on('zlib@1.3 +shared +pic', type='build') - depends_on('boost@1.74.0 +system +filesystem -atomic -container -coroutine -chrono -context -date_time -exception -fiber -graph -iostreams -locale -log -math -mpi -program_options -python -random -regex -test -thread -timer -wave +pic', type='build') + depends_on('boost +system +filesystem -atomic -container -coroutine -chrono -context -date_time -exception -fiber -graph -iostreams -locale -log -math -mpi -program_options -python -random -regex -test -thread -timer -wave +pic', type='build') - depends_on('qhull@2020.1 +pic', type='build') + depends_on('qhull +pic', type='build') depends_on('m-aneos@1.0') - depends_on('eigen@3.4.0', type='build') - depends_on('hdf5@1.8.19 ~mpi +hl', type='build', when='~mpi') - depends_on('hdf5@1.8.19 +mpi +hl', type='build', when='+mpi') + depends_on('eigen', type='build') + depends_on('hdf5 ~mpi +hl', type='build', when='~mpi') + depends_on('hdf5 +mpi +hl', type='build', when='+mpi') - depends_on('silo@4.10.2 +hdf5', type='build') + depends_on('silo +hdf5', type='build') # Zlib fix has been merged into conduit, using develop until next release. - depends_on('conduit@0.8.2 +shared +mpi +hdf5 -test ~parmetis', type='build', when='+mpi') - depends_on('conduit@0.8.2 +shared ~mpi +hdf5 -test ~parmetis', type='build', when='~mpi') + depends_on('conduit +shared +mpi +hdf5~hdf5_compat -test ~parmetis', type='build', when='+mpi') + depends_on('conduit +shared ~mpi +hdf5~hdf5_compat -test ~parmetis', type='build', when='~mpi') - depends_on('axom@0.7.0 ~shared +mpi +hdf5 -lua -examples -python -fortran -umpire -raja', type='build', when='+mpi') - depends_on('axom@0.7.0 ~shared ~mpi +hdf5 -lua -examples -python -fortran -umpire -raja', type='build', when='~mpi') + depends_on('axom ~shared +mpi +hdf5 -lua -examples -python -fortran -umpire -raja', type='build', when='+mpi') + depends_on('axom ~shared ~mpi +hdf5 -lua -examples -python -fortran -umpire -raja', type='build', when='~mpi') - depends_on('caliper@2.8.0 ~shared ~adiak ~libdw ~papi ~libunwind +pic', type='build') + depends_on('caliper ~shared ~adiak ~libdw ~papi ~libunwind +pic', type='build') - depends_on('opensubdiv@3.4.3', type='build') - depends_on('polytope@0.7 +python', type='build') + depends_on('opensubdiv', type='build') + depends_on('polytope +python', type='build') extends('python@3.9.10 +zlib +shared +ssl +tkinter', type='build') - depends_on('py-numpy@1.23.4', type='build') - depends_on('py-numpy-stl@3.0.0', type='build') - depends_on('py-python-utils@2.4.0', type='build') - depends_on('py-matplotlib@3.3.4 backend=tkagg +fonts', type='build') - depends_on('py-pillow@9.2.0', type='build') - depends_on('py-decorator@5.1.1', type='build') - depends_on('py-h5py@3.7.0', type='build') - depends_on('py-docutils@0.19', type='build') - depends_on('py-cython@0.29.32', type='build') - depends_on('py-scipy@1.8.1', type='build') - depends_on('py-importlib-metadata@4.12.0', type='build') - depends_on('py-ats@exit', type='build') - depends_on('py-mpi4py@3.1.4', type='build', when='+mpi') - - depends_on('py-sphinx@5.3.0', type='build') - depends_on('py-sphinx-rtd-theme@0.5.1', type='build') + depends_on('py-numpy', type='build') + depends_on('py-numpy-stl', type='build') + depends_on('py-python-utils', type='build') + depends_on('py-matplotlib backend=tkagg +fonts', type='build') + depends_on('py-pillow', type='build') + depends_on('py-decorator', type='build') + depends_on('py-h5py', type='build') + depends_on('py-docutils', type='build') + depends_on('py-cython', type='build') + depends_on('py-scipy@1.8', type='build') + depends_on('py-importlib-metadata', type='build') + depends_on('py-ats', type='build') + depends_on('py-mpi4py', type='build', when='+mpi') + + depends_on('py-sphinx', type='build') + depends_on('py-sphinx-rtd-theme', type='build') depends_on('netlib-lapack', type='build') diff --git a/scripts/spack/packages/tcl/package.py b/scripts/spack/packages/tcl/package.py deleted file mode 100644 index 3f4b61f87..000000000 --- a/scripts/spack/packages/tcl/package.py +++ /dev/null @@ -1,172 +0,0 @@ -# Copyright 2013-2022 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) - -import os - -from spack.util.environment import is_system_path - - -class Tcl(AutotoolsPackage, SourceforgePackage): - """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic - programming language, suitable for a very wide range of uses, including web and - desktop applications, networking, administration, testing and many more. Open source - and business-friendly, Tcl is a mature yet evolving language that is truly cross - platform, easily deployed and highly extensible.""" - - homepage = "https://www.tcl.tk/" - sourceforge_mirror_path = "tcl/tcl8.6.11-src.tar.gz" - - version('8.6.11', sha256='8c0486668586672c5693d7d95817cb05a18c5ecca2f40e2836b9578064088258') - version('8.6.10', sha256='5196dbf6638e3df8d5c87b5815c8c2b758496eb6f0e41446596c9a4e638d87ed') - version('8.6.8', sha256='c43cb0c1518ce42b00e7c8f6eaddd5195c53a98f94adc717234a65cbcfd3f96a') - version('8.6.6', sha256='a265409781e4b3edcc4ef822533071b34c3dc6790b893963809b9fe221befe07') - version('8.6.5', sha256='ce26d5b9c7504fc25d2f10ef0b82b14cf117315445b5afa9e673ed331830fb53') - version('8.6.4', sha256='9e6ed94c981c1d0c5f5fefb8112d06c6bf4d050a7327e95e71d417c416519c8d') - version('8.6.3', sha256='6ce0778de0d50daaa9c345d7c1fd1288fb658f674028812e7eeee992e3051005') - version('8.5.19', sha256='d3f04456da873d17f02efc30734b0300fb6c3b85028d445fe284b83253a6db18') - - extendable = True - - depends_on('zlib') - - configure_directory = 'unix' - - def install(self, spec, prefix): - with working_dir(self.build_directory): - make('install') - - # https://wiki.tcl-lang.org/page/kitgen - if self.spec.satisfies('@8.6:'): - make('install-headers') - - # Some applications like Expect require private Tcl headers. - make('install-private-headers') - - # Copy source to install tree - # A user-provided install option might re-do this - # https://github.com/spack/spack/pull/4102/files - installed_src = join_path( - self.spec.prefix, 'share', self.name, 'src') - stage_src = os.path.realpath(self.stage.source_path) - install_tree(stage_src, installed_src) - - # Replace stage dir -> installed src dir in tclConfig - filter_file( - stage_src, installed_src, - join_path(self.spec['tcl'].libs.directories[0], - 'tclConfig.sh')) - - # Don't install binaries in src/ tree - with working_dir(join_path(installed_src, self.configure_directory)): - make('clean') - - @run_after('install') - def symlink_tclsh(self): - with working_dir(self.prefix.bin): - symlink('tclsh{0}'.format(self.version.up_to(2)), 'tclsh') - - # ======================================================================== - # Set up environment to make install easy for tcl extensions. - # ======================================================================== - - @property - def libs(self): - return find_libraries(['libtcl{0}'.format(self.version.up_to(2))], - root=self.prefix, recursive=True) - - @property - def command(self): - """Returns the tclsh command. - - Returns: - Executable: the tclsh command - """ - # Although we symlink tclshX.Y to tclsh, we also need to support external - # installations that may not have this symlink, or may have multiple versions - # of Tcl installed in the same directory. - return Executable(os.path.realpath(self.prefix.bin.join( - 'tclsh{0}'.format(self.version.up_to(2))))) - - def _find_script_dir(self): - # Put more-specific prefixes first - check_prefixes = [ - join_path(self.prefix, "share", "tcl{0}".format(self.version.up_to(2))), - self.prefix, - ] - for prefix in check_prefixes: - result = find(prefix, "init.tcl") - if result: - return os.path.dirname(sorted(result)[0]) - - def setup_run_environment(self, env): - """Set TCL_LIBRARY to the directory containing init.tcl. - - For further info see: - - * https://wiki.tcl-lang.org/page/TCL_LIBRARY - """ - # When using tkinter from within spack provided python+tkinter, - # python will not be able to find Tcl unless TCL_LIBRARY is set. - env.set('TCL_LIBRARY', self._find_script_dir()) - #sorted(find(self.prefix, 'init.tcl'))[0])) - - def setup_dependent_build_environment(self, env, dependent_spec): - """Set TCL_LIBRARY to the directory containing init.tcl. - Set TCLLIBPATH to include the tcl-shipped directory for - extensions and any other tcl extension it depends on. - - For further info see: - - * https://wiki.tcl-lang.org/page/TCL_LIBRARY - * https://wiki.tcl-lang.org/page/TCLLIBPATH - """ - env.set('TCL_LIBRARY', self._find_script_dir()) - #sorted(find(self.prefix, 'init.tcl'))[0])) - - # If we set TCLLIBPATH, we must also ensure that the corresponding - # tcl is found in the build environment. This to prevent cases - # where a system provided tcl is run against the standard libraries - # of a Spack built tcl. See issue #7128 that relates to python but - # it boils down to the same situation we have here. - if not is_system_path(self.prefix.bin): - env.prepend_path('PATH', self.prefix.bin) - - # WARNING: paths in $TCLLIBPATH must be *space* separated, - # its value is meant to be a Tcl list, *not* an env list - # as explained here: https://wiki.tcl-lang.org/page/TCLLIBPATH: - # "TCLLIBPATH is a Tcl list, not some platform-specific - # colon-separated or semi-colon separated format" - - # WARNING: Tcl and Tcl extensions like Tk install their configuration files - # in subdirectories like `/lib/tcl8.6`. However, Tcl is aware of this, - # and $TCLLIBPATH should only contain `/lib`. $TCLLIBPATH is only needed - # because we install Tcl extensions to different directories than Tcl. See: - # https://core.tcl-lang.org/tk/tktview/447bd3e4abe17452d19a80e6840dcc8a2603fcbc - env.prepend_path( - 'TCLLIBPATH', self.spec['tcl'].libs.directories[0], separator=' ') - - for d in dependent_spec.traverse(deptype=('build', 'run', 'test')): - if d.package.extends(self.spec): - # Tcl libraries may be installed in lib or lib64, see #19546 - for lib in ['lib', 'lib64']: - tcllibpath = join_path(d.prefix, lib) - if os.path.exists(tcllibpath): - env.prepend_path('TCLLIBPATH', tcllibpath, separator=' ') - - def setup_dependent_run_environment(self, env, dependent_spec): - """Set TCLLIBPATH to include the tcl-shipped directory for - extensions and any other tcl extension it depends on. - - For further info see: - - * https://wiki.tcl-lang.org/page/TCLLIBPATH - """ - for d in dependent_spec.traverse(deptype=('build', 'run', 'test')): - if d.package.extends(self.spec): - # Tcl libraries may be installed in lib or lib64, see #19546 - for lib in ['lib', 'lib64']: - tcllibpath = join_path(d.prefix, lib) - if os.path.exists(tcllibpath): - env.prepend_path('TCLLIBPATH', tcllibpath, separator=' ') diff --git a/scripts/spack/packages/tk/package.py b/scripts/spack/packages/tk/package.py deleted file mode 100644 index 439363973..000000000 --- a/scripts/spack/packages/tk/package.py +++ /dev/null @@ -1,145 +0,0 @@ -# Copyright 2013-2023 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) - -import os - -from spack.package import * - - -class Tk(AutotoolsPackage, SourceforgePackage): - """Tk is a graphical user interface toolkit that takes developing desktop - applications to a higher level than conventional approaches. Tk is the standard GUI - not only for Tcl, but for many other dynamic languages, and can produce rich, native - applications that run unchanged across Windows, Mac OS X, Linux and more.""" - - homepage = "https://www.tcl.tk" - sourceforge_mirror_path = "tcl/tk8.6.5-src.tar.gz" - - version("8.6.11", sha256="5228a8187a7f70fa0791ef0f975270f068ba9557f57456f51eb02d9d4ea31282") - version("8.6.10", sha256="63df418a859d0a463347f95ded5cd88a3dd3aaa1ceecaeee362194bc30f3e386") - version("8.6.8", sha256="49e7bca08dde95195a27f594f7c850b088be357a7c7096e44e1158c7a5fd7b33") - version("8.6.6", sha256="d62c371a71b4744ed830e3c21d27968c31dba74dd2c45f36b9b071e6d88eb19d") - version("8.6.5", sha256="fbbd93541b4cd467841208643b4014c4543a54c3597586727f0ab128220d7946") - version("8.6.3", sha256="ba15d56ac27d8c0a7b1a983915a47e0f635199b9473cf6e10fbce1fc73fd8333") - version("8.5.19", sha256="407af1de167477d598bd6166d84459a3bdccc2fb349360706154e646a9620ffa") - - variant("xft", default=True, description="Enable X FreeType") - variant("xss", default=True, description="Enable X Screen Saver") - - extends("tcl", type=("build", "link", "run")) - - depends_on("tcl@8.6:", type=("build", "link", "run"), when="@8.6:") - depends_on("libx11") - depends_on("libxft", when="+xft") - depends_on("libxscrnsaver", when="+xss") - - configure_directory = "unix" - - # https://core.tcl-lang.org/tk/tktview/3598664fffffffffffff - # https://core.tcl-lang.org/tk/info/8b679f597b1d17ad - # https://core.tcl-lang.org/tk/info/997b17c343444e48 - patch( - "https://raw.githubusercontent.com/macports/macports-ports/v2.7.0-archive/x11/tk/files/patch-unix-Makefile.in.diff", - sha256="54bba3d2b3550b7e2c636881c1a3acaf6e1eb743f314449a132864ff47fd0010", - level=0, - when="@:8.6.11 platform=darwin", - ) - patch( - "https://raw.githubusercontent.com/macports/macports-ports/v2.7.0-archive/x11/tk/files/patch-dyld_fallback_library_path.diff", - sha256="9ce6512f1928db9987986f4d3540207c39429395d5234bd6489ba9d86a6d9c31", - level=0, - when="platform=darwin", - ) - - def configure_args(self): - spec = self.spec - config_args = [ - "--with-tcl={0}".format(spec["tcl"].libs.directories[0]), - "--x-includes={0}".format(spec["libx11"].headers.directories[0]), - "--x-libraries={0}".format(spec["libx11"].libs.directories[0]), - ] - config_args += self.enable_or_disable("xft") - config_args += self.enable_or_disable("xss") - - return config_args - - def install(self, spec, prefix): - with working_dir(self.build_directory): - make("install") - - # Some applications like Expect require private Tk headers. - make("install-private-headers") - - # Copy source to install tree - installed_src = join_path(self.spec.prefix, "share", self.name, "src") - stage_src = os.path.realpath(self.stage.source_path) - install_tree(stage_src, installed_src) - - # Replace stage dir -> installed src dir in tkConfig - filter_file( - stage_src, - installed_src, - join_path(self.spec["tk"].libs.directories[0], "tkConfig.sh"), - ) - - @run_after("install") - def symlink_wish(self): - with working_dir(self.prefix.bin): - symlink("wish{0}".format(self.version.up_to(2)), "wish") - - def test(self): - self.run_test(self.spec["tk"].command.path, ["-h"], purpose="test wish command") - - test_data_dir = self.test_suite.current_test_data_dir - test_file = test_data_dir.join("test.tcl") - self.run_test( - self.spec["tcl"].command.path, test_file, purpose="test that tk can be loaded" - ) - - @property - def command(self): - """Returns the wish command. - Returns: - Executable: the wish command - """ - # Although we symlink wishX.Y to wish, we also need to support external - # installations that may not have this symlink, or may have multiple versions - # of Tk installed in the same directory. - return Executable( - os.path.realpath(self.prefix.bin.join("wish{0}".format(self.version.up_to(2)))) - ) - - @property - def libs(self): - return find_libraries( - ["libtk{0}".format(self.version.up_to(2))], root=self.prefix, recursive=True - ) - - def _find_script_dir(self): - # Put more-specific prefixes first - check_prefixes = [ - join_path(self.prefix, "share", "tk{0}".format(self.version.up_to(2))), - self.prefix, - ] - for prefix in check_prefixes: - result = find(prefix, "tk.tcl") - if result: - return os.path.dirname(sorted(result)[0]) - - def setup_run_environment(self, env): - """Set TK_LIBRARY to the directory containing tk.tcl. - For further info, see: - * https://www.tcl-lang.org/man/tcl/TkCmd/tkvars.htm - """ - # When using tkinter from within spack provided python+tkinter, - # python will not be able to find Tk unless TK_LIBRARY is set. - env.set("TK_LIBRARY", self._find_script_dir()) - - def setup_dependent_build_environment(self, env, dependent_spec): - """Set TK_LIBRARY to the directory containing tk.tcl. - For further info, see: - * https://www.tcl-lang.org/man/tcl/TkCmd/tkvars.htm - """ - env.set("TK_LIBRARY", self._find_script_dir()) From b54070dc691283032bd7945c69d25a4448515232 Mon Sep 17 00:00:00 2001 From: Landon Owen Date: Wed, 24 Apr 2024 11:45:18 -0700 Subject: [PATCH 03/42] Spheral spack package is working without versions being set, ran into issue with exporting mpi and openmp through new blt interface --- cmake/CMakeDefinitions.cmake | 2 +- cmake/InstallTPLs.cmake | 44 +++++++++-------- cmake/SetupSpheral.cmake | 3 +- cmake/spheral/SpheralHandleTPL.cmake | 2 +- cmake/spheral_cxx-config.cmake.in | 60 +++++++++++------------ cmake/tpl/zlib.cmake | 5 -- scripts/devtools/tpl-manager.py | 48 +++++++++++------- scripts/spack/packages/spheral/package.py | 33 +++++++------ 8 files changed, 102 insertions(+), 95 deletions(-) delete mode 100644 cmake/tpl/zlib.cmake diff --git a/cmake/CMakeDefinitions.cmake b/cmake/CMakeDefinitions.cmake index 7c892941a..d8b2f2340 100644 --- a/cmake/CMakeDefinitions.cmake +++ b/cmake/CMakeDefinitions.cmake @@ -73,5 +73,5 @@ if (ENABLE_TIMER) endif() if (ENABLE_MPI) - add_definitions(-DUSE_MPI=1) + add_definitions(-DUSE_MPI=1) endif() diff --git a/cmake/InstallTPLs.cmake b/cmake/InstallTPLs.cmake index 05901241f..c35fbcb17 100644 --- a/cmake/InstallTPLs.cmake +++ b/cmake/InstallTPLs.cmake @@ -89,7 +89,7 @@ foreach(_comp ${AXOM_COMPONENTS_ENABLED}) endforeach() # TPLs that must be imported -list(APPEND SPHERAL_EXTERN_LIBS zlib boost eigen qhull silo hdf5 polytope) +list(APPEND SPHERAL_EXTERN_LIBS boost eigen qhull silo hdf5 polytope) blt_list_append( TO SPHERAL_EXTERN_LIBS ELEMENTS aneos IF ENABLE_ANEOS) blt_list_append( TO SPHERAL_EXTERN_LIBS ELEMENTS opensubdiv IF ENABLE_OPENSUBDIV) @@ -108,24 +108,26 @@ endforeach() if (EXISTS ${EXTERNAL_SPHERAL_TPL_CMAKE}) include(${EXTERNAL_SPHERAL_TPL_CMAKE}) endif() +blt_install_tpl_setups(DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) # Copied from serac, needed to bypass generator expression issue during export -set(_props) -if( ${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.13.0" ) - list(APPEND _props INTERFACE_LINK_OPTIONS) -endif() -list(APPEND _props INTERFACE_COMPILE_OPTIONS) -foreach(_target axom axom::openmp) - if(TARGET ${_target}) - message(STATUS "Removing OpenMP Flags from target[${_target}]") - foreach(_prop ${_props}) - get_target_property(_flags ${_target} ${_prop}) - if ( _flags ) - string( REPLACE "${OpenMP_CXX_FLAGS}" "" - correct_flags "${_flags}" ) - string( REPLACE "${OpenMP_Fortran_FLAGS}" "" - correct_flags "${correct_flags}" ) - set_target_properties( ${_target} PROPERTIES ${_prop} "${correct_flags}" ) - endif() - endforeach() - endif() -endforeach() + +# set(_props) +# if( ${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.13.0" ) +# list(APPEND _props INTERFACE_LINK_OPTIONS) +# endif() +# list(APPEND _props INTERFACE_COMPILE_OPTIONS) +# foreach(_target axom axom::openmp) +# if(TARGET ${_target}) +# message(STATUS "Removing OpenMP Flags from target[${_target}]") +# foreach(_prop ${_props}) +# get_target_property(_flags ${_target} ${_prop}) +# if ( _flags ) +# string( REPLACE "${OpenMP_CXX_FLAGS}" "" +# correct_flags "${_flags}" ) +# string( REPLACE "${OpenMP_Fortran_FLAGS}" "" +# correct_flags "${correct_flags}" ) +# set_target_properties( ${_target} PROPERTIES ${_prop} "${correct_flags}" ) +# endif() +# endforeach() +# endif() +# endforeach() diff --git a/cmake/SetupSpheral.cmake b/cmake/SetupSpheral.cmake index 8a1e523b1..5f4c7c12b 100644 --- a/cmake/SetupSpheral.cmake +++ b/cmake/SetupSpheral.cmake @@ -5,7 +5,6 @@ include(ExternalProject) #------------------------------------------------------------------------------- set(CMAKE_CXX_STANDARD 17) set(CMAKE_EXPORT_COMPILE_COMMANDS On) -set(CMAKE_EXPORT_COMPILE_COMMANDS On) if (NOT SPHERAL_CMAKE_MODULE_PATH) set(SPHERAL_CMAKE_MODULE_PATH "${SPHERAL_ROOT_DIR}/cmake") @@ -38,7 +37,7 @@ if (NOT EXISTS "${SPHERAL_BLT_DIR}/SetupBLT.cmake") "${SPHERAL_BLT_DIR} is not present.\n" "call cmake with -DSPHERAL_BLT_DIR=/your/installation/of/blt\n") endif() -set(BLT_EXPORT_THIRDPARTY ON CACHE BOOL "") + include(${SPHERAL_BLT_DIR}/SetupBLT.cmake) #------------------------------------------------------------------------------- diff --git a/cmake/spheral/SpheralHandleTPL.cmake b/cmake/spheral/SpheralHandleTPL.cmake index 18c8da287..3e75a8978 100644 --- a/cmake/spheral/SpheralHandleTPL.cmake +++ b/cmake/spheral/SpheralHandleTPL.cmake @@ -92,5 +92,5 @@ function(Spheral_Handle_TPL lib_name TPL_CMAKE_DIR) EXPORT spheral_cxx-targets DESTINATION lib/cmake) endif() - blt_export_tpl_targets(EXPORT ${lib_name} NAMESPACE spheral) + set_target_properties(${lib_name} PROPERTIES EXPORT_NAME spheral::${lib_name}) endfunction() diff --git a/cmake/spheral_cxx-config.cmake.in b/cmake/spheral_cxx-config.cmake.in index f6c093cd9..0fccbdb92 100644 --- a/cmake/spheral_cxx-config.cmake.in +++ b/cmake/spheral_cxx-config.cmake.in @@ -1,37 +1,37 @@ @PACKAGE_INIT@ -if(NOT axom_DIR) - set(axom_DIR "@axom_DIR@" CACHE PATH "") -endif() -set(SPHERAL_CXX_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@") -set(SPHERAL_CXX_INCLUDE_DIRS "${SPHERAL_CXX_INSTALL_PREFIX}/include") -if(NOT @ENABLE_CXXONLY@ AND NOT TARGET Python3) - set(python_DIR "@python_DIR@") - set(Python_EXECUTABLE ${python_DIR}/bin/python3) - set(Python3_EXECUTABLE ${python_DIR}/bin/python3) - find_package(Python3 COMPONENTS Interpreter Development) - set(PYTHON_EXE ${Python3_EXECUTABLE}) -endif() +if(NOT SPHERAL_FOUND) + #---------------------------------------------------------------------------- + # Set user configuration options and features + #---------------------------------------------------------------------------- -# Guard these assignments to not interfere with projects that use Spheral and SpheralC as TPLs -if(SPHERALC_STANDALONE) - set(CMAKE_C_COMPILER "@CMAKE_C_COMPILER@" CACHE PATH "Spheral C compiler path") - set(CMAKE_CXX_COMPILER "@CMAKE_CXX_COMPILER@" CACHE PATH "Spheral C++ compiler path") - set(CMAKE_Fortran_COMPILER "@CMAKE_Fortran_COMPILER@" CACHE PATH "Spheral C++ compiler path") - set(ENABLE_MPI @ENABLE_MPI@ CACHE BOOL "") - if(SPHERAL_ENABLE_MPI) - set(MPI_C_COMPILER "@MPI_C_COMPILER@" CACHE PATH "") - set(MPI_CXX_COMPILER "@MPI_CXX_COMPILER@" CACHE PATH "") - set(MPI_Fortran_COMPILER "@MPI_Fortran_COMPILER@" CACHE PATH "") + # Language features + set(SPHERAL_ENABLE_MPI "@ENABLE_MPI@") + set(SPHERAL_ENABLE_OPENMP "@ENABLE_OPENMP@") + set(SPHERAL_ENABLE_CUDA "@ENABLE_CUDA@") + if(NOT axom_DIR) + set(axom_DIR "@axom_DIR@" CACHE PATH "") endif() -endif() -if(NOT TARGET axom) - find_package(axom REQUIRED QUIET NO_DEFAULT_PATH PATHS ${axom_DIR} ${axom_DIR}/lib ${axom_DIR}/lib/cmake) -endif() -include("${SPHERAL_CXX_INSTALL_PREFIX}/lib/cmake/spheral_cxx-targets.cmake") + set(SPHERAL_CXX_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@") + set(SPHERAL_CXX_INCLUDE_DIRS "${SPHERAL_CXX_INSTALL_PREFIX}/include") + if(NOT @ENABLE_CXXONLY@ AND NOT TARGET Python3) + set(python_DIR "@python_DIR@") + set(Python_EXECUTABLE ${python_DIR}/bin/python3) + set(Python3_EXECUTABLE ${python_DIR}/bin/python3) + find_package(Python3 COMPONENTS Interpreter Development) + set(PYTHON_EXE ${Python3_EXECUTABLE}) + endif() + + if(NOT TARGET axom) + find_package(axom REQUIRED QUIET NO_DEFAULT_PATH PATHS ${axom_DIR} ${axom_DIR}/lib ${axom_DIR}/lib/cmake) + endif() + include("${SPHERAL_CXX_INSTAL_PREFIX}/lib/cmake/BLTSetupTargets.cmake") + include("${SPHERAL_CXX_INSTALL_PREFIX}/lib/cmake/spheral_cxx-targets.cmake") -set_property(TARGET Spheral_CXX - APPEND PROPERTY - INTERFACE_INCLUDE_DIRECTORIES ${SPHERAL_CXX_INCLUDE_DIRS}) + set_property(TARGET Spheral_CXX + APPEND PROPERTY + INTERFACE_INCLUDE_DIRECTORIES ${SPHERAL_CXX_INCLUDE_DIRS}) + set(SPHERAL_FOUND TRUE) +endif() diff --git a/cmake/tpl/zlib.cmake b/cmake/tpl/zlib.cmake deleted file mode 100644 index 9d79e5656..000000000 --- a/cmake/tpl/zlib.cmake +++ /dev/null @@ -1,5 +0,0 @@ -set(${lib_name}_libs libz.so) - -if(ENABLE_STATIC_TPL) - string(REPLACE ".so" ".a;" ${lib_name}_libs ${${lib_name}_libs}) -endif() diff --git a/scripts/devtools/tpl-manager.py b/scripts/devtools/tpl-manager.py index bf99482ee..026b5c7c9 100755 --- a/scripts/devtools/tpl-manager.py +++ b/scripts/devtools/tpl-manager.py @@ -59,6 +59,9 @@ def parse_args(): parser.add_argument('--no-spec', action='store_true', help='Skip output of the dependency graph.') + parser.add_argument('--skip-init', action='store_true', + help='Skip setting up and configuring Spack.') + return parser.parse_args() @@ -89,26 +92,13 @@ def parse_spec_list(file_path): #------------------------------ # Dependencies #------------------------------ -def build_deps(args): +def build_spack(args): print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~") - print("~~~~~ Building Dependencies") + print("~~~~~ Building and Configuring Spack") print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~") print("") print("{0}".format(project_dir)) - - # Figure out what specs this script is building TPLs for. - spec_list=[] - if args.spec_list: - spec_list = parse_spec_list(args.spec_list) - elif args.spec: - spec_list.append(args.spec) - else: - print("ERROR: Please define --spec or --spec-list, aborting...") - sys.exit(1) - for s in spec_list: - print("** SPEC : {0}".format(s)) - spack_upstream_opt="" if os.path.isdir(args.upstream_dir) and not args.no_upstream: spack_upstream_opt="--upstream {0}".format(args.upstream_dir) @@ -128,7 +118,7 @@ def build_deps(args): # We just want to use the spac instance directly to generate our TPLs, we don't want # to have the spack instance take over our environment. - #os.environ["SPACK_DISABLE_LOCAL_CONFIG"] = "1" + os.environ["SPACK_DISABLE_LOCAL_CONFIG"] = "1" spack_cmd=os.path.join(args.spheral_spack_dir, "spack/bin/spack") spheral_config_dir="scripts/spack/configs/" @@ -156,6 +146,24 @@ def build_deps(args): if os.path.exists(spheral_config_dir+"/concretizer.yaml"): sexe("cp {0}/concretizer.yaml {1}".format(spheral_config_dir, os.path.join(args.spheral_spack_dir, "spack/etc/spack/defaults")), echo=True) +def build_deps(args): + print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~") + print("~~~~~ Building Dependencies") + print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~") + print("") + print("{0}".format(project_dir)) + # Figure out what specs this script is building TPLs for. + spec_list=[] + if args.spec_list: + spec_list = parse_spec_list(args.spec_list) + elif args.spec: + spec_list.append(args.spec) + else: + print("ERROR: Please define --spec or --spec-list, aborting...") + sys.exit(1) + for s in spec_list: + print("** SPEC : {0}".format(s)) + spack_cmd=os.path.join(args.spheral_spack_dir, "spack/bin/spack") # Optionally add a parallel job number for spack builds if args.spack_jobs: spack_cmd += " --jobs={0}".format(args.spack_jobs) @@ -179,18 +187,20 @@ def build_deps(args): if sexe("{0} spec --fresh -IL {1}@develop%{2} 2>&1 | tee -a \"spec-info-{2}-out.txt\"".format(spack_cmd, package_name, s), echo=True) : sys.exit(1) # Install only the dependencies for Spheral - if sexe("{0} install --fail-fast --fresh --deprecated --only dependencies {1}@develop%{2} 2>&1 | tee -a \"tpl-build-{2}-out.txt\"".format(spack_cmd, package_name, s), echo=True) : sys.exit(1) + if sexe("{0} install --fail-fast --fresh --only dependencies {1}@develop%{2} 2>&1 | tee -a \"tpl-build-{2}-out.txt\"".format(spack_cmd, package_name, s), echo=True) : sys.exit(1) # Using dev-build we can have spack generate an init-config with the local source files for spheral. - if sexe("{0} dev-build --reuse-deps --ignore-dependencies --deprecated -u initconfig {1}@develop%{2} 2>&1 | tee -a \"dev-build-{2}-out.txt\"".format(spack_cmd, package_name, s), echo=True) : sys.exit(1) + if sexe("{0} dev-build --reuse-deps --ignore-dependencies -u initconfig {1}@develop%{2} 2>&1 | tee -a \"dev-build-{2}-out.txt\"".format(spack_cmd, package_name, s), echo=True) : sys.exit(1) if not args.no_clean: - sexe("rm dev-build-* spack-build-* spack-configure-args.txt") + sexe("rm spec-info-* tpl-build-* dev-build-* spack-build-* spack-configure-args.txt") #------------------------------------------------------------------------------ def main(): args = parse_args() + if (not args.skip_init): + build_spack(args) build_deps(args) diff --git a/scripts/spack/packages/spheral/package.py b/scripts/spack/packages/spheral/package.py index bb4258494..fd9a6f91e 100644 --- a/scripts/spack/packages/spheral/package.py +++ b/scripts/spack/packages/spheral/package.py @@ -19,7 +19,7 @@ class Spheral(CachedCMakePackage, CudaPackage): # ------------------------------------------------------------------------- # VERSIONS # ------------------------------------------------------------------------- - version('develop', branch='feature/spack', submodules=True) + version('develop', branch='develop', submodules=True) version('1.0', tag='FSISPH-v1.0', submodules=True) # ------------------------------------------------------------------------- @@ -36,9 +36,7 @@ class Spheral(CachedCMakePackage, CudaPackage): depends_on('mpi', when='+mpi') depends_on('cmake@3.10.0:', type='build') - depends_on('zlib@1.3 +shared +pic', type='build') - - depends_on('boost +system +filesystem -atomic -container -coroutine -chrono -context -date_time -exception -fiber -graph -iostreams -locale -log -math -mpi -program_options -python -random -regex -test -thread -timer -wave +pic', type='build') + depends_on('boost@1.74.0 +system +filesystem -atomic -container -coroutine -chrono -context -date_time -exception -fiber -graph -iostreams -locale -log -math -mpi -program_options -python -random -regex -test -thread -timer -wave +pic', type='build') depends_on('qhull +pic', type='build') depends_on('m-aneos@1.0') @@ -62,17 +60,12 @@ class Spheral(CachedCMakePackage, CudaPackage): extends('python@3.9.10 +zlib +shared +ssl +tkinter', type='build') - depends_on('py-numpy', type='build') + depends_on('py-numpy@1.23.4', type='build') depends_on('py-numpy-stl', type='build') - depends_on('py-python-utils', type='build') depends_on('py-matplotlib backend=tkagg +fonts', type='build') - depends_on('py-pillow', type='build') - depends_on('py-decorator', type='build') depends_on('py-h5py', type='build') depends_on('py-docutils', type='build') - depends_on('py-cython', type='build') - depends_on('py-scipy@1.8', type='build') - depends_on('py-importlib-metadata', type='build') + depends_on('py-scipy', type='build') depends_on('py-ats', type='build') depends_on('py-mpi4py', type='build', when='+mpi') @@ -104,9 +97,8 @@ def cache_name(self): cache_spec = envspec else: cache_spec = self.spec.compiler.name + "@" + self.spec.compiler.version - return "{1}-{2}.cmake".format( - hostname, - self._get_sys_type(self.spec), + return "{0}-{1}.cmake".format( + str(self._get_sys_type(self.spec)), cache_spec.replace(" ", "_") ) @@ -159,8 +151,6 @@ def initconfig_package_entries(self): entries.append(cmake_cache_path('python_DIR', spec['python'].prefix)) - entries.append(cmake_cache_path('zlib_DIR', spec['zlib'].prefix)) - entries.append(cmake_cache_path('boost_DIR', spec['boost'].prefix)) entries.append(cmake_cache_path('qhull_DIR', spec['qhull'].prefix)) @@ -203,3 +193,14 @@ def cmake_args(self): spec = self.spec return options + + @property + def build_dirname(self): + """Directory name to use when building the package.""" + return "spack-build-%s" % self.pkg.spec.dag_hash(7) + + @property + def build_directory(self): + """Full-path to the directory to use when building the package.""" + return os.path.join(self.pkg.stage.path, self.build_dirname) + From 6b14d61e5dd8533db796718118d1ba8c8c70063c Mon Sep 17 00:00:00 2001 From: Landon Owen Date: Wed, 24 Apr 2024 14:48:18 -0700 Subject: [PATCH 04/42] Reverting some things back to how it was done before regarding cmake exports --- cmake/InstallTPLs.cmake | 43 +++++++++++++++---------------- cmake/spheral_cxx-config.cmake.in | 12 ++++++++- 2 files changed, 32 insertions(+), 23 deletions(-) diff --git a/cmake/InstallTPLs.cmake b/cmake/InstallTPLs.cmake index c35fbcb17..f36fb0f16 100644 --- a/cmake/InstallTPLs.cmake +++ b/cmake/InstallTPLs.cmake @@ -108,26 +108,25 @@ endforeach() if (EXISTS ${EXTERNAL_SPHERAL_TPL_CMAKE}) include(${EXTERNAL_SPHERAL_TPL_CMAKE}) endif() -blt_install_tpl_setups(DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) -# Copied from serac, needed to bypass generator expression issue during export -# set(_props) -# if( ${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.13.0" ) -# list(APPEND _props INTERFACE_LINK_OPTIONS) -# endif() -# list(APPEND _props INTERFACE_COMPILE_OPTIONS) -# foreach(_target axom axom::openmp) -# if(TARGET ${_target}) -# message(STATUS "Removing OpenMP Flags from target[${_target}]") -# foreach(_prop ${_props}) -# get_target_property(_flags ${_target} ${_prop}) -# if ( _flags ) -# string( REPLACE "${OpenMP_CXX_FLAGS}" "" -# correct_flags "${_flags}" ) -# string( REPLACE "${OpenMP_Fortran_FLAGS}" "" -# correct_flags "${correct_flags}" ) -# set_target_properties( ${_target} PROPERTIES ${_prop} "${correct_flags}" ) -# endif() -# endforeach() -# endif() -# endforeach() +# Copied from serac, needed to bypass generator expression issue during export +set(_props) +if( ${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.13.0" ) + list(APPEND _props INTERFACE_LINK_OPTIONS) +endif() +list(APPEND _props INTERFACE_COMPILE_OPTIONS) +foreach(_target axom axom::openmp) + if(TARGET ${_target}) + message(STATUS "Removing OpenMP Flags from target[${_target}]") + foreach(_prop ${_props}) + get_target_property(_flags ${_target} ${_prop}) + if ( _flags ) + string( REPLACE "${OpenMP_CXX_FLAGS}" "" + correct_flags "${_flags}" ) + string( REPLACE "${OpenMP_Fortran_FLAGS}" "" + correct_flags "${correct_flags}" ) + set_target_properties( ${_target} PROPERTIES ${_prop} "${correct_flags}" ) + endif() + endforeach() + endif() +endforeach() diff --git a/cmake/spheral_cxx-config.cmake.in b/cmake/spheral_cxx-config.cmake.in index 0fccbdb92..28da5f0da 100644 --- a/cmake/spheral_cxx-config.cmake.in +++ b/cmake/spheral_cxx-config.cmake.in @@ -27,7 +27,17 @@ if(NOT SPHERAL_FOUND) if(NOT TARGET axom) find_package(axom REQUIRED QUIET NO_DEFAULT_PATH PATHS ${axom_DIR} ${axom_DIR}/lib ${axom_DIR}/lib/cmake) endif() - include("${SPHERAL_CXX_INSTAL_PREFIX}/lib/cmake/BLTSetupTargets.cmake") + if(SPHERALC_STANDALONE) + set(CMAKE_C_COMPILER "@CMAKE_C_COMPILER@" CACHE PATH "Spheral C compiler path") + set(CMAKE_CXX_COMPILER "@CMAKE_CXX_COMPILER@" CACHE PATH "Spheral C++ compiler path") + set(CMAKE_Fortran_COMPILER "@CMAKE_Fortran_COMPILER@" CACHE PATH "Spheral C++ compiler path") + set(ENABLE_MPI @ENABLE_MPI@ CACHE BOOL "") + if(SPHERAL_ENABLE_MPI) + set(MPI_C_COMPILER "@MPI_C_COMPILER@" CACHE PATH "") + set(MPI_CXX_COMPILER "@MPI_CXX_COMPILER@" CACHE PATH "") + set(MPI_Fortran_COMPILER "@MPI_Fortran_COMPILER@" CACHE PATH "") + endif() + endif() include("${SPHERAL_CXX_INSTALL_PREFIX}/lib/cmake/spheral_cxx-targets.cmake") set_property(TARGET Spheral_CXX From 8885141aaa84e6c174d84d7a224c8499d2f5163b Mon Sep 17 00:00:00 2001 From: Landon Owen Date: Thu, 25 Apr 2024 14:00:34 -0700 Subject: [PATCH 05/42] Fix dev-build tpl manager command --- scripts/devtools/tpl-manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/devtools/tpl-manager.py b/scripts/devtools/tpl-manager.py index 026b5c7c9..b2891a8fc 100755 --- a/scripts/devtools/tpl-manager.py +++ b/scripts/devtools/tpl-manager.py @@ -190,7 +190,7 @@ def build_deps(args): if sexe("{0} install --fail-fast --fresh --only dependencies {1}@develop%{2} 2>&1 | tee -a \"tpl-build-{2}-out.txt\"".format(spack_cmd, package_name, s), echo=True) : sys.exit(1) # Using dev-build we can have spack generate an init-config with the local source files for spheral. - if sexe("{0} dev-build --reuse-deps --ignore-dependencies -u initconfig {1}@develop%{2} 2>&1 | tee -a \"dev-build-{2}-out.txt\"".format(spack_cmd, package_name, s), echo=True) : sys.exit(1) + if sexe("{0} dev-build -i --fresh -u initconfig {1}@develop%{2} 2>&1 | tee -a \"dev-build-{2}-out.txt\"".format(spack_cmd, package_name, s), echo=True) : sys.exit(1) if not args.no_clean: sexe("rm spec-info-* tpl-build-* dev-build-* spack-build-* spack-configure-args.txt") From c82ebe49e5c02eb24c138c47eeabbc41b5b041cc Mon Sep 17 00:00:00 2001 From: Landon Owen Date: Wed, 1 May 2024 15:14:38 -0700 Subject: [PATCH 06/42] Combined separate TPL install and dev-build Spack calls into single install function to help prevent TPL build fails, updated tpl-managers exec call and added C++ TPL versions back --- cmake/SetupSpheral.cmake | 2 -- scripts/devtools/tpl-manager.py | 41 ++++++++++------------- scripts/spack/packages/spheral/package.py | 22 +++++++----- 3 files changed, 31 insertions(+), 34 deletions(-) diff --git a/cmake/SetupSpheral.cmake b/cmake/SetupSpheral.cmake index 5f4c7c12b..59585ca8c 100644 --- a/cmake/SetupSpheral.cmake +++ b/cmake/SetupSpheral.cmake @@ -82,8 +82,6 @@ if(ENABLE_CUDA) list(APPEND SPHERAL_CXX_DEPENDS cuda) endif() -option(BOOST_HEADER_ONLY "only use the header only components of Boost" OFF) - #-------------------------------------------------------------------------------# # Set a default build type if none was specified #-------------------------------------------------------------------------------# diff --git a/scripts/devtools/tpl-manager.py b/scripts/devtools/tpl-manager.py index b2891a8fc..4226c8886 100755 --- a/scripts/devtools/tpl-manager.py +++ b/scripts/devtools/tpl-manager.py @@ -66,20 +66,19 @@ def parse_args(): # Helper function for executing commands stolen from uberenv -def sexe(cmd,ret_output=False,echo=False): +def sexe(cmd,ret_output=False,echo=True): """ Helper for executing shell commands. """ if echo: - print("[exe: {0}]".format(cmd)) + print("[exe: {0}]".format(cmd)) + p = subprocess.run(cmd, shell=True, + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT, + check=True, text=True) + print(p.stdout) + if p.stderr != None: + print(p.stderr) if ret_output: - p = subprocess.Popen(cmd, - shell=True, - stdout=subprocess.PIPE, - stderr=subprocess.STDOUT) - out = p.communicate()[0] - out = out.decode('utf8') - return p.returncode,out - else: - return subprocess.call(cmd,shell=True) + return p.stdout # Parse the json formatted spec list... @@ -127,9 +126,9 @@ def build_spack(args): # We need to install spack without any configuration files so we can use # spack arch to determine the OS of the system and later to use spack find # for generating external package files on external systems. - if sexe("python3 {0} --setup-only {1} {2} {3} {4}".format(uberenv_path, prefix_opt, uberenv_project_json_opt, spack_upstream_opt, uberenv_spack_url_opt), echo=True): sys.exit(1) + sexe("python3 {0} --setup-only {1} {2} {3} {4}".format(uberenv_path, prefix_opt, uberenv_project_json_opt, spack_upstream_opt, uberenv_spack_url_opt)) - spack_arch_os = sexe("{0} arch -o".format(spack_cmd), ret_output=True)[1].strip() + spack_arch_os = sexe("{0} arch -o".format(spack_cmd), ret_output=True, echo=False).strip() print("INFO : Detected Operating System :{0}".format(spack_arch_os)) spheral_config_dir += spack_arch_os @@ -140,11 +139,11 @@ def build_spack(args): # Setup spack w/ Uberenv and the appropriate external package/compiler configs. - if sexe("python3 {0} --setup-only {1} {2} {3} {4} {5}".format(uberenv_path, prefix_opt, uberenv_project_json_opt, spack_config_dir_opt, spack_upstream_opt, uberenv_spack_url_opt), echo=True): sys.exit(1) + sexe("python3 {0} --setup-only {1} {2} {3} {4} {5}".format(uberenv_path, prefix_opt, uberenv_project_json_opt, spack_config_dir_opt, spack_upstream_opt, uberenv_spack_url_opt)) # Uberenv doesn't copy the concretizer.yaml options... if os.path.exists(spheral_config_dir+"/concretizer.yaml"): - sexe("cp {0}/concretizer.yaml {1}".format(spheral_config_dir, os.path.join(args.spheral_spack_dir, "spack/etc/spack/defaults")), echo=True) + sexe("cp {0}/concretizer.yaml {1}".format(spheral_config_dir, os.path.join(args.spheral_spack_dir, "spack/etc/spack/defaults"))) def build_deps(args): print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~") @@ -178,22 +177,18 @@ def build_deps(args): # Loop through the specs we want TPLs for and build/install/get them as necessary. if not args.init_only: for s in spec_list: - print("** Building TPL's and generating host-config for {0}%{1} ...".format(package_name,s)) os.environ["SPEC"] = s os.environ["LC_ALL"] = "en_US.UTF-8" if not args.no_spec: - if sexe("{0} spec --fresh -IL {1}@develop%{2} 2>&1 | tee -a \"spec-info-{2}-out.txt\"".format(spack_cmd, package_name, s), echo=True) : sys.exit(1) - - # Install only the dependencies for Spheral - if sexe("{0} install --fail-fast --fresh --only dependencies {1}@develop%{2} 2>&1 | tee -a \"tpl-build-{2}-out.txt\"".format(spack_cmd, package_name, s), echo=True) : sys.exit(1) + sexe("{0} spec --fresh -IL {1}@develop%{2} 2>&1 | tee -a \"spec-info-{2}-out.txt\"".format(spack_cmd, package_name, s)) - # Using dev-build we can have spack generate an init-config with the local source files for spheral. - if sexe("{0} dev-build -i --fresh -u initconfig {1}@develop%{2} 2>&1 | tee -a \"dev-build-{2}-out.txt\"".format(spack_cmd, package_name, s), echo=True) : sys.exit(1) + # Install only the dependencies for Spheral and create CMake configure file + sexe("{0} install --fail-fast --fresh -u initconfig {1}@develop%{2} dev_path=./ 2>&1 | tee -a \"tpl-build-{2}-out.txt\"".format(spack_cmd, package_name, s)) if not args.no_clean: - sexe("rm spec-info-* tpl-build-* dev-build-* spack-build-* spack-configure-args.txt") + sexe("rm -f spec-info-* tpl-build-* spack-build-* spack-configure-args.txt") #------------------------------------------------------------------------------ diff --git a/scripts/spack/packages/spheral/package.py b/scripts/spack/packages/spheral/package.py index fd9a6f91e..899b48700 100644 --- a/scripts/spack/packages/spheral/package.py +++ b/scripts/spack/packages/spheral/package.py @@ -38,22 +38,26 @@ class Spheral(CachedCMakePackage, CudaPackage): depends_on('boost@1.74.0 +system +filesystem -atomic -container -coroutine -chrono -context -date_time -exception -fiber -graph -iostreams -locale -log -math -mpi -program_options -python -random -regex -test -thread -timer -wave +pic', type='build') + depends_on('zlib@1.3 +shared +pic', type='build') + depends_on('qhull +pic', type='build') depends_on('m-aneos@1.0') - depends_on('eigen', type='build') - depends_on('hdf5 ~mpi +hl', type='build', when='~mpi') - depends_on('hdf5 +mpi +hl', type='build', when='+mpi') + depends_on('eigen@3.4.0', type='build') + depends_on('hdf5@1.8.19 ~mpi +hl', type='build', when='~mpi') + depends_on('hdf5@1.8.19 +mpi +hl', type='build', when='+mpi') - depends_on('silo +hdf5', type='build') + depends_on('silo@4.10.2 +hdf5', type='build') # Zlib fix has been merged into conduit, using develop until next release. - depends_on('conduit +shared +mpi +hdf5~hdf5_compat -test ~parmetis', type='build', when='+mpi') - depends_on('conduit +shared ~mpi +hdf5~hdf5_compat -test ~parmetis', type='build', when='~mpi') + depends_on('conduit@0.8.2 +shared +mpi +hdf5~hdf5_compat -test ~parmetis', type='build', when='+mpi') + depends_on('conduit@0.8.2 +shared ~mpi +hdf5~hdf5_compat -test ~parmetis', type='build', when='~mpi') + depends_on('conduit@0.8.2 +shared +mpi +hdf5 -test ~parmetis', type='build', when='+mpi^hdf5@1.8.0:1.8') + depends_on('conduit@0.8.2 +shared ~mpi +hdf5 -test ~parmetis', type='build', when='~mpi^hdf5@1.8.0:1.8') - depends_on('axom ~shared +mpi +hdf5 -lua -examples -python -fortran -umpire -raja', type='build', when='+mpi') - depends_on('axom ~shared ~mpi +hdf5 -lua -examples -python -fortran -umpire -raja', type='build', when='~mpi') + depends_on('axom@0.7.0 ~shared +mpi +hdf5 -lua -examples -python -fortran -umpire -raja', type='build', when='+mpi') + depends_on('axom@0.7.0 ~shared ~mpi +hdf5 -lua -examples -python -fortran -umpire -raja', type='build', when='~mpi') - depends_on('caliper ~shared ~adiak ~libdw ~papi ~libunwind +pic', type='build') + depends_on('caliper@2.8.0 ~shared ~adiak ~libdw ~papi ~libunwind +pic', type='build') depends_on('opensubdiv', type='build') depends_on('polytope +python', type='build') From e93d46ec4d3586c06bbd15eb75ab2df3ab5eda79 Mon Sep 17 00:00:00 2001 From: Landon Owen Date: Wed, 1 May 2024 16:24:54 -0700 Subject: [PATCH 07/42] Updated spack commit hash --- .uberenv_config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.uberenv_config.json b/.uberenv_config.json index cd7b365fe..ec603c94e 100644 --- a/.uberenv_config.json +++ b/.uberenv_config.json @@ -3,7 +3,7 @@ "package_version" : "develop", "package_source_dir" : "../../..", "spack_url" : "https://github.com/spack/spack", - "spack_commit" : "89319413d5d90caa9bea98e3419f8aeab61a2a0d", + "spack_commit" : "e2088b599e69f3a863b65e06c534ccb611a119f0", "spack_configs_path" : "scripts/spack/configs", "spack_packages_path" : "scripts/spack/packages" } From 5809c5ad5abdfd40058ef3f3954a3bc8d8c7414f Mon Sep 17 00:00:00 2001 From: Landon Owen Date: Thu, 2 May 2024 09:46:42 -0700 Subject: [PATCH 08/42] Add echo check for tpl-manager command function --- scripts/devtools/tpl-manager.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/devtools/tpl-manager.py b/scripts/devtools/tpl-manager.py index 4226c8886..5902f7266 100755 --- a/scripts/devtools/tpl-manager.py +++ b/scripts/devtools/tpl-manager.py @@ -74,7 +74,8 @@ def sexe(cmd,ret_output=False,echo=True): stdout=subprocess.PIPE, stderr=subprocess.STDOUT, check=True, text=True) - print(p.stdout) + if echo: + print(p.stdout) if p.stderr != None: print(p.stderr) if ret_output: From d8e3df2b1bc6d22a180a16d3ef0aed3168158285 Mon Sep 17 00:00:00 2001 From: Landon Owen Date: Thu, 2 May 2024 14:54:22 -0700 Subject: [PATCH 09/42] Added zlib provider for zlib-api in spack packages, added system externals for blueOS package --- scripts/devtools/tpl-manager.py | 9 +++---- .../configs/blueos_3_ppc64le_ib/packages.yaml | 27 ++++++++++++++++++- .../configs/toss_4_x86_64_ib/packages.yaml | 7 +++++ 3 files changed, 36 insertions(+), 7 deletions(-) diff --git a/scripts/devtools/tpl-manager.py b/scripts/devtools/tpl-manager.py index 5902f7266..fb998bf65 100755 --- a/scripts/devtools/tpl-manager.py +++ b/scripts/devtools/tpl-manager.py @@ -71,14 +71,11 @@ def sexe(cmd,ret_output=False,echo=True): if echo: print("[exe: {0}]".format(cmd)) p = subprocess.run(cmd, shell=True, - stdout=subprocess.PIPE, - stderr=subprocess.STDOUT, + capture_output=ret_output, check=True, text=True) - if echo: - print(p.stdout) - if p.stderr != None: - print(p.stderr) if ret_output: + if echo: + print(p.stdout) return p.stdout diff --git a/scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml b/scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml index 6f5cf30ad..66643ff40 100644 --- a/scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml +++ b/scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml @@ -2,13 +2,38 @@ packages: all: target: [ppc64le] compiler: [gcc, clang] + providers: + awk: [gawk] + blas: [openblas, amdblis] + lapack: [netlib-lapack] + pil: [py-pillow] + pkgconfig: [pkg-config] + zlib-api: [zlib] cmake: version: [3.20.2] buildable: false externals: - spec: cmake@3.20.2 prefix: /usr/tce/packages/cmake/cmake-3.20.2 - + gmake: + version: [4.2.1] + buildable: false + externals: + - spec: gmake@4.2.1 + prefix: /usr + git: + version: [2.29.1] + buildable: false + externals: + - spec: git@2.29.1+tcltk + prefix: /usr/tce + perl: + version: [5.26.3] + buildable: false + externals: + - spec: perl@5.26.3 + prefix: /usr + cuda: version: [11.1.0, 11.0.2, 10.1.243, 10.1.168, 9.2.148, 8.0] buildable: false diff --git a/scripts/spack/configs/toss_4_x86_64_ib/packages.yaml b/scripts/spack/configs/toss_4_x86_64_ib/packages.yaml index 7cdee2b2e..1fad303c6 100644 --- a/scripts/spack/configs/toss_4_x86_64_ib/packages.yaml +++ b/scripts/spack/configs/toss_4_x86_64_ib/packages.yaml @@ -4,6 +4,13 @@ packages: # us to run on broadwell as well target: [ivybridge] compiler: [gcc, clang] + providers: + awk: [gawk] + blas: [openblas, amdblis] + lapack: [netlib-lapack] + pil: [py-pillow] + pkgconfig: [pkg-config] + zlib-api: [zlib] cmake: version: [3.23.1] buildable: false From 5510a85574dc0a07b77322c5783be00e950c7250 Mon Sep 17 00:00:00 2001 From: Landon Owen Date: Mon, 6 May 2024 12:14:52 -0700 Subject: [PATCH 10/42] Removed blas and awk providers, added build_job 54 back in --- scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml | 2 -- scripts/spack/configs/config.yaml | 2 +- scripts/spack/configs/toss_4_x86_64_ib/packages.yaml | 2 -- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml b/scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml index 66643ff40..df281b2ac 100644 --- a/scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml +++ b/scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml @@ -3,8 +3,6 @@ packages: target: [ppc64le] compiler: [gcc, clang] providers: - awk: [gawk] - blas: [openblas, amdblis] lapack: [netlib-lapack] pil: [py-pillow] pkgconfig: [pkg-config] diff --git a/scripts/spack/configs/config.yaml b/scripts/spack/configs/config.yaml index 9d6b3e27b..9c3264b74 100644 --- a/scripts/spack/configs/config.yaml +++ b/scripts/spack/configs/config.yaml @@ -156,7 +156,7 @@ config: # - With `build_jobs: 16` and 4 cores available `spack install` will run `make -j4` # - With `build_jobs: 16` and 32 cores available `spack install` will run `make -j16` # - With `build_jobs: 2` and 4 cores available `spack install -j6` will run `make -j6` - # build_jobs: 16 + build_jobs: 54 # If set to true, Spack will use ccache to cache C compiles. diff --git a/scripts/spack/configs/toss_4_x86_64_ib/packages.yaml b/scripts/spack/configs/toss_4_x86_64_ib/packages.yaml index 1fad303c6..c20cad9e0 100644 --- a/scripts/spack/configs/toss_4_x86_64_ib/packages.yaml +++ b/scripts/spack/configs/toss_4_x86_64_ib/packages.yaml @@ -5,8 +5,6 @@ packages: target: [ivybridge] compiler: [gcc, clang] providers: - awk: [gawk] - blas: [openblas, amdblis] lapack: [netlib-lapack] pil: [py-pillow] pkgconfig: [pkg-config] From 4dd87f64d91fb01dc03834581b5c6a247158cc34 Mon Sep 17 00:00:00 2001 From: ldowen <54121008+ldowen@users.noreply.github.com> Date: Mon, 6 May 2024 12:15:08 -0700 Subject: [PATCH 11/42] Update scripts/devtools/tpl-manager.py Co-authored-by: Michael Davis --- scripts/devtools/tpl-manager.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/devtools/tpl-manager.py b/scripts/devtools/tpl-manager.py index fb998bf65..6955832e5 100755 --- a/scripts/devtools/tpl-manager.py +++ b/scripts/devtools/tpl-manager.py @@ -161,6 +161,7 @@ def build_deps(args): for s in spec_list: print("** SPEC : {0}".format(s)) spack_cmd=os.path.join(args.spheral_spack_dir, "spack/bin/spack") + # Optionally add a parallel job number for spack builds if args.spack_jobs: spack_cmd += " --jobs={0}".format(args.spack_jobs) From 50365368dbaf84697732b33abdee81102bfd69f2 Mon Sep 17 00:00:00 2001 From: ldowen <54121008+ldowen@users.noreply.github.com> Date: Mon, 6 May 2024 12:15:16 -0700 Subject: [PATCH 12/42] Update scripts/devtools/tpl-manager.py Co-authored-by: Michael Davis --- scripts/devtools/tpl-manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/devtools/tpl-manager.py b/scripts/devtools/tpl-manager.py index 6955832e5..b017faded 100755 --- a/scripts/devtools/tpl-manager.py +++ b/scripts/devtools/tpl-manager.py @@ -91,7 +91,7 @@ def parse_spec_list(file_path): #------------------------------ def build_spack(args): print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~") - print("~~~~~ Building and Configuring Spack") + print("~~~~~ Configuring Spack") print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~") print("") print("{0}".format(project_dir)) From 2149bc45773f2856fb17e77e071c83c0143d35d6 Mon Sep 17 00:00:00 2001 From: Landon Owen Date: Mon, 6 May 2024 12:25:34 -0700 Subject: [PATCH 13/42] Updated blueos package file, added qhull version number to spheral package recipe --- .../configs/blueos_3_ppc64le_ib/packages.yaml | 28 +++++++++++-------- scripts/spack/packages/spheral/package.py | 2 +- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml b/scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml index df281b2ac..8e138aa5b 100644 --- a/scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml +++ b/scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml @@ -31,9 +31,15 @@ packages: externals: - spec: perl@5.26.3 prefix: /usr - + cuda: - version: [11.1.0, 11.0.2, 10.1.243, 10.1.168, 9.2.148, 8.0] + version: + - 11.1.0 + - 11.0.2 + - 10.1.243 + - 10.1.168 + - 9.2.148 + - '8.0' buildable: false externals: - spec: cuda@11.1.0~allow-unsupported-compilers @@ -48,7 +54,7 @@ packages: prefix: /usr/tce/packages/cuda/cuda-9.2.148 - spec: cuda@8.0~allow-unsupported-compilers prefix: /usr/tce/packages/cuda/cuda-8.0 - + spectrum-mpi: externals: - spec: spectrum-mpi@10.3.1.03rtm0%pgi@19.10 @@ -153,15 +159,15 @@ packages: prefix: /usr buildable: false tcl: - externals: - - spec: tcl@8.5.19 - prefix: /usr - buildable: false + externals: + - spec: tcl@8.5.19 + prefix: /usr + buildable: false tk: - externals: - - spec: tk@8.5.19 - prefix: /usr - buildable: false + externals: + - spec: tk@8.5.19 + prefix: /usr + buildable: false fontconfig: externals: - spec: fontconfig@2.13.1 diff --git a/scripts/spack/packages/spheral/package.py b/scripts/spack/packages/spheral/package.py index 899b48700..f7393e1d9 100644 --- a/scripts/spack/packages/spheral/package.py +++ b/scripts/spack/packages/spheral/package.py @@ -40,7 +40,7 @@ class Spheral(CachedCMakePackage, CudaPackage): depends_on('zlib@1.3 +shared +pic', type='build') - depends_on('qhull +pic', type='build') + depends_on('qhull@2020.2 +pic', type='build') depends_on('m-aneos@1.0') depends_on('eigen@3.4.0', type='build') depends_on('hdf5@1.8.19 ~mpi +hl', type='build', when='~mpi') From 0a1e55129ad706551d2a83c583c4aaafd0d1445e Mon Sep 17 00:00:00 2001 From: Landon Owen Date: Mon, 6 May 2024 12:36:07 -0700 Subject: [PATCH 14/42] Removed cuda versions 8 and 9 from blueos package file --- scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml b/scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml index 8e138aa5b..afbeb6b0e 100644 --- a/scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml +++ b/scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml @@ -38,8 +38,6 @@ packages: - 11.0.2 - 10.1.243 - 10.1.168 - - 9.2.148 - - '8.0' buildable: false externals: - spec: cuda@11.1.0~allow-unsupported-compilers @@ -50,10 +48,6 @@ packages: prefix: /usr/tce/packages/cuda/cuda-10.1.243 - spec: cuda@10.1.168+allow-unsupported-compilers prefix: /usr/tce/packages/cuda/cuda-10.1.168 - - spec: cuda@9.2.148~allow-unsupported-compilers - prefix: /usr/tce/packages/cuda/cuda-9.2.148 - - spec: cuda@8.0~allow-unsupported-compilers - prefix: /usr/tce/packages/cuda/cuda-8.0 spectrum-mpi: externals: From 78de9f337d12486c3c0508f47ce7b5ab89ea60b9 Mon Sep 17 00:00:00 2001 From: Landon Owen Date: Mon, 6 May 2024 14:13:23 -0700 Subject: [PATCH 15/42] Added netlib-lapack as blas provider --- scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml | 1 + scripts/spack/configs/toss_4_x86_64_ib/packages.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml b/scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml index afbeb6b0e..a22ed5d8c 100644 --- a/scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml +++ b/scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml @@ -3,6 +3,7 @@ packages: target: [ppc64le] compiler: [gcc, clang] providers: + blas: [netlib-lapack] lapack: [netlib-lapack] pil: [py-pillow] pkgconfig: [pkg-config] diff --git a/scripts/spack/configs/toss_4_x86_64_ib/packages.yaml b/scripts/spack/configs/toss_4_x86_64_ib/packages.yaml index c20cad9e0..95cb2e062 100644 --- a/scripts/spack/configs/toss_4_x86_64_ib/packages.yaml +++ b/scripts/spack/configs/toss_4_x86_64_ib/packages.yaml @@ -5,6 +5,7 @@ packages: target: [ivybridge] compiler: [gcc, clang] providers: + blas: [netlib-lapack] lapack: [netlib-lapack] pil: [py-pillow] pkgconfig: [pkg-config] From 108376ebf1523929663bf3de8355fc606956d6c7 Mon Sep 17 00:00:00 2001 From: Landon Owen Date: Tue, 7 May 2024 09:17:18 -0700 Subject: [PATCH 16/42] Removed py-pillow provider --- scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml | 1 - scripts/spack/configs/toss_4_x86_64_ib/packages.yaml | 1 - 2 files changed, 2 deletions(-) diff --git a/scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml b/scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml index a22ed5d8c..f5fa75aaa 100644 --- a/scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml +++ b/scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml @@ -5,7 +5,6 @@ packages: providers: blas: [netlib-lapack] lapack: [netlib-lapack] - pil: [py-pillow] pkgconfig: [pkg-config] zlib-api: [zlib] cmake: diff --git a/scripts/spack/configs/toss_4_x86_64_ib/packages.yaml b/scripts/spack/configs/toss_4_x86_64_ib/packages.yaml index 95cb2e062..542c20fc4 100644 --- a/scripts/spack/configs/toss_4_x86_64_ib/packages.yaml +++ b/scripts/spack/configs/toss_4_x86_64_ib/packages.yaml @@ -7,7 +7,6 @@ packages: providers: blas: [netlib-lapack] lapack: [netlib-lapack] - pil: [py-pillow] pkgconfig: [pkg-config] zlib-api: [zlib] cmake: From 128baf94f2ff57e00c49e9fc42d1122de8521438 Mon Sep 17 00:00:00 2001 From: Landon Owen Date: Tue, 7 May 2024 10:31:06 -0700 Subject: [PATCH 17/42] Bring blas and pil providers back, add py-pillow back as a dependency of spheral --- scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml | 1 + scripts/spack/configs/toss_4_x86_64_ib/packages.yaml | 1 + scripts/spack/packages/spheral/package.py | 1 + 3 files changed, 3 insertions(+) diff --git a/scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml b/scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml index f5fa75aaa..2e995258c 100644 --- a/scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml +++ b/scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml @@ -6,6 +6,7 @@ packages: blas: [netlib-lapack] lapack: [netlib-lapack] pkgconfig: [pkg-config] + pil: [py-pillow] zlib-api: [zlib] cmake: version: [3.20.2] diff --git a/scripts/spack/configs/toss_4_x86_64_ib/packages.yaml b/scripts/spack/configs/toss_4_x86_64_ib/packages.yaml index 542c20fc4..95cb2e062 100644 --- a/scripts/spack/configs/toss_4_x86_64_ib/packages.yaml +++ b/scripts/spack/configs/toss_4_x86_64_ib/packages.yaml @@ -7,6 +7,7 @@ packages: providers: blas: [netlib-lapack] lapack: [netlib-lapack] + pil: [py-pillow] pkgconfig: [pkg-config] zlib-api: [zlib] cmake: diff --git a/scripts/spack/packages/spheral/package.py b/scripts/spack/packages/spheral/package.py index f7393e1d9..f014b85a7 100644 --- a/scripts/spack/packages/spheral/package.py +++ b/scripts/spack/packages/spheral/package.py @@ -66,6 +66,7 @@ class Spheral(CachedCMakePackage, CudaPackage): depends_on('py-numpy@1.23.4', type='build') depends_on('py-numpy-stl', type='build') + depends_on('py-pillow', type='build') depends_on('py-matplotlib backend=tkagg +fonts', type='build') depends_on('py-h5py', type='build') depends_on('py-docutils', type='build') From 123af2d1207c91ec832e1946bc9d38a841430f9e Mon Sep 17 00:00:00 2001 From: Landon Owen Date: Tue, 7 May 2024 15:13:09 -0700 Subject: [PATCH 18/42] Set externals and providers to match axom --- .../spack/configs/blueos_3_ppc64le_ib/packages.yaml | 9 +++++++++ scripts/spack/configs/toss_4_x86_64_ib/packages.yaml | 11 ++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml b/scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml index 2e995258c..76e7bd877 100644 --- a/scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml +++ b/scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml @@ -7,6 +7,7 @@ packages: lapack: [netlib-lapack] pkgconfig: [pkg-config] pil: [py-pillow] + mpi: [spectrum-mpi] zlib-api: [zlib] cmake: version: [3.20.2] @@ -83,6 +84,14 @@ packages: - spec: readline@7.0 prefix: /collab/usr/gapps/python/build/spack-coralea.3/opt/spack/linux-rhel7-ppc64le/gcc-4.9.3/readline-7.0-owal6z2zh5zotgvdmwow6sgdn6cqfn43 buildable: false + netlib-lapack: + buildable: false + externals: + # These have trailing underscores in their symbols + - spec: netlib-lapack@3.9.0%gcc@8.3.1.1 + prefix: /usr/tcetmp/packages/lapack/lapack-3.9.0-P9-gcc-7.3.1/ + - spec: netlib-lapack@3.9.0%gcc@8.3.1.2 + prefix: /usr/tcetmp/packages/lapack/lapack-3.9.0-P9-gcc-7.3.1/ autoconf: externals: - spec: autoconf@2.69 diff --git a/scripts/spack/configs/toss_4_x86_64_ib/packages.yaml b/scripts/spack/configs/toss_4_x86_64_ib/packages.yaml index 95cb2e062..99abcbaf4 100644 --- a/scripts/spack/configs/toss_4_x86_64_ib/packages.yaml +++ b/scripts/spack/configs/toss_4_x86_64_ib/packages.yaml @@ -5,8 +5,9 @@ packages: target: [ivybridge] compiler: [gcc, clang] providers: - blas: [netlib-lapack] + blas: [openblas] lapack: [netlib-lapack] + mpi: [mvapich2] pil: [py-pillow] pkgconfig: [pkg-config] zlib-api: [zlib] @@ -40,6 +41,9 @@ packages: - spec: mvapich2@2.3.6%gcc@10.3.1~cuda~debug~regcache~wrapperrpath ch3_rank_bits=32 file_systems=lustre,nfs,ufs process_managers=slurm prefix: /usr/tce/packages/mvapich2/mvapich2-2.3.6-gcc-10.3.1 + - spec: mvapich2@2.3.6%clang@14.0.6~alloca~cuda~debug+regcache+wrapperrpath ch3_rank_bits=32 + fabrics=mrail file_systems=auto process_managers=slurm + prefix: /usr/tce/packages/mvapich2/mvapich2-2.3.6-clang-14.0.6 buildable: false # ------ SYSTEM LIBS ------- @@ -152,3 +156,8 @@ packages: externals: - spec: netlib-lapack@3.9.0 prefix: /usr + openblas: + buildable: false + externals: + - prefix: /usr + spec: openblas@0.3.15 From f7406a38244fcafcec70d81fa1f8857921d0c235 Mon Sep 17 00:00:00 2001 From: Landon Owen Date: Tue, 7 May 2024 15:36:55 -0700 Subject: [PATCH 19/42] Removed second lapack external on blueOS --- scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml b/scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml index 76e7bd877..1b75af7c1 100644 --- a/scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml +++ b/scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml @@ -87,10 +87,7 @@ packages: netlib-lapack: buildable: false externals: - # These have trailing underscores in their symbols - - spec: netlib-lapack@3.9.0%gcc@8.3.1.1 - prefix: /usr/tcetmp/packages/lapack/lapack-3.9.0-P9-gcc-7.3.1/ - - spec: netlib-lapack@3.9.0%gcc@8.3.1.2 + - spec: netlib-lapack@3.9.0%gcc@8.3.1 prefix: /usr/tcetmp/packages/lapack/lapack-3.9.0-P9-gcc-7.3.1/ autoconf: externals: From d681edd5b63c7e70784e08af2c962f28d623aa9e Mon Sep 17 00:00:00 2001 From: Landon Owen Date: Tue, 7 May 2024 16:05:33 -0700 Subject: [PATCH 20/42] Add externals to ubuntu 20 package file --- .../spack/configs/ubuntu20.04/packages.yaml | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/scripts/spack/configs/ubuntu20.04/packages.yaml b/scripts/spack/configs/ubuntu20.04/packages.yaml index c3b86ba4a..e6a035acf 100644 --- a/scripts/spack/configs/ubuntu20.04/packages.yaml +++ b/scripts/spack/configs/ubuntu20.04/packages.yaml @@ -4,13 +4,27 @@ packages: - spec: mpich@3.3.2 prefix: /usr buildable: false - + all: + providers: + mpi: [mpich] + blas: [openblas] + lapack: [openblas] # ------ SYSTEM LIBS ------- ncurses: externals: - spec: ncurses@6.2 prefix: /usr buildable: false + perl: + buildable: false + externals: + - spec: perl@5.30.0 + prefix: /usr + cmake: + buildable: false + externals: + - spec: cmake@3.20.4 + prefix: /usr readline: externals: - spec: readline@8.0 @@ -101,6 +115,11 @@ packages: - spec: fontconfig@2.13.1 prefix: /usr buildable: false + openblas: + buildable: false + externals: + - spec: openblas@0.3.8 + prefix: /usr/lib/x86_64-linux-gnu/ # netlib-lapack: # externals: # - spec: netlib-lapack@3.9.0 From 5a0ff0a5607a4455becdd86d8a168b1ad85ec670 Mon Sep 17 00:00:00 2001 From: Landon Owen Date: Wed, 8 May 2024 11:10:13 -0700 Subject: [PATCH 21/42] Test where only zlib provider for toss --- scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml | 2 -- scripts/spack/configs/toss_4_x86_64_ib/packages.yaml | 5 ----- 2 files changed, 7 deletions(-) diff --git a/scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml b/scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml index 1b75af7c1..3d101d659 100644 --- a/scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml +++ b/scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml @@ -5,8 +5,6 @@ packages: providers: blas: [netlib-lapack] lapack: [netlib-lapack] - pkgconfig: [pkg-config] - pil: [py-pillow] mpi: [spectrum-mpi] zlib-api: [zlib] cmake: diff --git a/scripts/spack/configs/toss_4_x86_64_ib/packages.yaml b/scripts/spack/configs/toss_4_x86_64_ib/packages.yaml index 99abcbaf4..366507f6b 100644 --- a/scripts/spack/configs/toss_4_x86_64_ib/packages.yaml +++ b/scripts/spack/configs/toss_4_x86_64_ib/packages.yaml @@ -5,11 +5,6 @@ packages: target: [ivybridge] compiler: [gcc, clang] providers: - blas: [openblas] - lapack: [netlib-lapack] - mpi: [mvapich2] - pil: [py-pillow] - pkgconfig: [pkg-config] zlib-api: [zlib] cmake: version: [3.23.1] From d71c5f7ac745c7495d0d653ee40f7b18f6482a9a Mon Sep 17 00:00:00 2001 From: Landon Owen Date: Wed, 8 May 2024 12:46:59 -0700 Subject: [PATCH 22/42] Added providers back in since that did not fix the issue --- scripts/spack/configs/toss_4_x86_64_ib/packages.yaml | 5 +++++ scripts/spack/configs/ubuntu20.04/packages.yaml | 1 + 2 files changed, 6 insertions(+) diff --git a/scripts/spack/configs/toss_4_x86_64_ib/packages.yaml b/scripts/spack/configs/toss_4_x86_64_ib/packages.yaml index 366507f6b..d843aae97 100644 --- a/scripts/spack/configs/toss_4_x86_64_ib/packages.yaml +++ b/scripts/spack/configs/toss_4_x86_64_ib/packages.yaml @@ -5,6 +5,11 @@ packages: target: [ivybridge] compiler: [gcc, clang] providers: + blas: [openblas] + lapack: [netlib-lapack] + mpi: [mvapich2] + pkgconfig: [pkg-config] + pil: [py-pillow] zlib-api: [zlib] cmake: version: [3.23.1] diff --git a/scripts/spack/configs/ubuntu20.04/packages.yaml b/scripts/spack/configs/ubuntu20.04/packages.yaml index e6a035acf..0a90c0012 100644 --- a/scripts/spack/configs/ubuntu20.04/packages.yaml +++ b/scripts/spack/configs/ubuntu20.04/packages.yaml @@ -5,6 +5,7 @@ packages: prefix: /usr buildable: false all: + variants: +pic providers: mpi: [mpich] blas: [openblas] From 4692ddfed6b69de0295b12da865f76109040f77e Mon Sep 17 00:00:00 2001 From: Landon Owen Date: Thu, 9 May 2024 13:46:48 -0700 Subject: [PATCH 23/42] Testing what happens when numpy version number is removed --- scripts/spack/packages/caliper/package.py | 162 +++++++++++++--------- scripts/spack/packages/spheral/package.py | 2 +- 2 files changed, 99 insertions(+), 65 deletions(-) diff --git a/scripts/spack/packages/caliper/package.py b/scripts/spack/packages/caliper/package.py index 6a23f71d1..48aa10dd3 100644 --- a/scripts/spack/packages/caliper/package.py +++ b/scripts/spack/packages/caliper/package.py @@ -1,4 +1,4 @@ -# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other +# Copyright 2013-2024 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) @@ -6,8 +6,6 @@ import os import sys -from llnl.util import tty - from spack.package import * @@ -20,32 +18,68 @@ class Caliper(CMakePackage, CudaPackage, ROCmPackage): homepage = "https://github.com/LLNL/Caliper" git = "https://github.com/LLNL/Caliper.git" - url = "https://github.com/LLNL/Caliper/archive/v2.8.0.tar.gz" + url = "https://github.com/LLNL/Caliper/archive/v2.11.0.tar.gz" tags = ["e4s", "radiuss"] - maintainers = ["daboehme"] + maintainers("daboehme") test_requires_compiler = True + license("BSD-3-Clause") + version("master", branch="master") + version("2.11.0", sha256="b86b733cbb73495d5f3fe06e6a9885ec77365c8aa9195e7654581180adc2217c") + version("2.10.0", sha256="14c4fb5edd5e67808d581523b4f8f05ace8549698c0e90d84b53171a77f58565") + version("2.9.1", sha256="4771d630de505eff9227e0ec498d0da33ae6f9c34df23cb201b56181b8759e9e") + version("2.9.0", sha256="507ea74be64a2dfd111b292c24c4f55f459257528ba51a5242313fa50978371f") version("2.8.0", sha256="17807b364b5ac4b05997ead41bd173e773f9a26ff573ff2fe61e0e70eab496e4") - version("2.7.0", sha256="b3bf290ec2692284c6b4f54cc0c507b5700c536571d3e1a66e56626618024b2b") - version("2.6.0", sha256="6efcd3e4845cc9a6169e0d934840766b12182c6d09aa3ceca4ae776e23b6360f") - version("2.5.0", sha256="d553e60697d61c53de369b9ca464eb30710bda90fba9671201543b64eeac943c") - version("2.4.0", tag="v2.4.0") - version("2.3.0", tag="v2.3.0") - version("2.2.0", tag="v2.2.0") - version("2.1.1", tag="v2.1.1") - version("2.0.1", tag="v2.0.1") - version("1.9.1", tag="v1.9.1") - version("1.9.0", tag="v1.9.0") - version("1.8.0", tag="v1.8.0") - version("1.7.0", tag="v1.7.0") + version( + "2.7.0", + sha256="b3bf290ec2692284c6b4f54cc0c507b5700c536571d3e1a66e56626618024b2b", + deprecated=True, + ) + version( + "2.6.0", + sha256="6efcd3e4845cc9a6169e0d934840766b12182c6d09aa3ceca4ae776e23b6360f", + deprecated=True, + ) + version( + "2.5.0", + sha256="d553e60697d61c53de369b9ca464eb30710bda90fba9671201543b64eeac943c", + deprecated=True, + ) + version( + "2.4.0", tag="v2.4.0", commit="30577b4b8beae104b2b35ed487fec52590a99b3d", deprecated=True + ) + version( + "2.3.0", tag="v2.3.0", commit="9fd89bb0120750d1f9dfe37bd963e24e478a2a20", deprecated=True + ) + version( + "2.2.0", tag="v2.2.0", commit="c408e9b3642c7aa80eff37b0826d819c57e7bc04", deprecated=True + ) + version( + "2.1.1", tag="v2.1.1", commit="0593b0e01c1d8d3e50c990399cc0fee403485599", deprecated=True + ) + version( + "2.0.1", tag="v2.0.1", commit="4d7ff46381c53a461e62edd949e2d9dea9db7b08", deprecated=True + ) + version( + "1.9.1", tag="v1.9.1", commit="cfc1defbbee20b50dd3e3477badd09a92b1df970", deprecated=True + ) + version( + "1.9.0", tag="v1.9.0", commit="8356e747349b285aa621c5b74e71559f0babc4a1", deprecated=True + ) + version( + "1.8.0", tag="v1.8.0", commit="117c1ef596b617dc71407b8b67eebef094a654f8", deprecated=True + ) + version( + "1.7.0", tag="v1.7.0", commit="898277c93d884d4e7ca1ffcf3bbea81d22364f26", deprecated=True + ) is_linux = sys.platform.startswith("linux") variant("shared", default=True, description="Build shared libraries") variant("adiak", default=True, description="Enable Adiak support") - variant("mpi", default=True, description="Enable MPI wrappers") + variant("mpi", default=True, description="Enable MPI support") # libunwind has some issues on Mac variant( "libunwind", default=sys.platform != "darwin", description="Enable stack unwind support" @@ -59,18 +93,23 @@ class Caliper(CMakePackage, CudaPackage, ROCmPackage): variant("sampler", default=is_linux, description="Enable sampling support on Linux") variant("sosflow", default=False, description="Enable SOSflow support") variant("fortran", default=False, description="Enable Fortran support") - variant("pic", default=True, description="Produce position-independent code (for shared libs)") + variant("variorum", default=False, description="Enable Variorum support") + variant("kokkos", default=True, when="@2.3.0:", description="Enable Kokkos profiling support") + variant("tests", default=False, description="Enable tests") + variant("pic", default=True, description="Turn on -fPIC") - depends_on("adiak@0.1:0", when="@2.2: +adiak") + depends_on("adiak@0.1:0", when="@2.2:2.10 +adiak") + depends_on("adiak@0.4:0", when="@2.11: +adiak") depends_on("papi@5.3:5", when="@:2.2 +papi") - depends_on("papi@5.3:6", when="@2.3: +papi") + depends_on("papi@5.3:", when="@2.3: +papi") depends_on("libpfm4@4.8:4", when="+libpfm") depends_on("mpi", when="+mpi") depends_on("unwind@1.2:1", when="+libunwind") depends_on("elfutils", when="+libdw") + depends_on("variorum", when="+variorum") depends_on("sosflow@spack", when="@1.0:1+sosflow") @@ -78,24 +117,27 @@ class Caliper(CMakePackage, CudaPackage, ROCmPackage): depends_on("python", type="build") # sosflow support not yet in 2.0 - conflicts("+sosflow", "@2.0.0:2.8") + conflicts("+sosflow", "@2.0.0:2.11") conflicts("+adiak", "@:2.1") conflicts("+libdw", "@:2.4") conflicts("+rocm", "@:2.7") conflicts("+rocm+cuda") patch("for_aarch64.patch", when="target=aarch64:") + patch( + "sampler-service-missing-libunwind-include-dir.patch", + when="@2.9.0:2.9.1 +libunwind +sampler", + ) def setup_build_environment(self, env): if '+pic' in self.spec: env.append_flags('CFLAGS', self.compiler.cc_pic_flag) env.append_flags('CXXFLAGS', self.compiler.cxx_pic_flag) - + def cmake_args(self): spec = self.spec args = [ - ("-DPYTHON_EXECUTABLE=%s" % spec["python"].command.path), "-DBUILD_TESTING=Off", "-DBUILD_DOCS=Off", self.define_from_variant("BUILD_SHARED_LIBS", "shared"), @@ -112,7 +154,9 @@ def cmake_args(self): self.define_from_variant("WITH_NVTX", "cuda"), self.define_from_variant("WITH_ROCTRACER", "rocm"), self.define_from_variant("WITH_ROCTX", "rocm"), - self.define_from_variant("WITH_PIC", "pic"), + self.define_from_variant("WITH_VARIORUM", "variorum"), + self.define_from_variant("WITH_KOKKOS", "kokkos"), + self.define_from_variant("WITH_PIC", "pic") ] if "+papi" in spec: @@ -123,6 +167,8 @@ def cmake_args(self): args.append("-DLIBPFM_INSTALL=%s" % spec["libpfm4"].prefix) if "+sosflow" in spec: args.append("-DSOS_PREFIX=%s" % spec["sosflow"].prefix) + if "+variorum" in spec: + args.append("-DVARIORUM_PREFIX=%s" % spec["variorum"].prefix) # -DWITH_CALLPATH was renamed -DWITH_LIBUNWIND in 2.5 callpath_flag = "LIBUNWIND" if spec.satisfies("@2.5:") else "CALLPATH" @@ -143,6 +189,7 @@ def cmake_args(self): args.append("-DCUPTI_PREFIX=%s" % spec["cuda"].prefix) if "+rocm" in spec: + args.append("-DCMAKE_CXX_COMPILER={0}".format(spec["hip"].hipcc)) args.append("-DROCM_PREFIX=%s" % spec["hsa-rocr-dev"].prefix) if "+pic" in spec: @@ -156,44 +203,31 @@ def cache_test_sources(self): install test subdirectory for use during `spack test run`.""" self.cache_extra_test_sources([join_path("examples", "apps")]) - def run_cxx_example_test(self): - """Run stand alone test: cxx_example""" + def test_cxx_example(self): + """build and run cxx-example""" - test_dir = self.test_suite.current_test_cache_dir.examples.apps exe = "cxx-example" - source_file = "cxx-example.cpp" - - if not os.path.isfile(join_path(test_dir, source_file)): - tty.warn("Skipping caliper test:" "{0} does not exist".format(source_file)) - return - - if os.path.exists(self.prefix.lib): - lib_dir = self.prefix.lib - else: - lib_dir = self.prefix.lib64 - - options = [ - "-L{0}".format(lib_dir), - "-I{0}".format(self.prefix.include), - "{0}".format(join_path(test_dir, source_file)), - "-o", - exe, - "-std=c++11", - "-lcaliper", - "-lstdc++", - ] - - if not self.run_test( - exe=os.environ["CXX"], - options=options, - purpose="test: compile {0} example".format(exe), - work_dir=test_dir, - ): - tty.warn("Skipping caliper test: failed to compile example") - return - - if not self.run_test(exe, purpose="test: run {0} example".format(exe), work_dir=test_dir): - tty.warn("Skipping caliper test: failed to run example") - - def test(self): - self.run_cxx_example_test() + source_file = "{0}.cpp".format(exe) + + source_path = find_required_file( + self.test_suite.current_test_cache_dir, source_file, expected=1, recursive=True + ) + + lib_dir = self.prefix.lib if os.path.exists(self.prefix.lib) else self.prefix.lib64 + + cxx = which(os.environ["CXX"]) + test_dir = os.path.dirname(source_path) + with working_dir(test_dir): + cxx( + "-L{0}".format(lib_dir), + "-I{0}".format(self.prefix.include), + source_path, + "-o", + exe, + "-std=c++11", + "-lcaliper", + "-lstdc++", + ) + + cxx_example = which(exe) + cxx_example() diff --git a/scripts/spack/packages/spheral/package.py b/scripts/spack/packages/spheral/package.py index f014b85a7..6152fbd35 100644 --- a/scripts/spack/packages/spheral/package.py +++ b/scripts/spack/packages/spheral/package.py @@ -64,7 +64,7 @@ class Spheral(CachedCMakePackage, CudaPackage): extends('python@3.9.10 +zlib +shared +ssl +tkinter', type='build') - depends_on('py-numpy@1.23.4', type='build') + depends_on('py-numpy', type='build') depends_on('py-numpy-stl', type='build') depends_on('py-pillow', type='build') depends_on('py-matplotlib backend=tkagg +fonts', type='build') From 8200720f16aaadac944701520e2b712dab093053 Mon Sep 17 00:00:00 2001 From: Landon Owen Date: Thu, 9 May 2024 14:54:27 -0700 Subject: [PATCH 24/42] Brought numpy version back, removed python module load from gitlab script to stop scipy from using the wrong pkg-config on the CZ --- .gitlab/scripts.yml | 1 - scripts/spack/packages/spheral/package.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitlab/scripts.yml b/.gitlab/scripts.yml index 069bfaf6a..4b3612395 100644 --- a/.gitlab/scripts.yml +++ b/.gitlab/scripts.yml @@ -12,7 +12,6 @@ - cd $CI_BUILD_DIR - echo $SPEC - - ml load python/3 - $BUILD_ALLOC ./$SCRIPT_DIR/gitlab/build_and_install.py --spec="$SPEC" --extra-cmake-args="$EXTRA_CMAKE_ARGS" .build_and_test: diff --git a/scripts/spack/packages/spheral/package.py b/scripts/spack/packages/spheral/package.py index 6152fbd35..f014b85a7 100644 --- a/scripts/spack/packages/spheral/package.py +++ b/scripts/spack/packages/spheral/package.py @@ -64,7 +64,7 @@ class Spheral(CachedCMakePackage, CudaPackage): extends('python@3.9.10 +zlib +shared +ssl +tkinter', type='build') - depends_on('py-numpy', type='build') + depends_on('py-numpy@1.23.4', type='build') depends_on('py-numpy-stl', type='build') depends_on('py-pillow', type='build') depends_on('py-matplotlib backend=tkagg +fonts', type='build') From 2305448209b364f11d4e9461acfefc5098661b4c Mon Sep 17 00:00:00 2001 From: Landon Owen Date: Fri, 10 May 2024 09:33:44 -0700 Subject: [PATCH 25/42] Provide path to dev_path option in tplmanager --- scripts/devtools/tpl-manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/devtools/tpl-manager.py b/scripts/devtools/tpl-manager.py index b017faded..3a1924d08 100755 --- a/scripts/devtools/tpl-manager.py +++ b/scripts/devtools/tpl-manager.py @@ -184,7 +184,7 @@ def build_deps(args): sexe("{0} spec --fresh -IL {1}@develop%{2} 2>&1 | tee -a \"spec-info-{2}-out.txt\"".format(spack_cmd, package_name, s)) # Install only the dependencies for Spheral and create CMake configure file - sexe("{0} install --fail-fast --fresh -u initconfig {1}@develop%{2} dev_path=./ 2>&1 | tee -a \"tpl-build-{2}-out.txt\"".format(spack_cmd, package_name, s)) + sexe("{0} install --fail-fast --fresh -u initconfig {1}@develop%{2} dev_path={3} 2>&1 | tee -a \"tpl-build-{2}-out.txt\"".format(spack_cmd, package_name, s, project_dir)) if not args.no_clean: sexe("rm -f spec-info-* tpl-build-* spack-build-* spack-configure-args.txt") From b7cce6575454bcc0335771738a7fb1246c53e80b Mon Sep 17 00:00:00 2001 From: Landon Owen Date: Mon, 13 May 2024 11:54:56 -0700 Subject: [PATCH 26/42] No longer using external netlib-lapack on blueos --- scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml b/scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml index 3d101d659..60ab23b00 100644 --- a/scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml +++ b/scripts/spack/configs/blueos_3_ppc64le_ib/packages.yaml @@ -82,11 +82,6 @@ packages: - spec: readline@7.0 prefix: /collab/usr/gapps/python/build/spack-coralea.3/opt/spack/linux-rhel7-ppc64le/gcc-4.9.3/readline-7.0-owal6z2zh5zotgvdmwow6sgdn6cqfn43 buildable: false - netlib-lapack: - buildable: false - externals: - - spec: netlib-lapack@3.9.0%gcc@8.3.1 - prefix: /usr/tcetmp/packages/lapack/lapack-3.9.0-P9-gcc-7.3.1/ autoconf: externals: - spec: autoconf@2.69 From 58387e72093ab2235b5b2836e1b917783a41a898 Mon Sep 17 00:00:00 2001 From: Landon Owen Date: Tue, 14 May 2024 11:15:42 -0700 Subject: [PATCH 27/42] Update to the 0.22.0 Spack release hash --- .uberenv_config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.uberenv_config.json b/.uberenv_config.json index ec603c94e..96cc40f8d 100644 --- a/.uberenv_config.json +++ b/.uberenv_config.json @@ -3,7 +3,7 @@ "package_version" : "develop", "package_source_dir" : "../../..", "spack_url" : "https://github.com/spack/spack", - "spack_commit" : "e2088b599e69f3a863b65e06c534ccb611a119f0", + "spack_commit" : "5fe93fee1eec46a0750bd340198bffcb92ff9eec", "spack_configs_path" : "scripts/spack/configs", "spack_packages_path" : "scripts/spack/packages" } From 1aafe5dd7fc5260a29b789970cfb427a365333e5 Mon Sep 17 00:00:00 2001 From: Landon Owen Date: Tue, 14 May 2024 13:26:58 -0700 Subject: [PATCH 28/42] Removed openblas and switched back to netlib-lapack for the ubuntu package configurations --- .../spack/configs/ubuntu20.04/packages.yaml | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/scripts/spack/configs/ubuntu20.04/packages.yaml b/scripts/spack/configs/ubuntu20.04/packages.yaml index 0a90c0012..77bcb9c6c 100644 --- a/scripts/spack/configs/ubuntu20.04/packages.yaml +++ b/scripts/spack/configs/ubuntu20.04/packages.yaml @@ -8,8 +8,8 @@ packages: variants: +pic providers: mpi: [mpich] - blas: [openblas] - lapack: [openblas] + blas: [netlib-lapack] + lapack: [netlib-lapack] # ------ SYSTEM LIBS ------- ncurses: externals: @@ -116,18 +116,8 @@ packages: - spec: fontconfig@2.13.1 prefix: /usr buildable: false - openblas: - buildable: false - externals: - - spec: openblas@0.3.8 - prefix: /usr/lib/x86_64-linux-gnu/ - # netlib-lapack: - # externals: - # - spec: netlib-lapack@3.9.0 - # prefix: /usr - # buildable: false - liblapack64-dev: + netlib-lapack: externals: - - spec: liblapack64-dev@3.9.0 + - spec: netlib-lapack@3.9.0 prefix: /usr buildable: false From 250a0350d0a4f99c191bb5d68a526045427f52ba Mon Sep 17 00:00:00 2001 From: Landon Owen Date: Tue, 14 May 2024 15:17:05 -0700 Subject: [PATCH 29/42] Removed external netlib-lapack from ubuntu package config file --- Dockerfile | 2 +- scripts/spack/configs/ubuntu20.04/packages.yaml | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index ed9b467ea..41a840fac 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,7 +31,7 @@ ARG HOST_CONFIG=docker-$SPEC ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update -y RUN apt-get upgrade -y -RUN apt-get install -y build-essential git gfortran mpich autotools-dev autoconf sqlite pkg-config uuid gettext cmake libncurses-dev libgdbm-dev libffi-dev libssl-dev libexpat-dev libreadline-dev liblapack-dev libbz2-dev locales python python3 unzip libtool wget curl tk-dev +RUN apt-get install -y build-essential git gfortran mpich autotools-dev autoconf sqlite pkg-config uuid gettext cmake libncurses-dev libgdbm-dev libffi-dev libssl-dev libexpat-dev libreadline-dev libbz2-dev locales python python3 unzip libtool wget curl tk-dev # Setup system locale for pip package encoding/decoding RUN locale-gen en_US.UTF-8 diff --git a/scripts/spack/configs/ubuntu20.04/packages.yaml b/scripts/spack/configs/ubuntu20.04/packages.yaml index 77bcb9c6c..2795af05b 100644 --- a/scripts/spack/configs/ubuntu20.04/packages.yaml +++ b/scripts/spack/configs/ubuntu20.04/packages.yaml @@ -10,6 +10,8 @@ packages: mpi: [mpich] blas: [netlib-lapack] lapack: [netlib-lapack] + pkgconfig: [pkg-config] + pkgconf: [pkg-config] # ------ SYSTEM LIBS ------- ncurses: externals: @@ -116,8 +118,3 @@ packages: - spec: fontconfig@2.13.1 prefix: /usr buildable: false - netlib-lapack: - externals: - - spec: netlib-lapack@3.9.0 - prefix: /usr - buildable: false From d4e3bc189f32824e327c88ebe4558fdf7cef3299 Mon Sep 17 00:00:00 2001 From: Landon Owen Date: Tue, 14 May 2024 16:25:58 -0700 Subject: [PATCH 30/42] Removed external cmake for ubuntu build for now --- scripts/spack/configs/ubuntu20.04/packages.yaml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/scripts/spack/configs/ubuntu20.04/packages.yaml b/scripts/spack/configs/ubuntu20.04/packages.yaml index 2795af05b..5f684c36f 100644 --- a/scripts/spack/configs/ubuntu20.04/packages.yaml +++ b/scripts/spack/configs/ubuntu20.04/packages.yaml @@ -13,6 +13,7 @@ packages: pkgconfig: [pkg-config] pkgconf: [pkg-config] # ------ SYSTEM LIBS ------- +# FIXME: Currently allowing spack to build cmake and git ncurses: externals: - spec: ncurses@6.2 @@ -23,11 +24,6 @@ packages: externals: - spec: perl@5.30.0 prefix: /usr - cmake: - buildable: false - externals: - - spec: cmake@3.20.4 - prefix: /usr readline: externals: - spec: readline@8.0 From 119143e2a159564b2565441a75912bff7a991677 Mon Sep 17 00:00:00 2001 From: Landon Owen Date: Wed, 15 May 2024 13:43:53 -0700 Subject: [PATCH 31/42] Put spack install spec in tpl-manager in quotes --- scripts/devtools/tpl-manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/devtools/tpl-manager.py b/scripts/devtools/tpl-manager.py index 3a1924d08..e092741d6 100755 --- a/scripts/devtools/tpl-manager.py +++ b/scripts/devtools/tpl-manager.py @@ -184,7 +184,7 @@ def build_deps(args): sexe("{0} spec --fresh -IL {1}@develop%{2} 2>&1 | tee -a \"spec-info-{2}-out.txt\"".format(spack_cmd, package_name, s)) # Install only the dependencies for Spheral and create CMake configure file - sexe("{0} install --fail-fast --fresh -u initconfig {1}@develop%{2} dev_path={3} 2>&1 | tee -a \"tpl-build-{2}-out.txt\"".format(spack_cmd, package_name, s, project_dir)) + sexe("{0} install --fail-fast --fresh -u initconfig '{1}@develop%{2} dev_path=./' 2>&1 | tee -a \"tpl-build-{2}-out.txt\"".format(spack_cmd, package_name, s)) if not args.no_clean: sexe("rm -f spec-info-* tpl-build-* spack-build-* spack-configure-args.txt") From bdd8472cb36ee1e4d1d359e5eb32d632cc23e742 Mon Sep 17 00:00:00 2001 From: Landon Owen Date: Wed, 15 May 2024 15:47:05 -0700 Subject: [PATCH 32/42] Brought py-ats recipe back to avoid having to bring in py-poetry, trying double quotes around spec --- scripts/devtools/tpl-manager.py | 2 +- scripts/spack/packages/py-ats/package.py | 30 +++++++++++++++++++++++ scripts/spack/packages/spheral/package.py | 4 +-- 3 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 scripts/spack/packages/py-ats/package.py diff --git a/scripts/devtools/tpl-manager.py b/scripts/devtools/tpl-manager.py index e092741d6..699852eb8 100755 --- a/scripts/devtools/tpl-manager.py +++ b/scripts/devtools/tpl-manager.py @@ -184,7 +184,7 @@ def build_deps(args): sexe("{0} spec --fresh -IL {1}@develop%{2} 2>&1 | tee -a \"spec-info-{2}-out.txt\"".format(spack_cmd, package_name, s)) # Install only the dependencies for Spheral and create CMake configure file - sexe("{0} install --fail-fast --fresh -u initconfig '{1}@develop%{2} dev_path=./' 2>&1 | tee -a \"tpl-build-{2}-out.txt\"".format(spack_cmd, package_name, s)) + sexe("{0} install --fail-fast --fresh -u initconfig \"{1}@develop%{2} dev_path=./\" 2>&1 | tee -a \"tpl-build-{2}-out.txt\"".format(spack_cmd, package_name, s)) if not args.no_clean: sexe("rm -f spec-info-* tpl-build-* spack-build-* spack-configure-args.txt") diff --git a/scripts/spack/packages/py-ats/package.py b/scripts/spack/packages/py-ats/package.py new file mode 100644 index 000000000..3d69395a1 --- /dev/null +++ b/scripts/spack/packages/py-ats/package.py @@ -0,0 +1,30 @@ +# Copyright 2013-2021 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 PyAts(PythonPackage): + """ATS - Automated Testing System - is an open-source, Python-based tool + for automating the running of tests of an application across a broad range + of high performance computers.""" + + homepage = "https://github.com/LLNL/ATS" + git = "https://github.com/LLNL/ATS.git" + + maintainers = ['white238'] + + version('main', branch='main') + version('exit', branch='bugfix/exit-code') + version('7.0.100', tag='7.0.100') + version('7.0.9', tag='7.0.9') + version('7.0.5', tag='7.0.5') + + # TODO: Add flux variant when Flux functionality works in ATS + + depends_on("python@3.8:", type=('build', 'run')) + depends_on("py-numpy", type=('build', 'run')) + depends_on('py-setuptools', type='build') + depends_on('py-poetry-core', type='build') diff --git a/scripts/spack/packages/spheral/package.py b/scripts/spack/packages/spheral/package.py index f014b85a7..903dedb09 100644 --- a/scripts/spack/packages/spheral/package.py +++ b/scripts/spack/packages/spheral/package.py @@ -34,7 +34,7 @@ class Spheral(CachedCMakePackage, CudaPackage): # DEPENDS # ------------------------------------------------------------------------- depends_on('mpi', when='+mpi') - depends_on('cmake@3.10.0:', type='build') + depends_on('cmake@3.18.0:', type='build') depends_on('boost@1.74.0 +system +filesystem -atomic -container -coroutine -chrono -context -date_time -exception -fiber -graph -iostreams -locale -log -math -mpi -program_options -python -random -regex -test -thread -timer -wave +pic', type='build') @@ -71,7 +71,7 @@ class Spheral(CachedCMakePackage, CudaPackage): depends_on('py-h5py', type='build') depends_on('py-docutils', type='build') depends_on('py-scipy', type='build') - depends_on('py-ats', type='build') + depends_on('py-ats@exit', type='build') depends_on('py-mpi4py', type='build', when='+mpi') depends_on('py-sphinx', type='build') From 996c3d8cb76853750aea565b98edeab48f088e66 Mon Sep 17 00:00:00 2001 From: Landon Owen Date: Fri, 17 May 2024 12:33:45 -0700 Subject: [PATCH 33/42] Going back to using dev-build command to see if that still works --- scripts/devtools/tpl-manager.py | 2 +- scripts/spack/packages/spheral/package.py | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/scripts/devtools/tpl-manager.py b/scripts/devtools/tpl-manager.py index 699852eb8..d63ceda20 100755 --- a/scripts/devtools/tpl-manager.py +++ b/scripts/devtools/tpl-manager.py @@ -184,7 +184,7 @@ def build_deps(args): sexe("{0} spec --fresh -IL {1}@develop%{2} 2>&1 | tee -a \"spec-info-{2}-out.txt\"".format(spack_cmd, package_name, s)) # Install only the dependencies for Spheral and create CMake configure file - sexe("{0} install --fail-fast --fresh -u initconfig \"{1}@develop%{2} dev_path=./\" 2>&1 | tee -a \"tpl-build-{2}-out.txt\"".format(spack_cmd, package_name, s)) + sexe("{0} dev-build --fresh -u initconfig {1}@develop%{2} 2>&1 | tee -a \"tpl-build-{2}-out.txt\"".format(spack_cmd, package_name, s)) if not args.no_clean: sexe("rm -f spec-info-* tpl-build-* spack-build-* spack-configure-args.txt") diff --git a/scripts/spack/packages/spheral/package.py b/scripts/spack/packages/spheral/package.py index 903dedb09..a1ccecb1e 100644 --- a/scripts/spack/packages/spheral/package.py +++ b/scripts/spack/packages/spheral/package.py @@ -98,12 +98,13 @@ def cache_name(self): hostname = hostname.rstrip('1234567890') envspec = os.environ.get("SPEC") + spec = self.spec if envspec: cache_spec = envspec else: - cache_spec = self.spec.compiler.name + "@" + self.spec.compiler.version + cache_spec = str(spec.compiler.name) + "@" + str(spec.compiler.version) return "{0}-{1}.cmake".format( - str(self._get_sys_type(self.spec)), + str(self._get_sys_type(spec)), cache_spec.replace(" ", "_") ) @@ -207,5 +208,10 @@ def build_dirname(self): @property def build_directory(self): """Full-path to the directory to use when building the package.""" - return os.path.join(self.pkg.stage.path, self.build_dirname) + spec = self.spec + if spec.satisfies("@develop"): + dev_build_dir = "spack-build-" + str(spec.compiler.name) + "-" + str(spec.compiler.version) + return os.path.join(self.pkg.stage.source_path, build_dirname) + else: + return os.path.join(self.pkg.stage.path, self.build_dirname) From 8759506df1e16095f9621e3ad9ec33a5d4bbf610 Mon Sep 17 00:00:00 2001 From: Landon Owen Date: Fri, 17 May 2024 13:24:45 -0700 Subject: [PATCH 34/42] Added quiet flag to dev-build --- scripts/devtools/tpl-manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/devtools/tpl-manager.py b/scripts/devtools/tpl-manager.py index d63ceda20..d22f1b1e4 100755 --- a/scripts/devtools/tpl-manager.py +++ b/scripts/devtools/tpl-manager.py @@ -184,7 +184,7 @@ def build_deps(args): sexe("{0} spec --fresh -IL {1}@develop%{2} 2>&1 | tee -a \"spec-info-{2}-out.txt\"".format(spack_cmd, package_name, s)) # Install only the dependencies for Spheral and create CMake configure file - sexe("{0} dev-build --fresh -u initconfig {1}@develop%{2} 2>&1 | tee -a \"tpl-build-{2}-out.txt\"".format(spack_cmd, package_name, s)) + sexe("{0} dev-build -q --fresh -u initconfig {1}@develop%{2} 2>&1 | tee -a \"tpl-build-{2}-out.txt\"".format(spack_cmd, package_name, s)) if not args.no_clean: sexe("rm -f spec-info-* tpl-build-* spack-build-* spack-configure-args.txt") From 758e7c77fd808c9890956b628d08458d7ffc45fa Mon Sep 17 00:00:00 2001 From: Landon Owen Date: Thu, 23 May 2024 14:00:55 -0700 Subject: [PATCH 35/42] Fixed versions for all Spheral dependencies in spack recipe --- scripts/spack/packages/spheral/package.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/spack/packages/spheral/package.py b/scripts/spack/packages/spheral/package.py index a1ccecb1e..225f58ed7 100644 --- a/scripts/spack/packages/spheral/package.py +++ b/scripts/spack/packages/spheral/package.py @@ -59,20 +59,20 @@ class Spheral(CachedCMakePackage, CudaPackage): depends_on('caliper@2.8.0 ~shared ~adiak ~libdw ~papi ~libunwind +pic', type='build') - depends_on('opensubdiv', type='build') - depends_on('polytope +python', type='build') + depends_on('opensubdiv@3.4.3', type='build') + depends_on('polytope@0.7.3 +python', type='build') extends('python@3.9.10 +zlib +shared +ssl +tkinter', type='build') depends_on('py-numpy@1.23.4', type='build') - depends_on('py-numpy-stl', type='build') - depends_on('py-pillow', type='build') - depends_on('py-matplotlib backend=tkagg +fonts', type='build') - depends_on('py-h5py', type='build') - depends_on('py-docutils', type='build') - depends_on('py-scipy', type='build') + depends_on('py-numpy-stl@3.0.0', type='build') + depends_on('py-pillow@10.3.0', type='build') + depends_on('py-matplotlib@3.7.4 backend=tkagg +fonts', type='build') + depends_on('py-h5py@3.9.0', type='build') + depends_on('py-docutils@0.18.1', type='build') + depends_on('py-scipy@1.13.0', type='build') depends_on('py-ats@exit', type='build') - depends_on('py-mpi4py', type='build', when='+mpi') + depends_on('py-mpi4py@3.1.5', type='build', when='+mpi') depends_on('py-sphinx', type='build') depends_on('py-sphinx-rtd-theme', type='build') From d82629dcb6f6c350707564a162d0bb0ef7b97e23 Mon Sep 17 00:00:00 2001 From: Landon Owen Date: Thu, 23 May 2024 14:23:28 -0700 Subject: [PATCH 36/42] Set py-pillow version to what is used by ubuntu --- scripts/spack/packages/spheral/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/spack/packages/spheral/package.py b/scripts/spack/packages/spheral/package.py index 225f58ed7..2b8343e30 100644 --- a/scripts/spack/packages/spheral/package.py +++ b/scripts/spack/packages/spheral/package.py @@ -66,7 +66,7 @@ class Spheral(CachedCMakePackage, CudaPackage): depends_on('py-numpy@1.23.4', type='build') depends_on('py-numpy-stl@3.0.0', type='build') - depends_on('py-pillow@10.3.0', type='build') + depends_on('py-pillow@9.5.0', type='build') depends_on('py-matplotlib@3.7.4 backend=tkagg +fonts', type='build') depends_on('py-h5py@3.9.0', type='build') depends_on('py-docutils@0.18.1', type='build') From ab25e9946df267c5fc25e02f56f73cd50b4398ce Mon Sep 17 00:00:00 2001 From: Landon Owen Date: Thu, 23 May 2024 14:34:05 -0700 Subject: [PATCH 37/42] Fix scipy to ubuntu build version as well --- scripts/spack/packages/spheral/package.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/spack/packages/spheral/package.py b/scripts/spack/packages/spheral/package.py index 2b8343e30..6a4ddc0bc 100644 --- a/scripts/spack/packages/spheral/package.py +++ b/scripts/spack/packages/spheral/package.py @@ -70,7 +70,7 @@ class Spheral(CachedCMakePackage, CudaPackage): depends_on('py-matplotlib@3.7.4 backend=tkagg +fonts', type='build') depends_on('py-h5py@3.9.0', type='build') depends_on('py-docutils@0.18.1', type='build') - depends_on('py-scipy@1.13.0', type='build') + depends_on('py-scipy@1.12.0', type='build') depends_on('py-ats@exit', type='build') depends_on('py-mpi4py@3.1.5', type='build', when='+mpi') From 4db574c55cd01a53383ddc320c5f72c4e6849ef7 Mon Sep 17 00:00:00 2001 From: Landon Owen Date: Tue, 28 May 2024 09:38:06 -0700 Subject: [PATCH 38/42] Updated the upstream location --- .gitlab/os.yml | 2 +- scripts/devtools/tpl-manager.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab/os.yml b/.gitlab/os.yml index 28c42b369..58222b5ad 100644 --- a/.gitlab/os.yml +++ b/.gitlab/os.yml @@ -4,7 +4,7 @@ .sys_config: variables: LLNL_SERVICE_USER: sphapp - UPSTREAM_DIR: /usr/WS2/wciuser/Spheral/spheral-spack-tpls + UPSTREAM_DIR: /usr/WS2/sduser/Spheral/0.22 DISPLAY: ':0.0' .on_toss_3_x86: diff --git a/scripts/devtools/tpl-manager.py b/scripts/devtools/tpl-manager.py index d22f1b1e4..88ff73fd1 100755 --- a/scripts/devtools/tpl-manager.py +++ b/scripts/devtools/tpl-manager.py @@ -11,7 +11,7 @@ project_dir=os.path.abspath(os.path.join(os.path.realpath(__file__), "../../../")) default_spheral_spack_dir=os.path.join(os.getcwd(), "../spheral-spack-tpls") -default_upstream_dir="/usr/WS2/wciuser/Spheral/spheral-spack-tpls/spack/opt/spack/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_p/" +default_upstream_dir="/usr/WS2/sduser/Spheral/0.22/spack/opt/spack/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__/" uberenv_path = os.path.join(project_dir, "scripts/devtools/uberenv/uberenv.py") uberenv_project_json = os.path.join(os.getcwd(), ".uberenv_config.json") From 332bc9f99860e767b21126849cedb7a8d4ac321b Mon Sep 17 00:00:00 2001 From: Landon Owen Date: Thu, 30 May 2024 11:14:40 -0700 Subject: [PATCH 39/42] Updated upstream directory name --- .gitlab/os.yml | 2 +- scripts/devtools/tpl-manager.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab/os.yml b/.gitlab/os.yml index 58222b5ad..380b48312 100644 --- a/.gitlab/os.yml +++ b/.gitlab/os.yml @@ -4,7 +4,7 @@ .sys_config: variables: LLNL_SERVICE_USER: sphapp - UPSTREAM_DIR: /usr/WS2/sduser/Spheral/0.22 + UPSTREAM_DIR: /usr/WS2/sduser/Spheral/spack_upstream/0.22 DISPLAY: ':0.0' .on_toss_3_x86: diff --git a/scripts/devtools/tpl-manager.py b/scripts/devtools/tpl-manager.py index 88ff73fd1..079b48577 100755 --- a/scripts/devtools/tpl-manager.py +++ b/scripts/devtools/tpl-manager.py @@ -11,7 +11,7 @@ project_dir=os.path.abspath(os.path.join(os.path.realpath(__file__), "../../../")) default_spheral_spack_dir=os.path.join(os.getcwd(), "../spheral-spack-tpls") -default_upstream_dir="/usr/WS2/sduser/Spheral/0.22/spack/opt/spack/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__/" +default_upstream_dir="/usr/WS2/sduser/Spheral/spack_upstream/0.22/spack/opt/spack/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__/" uberenv_path = os.path.join(project_dir, "scripts/devtools/uberenv/uberenv.py") uberenv_project_json = os.path.join(os.getcwd(), ".uberenv_config.json") From 8f914240fbd7abdd8fe1be26818ebda63ff583c1 Mon Sep 17 00:00:00 2001 From: Landon Owen Date: Fri, 31 May 2024 09:02:25 -0700 Subject: [PATCH 40/42] Update upstream directory again --- scripts/devtools/tpl-manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/devtools/tpl-manager.py b/scripts/devtools/tpl-manager.py index 079b48577..fa658f067 100755 --- a/scripts/devtools/tpl-manager.py +++ b/scripts/devtools/tpl-manager.py @@ -11,7 +11,7 @@ project_dir=os.path.abspath(os.path.join(os.path.realpath(__file__), "../../../")) default_spheral_spack_dir=os.path.join(os.getcwd(), "../spheral-spack-tpls") -default_upstream_dir="/usr/WS2/sduser/Spheral/spack_upstream/0.22/spack/opt/spack/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_placeholder__/__/" +default_upstream_dir="/usr/WS2/sduser/Spheral/spack_upstream/0.22/spack/opt/spack/__spack_path_placeholder__/__spack_path_placeholder__/__spack_path_p" uberenv_path = os.path.join(project_dir, "scripts/devtools/uberenv/uberenv.py") uberenv_project_json = os.path.join(os.getcwd(), ".uberenv_config.json") From 8d2110af4a2d5e0ea0bbee3d4e0db2fffdfd524b Mon Sep 17 00:00:00 2001 From: Landon Owen Date: Tue, 4 Jun 2024 16:22:53 -0700 Subject: [PATCH 41/42] Removed pkg-config and pic variant lines from ubuntu spack package --- scripts/spack/configs/ubuntu20.04/packages.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/scripts/spack/configs/ubuntu20.04/packages.yaml b/scripts/spack/configs/ubuntu20.04/packages.yaml index 5f684c36f..a5e240854 100644 --- a/scripts/spack/configs/ubuntu20.04/packages.yaml +++ b/scripts/spack/configs/ubuntu20.04/packages.yaml @@ -5,13 +5,10 @@ packages: prefix: /usr buildable: false all: - variants: +pic providers: mpi: [mpich] blas: [netlib-lapack] lapack: [netlib-lapack] - pkgconfig: [pkg-config] - pkgconf: [pkg-config] # ------ SYSTEM LIBS ------- # FIXME: Currently allowing spack to build cmake and git ncurses: From 1801c47bb6fe0a5592030e745698a906e7f1121a Mon Sep 17 00:00:00 2001 From: Landon Owen Date: Wed, 5 Jun 2024 13:35:44 -0700 Subject: [PATCH 42/42] Updated release notes --- RELEASE_NOTES.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index fe35d2250..f97a32a13 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -9,6 +9,14 @@ Notable changes include: * Build changes / improvements: * tpl-manager.py will no longer use generic x86_64 configs for non LC systems. Users will be required to supply their own configs for pointing spack at external packages. + * Spack version is increased from 0.19 to 0.22. + * Spack upstream is updated. + * Removed the python 3 module load for the Gitlab CI to fix an issue with pkg-config changing. + * Zlib target and TPL cmake file is removed. + * PYB11Generator repo is updated. + * Spack config and package files inside Spheral are updated to accommodate Spack 0.22. + * Package recipes for py-numpy-stl, py-pillow, py-pipreqs, td, and tk are removed. + * Versions for python dependencies in the Spheral spack recipe are fixed and updated (in some cases). * Bug Fixes / improvements: