[Swift-devel] hanging problem

Jonathan Monette jon.monette at gmail.com
Sun Mar 27 20:05:51 CDT 2011


Yea.  I use the foreach loop because I need to iterate through the diff_imgs
array and run an app on each of the entries.  The loop runs and completes
and all the files in stats are mapped and have data they are just not being
closed.  So is there a better way of accomplishing what I am doing in Swift?


On Sun, Mar 27, 2011 at 8:02 PM, Daniel S. Katz <dsk at ci.uchicago.edu> wrote:

> Can you suggest how this should be done?
>
> Dan
>
>
> On Mar 27, 2011, at 8:00 PM, Mihael Hategan wrote:
>
> > Well, you seem to be iterating over an array that you are trying to
> > build inside the iteration, and you are not doing a fold. It's somewhat
> > coincidental that it works, probably because stats is mapped by a static
> > mapper and you don't actually use the value ("img").
> >
> > Though I see what you are trying to do. And it should either work or
> > fail nicely. So I'll see if I can make a simple test case out of this.
> >
> > Mihael
> >
> > On Sun, 2011-03-27 at 19:43 -0500, Jonathan Monette wrote:
> >> stats is an array mapped to several files in a directory of metadata
> >> generated by mFitplane.  I need to pass all these files and another
> >> metadata file to mConcatFit which is the app after this foreach loop.
> >> I need to wait for the foreach loop to be complete before mConcatFit
> >> can run.
> >>
> >> On Sun, Mar 27, 2011 at 7:41 PM, Mihael Hategan <hategan at mcs.anl.gov>
> >> wrote:
> >>        You have:
> >>        foreach img, i in stats
> >>           {
> >>               stats[ i ] = mFitplane ( diff_imgs[i] );
> >>           }
> >>
> >>
> >>        What is it that you are trying to do there?
> >>
> >>        Mihael
> >>
> >>
> >>        On Sun, 2011-03-27 at 15:54 -0500, Jonathan Monette wrote:
> >>> here is my entire script
> >>>
> >>> On Sun, Mar 27, 2011 at 3:45 PM, Mihael Hategan
> >>        <hategan at mcs.anl.gov>
> >>> wrote:
> >>>        On Wed, 2011-03-23 at 16:31 -0500, Jonathan Monette
> >>        wrote:
> >>>
> >>>> How can the array be closed but all of its values
> >>        not be?
> >>>
> >>>
> >>>        The array being closed simply means that its size is
> >>        known,
> >>>        but not
> >>>        necessarily that its elements have all been
> >>        computed.
> >>>
> >>>        I'll look at the log, but I'd also like the entire
> >>        script.
> >>>
> >>>        Mihael
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> --
> >>> Any intelligent fool can make things bigger and more
> >>        complex... It
> >>> takes a touch of genius - and a lot of courage to move in
> >>        the opposite
> >>> direction.
> >>> - Albert Einstein
> >>>
> >>>
> >>
> >>
> >>
> >>
> >>
> >>
> >> --
> >> Any intelligent fool can make things bigger and more complex... It
> >> takes a touch of genius - and a lot of courage to move in the opposite
> >> direction.
> >> - Albert Einstein
> >>
> >>
> >
> >
> > _______________________________________________
> > Swift-devel mailing list
> > Swift-devel at ci.uchicago.edu
> > http://mail.ci.uchicago.edu/mailman/listinfo/swift-devel
>
> --
> Daniel S. Katz
> University of Chicago
> (773) 834-7186 (voice)
> (773) 834-3700 (fax)
> d.katz at ieee.org or dsk at ci.uchicago.edu
> http://www.ci.uchicago.edu/~dsk/
>
>
>
>


-- 
Any intelligent fool can make things bigger and more complex... It takes a
touch of genius - and a lot of courage to move in the opposite direction.
- Albert Einstein
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/swift-devel/attachments/20110327/a346f0e2/attachment.html>


More information about the Swift-devel mailing list