nasa / cape

Computational Aerosciences Productivity & Execution
Other
21 stars 9 forks source link

Add Arbitrary Slurm Instructions #32

Closed rbreslavsky closed 5 months ago

rbreslavsky commented 5 months ago

In CAPE, we can add Slurm options via opts["Slurm"]["other"], but it has to be a dictionary. So, for instance, opts["Slurm"]["other"] = {"export": "ALL"} writes out #SBATCH --export=ALL in the submission script.

But what if we want something without the equals sign? Like #SBATCH --exclusive?

nasa-ddalle commented 5 months ago

Ok, so for that you can put (after the commit I just pushed to both v1.1 and main)

opts["Slurm"]["other"] = {"exclusive": True}

or, in JSON

"Slurm": {
    "other": {
        "exclusive": true
    }
}

I should not have missed this in my initial "Slurm" > "other" implementation!