[Swift-devel] Problem with iterate
Michael Wilde
wilde at mcs.anl.gov
Wed Feb 17 10:56:33 CST 2010
Tibi, while it may not be the most elegant approach, I think you need to put all statements that set the array statePathFiles *inside* the loop, and conditionally execute the setting of element 0 using an if statement.
- Mike
----- "Tiberiu Stef-Praun" <tiberius at ci.uchicago.edu> wrote:
> Hi Guys
>
> I have put together this really simple iteration example, which I
> expected to work (and it used to work in the past):
>
> ==============
> type file;
>
> app (file initOut) initFunc (string inputString){
> echo inputString stdout=@filename(initOut);
> }
>
> app (file catOut) catFunc (file catIn){
> cat @filename(catIn) @filename(catOut);
> }
>
> runLoop(){
>
> file statePathFiles[]<concurrent_mapper; prefix="statePathName.",
> suffix=".mat">;
>
> statePathFiles[0]=initFunc("hello");
>
> iterate it{
> trace(@strcat("Iteration: ",it));
> statePathFiles[it+1]=catFunc(statePathFiles[it]);
> } until (it==0);
> }
>
> runLoop();
> ================
>
> However, I get an error like this:
>
> Running UC Eval
> Could not start execution.
> variable statePathFiles has multiple writers.
>
>
> Please suggest solutions for it .
>
> Thank you
> Tibi
>
>
>
> --
> Tiberiu (Tibi) Stef-Praun, PhD
> Computational Sciences Researcher
> Computation Institute
> 5640 S. Ellis Ave, #405
> University of Chicago
> http://www-unix.mcs.anl.gov/~tiberius/
>
> _______________________________________________
> 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