[Swift-user] Error: Attempted to close nonexistent channel buffers
Allen, M. David
dmallen at mitre.org
Thu Sep 13 13:36:36 CDT 2007
Hello,
I'm just getting started with Swift, and trying to program a fairly
trivial sample to get started.
My swiftscript fails with the message:
"Execution failed:
grep started
Attempted to close nonexistent channel buffers"
Can anyone point me to the documentation that describes such errors?
This is referring to a spot in my code that is executing a very vanilla
grep operation. My input file is just 14 lines long, and this error
consistently happens towards the end of the overall workflow execution.
The code:
type blog {
string name;
string feedURL;
}
type file { }
(file headlines) getHeadlines(blog b) {
app {
feeder @b.feedURL stdout=@filename(headlines);
}
}
(file results[]) processBlogs(blog blogs[]) {
foreach blog el, index in blogs {
results[index] = getHeadlines( el ) ;
}
}
(string matches) findSingleMatch(file input, string searchTerm) {
app {
grep "-i" searchTerm @filename(input) stdout=@matches;
}
}
(file matches) findMatches(file inputs[], string searchTerm) {
string final;
foreach input, index in inputs {
string intermed = findSingleMatch(input, searchTerm);
final = strcat(final, intermed);
}
matches = dumpString(final);
}
(int retVal) debug(string m) {
app {
echo m ;
}
}
(file t) dumpString(string m) {
app {
echo m stdout=@filename(t);
}
}
blog blogs[] <csv_mapper; file="blogs.csv", delim=",", header="true">;
file output[] <simple_mapper;
prefix="output/blogHeadlines",suffix=".txt">;
file final <simple_mapper; prefix="output/result", suffix=".txt">;
output = processBlogs(blogs);
final = findMatches(output, "ARG 0");
Any help would be greatly appreciated.
--
M. David Allen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/swift-user/attachments/20070913/295750df/attachment.html>
More information about the Swift-user
mailing list