<div dir="ltr">Hi Mihael,<div><br></div><div>I am trying to pass an environment variable at the qsub level.</div><div><br></div><div>In the Swift source, CobalExecutor.java, I find the following code as part of qsub commandline builder:</div><div><br></div><div><div>Collection<String> names = getSpec().getEnvironmentVariableNames();</div><div> if (names != null && names.size() > 0) {</div><div> result.add("--env");</div><div> StringBuffer sb = new StringBuffer();</div><div> Iterator<String> i = names.iterator();</div><div> while (i.hasNext()) {</div><div> String name = i.next();</div><div> sb.append(name);</div><div> sb.append('=');</div><div> sb.append(quote(getSpec().getEnvironmentVariable(name)));</div><div> if (i.hasNext()) {</div><div> sb.append(':');</div><div> }</div><div> }</div><div> result.add(sb.toString());</div></div><div><br></div><div>I am wondering how to add my environment variable to this list.</div><div><br></div><div>--</div><div>Ketan</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 8, 2015 at 1:18 PM, Mihael Hategan <span dir="ltr"><<a href="mailto:hategan@mcs.anl.gov" target="_blank">hategan@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="im HOEnZb">Are you trying to pass an environment variable to an app or to the<br>
worker?<br>
<br>
Mihael<br>
<br>
On Fri, 2015-05-08 at 13:00 -0500, Ketan Maheshwari wrote:<br>
</span><div class="HOEnZb"><div class="h5">> Hi,<br>
><br>
> Question about the cobalt provider with 0.96: how to set an environment so<br>
> that it ends up on the qsub line:<br>
><br>
> qsub --env MY_ENV=true ...<br>
><br>
> I tried to add the env.MY_ENV line under site.cluster<br>
> and site.cluster.execution.options but to no avail.<br>
><br>
> From logs of my current runs, I see that the qsub line contains one<br>
> environment variable:<br>
><br>
> qsub --env WORKER_LOGGING_LEVEL=NONE --mode script --proccount 32 ...<br>
><br>
> but I do not see it being specified anywhere in my conf file.<br>
><br>
> Thanks for any suggestions.<br>
><br>
> --<br>
> Ketan<br>
</div></div><div class="HOEnZb"><div class="h5">> _______________________________________________<br>
> Swift-devel mailing list<br>
> <a href="mailto:Swift-devel@ci.uchicago.edu">Swift-devel@ci.uchicago.edu</a><br>
> <a href="https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-devel" target="_blank">https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-devel</a><br>
<br>
<br>
_______________________________________________<br>
Swift-devel mailing list<br>
<a href="mailto:Swift-devel@ci.uchicago.edu">Swift-devel@ci.uchicago.edu</a><br>
<a href="https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-devel" target="_blank">https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-devel</a><br>
</div></div></blockquote></div><br></div>