Skip to main content

Subsystem graph generation for the Flux containment subsystem

Project description

Compspec Containment

PyPI version

A compspec (Composition spec) is a specification and model for comparing things. Compspec containment is a plugin for extraction of the Flux Framework containment subsystem, which means verices (cluster, racks, nodes, sockets, cores, etc) and edges between them that describe relationships (e.g., "contains"). Other cluster types can be added and they will need to have an intermediate translation into a graph. 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-containment

Note that you'll need the fluxion Python module.

git clone --depth 1 https://github.com/flux-framework/flux-sched /tmp/flux-sched
PYTHONPATH=$PYTHONPATH:/tmp/flux-sched/src/python

In the dev container, try running an extraction for the Flux instance running:

flux start --test-size=4
compspec extract containment cluster-a

To save to file:

# This extracts a cluster named "a"
compspec extract --outfile containment-subsystem.json containment a

You can see the example example/containment-subsystem.json.

compspec-containment output
{
    "graph": {
        "directed": false,
        "metadata": {
            "type": "containment",
            "name": "a",
            "install_name": "compat-experiment"
        },
        "nodes": [
            {
                "id": "0",
                "metadata": {
                    "type": "cluster",
                    "paths": {
                        "containment": "/cluster0"
                    }
                }
            },
            {
                "id": "1",
                "metadata": {
                    "type": "node",
                    "name": "039b58a80799",
                    "rank": 0,
                    "paths": {
                        "containment": "/cluster0/039b58a80799"
                    }
                }
            },
            {
                "id": "2",
                "metadata": {
                    "type": "core",
                    "id": 0,
                    "rank": 0,
                    "paths": {
                        "containment": "/cluster0/039b58a80799/core0"
                    }
                }
            },
            {
                "id": "3",
                "metadata": {
                    "type": "core",
                    "id": 1,
                    "rank": 0,
                    "paths": {
                        "containment": "/cluster0/039b58a80799/core1"
                    }
                }
            },
            {
                "id": "4",
                "metadata": {
                    "type": "core",
                    "id": 2,
                    "rank": 0,
                    "paths": {
                        "containment": "/cluster0/039b58a80799/core2"
                    }
                }
            },
            {
                "id": "5",
                "metadata": {
                    "type": "core",
                    "id": 3,
                    "rank": 0,
                    "paths": {
                        "containment": "/cluster0/039b58a80799/core3"
                    }
                }
            },
            {
                "id": "6",
                "metadata": {
                    "type": "core",
                    "id": 4,
                    "rank": 0,
                    "paths": {
                        "containment": "/cluster0/039b58a80799/core4"
                    }
                }
            },
            {
                "id": "7",
                "metadata": {
                    "type": "core",
                    "id": 5,
                    "rank": 0,
                    "paths": {
                        "containment": "/cluster0/039b58a80799/core5"
                    }
                }
            },
            {
                "id": "8",
                "metadata": {
                    "type": "core",
                    "id": 6,
                    "rank": 0,
                    "paths": {
                        "containment": "/cluster0/039b58a80799/core6"
                    }
                }
            },
            {
                "id": "9",
                "metadata": {
                    "type": "core",
                    "id": 7,
                    "rank": 0,
                    "paths": {
                        "containment": "/cluster0/039b58a80799/core7"
                    }
                }
            },
            {
                "id": "10",
                "metadata": {
                    "type": "node",
                    "name": "039b58a80799",
                    "rank": 1,
                    "paths": {
                        "containment": "/cluster0/039b58a80799"
                    }
                }
            },
            {
                "id": "11",
                "metadata": {
                    "type": "core",
                    "id": 0,
                    "rank": 1,
                    "paths": {
                        "containment": "/cluster0/039b58a80799/core0"
                    }
                }
            },
            {
                "id": "12",
                "metadata": {
                    "type": "core",
                    "id": 1,
                    "rank": 1,
                    "paths": {
                        "containment": "/cluster0/039b58a80799/core1"
                    }
                }
            },
            {
                "id": "13",
                "metadata": {
                    "type": "core",
                    "id": 2,
                    "rank": 1,
                    "paths": {
                        "containment": "/cluster0/039b58a80799/core2"
                    }
                }
            },
            {
                "id": "14",
                "metadata": {
                    "type": "core",
                    "id": 3,
                    "rank": 1,
                    "paths": {
                        "containment": "/cluster0/039b58a80799/core3"
                    }
                }
            },
            {
                "id": "15",
                "metadata": {
                    "type": "core",
                    "id": 4,
                    "rank": 1,
                    "paths": {
                        "containment": "/cluster0/039b58a80799/core4"
                    }
                }
            },
            {
                "id": "16",
                "metadata": {
                    "type": "core",
                    "id": 5,
                    "rank": 1,
                    "paths": {
                        "containment": "/cluster0/039b58a80799/core5"
                    }
                }
            },
            {
                "id": "17",
                "metadata": {
                    "type": "core",
                    "id": 6,
                    "rank": 1,
                    "paths": {
                        "containment": "/cluster0/039b58a80799/core6"
                    }
                }
            },
            {
                "id": "18",
                "metadata": {
                    "type": "core",
                    "id": 7,
                    "rank": 1,
                    "paths": {
                        "containment": "/cluster0/039b58a80799/core7"
                    }
                }
            },
            {
                "id": "19",
                "metadata": {
                    "type": "node",
                    "name": "039b58a80799",
                    "rank": 2,
                    "paths": {
                        "containment": "/cluster0/039b58a80799"
                    }
                }
            },
            {
                "id": "20",
                "metadata": {
                    "type": "core",
                    "id": 0,
                    "rank": 2,
                    "paths": {
                        "containment": "/cluster0/039b58a80799/core0"
                    }
                }
            },
            {
                "id": "21",
                "metadata": {
                    "type": "core",
                    "id": 1,
                    "rank": 2,
                    "paths": {
                        "containment": "/cluster0/039b58a80799/core1"
                    }
                }
            },
            {
                "id": "22",
                "metadata": {
                    "type": "core",
                    "id": 2,
                    "rank": 2,
                    "paths": {
                        "containment": "/cluster0/039b58a80799/core2"
                    }
                }
            },
            {
                "id": "23",
                "metadata": {
                    "type": "core",
                    "id": 3,
                    "rank": 2,
                    "paths": {
                        "containment": "/cluster0/039b58a80799/core3"
                    }
                }
            },
            {
                "id": "24",
                "metadata": {
                    "type": "core",
                    "id": 4,
                    "rank": 2,
                    "paths": {
                        "containment": "/cluster0/039b58a80799/core4"
                    }
                }
            },
            {
                "id": "25",
                "metadata": {
                    "type": "core",
                    "id": 5,
                    "rank": 2,
                    "paths": {
                        "containment": "/cluster0/039b58a80799/core5"
                    }
                }
            },
            {
                "id": "26",
                "metadata": {
                    "type": "core",
                    "id": 6,
                    "rank": 2,
                    "paths": {
                        "containment": "/cluster0/039b58a80799/core6"
                    }
                }
            },
            {
                "id": "27",
                "metadata": {
                    "type": "core",
                    "id": 7,
                    "rank": 2,
                    "paths": {
                        "containment": "/cluster0/039b58a80799/core7"
                    }
                }
            },
            {
                "id": "28",
                "metadata": {
                    "type": "node",
                    "name": "039b58a80799",
                    "rank": 3,
                    "paths": {
                        "containment": "/cluster0/039b58a80799"
                    }
                }
            },
            {
                "id": "29",
                "metadata": {
                    "type": "core",
                    "id": 0,
                    "rank": 3,
                    "paths": {
                        "containment": "/cluster0/039b58a80799/core0"
                    }
                }
            },
            {
                "id": "30",
                "metadata": {
                    "type": "core",
                    "id": 1,
                    "rank": 3,
                    "paths": {
                        "containment": "/cluster0/039b58a80799/core1"
                    }
                }
            },
            {
                "id": "31",
                "metadata": {
                    "type": "core",
                    "id": 2,
                    "rank": 3,
                    "paths": {
                        "containment": "/cluster0/039b58a80799/core2"
                    }
                }
            },
            {
                "id": "32",
                "metadata": {
                    "type": "core",
                    "id": 3,
                    "rank": 3,
                    "paths": {
                        "containment": "/cluster0/039b58a80799/core3"
                    }
                }
            },
            {
                "id": "33",
                "metadata": {
                    "type": "core",
                    "id": 4,
                    "rank": 3,
                    "paths": {
                        "containment": "/cluster0/039b58a80799/core4"
                    }
                }
            },
            {
                "id": "34",
                "metadata": {
                    "type": "core",
                    "id": 5,
                    "rank": 3,
                    "paths": {
                        "containment": "/cluster0/039b58a80799/core5"
                    }
                }
            },
            {
                "id": "35",
                "metadata": {
                    "type": "core",
                    "id": 6,
                    "rank": 3,
                    "paths": {
                        "containment": "/cluster0/039b58a80799/core6"
                    }
                }
            },
            {
                "id": "36",
                "metadata": {
                    "type": "core",
                    "id": 7,
                    "rank": 3,
                    "paths": {
                        "containment": "/cluster0/039b58a80799/core7"
                    }
                }
            }
        ],
        "edges": [
            {
                "source": "0",
                "target": "1"
            },
            {
                "source": "1",
                "target": "2"
            },
            {
                "source": "1",
                "target": "3"
            },
            {
                "source": "1",
                "target": "4"
            },
            {
                "source": "1",
                "target": "5"
            },
            {
                "source": "1",
                "target": "6"
            },
            {
                "source": "1",
                "target": "7"
            },
            {
                "source": "1",
                "target": "8"
            },
            {
                "source": "1",
                "target": "9"
            },
            {
                "source": "0",
                "target": "10"
            },
            {
                "source": "10",
                "target": "11"
            },
            {
                "source": "10",
                "target": "12"
            },
            {
                "source": "10",
                "target": "13"
            },
            {
                "source": "10",
                "target": "14"
            },
            {
                "source": "10",
                "target": "15"
            },
            {
                "source": "10",
                "target": "16"
            },
            {
                "source": "10",
                "target": "17"
            },
            {
                "source": "10",
                "target": "18"
            },
            {
                "source": "0",
                "target": "19"
            },
            {
                "source": "19",
                "target": "20"
            },
            {
                "source": "19",
                "target": "21"
            },
            {
                "source": "19",
                "target": "22"
            },
            {
                "source": "19",
                "target": "23"
            },
            {
                "source": "19",
                "target": "24"
            },
            {
                "source": "19",
                "target": "25"
            },
            {
                "source": "19",
                "target": "26"
            },
            {
                "source": "19",
                "target": "27"
            },
            {
                "source": "0",
                "target": "28"
            },
            {
                "source": "28",
                "target": "29"
            },
            {
                "source": "28",
                "target": "30"
            },
            {
                "source": "28",
                "target": "31"
            },
            {
                "source": "28",
                "target": "32"
            },
            {
                "source": "28",
                "target": "33"
            },
            {
                "source": "28",
                "target": "34"
            },
            {
                "source": "28",
                "target": "35"
            },
            {
                "source": "28",
                "target": "36"
            }
        ]
    }
}

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_containment-0.0.14.tar.gz (9.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_containment-0.0.14-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file compspec_containment-0.0.14.tar.gz.

File metadata

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

File hashes

Hashes for compspec_containment-0.0.14.tar.gz
Algorithm Hash digest
SHA256 2bd715d7bf7aad0913954bf10856c5f00a659bec1a0034ef4e4725d424904347
MD5 6c911db9f1cf237ffbb6f9caf1c1a553
BLAKE2b-256 a308833a9cb6085424fe1330898f9648021f373c3809a2a1893c4da2a8523c0e

See more details on using hashes here.

File details

Details for the file compspec_containment-0.0.14-py3-none-any.whl.

File metadata

File hashes

Hashes for compspec_containment-0.0.14-py3-none-any.whl
Algorithm Hash digest
SHA256 26b424a78076bfd0892b40652a5bbe47c64396c34c32b2636b2b19143596aeb6
MD5 2d55a9755e969a28903586eebae46dd8
BLAKE2b-256 a8145b0c9ef3c52058d82419e0c7186e3299e87218f47d84ea4775a4c7445bec

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