[Swift-user] Difficulty forming commandline

Ketan Maheshwari ketancmaheshwari at gmail.com
Mon Oct 11 07:09:52 CDT 2010


Hello,

I have difficulty in forming a commandline that can be executed from within
Swift.

I have a commandline in the following form:

Image_Crop   -dir "Repository to process"     -xmin  someint   -ymin
someint -xmax someint  -ymax someint


I place it in Swiftscript as follows:

type messagefile;

(messagefile mf) image_crop (string somedir, int xmin, int ymin, int xmax,
int ymax) {
  app {
     Image_Crop " -dir " somedir " -xmin " xmin " -ymin " ymin " -xmax "
xmax  " -ymax " ymax stdout=@filename(mf);
  }
}


I call it as follows:

messagefile icoutfile <"icout.txt">;

icoutfile = image_crop
("/home/ketan/MpiReg/dataold/sorted/g_8b1e46671d5733/",20,71,142,169);


However, the call does not go through as expected. I suppose, Swift creates
a wrapper around this call and adds more parameters and switches as shown in
the log file inside its directory (*.d) as follows :

Image_Crop-txp9800k -jobdir t -e /home/ketan/MpiReg/bin/Image_Crop -out
icout.txt -err stderr.txt -i -d -if -of icout.txt -k -status files -a -dir
/home/ketan/MpiReg/dataold/sorted/g_8b1e46671d5733/ -xmin 20 -ymin 71 -xmax
142 -ymax 169


It seems the binary Image_Crop does not go along well with the additional
switches and parameters generated by the wrapper.

Any suggestions to approach this?


Regards,

Ketan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/swift-user/attachments/20101011/63172c46/attachment.html>


More information about the Swift-user mailing list