[Swift-devel] iterate fails

Ketan Maheshwari ketancmaheshwari at gmail.com
Mon Sep 16 10:49:07 CDT 2013


Hi,

I am trying a catsn example with foreach replaced by iterate as follows:

===
type file;

app (file o) cat (file i) {
  cat @i stdout=@o;
}
file out[]<simple_mapper; location="outdir", prefix="f.",suffix=".out">;

string d=@arg("data");

#foreach j in [1:1000] {
iterate j {
 file data<single_file_mapper; file=d>;
 out[j] = cat(data);
} until (j==3);
===

The run fails with error message as follows:
$ swift -tc.file tc -config cf -sites.file sites.xml catsn.swift
-data=data.txt
Swift trunk swift-r7065 (swift modified locally) cog-r3782
RunID: 20130916-1045-tldyyexe
Progress:  time: Mon, 16 Sep 2013 10:45:41 -0500

Execution failed:
org.griphyn.vdl.mapping.InvalidPathException: Array index '[2]' not found
for out of size 2
    swift:getFieldSubscript @ catsn, line: 93
Caused by: org.griphyn.vdl.mapping.InvalidPathException: Array index '[2]'
not found for out of size 2

Any suggestions?

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


More information about the Swift-devel mailing list