[Swift-devel] struct mapping code that formerly worked now fails

wilde at mcs.anl.gov wilde at mcs.anl.gov
Sun Aug 22 23:48:49 CDT 2010


Glen Hocky has a script that used to work but now fails under recent trunk revisions.

Ive reproduced the failure in a simplified script:

maptest2.swift is:

#---

type file;

type mystruct {
    file logfile;
}

app (mystruct o) cat2log (file i)
{
  cat @i stdout=@filename(o.logfile);
}

int nmodels=1;
mystruct modelOut[] <ext;exec="mystruct.map",n=nmodels>;

file data<"data.txt">;

foreach j in [0:nmodels-1] {
  modelOut[j] = cat2log(data);
}

# ---

mystruct.map is:

#!/bin/bash                                                                                                                           

nummodels=$2
outdir=outdir

for i in `seq 0 $(($nummodels-1))`;do
    echo [$i].logfile $outdir/$i.log
done

---

Under a recent trunk this fails with:

e$ swift maptest2.swift

swift-r3490 (swift modified locally) cog-r2829 (cog modified locally)

RunID: 20100823-0045-bmpsl452
Progress:
Execution failed:
        org.griphyn.vdl.mapping.InvalidPathException: Invalid path (..logfile) for org.griphyn.vdl.mapping.DataNode identifier tag:benc at ci.uchicago.edu,2008:swift:dataset:20100823-0045-r1xhema5:720000000009 type mystruct with no value at dataset=modelOut path=[0] (not closed)
e$ 

---

Under an older Swift it works:


e$ swift maptest2.swift

swift-r2974 cog-r2407

RunID: 20100823-0047-j504gggc
Progress:
Final status:  Finished successfully:1
e$ 

Mihael, do you know what is causing this?  Can you reproduce the error using the script and mapper above?

- Mike




More information about the Swift-devel mailing list