Skip to content

Create SLURM plugin to expose green metrics as an RO-Crate #318

Open

Description

Activity

  1. ianhinder commented on Oct 6, 2026

    @ianhinder
    Author

    @OliverWoolland, would you mind posting an update here? Thanks!

  2. OliverWoolland commented on Nov 3, 2026

    @OliverWoolland

    first cut will be a process run RO-Crate

    in true 90-90 style I've got all but one of the essential elements of a process run crate in an afternoon of pushing

    the remaining one... I think I need to figure out how to parse bash files to extract e.g. module loads

  3. OliverWoolland commented on Nov 3, 2026

    @OliverWoolland

    latest 'greatest'

    {
        "@context": [
            "https://w3id.org/ro/crate/1.3/context",
            {
                "wfr": "https://w3id.org/ro/terms/workflow-run/context"
            }
        ],
        "@graph": [
            {
                "@id": "https://w3id.org/ro/wfrun/process/0.6",
                "@type": "CreativeWork",
                "name": "Process Run Crate",
                "version": "0.6"
            },
            {
                "@id": "#job162",
                "@type": "CreateAction",
                "agent": {
                    "@id": "#agent-1000"
                },
                "description": "Slurm job 162 executed on 2026-11-02T14:05:36Z",
                "endTime": "2026-11-02T14:05:36Z",
                "identifier": "162",
                "name": "Slurm Job 162",
                "startTime": "2026-11-02T14:05:36Z"
            },
            {
                "@id": "#instrument",
                "@type": "SoftwareApplication"
            },
            {
                "@id": "#result",
                "@type": "Dataset"
            },
            {
                "@id": "#agent-1000",
                "@type": "Person",
                "identifier": "1000"
            },
            {
                "@id": "#object",
                "@type": "Dataset"
            },
            {
                "@id": "./",
                "@type": "Dataset",
                "conformsTo": {
                    "@id": "https://w3id.org/ro/wfrun/process/0.6"
                },
                "mentions": {
                    "@id": "#job162"
                }
            },
            {
                "@id": "ro-crate-metadata.json",
                "@type": "CreativeWork",
                "about": {
                    "@id": "./"
                },
                "conformsTo": {
                    "@id": "https://w3id.org/ro/crate/1.3"
                }
            }
        ]
    }
  4. ianhinder commented on Nov 3, 2026

    @ianhinder
    Author

    Can you inspect the environment of the bash process to see the variables set by the module load commands? "module" is a bash function which calls a script which outputs variables, and these are then exported into the process environment.

    Quick try:

    h52229ih@masc-compute:~$ module load openfoam/2312 paraview/5.12.0
    h52229ih@masc-compute:~$ echo $LOADEDMODULES 
    openfoam/2312:paraview/5.12.0
    h52229ih@masc-compute:~$ env | grep LOADEDMODULES
    LOADEDMODULES=openfoam/2312:paraview/5.12.0
    
  5. OliverWoolland commented on Nov 3, 2026

    @OliverWoolland

    Yep but I think both are needed as I don't have access to the live env during the job - only on the way in or out - so I think I would miss modules loaded by the script unless I parse them

  6. OliverWoolland commented on Nov 6, 2026

    @OliverWoolland
    {
        "@context": [
            "https://w3id.org/ro/crate/1.3/context",
            {
                "wfr": "https://w3id.org/ro/terms/workflow-run/context"
            }
        ],
        "@graph": [
            {
                "@id": "#executable_./bar.sh",
                "@type": "SoftwareApplication",
                "name": "./bar.sh"
            },
            {
                "@id": "#executable_matlab",
                "@type": "SoftwareApplication",
                "name": "matlab"
            },
            {
                "@id": "#executable_srun",
                "@type": "SoftwareApplication",
                "name": "srun"
            },
            {
                "@id": "#module_gcc_11.2.0",
                "@type": "SoftwareApplication",
                "name": "gcc",
                "softwareVersion": "11.2.0"
            },
            {
                "@id": "#module_openmpi_4.1.1",
                "@type": "SoftwareApplication",
                "name": "openmpi",
                "softwareVersion": "4.1.1"
            },
            {
                "@id": "https://w3id.org/ro/wfrun/process/0.6",
                "@type": "CreativeWork",
                "name": "Process Run Crate",
                "version": "0.6"
            },
            {
                "@id": "#agent-1000",
                "@type": "Person",
                "identifier": "1000"
            },
            {
                "@id": "#job213",
                "@type": "CreateAction",
                "agent": {
                    "@id": "#agent-1000"
                },
                "description": "Slurm job 213 executed on 2026-11-06T17:32:14Z",
                "endTime": "2026-11-06T17:32:14Z",
                "identifier": "213",
                "instrument": [
                    {
                        "@id": "#module_gcc_11.2.0"
                    },
                    {
                        "@id": "#module_openmpi_4.1.1"
                    },
                    {
                        "@id": "#executable_srun"
                    },
                    {
                        "@id": "#executable_matlab"
                    },
                    {
                        "@id": "#executable_./bar.sh"
                    }
                ],
                "name": "Slurm Job 213",
                "startTime": "2026-11-06T17:32:14Z"
            },
            {
                "@id": "./",
                "@type": "Dataset",
                "conformsTo": {
                    "@id": "https://w3id.org/ro/wfrun/process/0.6"
                },
                "mentions": {
                    "@id": "#job213"
                }
            },
            {
                "@id": "ro-crate-metadata.json",
                "@type": "CreativeWork",
                "about": {
                    "@id": "./"
                },
                "conformsTo": {
                    "@id": "https://w3id.org/ro/crate/1.3"
                }
            }
        ]
    }

    thought I'd update since it's friday - a few rough edges but a batch script's module loads and exes are in

  7. OliverWoolland commented on Nov 10, 2026

    @OliverWoolland

    uvx --from roc-validator rocrate-validator validate /path/to/crate/

    makes significant complaints

    FAILED 7
    REQUIRED 66
    PASSED 56

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions