In the job submit plugin, job_submit() has job_desc->environment set to NULL if a job is submitted through salloc but it is populated correctly if submitted through sbatch. Is this intentional? If so, is there some other way to access the job's environment from job_submit()? The environment variables do make it through to the job launch for both sbatch and salloc.
Ryan, That's in fact expected and documented behavior, take a look at[1]: >NOTE: Only sbatch sends the environment to slurmctld. salloc and srun do not send >the environment to slurmctld, so job_desc.environment is not available in the >job_submit plugin for these jobs. When job is run by salloc/srun task lanuch request is send from the client to slurmd, not from slurmctld. Let me know if that's more clear for you or if you have additional questions on that. cheers, Marcin [1]https://slurm.schedmd.com/job_submit_plugins.html#lua
I'll go ahead and close the case as information given. Should you have any question spelase reopen. cheers, Marcin