Jump to content
  • Announcements

    • admin

      PBS Forum Has Closed   06/12/17

      The PBS Works Support Forum is no longer active.  For PBS community-oriented questions and support, please join the discussion at http://community.pbspro.org.  Any new security advisories related to commercially-licensed products will be posted in the PBS User Area (https://secure.altair.com/UserArea/). 
adiaz

Limit users Hook

Recommended Posts

This is a PBS hook to limit a list of users to a set amount of walltime and number of cpus.


import pbs

UsersToLimit = ( "firstuser", "seconduser", "thirduser" )
MaxWalltime = 3600

if pbs.job.Owner in UsersToLimit:

if pbs.job.Resource_List["ncpus"] != 8:
pbs.RejectJob("You are only allowed to submit 8-processor jobs.")

if pbs.job.Resource_List["walltime"] > MaxWalltime:
pbs.RejectJob("Job walltime rejection message here!")

pbs.AcceptJob()

Share this post


Link to post
Share on other sites

hai adiaz

nice way to manage user limitation on pbs

i was really interested about hooks to manage users jobs

but if one user wants the entire nodes and up to some walltime , when he submits his job, next other users jobs will goes into queue.

how write that hook.

help me

Yadav

Share this post


Link to post
Share on other sites
hai adiaz

nice way to manage user limitation on pbs

i was really interested about hooks to manage users jobs

but if one user wants the entire nodes and up to some walltime ' date=' when he submits his job, next other users jobs will goes into queue.

how write that hook.

help me

Yadav[/quote']

Yadav,

I apologize but I'm not quite sure I understand the issue. The hook below is intended to limit users to prevent them from using up too much of the cluster, though you can technically do that with limits as well in the latest versions of PBS Pro. It might be a good idea to describe the scenario to us in examples of how it behaves now and how you would like it to behave.

Regards,

Chris

Share this post


Link to post
Share on other sites

hai Chris

the main thing is one my user have the job that uses the entire system, if the nodes aren't free, it put in queue. Other users who needs less nodes, their jobs will run with the free Nodes. My aim is to run main job first and other users jobs should taken up after completetion of main job till that other users job must be in a queue. ( I don't want to change schedule type like fifo and priority )

i want to enable the hook when main user submits the job, after completion i will disable hook.

is it possible in hooks?

Share this post


Link to post
Share on other sites

I am not sure you will be able to achieve what you want without changing the scheduling policies. Even in your description of the problem you are trying to solve, you are deviating from FIFO. If you want the big job to run first, and let the smaller jobs fill in around it.. then you need to consider using the job scheduling formula, backfilling, and Top Jobs. You may need to tweak parameters more... I don't know everything about your site..

Scott

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×