What does -S -cwd -r -j -l mean when running a python script?

I am trying to run a python script I received from a colleague. At the beginning, it has the following lines:

#$ -S /usr/bin/python
#$ -cwd
#$ -r yes
#$ -j y
#$ -l h_rt=10:00:00
#$ -l arch=lx24-amd64

Apparently, it should be "changed to my local environment." I tried Google search, but I don’t know what any of these commands mean. I assume that he tells my shell some things, but I do not know what they mean in this context.

+4
source share
1 answer

They look as if they qalter the command parameters to represent this as a job in the Sun Grid Engine:

script      "# $",       -C, ,       .

:

-S [[hostname]:]pathname,...
      Specifies the interpreting shell for the job. 

-l resource=value,...
      Launch the job in a Sun Grid Engine queue  meeting  the
      given  resource  request  list.

-j y[es]|n[o]
      Specifies whether or not the standard error  stream  of
      the job is merged into the standard output stream.

 -r y[es]|n[o]
      Identifies the ability of a job to be rerun or not.  If
      the  value of -r is 'yes', the job will be rerun if the
      job was  aborted  without  leaving  a  consistent  exit
      state.

 -cwd 
      Execute the job from  the  current  working  directory.
+3

Source: https://habr.com/ru/post/1541267/


All Articles