Thursday, December 06, 2007

Condor Birdbath Compromises

I have not been able to find the right incantation for using the "initialdir" attribute with the Birdbath web service. I'm trying to do the equivalent of the following submission script:

universe = vanilla
executable = /path/to/my/bin/a.out
output = theOutput
error = theError
log = theLog
arguments = 10 21
environment = "PATH=/path/to/my/bin/:/bin/:/usr/bin"
initialdir = /path/to/my/data
should_transfer_files = IF_NEEDED
when_to_transfer_output = ON_EXIT

Looking at spool/job.queue.log, you will see that this attribute's proper name is "Iwd". However, the classad structure (using Birdbath java helper classes) like below didn't work:

//Create a classad for the job.
ClassAdStructAttr[] extraAttributes =
new ClassAdStructAttr("Out", ClassAdAttrType.value3,
new ClassAdStructAttr("Err", ClassAdAttrType.value3,
new ClassAdStructAttr("Log", ClassAdAttrType.value3,
new ClassAdStructAttr("Environment", ClassAdAttrType.value2,
new ClassAdStructAttr("ShouldTransferFiles", ClassAdAttrType.value2,
new ClassAdStructAttr("WhenToTransferFiles", ClassAdAttrType.value2,
new ClassAdStructAttr("Iwd", ClassAdAttrType.value3,

The Iwd parameter is set correctly in the logs, but the executables can't find the input files in the initial directory correctly. My workaround solution was to uploading all the data files to the

File[] files={ new File("/local/data/path/file1.dat"),
new File("/local/data/path/file1.dat") };

And then run the usual way, except specify the files

xact.submit(clusterId, jobId, userName, universeType,
executable,arguments,"(TRUE)", extraAttributes, files);

This will put the data (input and output) in condor's spool directory.

No comments: