comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: limiting the CPU time allowed
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: limiting the CPU time allowed [message #23878] Tue, 27 February 2001 02:09
Nigel Wade is currently offline  Nigel Wade
Messages: 286
Registered: March 1998
Senior Member
>>>> >>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<

On 26/02/01, 22:17:59, "A. Roubicek" <aro@cdc.noaa.gov> wrote regarding
limiting the CPU time allowed:


> Hi all,

> I'm trying to find a way to limit the CPU time an IDL process can
> take (on unix, running from cron), to prevent clugging the system
> with runaway processes. Any leads would be greatly appreciated!

> Thank you,
> A.R.

As Craig mentioned you can set per-process CPU limits (for sh/ksh the
command is ulimit, BTW).

Alternatively you might consider installing a batch system such as GNQS
(which should be free, it's covered by the GNU GPL) and then set up batch
queues with time limits to process your IDL (and anything else you want
to
have processed in the background).

Of course, a batch system may be total overkill for your requirements;
I just thought I'd throw the suggestion into the discussion.

--
-----------------------------------------------------------
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : nmw@ion.le.ac.uk
Phone : +44 (0)116 2523568, Fax : +44 (0)116 2523555
Re: limiting the CPU time allowed [message #23885 is a reply to message #23878] Mon, 26 February 2001 17:37 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
"A. Roubicek" <aro@cdc.noaa.gov> writes:
> Hi JD, thank you for your reply,
> I am sorry, I was not clear. I mean that "if the job takes more than
> certain amount of CPU time, it should be killed". Is there any way to do
> it from within IDL? Some applications have an option in the calling
> command to set this kind of limit.

If you are running under Unix you can set a CPU processing limit.
Under csh, you would do "limit cputime nnn" where nnn is the number of
CPU seconds. You would do this in the shell *before* invoking your
IDL script. Hopefully you can use this, or else the equivalent in
your shell.

Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
Re: limiting the CPU time allowed [message #23895 is a reply to message #23885] Mon, 26 February 2001 15:02 Go to previous message
Liam E. Gumley is currently offline  Liam E. Gumley
Messages: 378
Registered: January 2000
Senior Member
"A. Roubicek" wrote:
>
> Hi JD, thank you for your reply,
> I am sorry, I was not clear. I mean that "if the job takes more than
> certain amount of CPU time, it should be killed". Is there any way to do
> it from within IDL? Some applications have an option in the calling
> command to set this kind of limit.
>
> On Mon, 26 Feb 2001, JD Smith wrote:
>
>> "A. Roubicek" wrote:
>>>
>>> Hi all,
>>>
>>> I'm trying to find a way to limit the CPU time an IDL process can
>>> take (on unix, running from cron), to prevent clugging the system
>>> with runaway processes. Any leads would be greatly appreciated!
>>>
>>> Thank you,
>>> A.R.
>>
>> nice 15 idl "domyjob.pro"
>>
>> jd

If runaway IDL processes are begin created by cron, then killing them
after the fact would seem to be treating the symptom and not the
disease. Do the IDL scripts created by your cron job have adequate error
handling? Does each IDL script invoked by cron have an EXIT statement at
the end?

To kill runaway jobs, you might be able to parse the output of 'ps',
e.g.,

IDL> spawn, 'ps -ef | fgrep idl | sort', result

Don't kill the IDL license manager though...

Cheers,
Liam.
http://cimss.ssec.wisc.edu/~gumley
Re: limiting the CPU time allowed [message #23899 is a reply to message #23895] Mon, 26 February 2001 14:36 Go to previous message
A. Roubicek is currently offline  A. Roubicek
Messages: 2
Registered: February 2001
Junior Member
Hi JD, thank you for your reply,
I am sorry, I was not clear. I mean that "if the job takes more than
certain amount of CPU time, it should be killed". Is there any way to do
it from within IDL? Some applications have an option in the calling
command to set this kind of limit.


On Mon, 26 Feb 2001, JD Smith wrote:

> "A. Roubicek" wrote:
>>
>> Hi all,
>>
>> I'm trying to find a way to limit the CPU time an IDL process can
>> take (on unix, running from cron), to prevent clugging the system
>> with runaway processes. Any leads would be greatly appreciated!
>>
>> Thank you,
>> A.R.
>
> nice 15 idl "domyjob.pro"
>
> jd
>
>
Re: limiting the CPU time allowed [message #23900 is a reply to message #23899] Mon, 26 February 2001 14:30 Go to previous message
John-David T. Smith is currently offline  John-David T. Smith
Messages: 384
Registered: January 2000
Senior Member
"A. Roubicek" wrote:
>
> Hi all,
>
> I'm trying to find a way to limit the CPU time an IDL process can
> take (on unix, running from cron), to prevent clugging the system
> with runaway processes. Any leads would be greatly appreciated!
>
> Thank you,
> A.R.

nice 15 idl "domyjob.pro"

jd
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDL programmers required
Next Topic: Congrid problem

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 11:42:41 PDT 2025

Total time taken to generate the page: 0.00516 seconds