Skip to main content

Subsystem graph generation for a spack install

Project description

Compspec Spack

PyPI version

A compspec (Composition spec) is a specification and model for comparing things. Compspec spack is a plugin for extraction of spack subsystem metadata about software installed on a system (for a system or user spack install) that can be used for scheduling and other purposes. It output Json Graph Format version 2. To learn more:

  • Compspec: the Python library that discovers and loads this plugin.

Usage

Install compspec and the plugin here:

pip install compspec
pip install compspec-spack

Then run an extraction with spack. You will want to provide the root to the spack install to describe:

compspec extract spack /opt/spack

To save to file:

compspec extract --outfile spack-subsystem.json spack /opt/spack
compspec-spack output
{
    "graph": {
        "nodes": {
            "spack0": {
                "metadata": {
                    "type": "spack",
                    "basename": "spack",
                    "name": "spack0",
                    "id": 0,
                    "uniq_id": 0,
                    "containment": {
                        "paths": "/spack0"
                    },
                    "size": 1,
                    "unit": "",
                    "rank": 0,
                    "exclusive": false
                },
                "label": "spack0"
            },
            "package1": {
                "metadata": {
                    "type": "package",
                    "basename": "package",
                    "name": "package0",
                    "id": 1,
                    "uniq_id": 1,
                    "containment": {
                        "paths": "/spack0/package0"
                    },
                    "size": 1,
                    "unit": "",
                    "rank": 0,
                    "exclusive": false,
                    "attributes": {
                        "name": "perl",
                        "version": "5.38.0",
                        "platform": "linux",
                        "target": "skylake",
                        "os": "ubuntu22.04",
                        "vendor": "GenuineIntel",
                        "compiler_version": "11.4.0",
                        "compiler": "gcc"
                    }
                },
...
    "edges": [
        {
                "source": "package7721",
                "target": "library7786",
                "metadata": {
                    "name": {
                        "containment": "contains"
                    }
                }
            },
            {
                "source": "library7786",
                "target": "package7721",
                "metadata": {
                    "name": {
                        "containment": "in"
                    }
                }
            }
        ]
    },
    "metadata": {
        "install_name": "compat-experiment",
        "spack_root": "/home/vanessa/Desktop/Code/flux/spack/opt/spack"
    }

Note that this output can get very large, even when we compress attributes for packages (nodes) at the level of the node! I do think we need to have libraries / binaries as separate nodes, hence why it gets so big.

Development

If you open the Development container in VSCode, you'll find spack on the path:

$ which spack

This allows us to easily develop and test the compatibility plugin. You can also just clone spack locally.

TODO

  • Add python extraction example
  • Testing gloob gloob gloob

License

HPCIC DevTools is distributed under the terms of the MIT license. All new contributions must be made under this license.

See LICENSE, COPYRIGHT, and NOTICE for details.

SPDX-License-Identifier: (MIT)

LLNL-CODE- 842614

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

compspec_spack-0.0.12.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

compspec_spack-0.0.12-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file compspec_spack-0.0.12.tar.gz.

File metadata

  • Download URL: compspec_spack-0.0.12.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.2

File hashes

Hashes for compspec_spack-0.0.12.tar.gz
Algorithm Hash digest
SHA256 d93e6d2d6ca7e7646ed24afda2c20198e250e1bd37ca282aea2a8a72d70f3bf9
MD5 9a6e6f98fd472f56470fb743a53635cd
BLAKE2b-256 aa21e917fd0c704d77db8b0cbec285597438604921d42ccb34f0d02c5d593e5f

See more details on using hashes here.

File details

Details for the file compspec_spack-0.0.12-py3-none-any.whl.

File metadata

File hashes

Hashes for compspec_spack-0.0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 396e5263d41c02c51180a5eab80c8e4310c9e65ad9e536d9b3ea8b4395d6c7e3
MD5 f86932c3fd7e6da1663cd2b8b7e05025
BLAKE2b-256 83ffc590bcd6bfde3c8c3d4521555ae3ff78bf517a5729d8d9150c7900dcfbee

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page