[Swift-devel] array_mapper hangs
wilde at mcs.anl.gov
wilde at mcs.anl.gov
Sat Mar 20 10:19:03 CDT 2010
Also, to clarify: Ben is right in pointing out that this part of my earlier reply:
"Ie, at the point at which it wants a value for physD[0] and physD[1]..." is irrelevant. The problem, I think, is the fact that a return value was never set in maptest().
So I *think* that Swift is behaving correctly in your original script, Sarah, and in all the tests I've tried based on it.
- Mike
----- wilde at mcs.anl.gov wrote:
> I think the script is hanging because its trying to return physD[]
> without ever setting the return array parameter physD (or any member
> of it):
>
> app (file physD[]) maptest(){
> > touch @filename(physD[0]) @filename(physD[1]);
> > }
>
> The following examples don't use @filename in maptest. am3.swift
> hangs, am4.swift works. The difference is that am4 puts a value in f[]
> and am3 does not.
>
> ::::::::::::::
> am3.swift
> ::::::::::::::
> type file;
>
> app (file physD[]) maptest() {
> echo "hi";
> }
>
> file f[];
>
> f = maptest();
> ::::::::::::::
> am4.swift
> ::::::::::::::
> type file;
>
> app (file o) echo (string s) { echo s stdout=@o; }
>
> (file physD[]) maptest() {
> physD[0] = echo("hi");
> }
>
> file f[];
>
> f = maptest();
> $
>
>
> ----- "Ben Clifford" <benc at hawaga.org.uk> wrote:
>
> > > The script is hanging because its trying to access the values of
> the
> >
> > > array object f[], which is never set. Ie, at the point at which
> it
> > wants
> > > a value for physD[0] and physD[1], physD itself - even though it
> has
> >
> > > been *mapped* - has never been given a *value.
> >
> > Sarah's script doesn't ask for the values of physD[i]. It asks for
> the
> >
> > @filename of them. That 'should' work for anything that has been
> > mapped
> > even if it doesn't have a value.
> >
> > --
>
> --
> Michael Wilde
> Computation Institute, University of Chicago
> Mathematics and Computer Science Division
> Argonne National Laboratory
>
> _______________________________________________
> Swift-devel mailing list
> Swift-devel at ci.uchicago.edu
> http://mail.ci.uchicago.edu/mailman/listinfo/swift-devel
--
Michael Wilde
Computation Institute, University of Chicago
Mathematics and Computer Science Division
Argonne National Laboratory
More information about the Swift-devel
mailing list