[Swift-devel] Q about wrapper.sh

Zhao Zhang zhaozhang at uchicago.edu
Thu Oct 30 17:01:22 CDT 2008


Hi,

I got a problem when running swift and falkon together on BGP. Here is 
the description.
If there are multiple input files from swift, the command falkon would 
receive is
shared/wrapper.sh thetaworker-9ypial1j -jobdir 9/y -e 
/home/falkon/economics/bin/runWorker-bgp.sh -out stdout.txt -err 
stderr.txt -i -d iofiles -if 
*iofiles/DataInit1.txt|iofiles/ApproxData1.txt* -of  -k  -a 1 
iofiles/DataInit1.txt iofiles/ApproxData1.txt
the delimiter is "|"

When the following code in wrapper tried to parse "-if", it only take 
one file out, what kind of change do I need to change? Thanks

best wishes
zhangzhao

getarg() {
        NAME=$1
        shift
        VALUE=""
        SHIFTCOUNT=0
        if [ "$1" == "$NAME" ]; then
                shift
                let "SHIFTCOUNT=$SHIFTCOUNT+1"
                while [ "${1:0:1}" != "-" ] && [ "$#" != "0" ]; do
                        VALUE="$VALUE $1"
                        shift
                        let "SHIFTCOUNT=$SHIFTCOUNT+1"
                done
        else
                fail 254 "Missing $NAME argument"
        fi
        VALUE="${VALUE:1}"
}




More information about the Swift-devel mailing list