[Swift-devel] simple parameter test hangs

Michael Wilde wilde at mcs.anl.gov
Thu Oct 4 23:57:02 CDT 2007


-- This program hangs in the same way:
type messagefile;

type file;

type params {
   string x;
   string y;
   file f;
};

(messagefile t) echo ( file p1, file p2, string s1, string s2 ) {
     app {
         echo @p1 @p2 s1 s2 stdout=@filename(t);
     }
}

(messagefile t) pecho (params p ) {
     app {
         echo p.x p.y @p.f stdout=@filename(t);
     }
}

string fn[] = ["f001","f002"];
file   fv[] <array_mapper;files=fn>;

params p;
p.x = "x1111";
p.y = "y2222";
p.f = fv[0];

messagefile outfile <"hello2.txt">;

outfile = pecho(p);

-- 
problem in passing a struct? I'll try to narrow it down.

- mike


On 10/4/07 11:14 PM, Michael Wilde wrote:
> -- the following program hangs (using 0.3):
> 
> type messagefile;
> 
> type params {
>   int x;
>   int y;
> }
> 
> (messagefile t) pecho (params p[] ) {
>     app {
>         echo p[0].x p[0].y stdout=@filename(t);
>     }
> }
> 
> messagefile outfile <"hello2.txt">;
> 
> params z[];
> z[0].x = 111;
> z[0].y = 222;
> 
> outfile = pecho(z);
> 
> -- while this one works:
> 
> type messagefile;
> 
> type params {
>   int x;
>   int y;
> }
> 
> (messagefile t) pecho (params p) {
>     app {
>         echo p.x p.y stdout=@filename(t);
>     }
> }
> 
> messagefile outfile <"hello2.txt">;
> 
> params z;
> z.x = 111;
> z.y = 222;
> 
> outfile = pecho(z);
> 
> -- swift says:
> 
> $ swift t2.swift
> Swift v0.3 r1319 (modified locally)
> 
> RunID: 20071004-2312-mlnzad63
> 
> (and then it hangs)
> 
> -- heres the log:
> $ more t2-20071004-2312-mlnzad63.log
> 2007-10-04 23:12:43,147-0500 INFO  Loader t2.swift: source file is new. 
> Recompiling.
> 2007-10-04 23:12:45,431-0500 INFO  Karajan Validation of XML 
> intermediate file was succ
> essful
> 2007-10-04 23:12:48,744-0500 INFO  unknown Using sites file: 
> /home/wilde/swift/vdsk-0.3
> /bin/../etc/sites.xml
> 2007-10-04 23:12:48,745-0500 INFO  unknown Using tc.data: 
> /home/wilde/swift/vdsk-0.3/bi
> n/../etc/tc.data
> 2007-10-04 23:12:50,769-0500 INFO  unknown Swift v0.3 r1319 (modified 
> locally)
> 
> 2007-10-04 23:12:50,772-0500 INFO  unknown RunID: 20071004-2312-mlnzad63
> $
> 
> -- 
> java doesnt seem to be burning cpu - looks more like a hang than a loop; 
> doesnt seem to be waiting on stdin either, as far as i can tell.
> 
> 
> _______________________________________________
> Swift-devel mailing list
> Swift-devel at ci.uchicago.edu
> http://mail.ci.uchicago.edu/mailman/listinfo/swift-devel
> 
> 



More information about the Swift-devel mailing list