Ondemand with slurm based sytems, sbatch?

This has been solved in 1.7 which was released today. It was fixed for all support schedulers, including SLURM.

To enable it, use the copy_environment attribute in your script element. The given scheduler will set the appropriate flags.

In slurms’ case it appears that you also need to set job_environment with at least something.

This configuration in SLURM:

script:
   copy_environment: true
   job_envorionment:
     FOO: "BAR"

will produce --export=ALL,FOO when submitting the job.