[Swift-devel] cache already contains error

Ketan Maheshwari ketancmaheshwari at gmail.com
Mon Apr 1 17:49:36 CDT 2013


Hi,

I am running into the "cache already contains" error when using a nested
loop with file mappers. Here is a simple reproduction of the issue with a
nested loop variant of catsn.swift:

type file;
app (file o) cat (file i){
  cat @i stdout=@o;
}

#file out[];
#file out[]<concurrent_mapper; location="outdir",
prefix="f.",suffix=".out">;
file out[]<simple_mapper; location="outdir", prefix="f.",suffix=".out">;

foreach i in [0:1] {
  foreach j in [0:1]{
    file data<"data.txt">;
    out[j] = cat(data);
  }
}

It runs into the cache error after completing few tasks successfully:
$ swift catsn.swift
Swift trunk swift-r6410 cog-r3648

RunID: 20130401-1745-7khkyrqc
Progress:  time: Mon, 01 Apr 2013 17:45:59 -0500
Progress:  time: Mon, 01 Apr 2013 17:46:00 -0500  Selecting site:1
 Active:1  Finished successfully:2
Execution failed:
Exception in cat:
    Arguments: [data.txt]
    Host: localhost
    Directory: catsn-20130401-1745-7khkyrqc/jobs/y/cat-yzf9fg7l
Caused by:
The cache already contains
localhost:catsn-20130401-1745-7khkyrqc/shared/outdir/f.0000.out.
cat, catsn.swift, line 14

The cause, I think is that the nested loop triggers the same series of
random sequences in mappers code which collides. Both, the simple and the
concurrent mappers fail with same message.

Does anyone know of a workaround?

Thanks,
-- 
Ketan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/swift-devel/attachments/20130401/8a97ef5f/attachment.html>


More information about the Swift-devel mailing list