<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Apologies, I was not able to reply to the previous thread.<a href="https://groups.google.com/g/slurm-users/c/9BO1P_z7vXI">[slurm-users] Prologslurmctld environment variables (google.com)</a></div><div><br></div><div>I was not able to use "spank_job_control_setenv" successfully with sbatch.</div><div><a href="https://slurm.schedmd.com/spank.html" target="_blank" rel="nofollow" style="text-decoration-line:none;color:rgb(26,115,232);font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:14px">https://slurm.schedmd.com/spank.html</a><br></div><div><br></div><div>I'm using a spank option named 'env':</div><div>sbatch --env=test</div><div><br></div><div>My example environment.c script called the following functions as a test:</div><div dir="ltr"><br></div><div dir="ltr">slurm_spank_init -> called with sbatch -> however, "test" value is Null<br></div><div dir="ltr">slurm_spank_job_prolog -> not called with sbatch<br></div><div dir="ltr">slurm_spank_init_post_opt -> called with sbatch -> however, "test" value is Null<br></div><div dir="ltr">slurm_spank_local_user_init -> not called with sbatch<br></div><div dir="ltr">slurm_spank_user_init -> not called with sbatch<br></div><div dir="ltr">slurm_spank_task_init_privileged -> not called with sbatch</div><div dir="ltr">slurm_spank_task_post_fork -> not called with sbatch<br></div><div dir="ltr"><br></div><div dir="ltr"><div dir="ltr">if (spank_job_control_setenv(sp, "env", global_variable, 1) != ESPANK_SUCCESS)</div><div dir="ltr">    {</div><div dir="ltr">        slurm_info("init | Unable to set env");</div><div dir="ltr">        slurm_info("Value: %s",global_variable);</div><div dir="ltr">    }</div><div dir="ltr">    else {</div><div dir="ltr">        slurm_info("init | Able to set env");</div><div dir="ltr">        slurm_info("Value: %s",global_variable);</div><div dir="ltr">    }</div></div><div dir="ltr"><br></div><div>Output:</div><div dir="ltr"><div dir="ltr">sbatch: init | Able to set BIOS</div><div dir="ltr">sbatch: Value:</div></div><div dir="ltr"><br></div><div>How can I reference the "--env=test" value in my c script?</div><div>Is it possible to run 'spank_job_control_setenv' with sbatch?</div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>