[Swift-user] Error: Attempted to close nonexistent channel buffers
Mihael Hategan
hategan at mcs.anl.gov
Thu Sep 13 15:22:17 CDT 2007
What version are you using?
That error shows a bug in the Swift implementation, and it should have
been fixed, at least in SVN.
Mihael
On Thu, 2007-09-13 at 14:36 -0400, Allen, M. David wrote:
> 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
> _______________________________________________
> Swift-user mailing list
> Swift-user at ci.uchicago.edu
> http://mail.ci.uchicago.edu/mailman/listinfo/swift-user
More information about the Swift-user
mailing list