[Swift-user] Resuming jobs when script has changed

Mihael Hategan hategan at mcs.anl.gov
Mon May 19 18:24:47 CDT 2014


Here's the swift part. It will only work with absolute paths. It can
probably be modified to only work with relative paths.

type file;

app (file outf) existsApp(string path) {
  existsApp path stdout=@filename(outf);
}

(boolean result) exists(string path) {
  result = readData(existsApp(path));
}

file there <"/bin/bash">;
file notthere <"/bin/notthere">;

tracef("Y %b\n", exists(@filename(there)));
tracef("N %b\n", exists(@filename(notthere)));

And existsApp:
#!/bin/bash

# add leading / since @filename removes it
# this will not work with swift > 0.94
if [ -f "/$1" ]; then
        echo "true"
else
        echo "false"
fi



On Mon, 2014-05-19 at 15:28 -0700, Mihael Hategan wrote:
> On Mon, 2014-05-19 at 22:21 +0000, Bronevetsky, Greg wrote:
> > Thanks, Mihael! I've modified my original code based on your suggestions (new code below) but I'm getting the following error:
> > Could not start execution
> >         Procedure exists is not defined.
> 
> Sorry. That's where your implementation of exists for absolute path
> names goes. I'll send you the relevant code shortly. I'm working on the
> array splitting issue now.
> 
> Mihael
> 
> 
> _______________________________________________
> 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