Mike, runjob is the task launcher on BG/Q. Take a look at the --envs option documented in the runjob man page.
Then look at srun's man page for the --launcher-opts option. I believe the answer may involve the use of the two. It will be something like: srun [...] --launcher-opts=='--envs MY_ENV=myenv' a.out Don > -----Original Message----- > From: Michael Robbert [mailto:[email protected]] > Sent: Tuesday, July 29, 2014 2:34 PM > To: slurm-dev > Subject: [slurm-dev] Pass environmental variables to srun > > Is it possible to pass environmental variables to srun so that they'll be > included in the environment of the executable, but not that of srun? > > What we're trying to do is profile uninstrumented applications with Tau on > BG/Q. From what I gather this is normally done with tau_exec, but that is a > bash shell script that won't run on the BG/Q compute node. There appears to > be a -qsub option for that command that gathers up the needed environmental > variables and passes them to the qsub command line using the --env option. > So, I'm looking for a similar option in srun and can't find one. If there > are other suggestions for how to do this that would be great as well. I've > been told that we've tried setting the needed environmental variables in the > script before srun, but then srun fails to run so it looks like these need > to be set only for the application that we want to profile. > > Thanks, > Mike Robbert > Colorado School of Mines
