struct of structs via ext mapper(was Re: [Swift-user] single structs for ext mapper.)
Allan Espinosa
aespinosa at cs.uchicago.edu
Tue Jul 14 12:45:08 CDT 2009
got it. thanks ben!
now based on this, i tried out a struct of structs. my swift session
(latest on cog svn and swift svn) reports as follows:
RunID: testing
Progress:
Progress: Initializing site shared directory:1 Failed:1
Execution failed:
Mapper failed to map org.griphyn.vdl.mapping.DataNode
identifier tag:benc at ci.uchicago.edu,2008:swift:dataset:20090714-1343-6lzjg014:720000000039
type AmplFilter with no value at dataset=res path=.out (not closed)
my instance_mapper.sh:
#!/bin/bash
while getopts ":i:" options; do
case $options in
i) export instance=$OPTARG ;;
*) exit 1;;
esac
done
echo "expend result/$instance/expend.dat";
echo "limits result/$instance/limits.dat";
echo "price result/$instance/price.dat";
echo "ratio result/$instance/ratio.dat";
echo "solve result/$instance/solve.dat";
echo "ofile result/$instance/stdout";
echo "out.expend_out result/$instance/expend.out";
echo "out.price_out result/$instance/price.out";
echo "out.ratio_out result/$instance/ratio.out";
here is the workflow i was working on:
type Template;
type AmplIn;
type StdOut;
type AmplCmd {
Template temp;
AmplIn mod;
AmplIn process;
AmplIn output;
AmplIn so;
AmplIn tree;
}
type ExpendDat;
type LimitsDat;
type PriceDat;
type RatioDat;
type SolveDat;
type ExpendOut;
type PriceOut;
type RatioOut;
type AmplFilter {
ExpendOut expend_out;
PriceOut price_out;
RatioOut ratio_out;
}
type AmplResult {
ExpendDat expend;
LimitsDat limits;
PriceDat price;
RatioDat ratio;
SolveDat solve;
StdOut ofile;
AmplFilter out;
}
app (AmplResult result) run_ampl (string instanceID, AmplCmd cmd)
{
run_ampl instanceID @filename(cmd.temp)
@filename(cmd.mod) @filename(cmd.process)
@filename(cmd.output) @filename(cmd.so) @filename(cmd.tree)
stdout=@filename(result.ofile);
}
AmplCmd const_cmd <ext;exec="./cmd_mapper.sh">;
int runs[]=[2001:2002];
foreach i in runs {
string instanceID = @strcat("run", i);
AmplResult res <ext;exec="./instance_mapper.sh", i=instanceID>;
res = run_ampl(instanceID, const_cmd);
}
2009/7/11 Ben Clifford <benc at hawaga.org.uk>:
>> How do you use ext mapper for single structs? I used a $.xxx but swift
>> does not recognize that.
>
> Try specifying xxx without the $. on the front.
>
> --
>
>
>
--
Allan M. Espinosa <http://allan.88-mph.net/blog>
PhD student, Computer Science
University of Chicago <http://people.cs.uchicago.edu/~aespinosa>
More information about the Swift-user
mailing list