[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HTCondor-users] Jobs on Windows and heterogeneous pool

> I will test your proposition to create a batch... but It's significate
> that I can't submit a single jobs (single submit file) for executing on
> Linux and Windows, no ?

Clearly you can't make a single binary which runs under both Linux and
Windows (you're not attempting to use WINE are you?) and therefore at some
level you are going to have to deal with making your application work on one
or the other.

Condor gives you quite a few choices.

1. You can make multiple versions of your binary, and at runtime use the
$$(OpSys) and $$(Arch) expansions to select the right binary for where the
job is going to run. Details in 

Look for the example which shows
executable = povray.$$(OpSys).$$(Arch)

And as previously described, you could also write a wrapper script which
selects the appropriate executable and does platform-specific

2. Use a Requirements expression so that Linux jobs only run on Linux nodes,
and Windows jobs only run on Windows nodes. Details in the same page.

Note, the default Requirements expression is set as follows:

"Arch and OpSys are set equal to the Arch and OpSys of the submit machine.
In other words: unless you request otherwise, HTCondor will give your job
machines with the same architecture and operating system version as the
machine running condor_submit."

3. Write your application in a universal language such as Python, Ruby or
Perl, and take care to set up those environments and libraries as closely as
possible.  If your application still needs to vary its behaviour dependent
on where it's running, then you can code for that easily within the

You can transfer libraries that your application needs along with the job. 
e.g.  for Python jobs I put the auxilliary .py files into a zip file, then

transfer_input_files = mylib.zip
environment = "PYTHONPATH=mylib.zip"

4. Fire up a virtual machine on each node, and run htcondor *within* the
virtual machine.  In that case, each job executes in an identical
environment (say a particular version of Linux), even if the underlying host
is running something else.

> Windows is really strange

You're telling me!

Installing cygwin will give you a more sane set of command-line tools,
including the bash script.