Skip to content

make use of slurm arrrays #45

@larsbuntemeyer

Description

@larsbuntemeyer

map date range to slurm task ids, .e.g.

sbatch --export=SLURM_ARRAY_DATE_1='1979-01-01',SLURM_ARRAY_DATE_2='1979-01-02' --array=1,2 array.py

with array.py

#!/usr/bin/env python
import os

task_id = os.environ['SLURM_ARRAY_TASK_ID']
task_input = os.environ[f'SLURM_ARRAY_DATE_{task_id}']

print(task_id, task_input)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions