Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Objective

Provide the ability to pad a job's resource nodes request (i.e. request additional chunks of resource for the job), so that if some nodes fail, the job can still start. Any left over nodes not needed by the job can be released back to the server.

Interface 1: rjselect job resource

  • Visibility: Public
  • Change Control: Stable
  • Python type: pbs.select
  • Input Format: rjselect="[N:][chunk specification][+[N:]chunk specification]" (same as select spec)
    where N is a multiple of chunks, and chunk specification is of the form:
    "<resource name>=<value>[:<resource name>=<value>...]"
    rjselect can be set in one of the following ways:
    • qsub -l rjselect=[N:][chunk specification][+[N:]chunk specification]
    • qalter -l rjselect=[N:][chunk specification][+[N:]chunk specification]
    • As a PBS directive in a job script:
                   #PBS -l rjselect=[N:][chunk specification][+[N:]chunk_specification]
    • Within a Python hook script, use the pbs.select() type.
                 pbs.event().job.Resource_List["rjselect"] = pbs.select("[N:][chunk specification][+[N:]chunk specification]")
  • Privilege: only root, PBS admin, PBS operator can set the rjselect value
  • Details:
    This is a builtin resource that is used to cause a job to be started reliably. rjselect must be a mirror of the original 'select' request, but with extra chunks added to cause assignment of extra vnodes. When rjselect is set, the schedselect job attribute is set to map to this value instead of the orignal 'select', causing the scheduler to allocate the extra nodes to the job. At the start of the job, before the user's program/job script is executed, any failure of sister nodes are tolerated. But just before the execjob_launch hook (if any) is executed, and also before the user's program/job script is started, the job's assigned nodes are pruned back (take away the failed nodes) to a minimum list, enough to satisfy the original 'select' request.

    When the job is updated, the MS mom will tell the sister moms (via an IM_UPDATE_JOB request) that the nodes mapping has changed. This is needed so that spawning multi node tasks via TM interface continues to work.

  • Normal case:
    • The rjselect value is a mirror of the original select value with the 'N' part of a chunk specification (i.e. [N:][chunk specification][+[N:]chunk specification\) changed to reflect additional chunks.
    • Example, given qsub -l select="ncpus=3:mem=1gb+ncpus=2:mem=2gb+ncpus=1:mem=3gb" where there's 1 chunk of "ncpus=3:mem=1gb" spec, 1 chunk of "ncpus=2:mem=2gb" spec, and 1 chunk of "chpus=1:mem=3gb" spec. an rjselect value can bump up the second chunk to have 2 of 'ncpus=2:mem=2gb" spec and the third chunk to have 2 of "ncpus=1:mem=3gb" spec as follows:    rjselect=ncpus=3:mem=1gb+2:ncpus=2:mem=2gb+2:ncpus=1:mem=3gb
    •   The first chunk assigned is always preserved since that is allocated from the MS host, so there's really no need to bump the number of chunks for the first chunk in the original select request.
  • Log/Error messages:
    1. If 'rjselect' is set by a regular, non-privileged user, then there'll be an error message from qsub, qalter as follows:
                     "not allowed to set 'rjselect' unless PBS operator or manager"
    2. When job's assigned nodes get pruned, mom_logs will show the following info under PBSEVENT_JOB log level::

      ";Job;<jobid>;pruned from exec_vnode=<original value_satisfying_rjselect>"
      ";Job;<jobid>;pruned to exec_node=<new value_mapping_original_select>"
      ";Job;<jobid>;pruned from schedselect=<original schedselect value_satisfying_rjselect>"
      ";Job;<jobid>;pruned to schedselect=<new schedselect value_mapping_original_select>"

    3. When mother superior fails to prune currently assigned chunk resources (which satisfied the rjselect request) into a minimum set that satisfies the original select specification, then the job is requeued, and the following detailed mom_logs message are shown under PBSEVENT_DEBUG log level unless otherwise noted:

      1. "<jobid>;job not started, Retry 3" under PBSEVENT_ERROR log level

      2. "could not satisfy 1st select chunk (<resc1>=<val1> <resc2>=<val2>... <rescN>=valN) with first available chunk (<resc1>=<val1> <resc2>=<val2>...<rescN>=<valN>"  when first chunk from the original select spec could not be satisfied

      3. "could not satisfy the original select chunk (<resc1>=<val1> <resc2>=<val2> ...<rescN>=valN) with first available chunk <resc1>=<val1> <resc2>=<val2>..."  when a secondary (sister) chunk from the original select spec could not be satisfied

      4. "job node_list_fail: node <node_name1>" which shows a job's vnode that is managed by an unhealthy mom

      5. "job node_list: node <node_name1>" which shows a job's vnode managed by a fully functionining mom.

    4. When a sister mom updated its internal nodes info, then mom_logs on the sister host would show the message in PBSEVENT_JOB level:

          ";pbs_mom;Job;<jobid>;updated nodes info"

    5. When mother superior notice that not all acks were received from the sister moms in regards to updating their internal nodes data, then mom_logs would show the    
       PBSEVENT_DEBUG2 message: "NOT all job updates to sister moms completed" Note that eventually, all the nodes would automatically complete updating its info.
    6. if a sister mom receives a TM request but its nodes data have not been updated yet, then mom_logs on the sister host will show under PBSEVENT_JOB log level:
      ""job reliably started but missing updated nodes list. Try spawn() again later." 
      NOTE: The client would get an "error on spawn" message while doing tm_spawn.

  • Examples:

Given a queuejob hook where it sets rjselect to allow another node to be added to the 2nd chunk and third chunk:
% cat qjob.py

import pbs
e=pbs.event()
e.job.Resource_List["rjselect"] = pbs.select("ncpus=3:mem=1gb+2:ncpus=2:mem=2gb+2:ncpus=1:mem=3gb")
# qmgr -c "c h qjob event=queuejob"
# qmgr -c "i h qjob application/x-python default qjob.py"
And a job of the form:
% cat jobr.scr
#PBS -l select="ncpus=3:mem=1gb+ncpus=2:mem=2gb+ncpus=1:mem=3gb"
#PBS -l place=scatter:excl

echo $PBS_NODEFILE
cat $PBS_NODEFILE
echo END
echo "HOSTNAME tests"
echo "pbsdsh -n 0 hostname"
pbsdsh -n 0 hostname
echo "pbsdsh -n 1 hostname"
pbsdsh -n 1 hostname
echo "pbsdsh -n 2 hostname"
pbsdsh -n 2 hostname
echo "PBS_NODEFILE tests"
for host in `cat $PBS_NODEFILE`
do
echo "HOST=$host"
echo "pbs_tmrsh $host hostname"
pbs_tmrsh $host hostname
echo "ssh $host pbs_attach -j $PBS_JOBID hostname"
ssh $host pbs_attach -j $PBS_JOBID hostname
done


Suppose we have 5 nodes: borg (mother superior), federer, lendl, agassi, sampras
When job first starts, it will run on 5 nodes first, as the "rjselect" resource is made known to the scheduler by mapping it to the 'schedselect' value:

% qstat -f 20
Job Id: 20.borg.pbspro.com
...
exec_host = borg/0*3+federer/0*2+lendl/0*2+agassi/0+sampras/0
exec_vnode = (borg:ncpus=3:mem=1048576kb)+(federer:ncpus=2:mem=2097152kb)+(lendl:ncpus=2:mem=2097152kb)+(agassi:ncpus=1:mem=3145728kb)+(sampras:ncpus=1:mem=3145728kb)
Resource_List.mem = 11gb
Resource_List.ncpus = 9
Resource_List.nodect = 5
Resource_List.place = scatter:excl
Resource_List.rjselect = ncpus=3:mem=1gb+2:ncpus=2:mem=2gb+2:ncpus=1:mem=3gb
Resource_List.select = ncpus=3:mem=1gb+ncpus=2:mem=2gb+ncpus1:mem=3gb
schedselect = 1:ncpus=3:mem=1gb+2:ncpus=2:mem=2gb+2:ncpus=1:mem=3gb


Now if say nodes federer and sampras were detected to be unhealthy, then 
a snapshot of the job's output would show the pruned list of nodes:

/var/spool/PBS/aux/20.borg.pbspro.com <-- updated contents of $PBS_NODEFILE
borg.pbspro.com
lendl.pbspro.com
agassi.pbspro.com
END

HOSTNAME tests

pbsdsh -n 0 hostname
borg.pbspro.com
pbsdsh -n 1 hostname
lendl.pbspro.com
pbsdsh -n 2 hostname
agassi.pbspro.com

PBS_NODEFILE tests
HOST=borg.pbspro.com
pbs_tmrsh borg.pbspro.com hostname
borg.pbspro.com
ssh borg.pbspro.com pbs_attach -j 20.borg.pbspro.com hostname
borg.pbspro.com
HOST=lendl.pbspro.com
pbs_tmrsh lendl.pbspro.com hostname
lendl.pbspro.com
ssh lendl.pbspro.com pbs_attach -j 20.borg.pbspro.com hostname
lendl.pbspro.com
HOST=agassi.pbspro.com
pbs_tmrsh agassi.pbspro.com hostname
agassi.pbspro.com
ssh agassi.pbspro.com pbs_attach -j 20.borg.pbspro.com hostname
agassi.pbspro.com


Interface 2: New server accounting record: 's' for the start record of a job that was submitted with the rjselect request

  • Visibility: Public
  • Change Control: Stable
  • Synopsis: When a job was reliably started (had an rjselect value) and its nodes assignment were changed to match the original select spec, then there'll be this accounting record that will reflect the new values to 'exec_vnode', 'exec_host', and Resource_List.
  • Example:

    04/07/2016 17:08:09;s;20.borg.pbspro.com;user=bayucan group=users project=_pbs_project_default jobname=jobr.scr queue=workq ctime=1460063202 qtime=1460063202 etime=1460063202 start=1460063203 exec_host=borg/0*3+lendl/0*2+agassi/0 exec_vnode=(borg:ncpus=3:mem=1048576kb)+(lendl:ncpus=2:mem=2097152kb)+(agassi:ncpus=1:mem=3145728kb) Resource_List.mem=6gb Resource_List.ncpus=6 Resource_List.nodect=3 Resource_List.place=scatter:excl Resource_List.rjselect=ncpus=3:mem=1gb+2:ncpus=2:mem=2gb+2:ncpus=1:mem=3gb Resource_List.select=ncpus=3:mem=1gb+ncpus=2:mem=2gb+ncpus=1:mem=3gb session=0 run_count=1

Interface 3: sister_join_job_alarm mom config option

  • Visibility: Public
  • Change Control: Stable
  • Details:
    This is the number of seconds that mother superior mom will wait to receive acknowledgement from all the sister moms for the IM_JOIN_JOB requests sent, if job is started reliably. When job runs, just before a job officially launches the program, pbs_mom will ignore any errors from sister moms including failed IM_JOIN_JOB requests. pbs_mom will use this value before proceeding to pre-starting the job (calling finish_exec()).
  • Default value: 30 seconds
        To change value, add the following line in mom's config file:
                            $sister_join_job_alarm <# of seconds> 
  • Log/Error messages:
    1. When $sister_join_job_alarm value exceeded for a job, mom_logs shows the PBSEVENT_ADMIN level message: ";Job;<jobid>;join job wait time exceeded"

Interface 4: job_launch_delay mom config option

  • Visibility: Public
  • Change Control: Stable
  • Details:
    This is the number of seconds that a child mom waits on a pipe attached to a parent mom, or vice versa, for information about sister moms assigned to a reliably-started job.There are 3 cases that this happens:
    1.  before prologue hook execution
    2. before execjob_launch hook execution
    3. while waiting for confirmation from main mom that nodes information have been successfully updated and communicated to all the sister moms.
  • Default value: 35 seconds
    To change value, add the following line in mom's config file:
                   $job_launch_delay <number of seconds>
  • Log/Error messages:
    The following messages are logged in PBSEVENT_DEBUG2 level:
    1. mom_logs: ";Job;<jobid>;job reliable startup job_launch_delay=<$job_launch_delay value> secs: before prologue"

    2. mom_logs: ";Job;<jobid>;job reliable startup job_launch_delay=<$job_launch_delay value> secs: before launch"

    3. mom_logs: ";Job;<jobid>;job reliable startup job_launch_delay=<$job_launch_delay value> secs: waiting on job update acks from sister moms"

Interface 5: pbs.event().vnode_list_fail[] hook parameter

  • Visibility: Public
  • Change Control: Stable
  • Details:
    This is a new event parameter for the execjob_prologue and execjob_launch hook. It will contain the list of vnodes and their assigned resources that are managed by unhealthy moms. And one can walk through this list and start offlining the vnodes. For example:

    for vn in e.vnode_list_fail.keys():
        v = e.vnode_list_fail[vn]
        pbs.logmsg(pbs.LOG_DEBUG, "offlining %s" % (vn,))
        v.state = pbs.ND_OFFLINE

  • Log/Error messages:
    1. If an execjob_prologue hook or an execjob_launch hook requested to offline a vnode, server_logs would show the message under PBSEVENT_DEBUG2 level:

      ";Server@borg;Node;<node name>;Updated vnode <node_name>'s attribute state=offline per mom hook request" 


Site Map

Developer Guide Pages


  • No labels