Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python: PBS submission, what happens if I change script?

Tags:

python

qsub

pbs

I have a script job.bin for executing a code in python (pythoncode.py) on a cluster, submitting jobs via qsub. In job.bin:

cd /path/to/my/python/code
python pythoncode.py

What happens if:

a) while pythoncode.py is running, I change its content

b) while pythoncode.py is held on queue, I change its content

pythoncode.py contains some parameters that I can vary. In situations a) and b), will a change of any of these parameters affect the already begun or queuing run?

like image 585
johnhenry Avatar asked Feb 13 '18 10:02

johnhenry


People also ask

What is PBS in script?

PBS stands for Portable Bash Script. A PBS Script is used to submit jobs (computation user wants to be done) to the scheduler. These jobs can then be handled by the scheduler and require no further input from the user, who often simply logs out after succesful submission.

What is Walltime in PBS?

Walltime. Walltime is specified through the option -l walltime=HH:MM:SS with HH:MM:SS the walltime that you expect to need for the job. (The format DD:HH:MM:SS can also be used when the walltime exceeds 1 day, and MM:SS or simply SS are also viable options for very short jobs).

What is PBS in Python?

PBS is a unique subprocess wrapper that maps your system programs to. Python functions dynamically. PBS helps you write shell scripts in. Python by giving you the good features of Bash (easy command calling, easy.


1 Answers

  1. When you change job.bin after you submitted your job nothing happens because the submission file is copied to a temporary storage by qsub.
  2. When you change pythoncode.py while job is held in the queue the new version of the file will be run as the job script is read after the job state is changed to running by the scheduler.
  3. When you change pythoncode.py while the job is running nothing happens as the python interpreter has already started and read the script into its own memory.

Pro tip. Admin can change the job.bin file held in the temporary storage while the job is held in the queue so that the new version of job.bin will run.

like image 175
Dmitri Chubarov Avatar answered Oct 05 '22 14:10

Dmitri Chubarov