[Swift-devel] code to test for file existence in swift

Michael Wilde wilde at mcs.anl.gov
Fri Apr 25 10:49:14 CDT 2008


Ah - this kind of situation is different: it should be covered by the 
Swift retry mechanism, I think. You should be able to restart the 
workflows after (most) failures and it should pick up where it left off, 
which is I think what you want in this case, right?

In other words, this kind of file existence checking should require no 
code. The state of the workflow - based on the file mapping that were 
done when the workflow still ran - should be retained in the Swift 
recovery log.

See:

http://www.ci.uchicago.edu/swift/guides/userguide.php#restart

At one point I think there was a bug in Swift recovery.  Mihael or Ben, 
do you know what the state of this feature is?

- Mike


On 4/25/08 10:37 AM, Mike Kubal wrote:
> I was running a job that did not finish due to my grid-proxy expiring (I 
> should have set it longer in the first place) that iterates through 670 
> input files. I wanted to add some code to my swift script that would 
> check to see if the corresponding output file existed so as not to 
> resubmit when iterating through the input files.
> 
> if(results_file exist){ print("done already")}
> else{run job(input_file)}
> 
> */Mihael Hategan <hategan at mcs.anl.gov>/* wrote:
> 
>     Can you provide more details about the scenario?
>     In principle, no such facilities exist (or should exist) in swift.
> 
>     Mihael
> 
>     On Fri, 2008-04-25 at 08:08 -0700, Mike Kubal wrote:
>      > Could someone suggest swift code for testing for the
>      > existence of a file?
>      >
>      > Thanks,
>      >
>      > Mike
>      >
>      >
>      >
>     ____________________________________________________________________________________
>      > Be a better friend, newshound, and
>      > know-it-all with Yahoo! Mobile. Try it now.
>     http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>      > _______________________________________________
>      > Swift-devel mailing list
>      > Swift-devel at ci.uchicago.edu
>      > http://mail.ci.uchicago.edu/mailman/listinfo/swift-devel
>      >
> 
>     _______________________________________________
>     Swift-devel mailing list
>     Swift-devel at ci.uchicago.edu
>     http://mail.ci.uchicago.edu/mailman/listinfo/swift-devel
> 
> 
> ------------------------------------------------------------------------
> Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try 
> it now. 
> <http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 
>  >
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Swift-devel mailing list
> Swift-devel at ci.uchicago.edu
> http://mail.ci.uchicago.edu/mailman/listinfo/swift-devel



More information about the Swift-devel mailing list