[Swift-user] Is there a way to set env variables in swift

Lorenzo Pesce lpesce at uchicago.edu
Wed Aug 31 11:47:42 CDT 2011


Sorry for the question...

it turns out that I did not put ::LINUX after AMD64. I could not figure it out from the error messages or the guides, but with some trial and error that appears to be the issue.

BTW, I can't find a description of the structure of tc.files. 

Don't worry, I am actually reading the manual and tutorial right now... (BTW, the new tutorial is so much better than the last one I tried to read, thanks!)

(of course having to read the tutorial is going to turn off nearly 100% of my users, but luckily for them I will most likely take care of their scripts).



On Aug 31, 2011, at 10:59 AM, Jonathan Monette wrote:

> What is your sites file?  Is there a pool handle in the sites file names pbs?
> 
> On Aug 31, 2011, at 10:57 AM, Lorenzo Pesce wrote:
> 
>> Sometimes one had to ask stupid questions, so I will go ahead and do it. 
>> 
>> This is the script
>> 
>> // file to run the Margic square example from the matlab web site
>> type file;
>> 
>> string MCRPath = "/soft/mcr/v714";
>> 
>> app (file outdata) magicsq (string mcr, int size)
>> {
>> runMagicSquare mcr size stdout=@outdata;
>> }
>> 
>> int matsize[] = [0:23];
>> 
>> file MagicSquares[] <simple_mapper; prefix="magicmat.",suffix=".dat">;
>> 
>> foreach s, i in matsize {
>> MagicSquares[i] = magicsq (MCRPath, s);
>> }
>> 
>> 
>> this is tc
>> 
>> # sitename  transformation path
>> pbs   echo           /bin/echo
>> pbs   cat            /bin/cat
>> pbs   ls             /bin/ls
>> pbs   grep           /bin/grep
>> pbs   sort           /bin/sort
>> pbs   paste          /bin/paste
>> pbs   cp             /bin/cp
>> pbs   touch          /bin/touch
>> pbs   wc             /usr/bin/wc
>> 
>> # custom entries
>> pbs   convert        /home/ketan/ImageMagick-install/bin/convert
>> pbs   script1        /lustre/beagle/ketan/beagle-swift-training-examples/script1.sh
>> pbs   script2        /lustre/beagle/ketan/beagle-swift-training-examples/script2.sh
>> pbs   annotate       /lustre/beagle/ketan/beagle-swift-training-examples/annotate.sh
>> pbs   runMagicSquare /home/lpesce/matlab/bin/run_magicsquare.sh INSTALLED  AMD64  ENV::TMP="/lustre/beagle/lpesce/tmp"
>> 
>> 
>> this is the call:
>> 
>> swift -config cf -sites.file sites.xml -tc.file tc script.swift
>> 
>> This is what I get:
>> 
>> ....
>> 011-08-31 15:49:25,816+0000 INFO  vdl:execute The application "runMagicSquare" is not available in your tc.data catalog
>> Caused by: org.globus.cog.karajan.scheduler.NoSuchResourceException
>> 2011-08-31 15:49:25,825+0000 DEBUG magicsq PROCEDURE_END line=6
>> ....
>> 
>> What am I doing stupidly here?
>> 
>> Thanks!
>> 
>> 
>> 
>> 
>> 
>> On Aug 30, 2011, at 4:22 PM, Michael Wilde wrote:
>> 
>>> Lorenzo,
>>> 
>>> You can set env vars for an application in the tc.data file. Use the "env namespace profile" as described at:
>>> 
>>> http://www.ci.uchicago.edu/swift/guides/trunk/userguide/userguide.html#_env_namespace
>>> 
>>> Like this:
>>> 
>>> beagle myapp /home/joe/bin/myapp  INSTALLED       INTEL32::LINUX  ENV::TMP="/lustre/beagle/joe/tmp"
>>> 
>>> If you need "joe" substituted into the "TMP" env var in the tc file dynamically (as with your example below), you need to do that with your own wrapper script on the client host (before you run the swift command).
>>> 
>>> Alternatively, if you are running locally on Beagle, there may also be an option you can specify in your sites file that will get passed down to the PBS qsub command, to pass the environment vars of the submitting job down to the submitted job, in which case you dont need the ENV::TMP profile in your tc.data file.  David or Justin may be able to clarify whats possible there. (And this should go into the new 0.93 Site Configuration Guide).
>>> 
>>> - Mike
>>> 
>>> ----- Original Message -----
>>>> From: "Lorenzo Pesce" <lpesce at uchicago.edu>
>>>> To: swift-user at ci.uchicago.edu
>>>> Sent: Tuesday, August 30, 2011 2:59:57 PM
>>>> Subject: [Swift-user] Is there a way to set env variables in swift
>>>> Specifically something like
>>>> 
>>>> export TMP=/lustre/beagle/`whoami`/tmp
>>>> 
>>>> Thanks
>>>> 
>>>> Lorenzo
>>>> _______________________________________________
>>>> Swift-user mailing list
>>>> Swift-user at ci.uchicago.edu
>>>> https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-user
>>> 
>>> -- 
>>> Michael Wilde
>>> Computation Institute, University of Chicago
>>> Mathematics and Computer Science Division
>>> Argonne National Laboratory
>>> 
>> 
>> _______________________________________________
>> Swift-user mailing list
>> Swift-user at ci.uchicago.edu
>> https://lists.ci.uchicago.edu/cgi-bin/mailman/listinfo/swift-user
> 




More information about the Swift-user mailing list