qsub for a Python script

1.2k views Asked by At

I would like to submit Python scripts directly on a computing cluster using SGE. I have a test script:

#!/usr/bin/python
print "hello"

I have run chmod +x hello.py such that on the front end:

./hello.py
>> hello

However, when I run qsub -o out.log hello.py, the following files are generated:

out.log:

Warning: no access to tty (Bad file descriptor).
Thus no job control in this shell.

hello.py.e707589:

print: Command not found.

It seems to me that qsub is nonetheless trying to interpret the script as a bash script, even despite the header. How can I fix this?

0

There are 0 answers