[torqueusers] submitting a job, then modify script and resubmit

Mahmood Naderan nt_mahmood at yahoo.com
Mon Feb 13 08:06:50 MST 2012


ok thanks.
Its my job then

 
// Naderan *Mahmood;


----- Original Message -----
From: Axel Kohlmeyer <akohlmey at cmm.chem.upenn.edu>
To: Mahmood Naderan <nt_mahmood at yahoo.com>
Cc: torque cluster <torqueusers at supercluster.org>
Sent: Monday, February 13, 2012 6:31 PM
Subject: Re: [torqueusers] submitting a job, then modify script and resubmit

On Mon, Feb 13, 2012 at 9:56 AM, Mahmood Naderan <nt_mahmood at yahoo.com> wrote:
> That sounds bad...
> Why it doesn't copy all necessary files for a job?

how should it know?

remember the script interpreter for the batch script
can be *anything* that reads a text file. it doesn't
have to be a shell program. and the arguments and
commands in the script can be computed on the
fly. how to know in advance.
if you want consistent behavior, you have to
make the copies yourself, e.g. create a subdirectory
for each submission and copy stuff in there from
a wrapper script to qsub. you are the only person
to set this up, since you know which files will be
needed by a job.

only the submit script is required.

axel.


>
>
> // Naderan *Mahmood;
>
>
> ----- Original Message -----
> From: Axel Kohlmeyer <akohlmey at cmm.chem.upenn.edu>
> To: Mahmood Naderan <nt_mahmood at yahoo.com>
> Cc: torque cluster <torqueusers at supercluster.org>
> Sent: Monday, February 13, 2012 6:24 PM
> Subject: Re: [torqueusers] submitting a job, then modify script and resubmit
>
> On Mon, Feb 13, 2012 at 9:48 AM, Mahmood Naderan <nt_mahmood at yahoo.com> wrote:
>> Thanks for your answer. I got that.
>>
>> Another question is about modification of other config files. Does qsub copy all files or it does only copy the script?
>
> it only copies the script. that is all it knows about.
>
> axel.
>
>> In this case, I have a scr.sh which is:
>> #PBS ...
>> ./run config.ini
>>
>>
>> the config.ini file looks like:
>> exe = bin1
>> args = 8
>>
>> The first qsub is:
>> qsub scr.sh
>>
>> After submitting that, I modify the config.ini to
>>
>> exe = bin1
>> args = 64
>>
>> Then I resubmit scr.sh again
>>
>> qsub scr.sh
>>
>> Please note that the scr.sh doesn't change in this case. However the config.ini is modified.
>>
>>
>> Does your answer apply to this case?
>>
>> Regards
>> // Naderan *Mahmood;
>>
>>
>> ________________________________
>> From: Axel Kohlmeyer <akohlmey at cmm.chem.upenn.edu>
>> To: Mahmood Naderan <nt_mahmood at yahoo.com>; Torque Users Mailing List <torqueusers at supercluster.org>
>> Sent: Monday, February 13, 2012 5:33 PM
>> Subject: Re: [torqueusers] submitting a job, then modify script and resubmit
>>
>> On Mon, Feb 13, 2012 at 8:15 AM, Mahmood Naderan <nt_mahmood at yahoo.com> wrote:
>>> Dear all,
>>> 1- Assume I have a script (named scr.sh) like this:
>>>
>>> #PBS -N run1
>>> #PBS -V
>>> #PBS -l nodes=1
>>> #PBS -q long
>>> #PBS -o /home/mahmood/run1.out
>>> #PBS -j oe
>>> cd $PBS_O_WORKDIR
>>> ./run1 config1
>>>
>>> 2- Then I run
>>> qsub scr.sh
>>>
>>> 3- the jobs state is 'Q' since all cores are busy. That is fine...
>>> 4- while run1 is in 'Q', I reopen scr.sh and change it to
>>>
>>> #PBS -N run2
>>> #PBS -V
>>> #PBS -l nodes=1
>>> #PBS -q long
>>> #PBS -o /home/mahmood/run2.out
>>> #PBS -j oe
>>> cd $PBS_O_WORKDIR
>>> ./run1 config2
>>>
>>>
>>> 5- Then I run
>>> qsub scr.sh
>>>
>>> 6- this job also is in 'Q' until some cores become free.
>>> 7- After some hours, two cores become free and both "run1" and "run2" change to 'R'.
>>>
>>> The question is, when run1 change to 'R', will it read its own scr.sh (which contain "./run config1")?
>>> Since the latest modification to scr.sh belongs to run2, I wonder what happen to run1?
>>
>> qsub makes a copy of the submit script and the batch system will
>> execute that. that is the only way how it can consistently feeding
>> submission from standard input.
>>
>> axel.
>>
>>
>>> You may say that I can test that myself to see the result, but since they stay in 'Q' for long time, I want to be sure about what I am doing.
>>> Hope that I state the problem correctly.
>>>
>>>
>>> // Naderan *Mahmood;
>>> _______________________________________________
>>> torqueusers mailing list
>>> torqueusers at supercluster.org
>>> http://www.supercluster.org/mailman/listinfo/torqueusers
>>
>>
>>
>> --
>> Dr. Axel Kohlmeyer    akohlmey at gmail.com
>> http://sites.google.com/site/akohlmey/
>>
>> Institute for Computational Molecular Science
>> Temple University, Philadelphia PA, USA.
>
>
>
> --
> Dr. Axel Kohlmeyer    akohlmey at gmail.com
> http://sites.google.com/site/akohlmey/
>
> Institute for Computational Molecular Science
> Temple University, Philadelphia PA, USA.
>



-- 
Dr. Axel Kohlmeyer    akohlmey at gmail.com
http://sites.google.com/site/akohlmey/

Institute for Computational Molecular Science
Temple University, Philadelphia PA, USA.



More information about the torqueusers mailing list