跳转到主要内容

使用Flux生成资源图

项目描述

Compspec Flux

PyPI version

Compspec(组合规范)是一种比较事物的规范和模型。Compspec Flux提供了一种简单的方法来提取关于运行中的Flux实例的元数据,即节点图。其他感兴趣的链接包括

  • Compspec:发现和加载此插件的Python库。
  • 兼容性:容器镜像和应用程序与主机环境之间的兼容性。
  • Compspec Go:用于检索工件并为图像选择和调度制作图的Go库。

用法

在此处安装compspec和插件

pip install compspec
pip install compspec-flux

然后(与Flux实例一起)运行插件。请注意,此处提供的VSCode设置将为此提供支持。您可以使用默认设置,或向插件名称“flux”之后添加任何参数。以下是启动Flux实例的方法

flux start --test-size=4

以下是打印到终端的方法

compspec extract flux
Flux输出
{
    "graph": {
        "nodes": {
            "0": {
                "id": 0,
                "metadata": {
                    "type": "cluster",
                    "basename": "cluster",
                    "name": "cluster0",
                    "uniq_id": 0,
                    "containment": {
                        "paths": "/cluster0"
                    },
                    "size": 1,
                    "unit": "",
                    "rank": 0,
                    "exclusive": false
                }
            },
            "1": {
                "id": 1,
                "metadata": {
                    "type": "node",
                    "basename": "node",
                    "name": "node1",
                    "uniq_id": 1,
                    "containment": {
                        "paths": "/cluster0/node1"
                    },
                    "size": 1,
                    "unit": "",
                    "rank": 0,
                    "exclusive": false
                }
            }
        },
        "edges": [
            {
                "source": "0",
                "target": "1",
                "metadata": {
                    "name": {
                        "containment": "contains"
                    }
                }
            },
            {
                "source": "1",
                "target": "0",
                "metadata": {
                    "name": {
                        "containment": "in"
                    }
                }
            }
        ]
    }
}

以及如何保存到文件

compspec extract --outfile cluster-resources.json flux

许可证

HPCIC DevTools在MIT许可证下分发。所有新的贡献都必须在此许可证下进行。

有关详细信息,请参阅LICENSECOPYRIGHTNOTICE

SPDX-License-Identifier: (MIT)

LLNL-CODE- 842614

项目详情


下载文件

下载您平台对应的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。

源分布

compspec-flux-0.0.11.tar.gz (7.8 kB 查看哈希值)

上传时间

构建分布

compspec_flux-0.0.11-py3-none-any.whl (8.1 kB 查看哈希值)

上传时间 Python 3