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

Re: [Condor-users] Condor and Python



Nick,

I write a python script which takes too much time to run in my Mac... I therefore turn to Condor for help. I've learned the way to run Matlab script in Condor so I guess running Python should be similar. But I read some posts in the mailing list that Condor doesn't quite support Python...

So anyone can help me on how to submit and run a Python script in Condor?

Python is only not natively supported in Condor's standard universe. If you use vanilla, you will be fine, though. A very simplified example:

#### Python script: hello.py #######

#!/usr/bin/env python
# typically this would be invoked via ./hello.py in a command line

print "Hello world!"


#############################################
#### Condor submit file hello.submit ########

executable = hello.py
universe   = vanilla
output     = hello.out
error      = hello.err
log        = hello.log
# maybe arguments?
## arguments = <arguments your script would typically take >
queue

#############################################

I hope that'll give you an idea on how to do it. Also look at

http://www.cs.wisc.edu/condor/manual/v7.4/2_5Submitting_Job.html

for more submit file attributes and examples.

--
Cathrin Weiss
Condor Project