logo       

RE: Runnig a script after job completion: msg#00039

Subject: RE: Runnig a script after job completion
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

I have done similar things in the past by the following method:

I issue the qsub command in a script. The script then waits for job
completion through a loop that checks qstat for the "C" state (or while
your jobid is still present in the queue). When the job is done, the
main script continues with whatever tests and set-up you need. You could
set all this inside a loop that repeats until your job is converged.
Here is the concept:

# start a loop until convergence
Converged=no
While(converged = no)

   # launch the case and get the job id
   Jobid = qsub my_job
   
   # wait for job to complete
   While(qstat = jobid)
      Sleep 60
   End

   # check for convergence
   Converged = Check_for_convergence()

   # set up next case if not converged
   If(converged = no)
      Set_up_next_run()
   End

End

I hope this helps. Let me know if you need more details in the scripting
part. I kept is generic since I don't know what language you are
scripting in.

Flavio Martins
Senior Engineer
Aerodynamics / CFD
Florida Turbine Technologies Inc.
100 Marquette Road
Suite 110
Jupiter, FL 33458-7101
Phone: (561) 427-6261
Fax: (561) 427-6191
- -----Original Message-----
From: torqueusers-bounces@xxxxxxxxxxxxxxxx
[mailto:torqueusers-bounces@xxxxxxxxxxxxxxxx] On Behalf Of Chaitanya
Krishna
Sent: Thursday, October 11, 2007 3:45 PM
To: torqueusers@xxxxxxxxxxxxxxxx
Subject: [torqueusers] Runnig a script after job completion

Hello all,

I have been searching for a simple solution to my problem but havent
been ablt to find any till now.

I tried the archives too. May be my search terms weren't good enough!!

I want to run a shell script after a job that I submit using qsub is
over. Is this possible? If so how?

To elaborate on the question. I submit a job using qsub, then I need
to check the output to see if the calculation has converged. If it
hasn't converged I need to copy the outputfiles that I have at present
and then continue the job using another qsub command. Is this
possible?

In a nut shell whenever the job submitted using qsub is finished in
should trigger a shell script.

Thanks in advance,
Chaitanya.
TU Delft
_______________________________________________
torqueusers mailing list
torqueusers@xxxxxxxxxxxxxxxx
http://www.supercluster.org/mailman/listinfo/torqueusers

-----BEGIN PGP SIGNATURE-----
Version: PGP Universal 2.6.1
Charset: us-ascii

wsBVAwUBRw+dqjxaeRbmFE+LAQj4wQf+O/5cIVUI9EEp5iemLpGaOfN+5HpOzwGR
u4vIEz+6tzQjXvVYUbYLV7FsJaDd5Tnt0+w6X8B5K8M0BNi/gNWk71bLH9zXZhcz
YGPTGPlQ6Vo9XQre5NWijoT0FQ8hRGW589usfKFZmUDT0c7H84ym/BG6eWZoQiPH
dBZJgLDaJc7nHuopAYHwgTfbyyBJyvXT79Bnt8l1vIaVBa3wAbZcECTsTWsRN1Pk
+QeyK0Nak/HvDKRFu0lvC47KtUTcDspOMdPR8HNv8KrzDggDTKns68zECahJthC4
DWxLRyUW9JitTerfZ60zf/DFikVBHaeKKRKvpsY5rqH3sMM9qhkzrg==
=Gv6y
-----END PGP SIGNATURE-----


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
qnx.openqnx.dev...    politics.lenini...    audio.emagic.ex...    tex.texinfo.gen...    handhelds.linux...    ietf.sipping/20...    lang.erlang.gen...    cygwin.talk/200...    yellowdog.gener...    mozilla.devel.l...    xfree86.newbie/...    openbsd.ports/2...    db.oracle.devel...    kde.kalyxo.deve...    user-groups.lin...    bbc.cvs/2003-04...    gnu.libtool.bug...    redhat.k12osn/2...    emulators.wine....    freebsd.devel.d...    search.xapian.g...    java.izpack.use...    network.mrtg.us...    windows.total-c...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe